摘要: d[900] = 1180945252 d[899] = 451945252 #include int main(){ int d[902]={0}, x; int t, i; for(i=1; i<902; i++) d[i] = d[i-1] + i * i * i; sc... 阅读全文
posted @ 2015-09-21 16:08 StevenLuke 阅读(114) 评论(0) 推荐(0)
摘要: 这种方法不知道哪里错了,待查。 #include int main(){ int t, n, i, x; double d; scanf("%d", &t); while(t--){ scanf("%lf%d", &d, &n); for(i=0; i#include... 阅读全文
posted @ 2015-09-21 15:32 StevenLuke 阅读(131) 评论(0) 推荐(0)
摘要: #include int main(){ int t; double u, v, w, l; scanf("%d", &t); while(t--){ scanf("%lf%lf%lf%lf", &u, &v, &w, &l); printf("%.3lf\n", l... 阅读全文
posted @ 2015-09-21 15:12 StevenLuke 阅读(93) 评论(0) 推荐(0)
摘要: #include int main(){ int n, w, d, sum, ans, t; while(~scanf("%d%d%d%d", &n, &w, &d, &t)){ sum = n * (n-1) / 2 * w; ans = (sum - t) / d; ... 阅读全文
posted @ 2015-09-20 19:48 StevenLuke 阅读(112) 评论(0) 推荐(0)
摘要: 这样的水题做他干嘛,我还提交5次才ac,马丹,我是来读英语来了 #include int main(){ int n; long a, b, c; scanf("%d", &n); while(n--){ scanf("%ld%ld%ld", &a, &b, &c); if(b-c>a) p... 阅读全文
posted @ 2015-09-20 19:26 StevenLuke 阅读(116) 评论(0) 推荐(0)
摘要: #include int main(){ int t, i, sum, num, n; scanf("%d", &t); while(t--){ scanf("%d", &n); sum = 0; for(i=0; i<n; i++){ ... 阅读全文
posted @ 2015-09-20 19:14 StevenLuke 阅读(150) 评论(0) 推荐(0)
摘要: min需要写为1000,写成0不行。fuck,#include #include int main(){ int n, max, min, i, num ,sum; while(~scanf("%d", &n)){ if(n==0) break; max = 0; ... 阅读全文
posted @ 2015-09-20 19:06 StevenLuke 阅读(126) 评论(0) 推荐(0)
摘要: #include #include using namespace std;int main(){ int n, d[10001], i=0; while(~scanf("%d", &n)){ for(i=0; i<n; i++) scanf("%d", &d[i]); sor... 阅读全文
posted @ 2015-09-19 19:38 StevenLuke 阅读(145) 评论(0) 推荐(0)
摘要: 想用map做,无奈不怎么会map,我也是几天前才看了map。自己写的错误代码如下。 #include #include #include using namespace std;int main() { map char_count; string s; int i; ... 阅读全文
posted @ 2015-09-18 13:25 StevenLuke 阅读(146) 评论(0) 推荐(0)
摘要: 开始用递归总是超时,后来发现每 7 一循环,不过要根据 f [3] 把0, 1, 2, 3, 4, 5, 6的次序改了,但这样我写不出来,后来百度说49一循环,解决了。 #include using namespace std;int main(){ int a,b; long in... 阅读全文
posted @ 2015-09-18 12:45 StevenLuke 阅读(147) 评论(0) 推荐(0)