Task: | Chessboard |
Sender: | Lieska |
Submission time: | 2019-02-16 15:19:56 +0200 |
Language: | C++ |
Status: | READY |
Result: | 70 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 8 |
#2 | ACCEPTED | 8 |
#3 | ACCEPTED | 15 |
#4 | ACCEPTED | 16 |
#5 | ACCEPTED | 23 |
#6 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.02 s | 1, 2, 3, 4, 5, 6 | details |
#2 | ACCEPTED | 0.02 s | 3, 4, 5, 6 | details |
#3 | ACCEPTED | 0.01 s | 6 | details |
#4 | ACCEPTED | 0.02 s | 1, 3, 4, 5, 6 | details |
#5 | ACCEPTED | 0.03 s | 1, 3, 4, 5, 6 | details |
#6 | ACCEPTED | 0.02 s | 1, 3, 4, 5, 6 | details |
#7 | ACCEPTED | 0.02 s | 1, 2, 3, 4, 5, 6 | details |
#8 | ACCEPTED | 0.01 s | 1, 3, 4, 5, 6 | details |
#9 | ACCEPTED | 0.01 s | 1, 3, 4, 5, 6 | details |
#10 | ACCEPTED | 0.02 s | 1, 3, 4, 5, 6 | details |
#11 | ACCEPTED | 0.11 s | 2, 5, 6 | details |
#12 | ACCEPTED | 0.05 s | 2, 5, 6 | details |
#13 | ACCEPTED | 0.08 s | 2, 5, 6 | details |
#14 | ACCEPTED | 0.08 s | 2, 5, 6 | details |
#15 | ACCEPTED | 0.10 s | 2, 5, 6 | details |
#16 | ACCEPTED | 0.07 s | 2, 5, 6 | details |
#17 | ACCEPTED | 0.03 s | 2, 5, 6 | details |
#18 | ACCEPTED | 0.08 s | 2, 5, 6 | details |
#19 | ACCEPTED | 0.15 s | 2, 5, 6 | details |
#20 | ACCEPTED | 0.09 s | 2, 5, 6 | details |
#21 | ACCEPTED | 0.01 s | 3, 4, 5, 6 | details |
#22 | ACCEPTED | 0.02 s | 3, 4, 5, 6 | details |
#23 | ACCEPTED | 0.02 s | 3, 4, 5, 6 | details |
#24 | ACCEPTED | 0.02 s | 3, 4, 5, 6 | details |
#25 | ACCEPTED | 0.02 s | 3, 4, 5, 6 | details |
#26 | ACCEPTED | 0.02 s | 3, 4, 5, 6 | details |
#27 | ACCEPTED | 0.03 s | 3, 4, 5, 6 | details |
#28 | ACCEPTED | 0.02 s | 3, 4, 5, 6 | details |
#29 | ACCEPTED | 0.01 s | 3, 4, 5, 6 | details |
#30 | ACCEPTED | 0.02 s | 2, 3, 4, 5, 6 | details |
#31 | ACCEPTED | 0.02 s | 3, 4, 5, 6 | details |
#32 | ACCEPTED | 0.02 s | 2, 3, 4, 5, 6 | details |
#33 | ACCEPTED | 0.01 s | 3, 4, 5, 6 | details |
#34 | ACCEPTED | 0.02 s | 3, 4, 5, 6 | details |
#35 | ACCEPTED | 0.03 s | 3, 4, 5, 6 | details |
#36 | ACCEPTED | 0.05 s | 4, 5, 6 | details |
#37 | ACCEPTED | 0.11 s | 2, 4, 5, 6 | details |
#38 | ACCEPTED | 0.14 s | 4, 5, 6 | details |
#39 | ACCEPTED | 0.24 s | 4, 5, 6 | details |
#40 | ACCEPTED | 0.26 s | 4, 5, 6 | details |
#41 | ACCEPTED | 0.12 s | 2, 4, 5, 6 | details |
#42 | ACCEPTED | 0.03 s | 4, 5, 6 | details |
#43 | ACCEPTED | 0.09 s | 4, 5, 6 | details |
#44 | ACCEPTED | 0.13 s | 4, 5, 6 | details |
#45 | ACCEPTED | 0.04 s | 4, 5, 6 | details |
#46 | ACCEPTED | 0.09 s | 4, 5, 6 | details |
#47 | ACCEPTED | 0.11 s | 4, 5, 6 | details |
#48 | ACCEPTED | 0.13 s | 4, 5, 6 | details |
#49 | ACCEPTED | 0.06 s | 2, 4, 5, 6 | details |
#50 | ACCEPTED | 0.02 s | 4, 5, 6 | details |
#51 | ACCEPTED | 0.23 s | 5, 6 | details |
#52 | ACCEPTED | 0.17 s | 5, 6 | details |
#53 | ACCEPTED | 0.18 s | 5, 6 | details |
#54 | ACCEPTED | 0.16 s | 5, 6 | details |
#55 | ACCEPTED | 0.17 s | 2, 5, 6 | details |
#56 | ACCEPTED | 0.26 s | 5, 6 | details |
#57 | ACCEPTED | 0.14 s | 2, 5, 6 | details |
#58 | ACCEPTED | 0.17 s | 5, 6 | details |
#59 | ACCEPTED | 0.15 s | 5, 6 | details |
#60 | ACCEPTED | 0.73 s | 5, 6 | details |
#61 | ACCEPTED | 0.78 s | 5, 6 | details |
#62 | ACCEPTED | 0.73 s | 5, 6 | details |
#63 | ACCEPTED | 0.78 s | 5, 6 | details |
#64 | ACCEPTED | 0.72 s | 5, 6 | details |
#65 | ACCEPTED | 0.82 s | 5, 6 | details |
#66 | ACCEPTED | 0.70 s | 5, 6 | details |
#67 | WRONG ANSWER | 0.95 s | 6 | details |
#68 | WRONG ANSWER | 0.95 s | 6 | details |
#69 | WRONG ANSWER | 0.81 s | 6 | details |
#70 | WRONG ANSWER | 0.85 s | 6 | details |
#71 | WRONG ANSWER | 0.89 s | 6 | details |
#72 | WRONG ANSWER | 0.86 s | 6 | details |
#73 | WRONG ANSWER | 0.87 s | 6 | details |
#74 | WRONG ANSWER | 0.94 s | 6 | details |
#75 | WRONG ANSWER | 0.88 s | 6 | details |
#76 | WRONG ANSWER | 0.95 s | 6 | details |
#77 | WRONG ANSWER | 0.27 s | 6 | details |
#78 | WRONG ANSWER | 0.16 s | 6 | details |
#79 | WRONG ANSWER | 0.22 s | 6 | details |
#80 | WRONG ANSWER | 0.23 s | 6 | details |
#81 | WRONG ANSWER | 0.22 s | 6 | details |
#82 | WRONG ANSWER | 0.21 s | 6 | details |
#83 | WRONG ANSWER | 0.19 s | 6 | details |
#84 | WRONG ANSWER | 0.62 s | 6 | details |
#85 | WRONG ANSWER | 0.99 s | 6 | details |
#86 | WRONG ANSWER | 0.03 s | 6 | details |
#87 | WRONG ANSWER | 0.02 s | 6 | details |
#88 | WRONG ANSWER | 0.99 s | 6 | details |
#89 | WRONG ANSWER | 0.22 s | 6 | details |
#90 | WRONG ANSWER | 0.02 s | 6 | details |
Code
#include <bits/stdc++.h> using namespace std; int main(){ typedef long long ll; ll n, k, a, b, c, d, A=0, b1=0, c1=0, d1=0, e1=0, f1=0, g1=0, h, m, v1, v2, w1, w2, b2=0, c2=0, d2=0, e2=0, f2=0, g2=0, p=1e12; cin >> n >> k; ll t[100001][5]; for (int i=1; i<=k; ++i) { cin >> a >> b >> c >> d; t[i][1]=a; t[i][2]=b; t[i][3]=c; t[i][4]=d; A+=(c-a+1)*(d-b+1); } a=2; m=n; while (a<=m){ while (m%a==0){ if (b1==0 || b1==a){ b1=a; b2++; } else if (c1==0 || c1==a){ c1=a; c2++; } else if (d1==0 || d1==a){ d1=a; d2++; } else if (e1==0 || e1==a){ e1=a; e2++; } else if (f1==0 || f1==a){ f1=a; f2++; } else if (g1==0 || g1==a){ g1=a; g2++; } m/=a; } a++; } for (int i2=0; i2<=b2; ++i2){ for (int i3=0; i3<=c2; ++i3){ for (int i4=0; i4<=d2; ++i4){ for (int i5=0; i5<=e2; ++i5){ for (int i6=0; i6<=f2; ++i6){ for (int i7=0; i7<=g2; ++i7){ a=1; h=0; while (h<i2) { a*=b1; h++; } h=0; while (h<i3) { a*=c1; h++; } h=0; while (h<i4) { a*=d1; h++; } h=0; while (h<i5) { a*=e1; h++; } h=0; while (h<i6) { a*=f1; h++; } h=0; while (h<i7) { a*=g1; h++; } if (a<n){ m=0; for (int i=1; i<=k; ++i){ if ((t[i][1]-1)/a==(t[i][3]-1)/a && (t[i][2]-1)/a==(t[i][4]-1)/a){ if (((t[i][1]-1)/a+(t[i][2]-1)/a)%2==1) m+=(t[i][4]-t[i][2]+1)*(t[i][3]-t[i][1]+1); } else if ((t[i][1]-1)/a==(t[i][3]-1)/a){ if ((t[i][2]-1)%a==0) v2=t[i][2]; else v2=((t[i][2]-1)/a+1)*a; if (t[i][4]%a==0) w2=t[i][4]; else w2=t[i][4]/a*a; if (w2>v2){ if ((w2-v2+1)%(2*a)==0) { m+=(w2-v2+1)*(t[i][3]-t[i][1]+1)/2; } else if (((t[i][1]-1)/a+(v2-1)/a)%2==1) { m+=(w2-v2+1+a)*(t[i][3]-t[i][1]+1)/2; } else { m+=(w2-v2+1-a)*(t[i][3]-t[i][1]+1)/2; } } if (v2>t[i][2]){ if (((t[i][1]-1)/a+(t[i][2]-1)/a)%2==1) m+=(v2-t[i][2])*(t[i][3]-t[i][1]+1); } if (t[i][4]>w2){ if (((t[i][3]-1)/a+(t[i][4]-1)/a)%2==1) m+=(t[i][4]-w2)*(t[i][3]-t[i][1]+1); } } else if ((t[i][2]-1)/a==(t[i][4]-1)/a){ if ((t[i][1]-1)%a==0) v1=t[i][1]; else v1=((t[i][1]-1)/a+1)*a; if (t[i][3]%a==0) w1=t[i][3]; else w1=t[i][3]/a*a; if (w1>v1){ if ((w1-v1+1)%(2*a)==0) m+=(w1-v1+1)*(t[i][4]-t[i][2]+1)/2; else if (((v1-1)/a+(t[i][2]-1)/a)%2==1) m+=(w1-v1+1+a)*(t[i][4]-t[i][2]+1)/2; else m+=(w1-v1+1-a)*(t[i][4]-t[i][2]+1)/2; } if (v1>t[i][1]){ if (((t[i][1]-1)/a+(t[i][2]-1)/a)%2==1) m+=(v1-t[i][1])*(t[i][4]-t[i][2]+1); } if (t[i][3]>w1){ if (((t[i][3]-1)/a+(t[i][4]-1)/a)%2==1) m+=(t[i][3]-w1)*(t[i][4]-t[i][2]+1); } } else { if ((t[i][1]-1)%a==0) v1=t[i][1]; else v1=((t[i][1]-1)/a+1)*a; if ((t[i][2]-1)%a==0) v2=t[i][2]; else v2=((t[i][2]-1)/a+1)*a; if (t[i][3]%a==0) w1=t[i][3]; else w1=t[i][3]/a*a; if (t[i][4]%a==0) w2=t[i][4]; else w2=t[i][4]/a*a; if (w1>=v1 && w2>=v2){ if ((w1-v1+1)%(2*a)==0 || (w2-v2+1)%(2*a)==0) m+=(w1-v1+1)*(w2-v2+1)/2; else if (((v1-1)/a+(v2-1)/a)%2==0) m+=((w1-v1+1)*(w2-v2+1)-a*a)/2; else m+=((w1-v1+1)*(w2-v2+1)+a*a)/2; } if (v1>t[i][1] && w2>=v2){ if ((w2-v2+1)%(2*a)==0) m+=(v1-t[i][1])*(w2-v2+1)/2; else if (((v1-1)/a+(v2-1)/a)%2==0) m+=((v1-t[i][1])*(w2-v2+1)+a*(v1-t[i][1]))/2; else m+=((v1-t[i][1])*(w2-v2+1)-a*(v1-t[i][1]))/2; } if (t[i][3]>w1 && w2>=v2){ if ((w2-v2+1)%(2*a)==0) m+=(t[i][3]-w1)*(w2-v2+1)/2; else if ((w1/a+(v2-1)/a)%2==1) m+=((t[i][3]-w1)*(w2-v2+1)+a*(t[i][3]-w1))/2; else m+=((t[i][3]-w1)*(w2-v2+1)-a*(t[i][3]-w1))/2; } if (t[i][4]>w2 && w1>=v1){ if ((w1-v1+1)%(2*a)==0) m+=(t[i][4]-w2)*(w1-v1+1)/2; else if ((w2/a+(v1-1)/a)%2==1) m+=((t[i][4]-w2)*(w1-v1+1)+a*(t[i][4]-w2))/2; else m+=((t[i][4]-w2)*(w1-v1+1)-a*(t[i][4]-w2))/2; } if (v2>t[i][2] && w1>=v1){ if ((w1-v1+1)%(2*a)==0) m+=(v2-t[i][2])*(w1-v1+1)/2; else if (((v1-1)/a+(v2-1)/a)%2==0) m+=((v2-t[i][2])*(w1-v1+1)+a*(v2-t[i][2]))/2; else m+=((v2-t[i][2])*(w1-v1+1)-a*(v2-t[i][2]))/2; } if (v2>t[i][2] && v1>t[i][1]){ if ((w1-v1+1)%(2*a)==1) m+=(v1-t[i][1])*(v2-t[i][2]); } if (t[i][3]>w1 && t[i][2]>v2){ if ((w1/a+(v2-1)/a)%2==0) m+=(t[i][2]-v2)*(t[i][3]-w1); } if (v1>t[i][1] && t[i][4]>w2){ if ((w2/a+(v1-1)/a)%2==0) m+=(t[i][4]-w2)*(v1-t[i][1]); } if (t[i][3]>w1 && t[i][4]>w2){ if ((w1/a+w2/a)%2==1) m+=(t[i][3]-w1)*(t[i][4]-w2); } } } if (n%(2*a)==0) m+=n*n/2-A+m; else m+=(n*n+a*a)/2-A+m; if (m<p) p=m; m*=-1; m+=n*n; if (m<p) p=m; } } } } } } } cout << p; return 0; }
Test details
Test 1
Group: 1, 2, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
2 0 |
correct output |
---|
2 |
user output |
---|
2 |
Test 2
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
6 8
3 3 3 3 1 2 1 2 3 4 3 4 5 5 5 5 ... |
correct output |
---|
14 |
user output |
---|
14 |
Test 3
Group: 6
Verdict: ACCEPTED
input |
---|
4 1
4 1 4 4 |
correct output |
---|
8 |
user output |
---|
8 |
Test 4
Group: 1, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
100 0 |
correct output |
---|
4800 |
user output |
---|
4800 |
Test 5
Group: 1, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
99 0 |
correct output |
---|
4356 |
user output |
---|
4356 |
Test 6
Group: 1, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
98 0 |
correct output |
---|
4704 |
user output |
---|
4704 |
Test 7
Group: 1, 2, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
97 0 |
correct output |
---|
4704 |
user output |
---|
4704 |
Test 8
Group: 1, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
96 0 |
correct output |
---|
4096 |
user output |
---|
4096 |
Test 9
Group: 1, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
95 0 |
correct output |
---|
4332 |
user output |
---|
4332 |
Test 10
Group: 1, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
94 0 |
correct output |
---|
4416 |
user output |
---|
4416 |
Test 11
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
62119 62603
12553 17025 12553 17025 6889 49271 6889 49271 22523 10778 22523 10778 27058 28538 27058 28538 ... |
correct output |
---|
1929384918 |
user output |
---|
1929384918 |
Test 12
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
13553 16567
10214 777 10214 777 1372 7931 1372 7931 2222 8015 2222 8015 12573 8712 12573 8712 ... |
correct output |
---|
91841677 |
user output |
---|
91841677 |
Test 13
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
83311 39346
17169 55690 17169 55690 44097 70844 44097 70844 21463 68879 21463 68879 65027 22685 65027 22685 ... |
correct output |
---|
3470361291 |
user output |
---|
3470361291 |
Test 14
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
2593 45808
734 225 734 225 2097 527 2097 527 1970 1389 1970 1389 1595 164 1595 164 ... |
correct output |
---|
3361728 |
user output |
---|
3361728 |
Test 15
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
56393 54508
31316 8221 31316 8221 28261 551 28261 551 56373 14562 56373 14562 30770 1992 30770 1992 ... |
correct output |
---|
1590085022 |
user output |
---|
1590085022 |
Test 16
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
48313 34790
25246 25140 25246 25140 27687 40566 27687 40566 29723 14480 29723 14480 8105 11104 8105 11104 ... |
correct output |
---|
1167072972 |
user output |
---|
1167072972 |
Test 17
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
22369 7369
8903 15030 8903 15030 21789 2148 21789 2148 20232 1605 20232 1605 18493 16645 18493 16645 ... |
correct output |
---|
250186080 |
user output |
---|
250186080 |
Test 18
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
49177 34976
20242 3416 20242 3416 29831 41358 29831 41358 44096 23812 44096 23812 38772 41358 38772 41358 ... |
correct output |
---|
1209188651 |
user output |
---|
1209188651 |
Test 19
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
30517 90160
1148 29295 1148 29295 4742 14556 4742 14556 13369 19072 13369 19072 3570 26309 3570 26309 ... |
correct output |
---|
465643354 |
user output |
---|
465643354 |
Test 20
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
37853 50195
37739 14089 37739 14089 13677 29088 13677 29088 21276 27518 21276 27518 14263 24397 14263 24397 ... |
correct output |
---|
716424803 |
user output |
---|
716424803 |
Test 21
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
78 280
55 71 55 71 22 73 22 73 60 30 60 30 28 11 28 11 ... |
correct output |
---|
2732 |
user output |
---|
2732 |
Test 22
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
66 47
28 26 28 26 40 19 40 19 6 14 6 14 32 53 32 53 ... |
correct output |
---|
1941 |
user output |
---|
1941 |
Test 23
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
80 192
6 44 6 44 5 11 5 11 60 63 60 63 13 7 13 7 ... |
correct output |
---|
3096 |
user output |
---|
3096 |
Test 24
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
78 980
6 3 6 3 26 55 26 55 56 50 56 50 74 1 74 1 ... |
correct output |
---|
2820 |
user output |
---|
2820 |
Test 25
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
77 854
21 27 21 27 51 59 51 59 24 42 24 42 31 31 31 31 ... |
correct output |
---|
2926 |
user output |
---|
2926 |
Test 26
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
76 376
36 4 36 4 71 16 71 16 44 55 44 55 9 38 9 38 ... |
correct output |
---|
2862 |
user output |
---|
2862 |
Test 27
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
87 898
30 50 30 50 9 39 9 39 26 12 26 12 6 62 6 62 ... |
correct output |
---|
3468 |
user output |
---|
3468 |
Test 28
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
63 680
36 4 36 4 62 16 62 16 17 62 17 62 55 58 55 58 ... |
correct output |
---|
1854 |
user output |
---|
1854 |
Test 29
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
94 392
10 77 10 77 77 51 77 51 44 52 44 52 52 51 52 51 ... |
correct output |
---|
4388 |
user output |
---|
4388 |
Test 30
Group: 2, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
67 130
38 38 38 38 12 6 12 6 55 13 55 13 24 29 24 29 ... |
correct output |
---|
2238 |
user output |
---|
2238 |
Test 31
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
65 620
19 61 19 61 52 63 52 63 46 11 46 11 17 11 17 11 ... |
correct output |
---|
2030 |
user output |
---|
2030 |
Test 32
Group: 2, 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
53 538
30 25 30 25 17 23 17 23 42 10 42 10 32 19 32 19 ... |
correct output |
---|
1402 |
user output |
---|
1402 |
Test 33
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
66 833
54 9 54 9 9 58 9 58 40 38 40 38 66 40 66 40 ... |
correct output |
---|
2031 |
user output |
---|
2031 |
Test 34
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
76 942
8 17 8 17 45 67 45 67 49 7 49 7 63 31 63 31 ... |
correct output |
---|
2818 |
user output |
---|
2818 |
Test 35
Group: 3, 4, 5, 6
Verdict: ACCEPTED
input |
---|
51 996
39 14 39 14 15 41 15 41 7 26 7 26 47 28 47 28 ... |
correct output |
---|
1234 |
user output |
---|
1234 |
Test 36
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
951 27387
498 551 498 551 473 607 473 607 34 412 34 412 235 309 235 309 ... |
correct output |
---|
404957 |
user output |
---|
404957 |
Test 37
Group: 2, 4, 5, 6
Verdict: ACCEPTED
input |
---|
997 84199
816 858 816 858 867 339 867 339 48 144 48 144 602 605 602 605 ... |
correct output |
---|
496614 |
user output |
---|
496614 |
Test 38
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
995 98903
812 180 812 180 208 3 208 3 989 882 989 882 752 405 752 405 ... |
correct output |
---|
479313 |
user output |
---|
479313 |
Test 39
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
960 88310
3 682 3 682 1 188 1 188 822 937 822 937 159 619 159 619 ... |
correct output |
---|
419856 |
user output |
---|
419856 |
Test 40
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
960 98688
527 620 527 620 684 89 684 89 819 261 819 261 489 334 489 334 ... |
correct output |
---|
420968 |
user output |
---|
420968 |
Test 41
Group: 2, 4, 5, 6
Verdict: ACCEPTED
input |
---|
997 80944
838 518 838 518 68 710 68 710 270 343 270 343 766 3 766 3 ... |
correct output |
---|
496902 |
user output |
---|
496902 |
Test 42
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
1000 452
536 100 536 100 315 886 315 886 900 842 900 842 249 135 249 135 ... |
correct output |
---|
479998 |
user output |
---|
479998 |
Test 43
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
970 42341
130 398 130 398 43 267 43 267 152 807 152 807 362 376 362 376 ... |
correct output |
---|
453319 |
user output |
---|
453319 |
Test 44
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
995 90058
511 885 511 885 527 974 527 974 410 866 410 866 904 157 904 157 ... |
correct output |
---|
478912 |
user output |
---|
478912 |
Test 45
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
969 8460
864 658 864 658 488 287 488 287 899 142 899 142 619 510 619 510 ... |
correct output |
---|
418466 |
user output |
---|
418466 |
Test 46
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
955 56519
839 109 839 109 193 929 193 929 855 553 855 553 217 753 217 753 ... |
correct output |
---|
439975 |
user output |
---|
439975 |
Test 47
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
964 67886
426 661 426 661 518 368 518 368 88 520 88 520 723 173 723 173 ... |
correct output |
---|
464330 |
user output |
---|
464330 |
Test 48
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
958 95428
850 365 850 365 724 136 724 136 680 956 680 956 557 423 557 423 ... |
correct output |
---|
458568 |
user output |
---|
458568 |
Test 49
Group: 2, 4, 5, 6
Verdict: ACCEPTED
input |
---|
971 33239
281 301 281 301 332 762 332 762 880 766 880 766 394 44 394 44 ... |
correct output |
---|
471397 |
user output |
---|
471397 |
Test 50
Group: 4, 5, 6
Verdict: ACCEPTED
input |
---|
982 2680
707 794 707 794 924 976 924 976 771 496 771 496 757 224 757 224 ... |
correct output |
---|
482066 |
user output |
---|
482066 |
Test 51
Group: 5, 6
Verdict: ACCEPTED
input |
---|
99774 82706
29912 70150 29912 70150 93471 873 93471 873 64978 14740 64978 14740 57016 16856 57016 16856 ... |
correct output |
---|
4424387268 |
user output |
---|
4424387268 |
Test 52
Group: 5, 6
Verdict: ACCEPTED
input |
---|
99977 93922
21409 34520 21409 34520 86353 53283 86353 53283 63290 57739 63290 57739 29449 23631 29449 23631 ... |
correct output |
---|
4980407190 |
user output |
---|
4980407190 |
Test 53
Group: 5, 6
Verdict: ACCEPTED
input |
---|
99891 83172
90303 85558 90303 85558 33844 73421 33844 73421 88863 39217 88863 39217 72109 49051 72109 49051 ... |
correct output |
---|
4434769828 |
user output |
---|
4434769828 |
Test 54
Group: 5, 6
Verdict: ACCEPTED
input |
---|
99993 90989
79270 14288 79270 14288 85646 79349 85646 79349 52895 28799 52895 28799 89240 68108 89240 68108 ... |
correct output |
---|
4443832367 |
user output |
---|
4443832367 |
Test 55
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
99833 97797
91728 33605 91728 33605 56240 1921 56240 1921 52574 2978 52574 2978 66080 84364 66080 84364 ... |
correct output |
---|
4983313553 |
user output |
---|
4983313553 |
Test 56
Group: 5, 6
Verdict: ACCEPTED
input |
---|
99788 92629
6234 39317 6234 39317 65115 28113 65115 28113 47733 59631 47733 59631 99682 1524 99682 1524 ... |
correct output |
---|
4949362925 |
user output |
---|
4949362925 |
Test 57
Group: 2, 5, 6
Verdict: ACCEPTED
input |
---|
99713 85568
43719 78844 43719 78844 33991 59935 33991 59935 92925 27684 92925 27684 60286 18810 60286 18810 ... |
correct output |
---|
4971341116 |
user output |
---|
4971341116 |
Test 58
Group: 5, 6
Verdict: ACCEPTED
input |
---|
99883 86910
55536 1053 55536 1053 21242 23495 21242 23495 45485 56205 45485 56205 50620 73711 50620 73711 ... |
correct output |
---|
4886506698 |
user output |
---|
4886506698 |
Test 59
Group: 5, 6
Verdict: ACCEPTED
input |
---|
99983 83817
58795 99486 58795 99486 21058 4598 21058 4598 61620 11559 61620 11559 34661 78688 34661 78688 ... |
correct output |
---|
4968724747 |
user output |
---|
4968724747 |
Test 60
Group: 5, 6
Verdict: ACCEPTED
input |
---|
83160 90683
25845 47632 25845 47632 55730 52535 55730 52535 78252 71397 78252 71397 23041 36989 23041 36989 ... |
correct output |
---|
3073603429 |
user output |
---|
3073603429 |
Test 61
Group: 5, 6
Verdict: ACCEPTED
input |
---|
83160 96664
9683 34570 9683 34570 65381 4539 65381 4539 54199 61055 54199 61055 32492 77890 32492 77890 ... |
correct output |
---|
3073604510 |
user output |
---|
3073604510 |
Test 62
Group: 5, 6
Verdict: ACCEPTED
input |
---|
83160 90066
17246 35100 17246 35100 16401 7141 16401 7141 2153 46311 2153 46311 63120 19021 63120 19021 ... |
correct output |
---|
3073603936 |
user output |
---|
3073603936 |
Test 63
Group: 5, 6
Verdict: ACCEPTED
input |
---|
83160 96055
55170 62983 55170 62983 23300 53840 23300 53840 58900 35766 58900 35766 67659 66360 67659 66360 ... |
correct output |
---|
3073604031 |
user output |
---|
3073604031 |
Test 64
Group: 5, 6
Verdict: ACCEPTED
input |
---|
83160 88739
7851 37290 7851 37290 64008 56336 64008 56336 53191 5264 53191 5264 55806 23639 55806 23639 ... |
correct output |
---|
3073604053 |
user output |
---|
3073604053 |
Test 65
Group: 5, 6
Verdict: ACCEPTED
input |
---|
83160 99749
71811 24541 71811 24541 38479 48869 38479 48869 57110 23821 57110 23821 20981 79024 20981 79024 ... |
correct output |
---|
3073605119 |
user output |
---|
3073605119 |
Test 66
Group: 5, 6
Verdict: ACCEPTED
input |
---|
83160 86087
66621 78656 66621 78656 17938 7207 17938 7207 9652 10634 9652 10634 44941 74110 44941 74110 ... |
correct output |
---|
3073603143 |
user output |
---|
3073603143 |
Test 67
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 93358
68289 35885 80691 63455 81214 43346 82261 49430 70807 31687 76195 35027 82385 46890 82891 76920 ... |
correct output |
---|
3036122639 |
user output |
---|
3257666401 |
Test 68
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 93062
56990 40408 76540 56520 55466 69581 71866 71576 72425 71710 73297 78781 35386 17468 42736 48316 ... |
correct output |
---|
3112990308 |
user output |
---|
2703879270 |
Test 69
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 80786
28047 31723 63126 51888 46383 63592 59027 71874 61698 64512 61891 76286 28266 5332 35804 28025 ... |
correct output |
---|
2797922557 |
user output |
---|
2610894735 |
Test 70
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 89363
58515 51945 78606 80192 83092 71408 83155 76994 79062 67265 79673 73243 79886 76891 80976 76900 ... |
correct output |
---|
3108957950 |
user output |
---|
2781599280 |
Test 71
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 88511
73897 45834 75942 57320 80008 81404 83109 82212 83113 82531 83159 83055 83112 81433 83112 82481 ... |
correct output |
---|
3168760110 |
user output |
---|
2983026152 |
Test 72
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 86504
66640 81926 79383 82890 17523 83126 33278 83150 67521 83106 73053 83110 82509 82651 82624 82830 ... |
correct output |
---|
3316637130 |
user output |
---|
2843590112 |
Test 73
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 84863
49663 30118 51862 51725 40750 63826 49931 74339 47743 76629 47768 80007 77282 61756 78867 67377 ... |
correct output |
---|
3312212659 |
user output |
---|
3002098507 |
Test 74
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 92579
19945 57676 80239 64443 64389 25697 75320 41868 2619 1941 3817 39953 779 59012 3304 63431 ... |
correct output |
---|
3029830989 |
user output |
---|
2274410835 |
Test 75
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 87422
47974 19177 75815 64548 82839 38893 82921 82329 54008 80505 54761 81508 74014 75245 75273 77447 ... |
correct output |
---|
3202112344 |
user output |
---|
2329979254 |
Test 76
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 93765
46401 34354 56550 66792 73453 77778 75327 78607 64779 81215 68094 82164 59260 81288 62240 81486 ... |
correct output |
---|
3083195729 |
user output |
---|
2482747355 |
Test 77
Group: 6
Verdict: WRONG ANSWER
input |
---|
99814 98265
54265 43195 73992 96315 47318 97147 69892 98813 72797 98500 73315 99697 4920 99169 56551 99625 ... |
correct output |
---|
4806177885 |
user output |
---|
4196476449 |
Test 78
Group: 6
Verdict: WRONG ANSWER
input |
---|
99887 91031
49650 10700 77067 14462 54025 805 92454 5926 49749 262 52254 1067 49588 1620 49607 11742 ... |
correct output |
---|
4988266528 |
user output |
---|
4976212759 |
Test 79
Group: 6
Verdict: WRONG ANSWER
input |
---|
99716 84632
17486 66197 53430 88386 6004 24566 7075 26407 60340 83216 62630 91701 19145 94512 23942 98771 ... |
correct output |
---|
4623269909 |
user output |
---|
4433139137 |
Test 80
Group: 6
Verdict: WRONG ANSWER
input |
---|
99716 88540
21678 44888 63922 69139 70054 92728 74851 95376 67905 79097 68437 86856 75798 47478 89057 87993 ... |
correct output |
---|
4780661743 |
user output |
---|
3938130979 |
Test 81
Group: 6
Verdict: WRONG ANSWER
input |
---|
99909 81534
62829 19017 65364 71709 51802 87460 59271 96687 82826 80514 86248 85677 63955 74358 64442 84471 ... |
correct output |
---|
4900919128 |
user output |
---|
4756032373 |
Test 82
Group: 6
Verdict: WRONG ANSWER
input |
---|
99717 94496
29879 12438 66685 24314 95975 79556 96816 85961 22359 2004 23445 16906 16745 570 22217 9244 ... |
correct output |
---|
4258108949 |
user output |
---|
4895753742 |
Test 83
Group: 6
Verdict: WRONG ANSWER
input |
---|
99772 85568
32557 45118 76657 61864 78864 43543 98630 43877 88683 26888 96294 43251 28999 15102 29980 47190 ... |
correct output |
---|
4588954930 |
user output |
---|
4630503456 |
Test 84
Group: 6
Verdict: WRONG ANSWER
input |
---|
99900 96335
60183 66133 62639 68302 46613 98664 60073 99747 7127 99852 39766 99894 30878 99830 41673 99843 ... |
correct output |
---|
3716965952 |
user output |
---|
3716889596 |
Test 85
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 99358
5749 64133 71828 80541 2937 48282 2986 60025 3381 21139 4580 28059 58483 9861 64328 59657 ... |
correct output |
---|
3276607065 |
user output |
---|
2694599135 |
Test 86
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 62
12185 33984 77492 53116 7348 56659 64458 60280 30550 18067 34197 26268 67146 65922 71869 66747 ... |
correct output |
---|
2907600256 |
user output |
---|
2047691184 |
Test 87
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 6
7190 796 41978 74999 8157 550 75108 660 6248 27981 6775 55639 7915 466 8043 547 ... |
correct output |
---|
3178100632 |
user output |
---|
430784244 |
Test 88
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 99363
36658 59090 82051 81797 80511 24227 82413 46771 82432 69021 82859 69079 81057 57111 81149 58181 ... |
correct output |
---|
3116489733 |
user output |
---|
3086836891 |
Test 89
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 18511
23549 27423 51955 80738 69055 45118 74946 54656 56986 39814 62744 43290 79926 2396 82505 22436 ... |
correct output |
---|
3124679865 |
user output |
---|
2414159185 |
Test 90
Group: 6
Verdict: WRONG ANSWER
input |
---|
83160 4
1033 12653 20282 69536 43466 3762 46899 12116 60301 1808 71718 2662 751 7886 968 41787 |
correct output |
---|
3083719344 |
user output |
---|
2764665506 |