上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 56 下一页
摘要: #include #include #include using namespace std; int main() { string s; while(cin >> s) { char smax = s[0]; int len = s.length(); for(int i = 1; i smax) { smax = s[i]; } } ... 阅读全文
posted @ 2019-07-30 16:25 青衫客36 阅读(101) 评论(0) 推荐(0) 编辑
摘要: #include #include int main() { char a[55]; int n, len; scanf("%d", &n); getchar(); // 吃掉n后面的回车键 while(n --) { gets(a); len = strlen(a); int length = 0; if(a[0] >= '0' && a[0] = '0'... 阅读全文
posted @ 2019-07-30 16:01 青衫客36 阅读(651) 评论(0) 推荐(0) 编辑
摘要: 在循环中每个学生的sum初始都要清零(第20行代码) Wrong Answer(第20行, 结构体中的sum没有初始化)->Accepted 阅读全文
posted @ 2019-07-29 22:40 青衫客36 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Runtime Error 就是ACM中常说的RE,出现这种错误往往是数组越界造成的,你应该检查数组开的是否足够大,或者在程序处理过程中是否存在数组下表越界的情况。 阅读全文
posted @ 2019-07-29 21:17 青衫客36 阅读(749) 评论(0) 推荐(0) 编辑
摘要: 经常会遇到这种令人抓狂的情况 自己编写的程序在codeblocks上怎么编译运行都能输出正确结果 然而一提交,却无法Accept,很多时候显示的并不是Wrong Answer 而是比WrongAnswer更令人绝望的 。 在oj中,给定的Time Limit 是1000MS,出现Time Limit 阅读全文
posted @ 2019-07-29 21:15 青衫客36 阅读(5310) 评论(0) 推荐(0) 编辑
摘要: Time Limit Exceeded(没有加!=EOF)->Runtime Error(数组开小了) (ACCESS_VIOLATION)->Accepted 阅读全文
posted @ 2019-07-29 21:14 青衫客36 阅读(118) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int salary[6] = {100, 50, 10, 5, 2, 1}; int main() { int n; while(scanf("%d", &n) && n != 0) { int a[n]; int sum = 0; for(int i = 0; i <... 阅读全文
posted @ 2019-07-29 18:14 青衫客36 阅读(187) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; int main() { int n; while(scanf("%d", &n) && n != 0) { set s; int a[n], b[n]; for(int i = 0; i ()); for(int i... 阅读全文
posted @ 2019-07-29 17:38 青衫客36 阅读(339) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { int n, m; while(scanf("%d %d", &n, &m) && (n != 0 || m != 0)) { int a[n]; a[0] = m; for(int i = 1; i <= n; ++ i) { scanf("%d",... 阅读全文
posted @ 2019-07-29 17:21 青衫客36 阅读(101) 评论(0) 推荐(0) 编辑
摘要: #include int f(int n) { if(n == 0 || n == 1) return 1; if(n == 2) return 2; return f(n - 1) + f(n - 3); } int main() { int n; while(scanf("%d", &n) && n != 0) { printf("%d\n", f(n)); ... 阅读全文
posted @ 2019-07-29 11:09 青衫客36 阅读(105) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 56 下一页