Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
52619 | AK2022071323 | 折纸 | C++ | 运行出错 | 0 | 0 MS | 92 KB | 1314 | 2022-07-19 14:48:35 |
using namespace std; int m,k,a,b,c,n,t,s,q[1100],h[1000010],l[1000010],r[1000010]; vector <int> v[2000010]; int f(int x,int y) { if(!(x & 1)) { int sum = 0,ret = 0; for(int i = x; i <= y; i++) { sum += q[i]; if((i - x) & 1) { ret ^= sum; sum = 0; } } ret ^= sum; return ret; } else { int ret = q[x],yh = 0; for(int i = x + 1; i <= y; i++) { yh ^= q[i]; if(!((i - x) & 1)) { ret += yh; yh = 0; } } ret += yh; return ret; } } int main() { scanf("%d",&k); scanf("%d%d%d",&m,&l[0],&r[0]); scanf("%d%d%d",&a,&b,&c); n = (1 << k); for(int i = 0; i < n; i++) v[i].push_back(i); for(int i = k - 1; i >= 0; i--) { t = (1 << i); s = (1 << (k - i - 1)); for(int j = 1; j <= t; j++) for(int w = s - 1; w >= 0; w--) v[t - j].push_back(v[t + j - 1][w]); } for(int i = 0; i < n; i++) q[i] = v[0][i]; for(int i = 1; i <= m; i++) { h[i] = ((h[i - 1] ^ l[i - 1] ^ r[i - 1] ^ f(l[i - 1],r[i - 1])) + c) % 1000000007; l[i] = ((l[i - 1] ^ a ^ h[i]) % (n + 1)) % n; r[i] = ((r[i - 1] ^ b ^ h[i]) % (n - l[i])) + l[i]; } printf("%d\n",h[m]); return 0; }
10
10000 809 865
130107079 153947790 255966245
666848080
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
10
10000 221 589
944701168 700442398 34355465
569397272
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
10
10000 748 864
576976173 1012785087 1034132512
346876515
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
10
10000 672 735
855580724 912781044 930582883
842538541
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
10
10000 352 987
759685970 722338485 66556010
567796788
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
10
10000 604 805
677357038 860847257 747694127
938919769
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
1000000 182605240 496893766
10828878 77998171 468620744
270539961
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
1000000 798921729 970972784
298375657 552414599 69210941
698971634
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
1000000 491213052 1008655253
540364455 997694235 670662177
887104232
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
1000000 108738693 190977597
26562285 77934324 348953146
305028636
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
1000000 90539574 484282508
916685152 756467271 673043636
202744167
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
1000000 672880439 739455141
95448583 928304612 736721335
164967263
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
50000000 475777295 502870417
446463283 42834374 194548939
47732999
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
50000000 422537916 557945373
9382247 694931685 628139571
925648973
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
50000000 564376791 879716358
458420174 248579038 786106855
741334962
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
50000000 682606890 971060503
963521982 257985514 742036810
374758311
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
50000000 983188913 1034983559
530563472 487474957 408735852
313821591
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
50000000 918227907 1052700900
409718924 46289347 235728955
643391700
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
50000000 122695447 485993694
302465122 895594059 992795421
935836267
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0
30
50000000 225844539 748435489
351184253 510865610 201694729
39228514
Runtime Error:Segmentation fault
exit code: 0, checker exit code: 0