- 博客(9)
- 收藏
- 关注
原创 UVa 10812 Beat the Spread!
#include #include #include #include #include using namespace std;int main(){ int n; int s, d; scanf("%d", &n); while (n-- > 0) { scanf("%d%d", &s, &d); if (s < d || (s + d) & 1) {
2014-05-29 22:44:54 464
原创 UVa 541 Error Correction
#include #include #include #include #include using namespace std;bool bmp[101][101];int main(){ int n; int tmp; int colNum; int rowNum; int col; int row; scanf("%d", &n); while (n != 0
2014-05-29 22:33:36 581
原创 UVa 10137 The Trip
#include #include #include using namespace std;vector PT;void solve(int n,int average){ int res=0; int res1=0; int res2=0; for(int i=0;i<n;i++) { // data=(PT[i]+0.001
2014-05-13 19:54:00 428
原创 UVa 706 LCD Display
#include #include #include #include #include using namespace std;char LCD[10][5][3]={{{' ','-',' '},{'|',' ','|'},{' ',' ',' '},{'|',' ','|'},{' ','-',' '}},//0 {{' ',
2014-05-13 06:09:33 367
原创 UVa 10189 Minesweeper
#include #include using namespace std;bool field[102][102];int getNum(int m,int n){ return field[m-1][n-1]+field[m-1][n]+field[m-1][n+1] +field[m][n-1]+field[m][n+1] +fiel
2014-05-12 22:32:49 246
原创 UVa 100 The 3n + 1 problem
#include #include using namespace std;int dp[1000001];int getMCL(int n){ int newN=0; if(n%2==0) newN=n>>1; else newN=n*3+1; if(n>1000000) return 1+getMCL(newN); else if(dp[n]=
2014-05-12 21:41:35 388
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人