UVa Online Judge
文章平均质量分 77
darce
这个作者很懒,什么都没留下…
展开
-
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 阅读 · 0 评论 -
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 阅读 · 0 评论 -
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 阅读 · 0 评论 -
UVa 10267 Graphical Editor
注意填充颜色判断,避免无限递归。原创 2014-05-13 23:34:20 · 344 阅读 · 0 评论 -
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 阅读 · 0 评论 -
UVa 539 The Settlers of Catan
调试后第一次就AC,难得!原创 2014-05-23 23:29:15 · 411 阅读 · 0 评论 -
UVa 1585 Score
注意输入最后一行可能没有回车换行,原创 2014-05-24 00:07:54 · 723 阅读 · 0 评论 -
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 阅读 · 0 评论 -
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 阅读 · 0 评论