- 博客(5)
- 收藏
- 关注
原创 UVa 102 Ecological Bin Packing
UVa 102 Ecological Bin Packing c++只学了一点就开始做题的后果就是代码特别幼稚。。 #include #include #include #include using namespace std; //暴力枚举各种情况找到最小值 int main() { int bin[3][3], min, sum;
2013-09-11 19:12:21 437
原创 UVa 100 The 3n + 1 problem
UVa 100 The 3n + 1 problem #include #include #include using namespace std; int solve(int i, int cnt) { if (i == 1) return cnt; else if (i % 2) return solve(3 * i + 1, cnt + 1); else return
2013-09-09 21:28:18 405
原创 POJ 2260 Error Correction
POJ 2260 Error Correction #include #include using namespace std; const int maxn = 110; int mat[maxn][maxn]; int main() { int n, row, col, cnt, sum, flag; //row,col记录要改变的位置坐标 while ((scanf("
2013-09-08 22:29:22 353
原创 POJ 1068 Parencodings
POJ 1068 Parencodings #include #include using namespace std; const int maxn = 41; int lr[maxn],rl[maxn],r[maxn],ans[maxn];//记录每个括号左侧的右括号数;右侧的左括号数;右括号的位置;答案 int main(){ int cas,n,num,cnt; scanf("%
2013-09-08 20:48:28 376
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人