# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
382370 | 2021-03-27T07:40:33 Z | kshitij_sodani | Aliens (IOI16_aliens) | C++14 | 433 ms | 80876 KB |
//#pragma GCC optimize("Ofast,unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long llo; #define mp make_pair #define pb push_back #define a first #define b second #define xx int //#define endl '\n' #include "aliens.h" int mi[1000001]; vector<llo> dp[50001]; pair<llo,llo> sect(pair<llo,llo> aa,pair<llo,llo> bb){ pair<llo,llo> cc={bb.b-aa.b,aa.a-bb.a}; if(cc.b<0){ cc.b=-cc.b; cc.a=-cc.a; } return cc; } llo eval(pair<llo,llo> aa,llo bb){ return aa.a*bb+aa.b; } long long take_photos(xx n, xx m, xx k,vector<xx> aa,vector<xx> bb) { vector<pair<llo,llo>> ss; for(llo i=0;i<m;i++){ mi[i]=-1; } for(llo i=0;i<n;i++){ mi[min(aa[i],bb[i])]=max(mi[min(aa[i],bb[i])],max(aa[i],bb[i])); } llo cur=-1; for(llo i=0;i<m;i++){ if(mi[i]!=-1){ if(mi[i]>cur){ ss.pb({i,mi[i]}); cur=mi[i]; } } } for(int i=0;i<ss.size();i++){ for(int j=1;j<=k+1;j++){ dp[i].pb(0); } } for(llo i=1;i<=k;i++){ vector<pair<llo,llo>> ee; llo ind=0; for(llo j=0;j<ss.size();j++){ dp[j][i]=(ss[j].b-ss[0].a+1); dp[j][i]*=dp[j][i]; if(i==1){ continue; } if(ee.size()){ while(ind+1<ee.size()){ if(eval(ee[ind],ss[j].b)>=eval(ee[ind+1],ss[j].b)){ ind++; } else{ break; } } dp[j][i]=min(dp[j][i],eval(ee[ind],ss[j].b)+ss[j].b*ss[j].b); } /*for(auto jj:ee){ dp[j][i]=min(dp[j][i],jj.a*ss[j].b+jj.b+ss[j].b*ss[j].b); }*/ /*for(llo ii=0;ii<j;ii++){ llo cur=max(ss[ii].b+1-ss[ii+1].a,(llo)0); cur*=cur; dp[j][i]=min(dp[j][i],dp[ii][i-1]+(ss[j].b-ss[ii+1].a+1)*(ss[j].b-ss[ii+1].a+1)-cur); }*/ if(j+1<ss.size()){ llo a2=max(ss[j].b+1-ss[j+1].a,(llo)0); a2*=a2; a2=-a2; a2+=(ss[j+1].a-1)*(ss[j+1].a-1); a2+=dp[j][i-1]; llo mm=-2*(ss[j+1].a-1); pair<llo,llo> ne={mm,a2}; while(ee.size()>=2){ pair<llo,llo> ac=sect(ee.back(),ee[ee.size()-2]); pair<llo,llo> bc=sect(ee[ee.size()-2],ne); //bc<ac if(bc.a*ac.b<bc.b*ac.a){ ee.pop_back(); } else{ break; } } ee.pb({mm,a2}); } } } /* for(llo i=1;i<=k;i++){ for(llo j=0;j<ss.size();j++){ cout<<dp[j][i]<<","; } cout<<endl; }*/ /*cout<<dp[0][1]<<"::"<<dp[1][1]<<endl; for(auto j:ss){ cout<<j.a<<":"<<j.b<<endl; } cout<<endl; */ return dp[ss.size()-1][k]; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 1536 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 1516 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 1516 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 1516 KB | Correct answer: answer = 210 |
7 | Correct | 2 ms | 1516 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2374 |
11 | Correct | 3 ms | 1516 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 1516 KB | Correct answer: answer = 49 |
13 | Correct | 2 ms | 1516 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 1516 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
18 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 1516 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
2 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
4 | Correct | 2 ms | 1516 KB | Correct answer: answer = 5 |
5 | Correct | 2 ms | 1516 KB | Correct answer: answer = 41 |
6 | Correct | 2 ms | 1516 KB | Correct answer: answer = 71923 |
7 | Correct | 2 ms | 1516 KB | Correct answer: answer = 77137 |
8 | Correct | 6 ms | 2284 KB | Correct answer: answer = 764 |
9 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
10 | Correct | 10 ms | 3564 KB | Correct answer: answer = 500 |
11 | Correct | 2 ms | 1516 KB | Correct answer: answer = 32 |
12 | Correct | 2 ms | 1516 KB | Correct answer: answer = 130050 |
13 | Correct | 3 ms | 1772 KB | Correct answer: answer = 5110 |
14 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2626 |
15 | Correct | 2 ms | 1772 KB | Correct answer: answer = 796 |
16 | Correct | 3 ms | 1772 KB | Correct answer: answer = 7580 |
17 | Correct | 5 ms | 2540 KB | Correct answer: answer = 1904 |
18 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996004 |
19 | Correct | 2 ms | 1644 KB | Correct answer: answer = 38817 |
20 | Correct | 3 ms | 1900 KB | Correct answer: answer = 4096 |
21 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
22 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
23 | Correct | 5 ms | 2028 KB | Correct answer: answer = 2040 |
24 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 1536 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 1516 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 1516 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 1516 KB | Correct answer: answer = 210 |
7 | Correct | 2 ms | 1516 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2374 |
11 | Correct | 3 ms | 1516 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 1516 KB | Correct answer: answer = 49 |
13 | Correct | 2 ms | 1516 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 1516 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
18 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 1516 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
21 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
22 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
23 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 1516 KB | Correct answer: answer = 5 |
25 | Correct | 2 ms | 1516 KB | Correct answer: answer = 41 |
26 | Correct | 2 ms | 1516 KB | Correct answer: answer = 71923 |
27 | Correct | 2 ms | 1516 KB | Correct answer: answer = 77137 |
28 | Correct | 6 ms | 2284 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
30 | Correct | 10 ms | 3564 KB | Correct answer: answer = 500 |
31 | Correct | 2 ms | 1516 KB | Correct answer: answer = 32 |
32 | Correct | 2 ms | 1516 KB | Correct answer: answer = 130050 |
33 | Correct | 3 ms | 1772 KB | Correct answer: answer = 5110 |
34 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2626 |
35 | Correct | 2 ms | 1772 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 1772 KB | Correct answer: answer = 7580 |
37 | Correct | 5 ms | 2540 KB | Correct answer: answer = 1904 |
38 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 1644 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 1900 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
42 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
43 | Correct | 5 ms | 2028 KB | Correct answer: answer = 2040 |
44 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2 |
45 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
46 | Correct | 2 ms | 1516 KB | Correct answer: answer = 9 |
47 | Correct | 2 ms | 1516 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 1516 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 1516 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 1516 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 1516 KB | Correct answer: answer = 400 |
52 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996004 |
53 | Correct | 2 ms | 1548 KB | Correct answer: answer = 997310 |
54 | Correct | 2 ms | 1536 KB | Correct answer: answer = 990781 |
55 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 1516 KB | Correct answer: answer = 484 |
57 | Correct | 2 ms | 1516 KB | Correct answer: answer = 484 |
58 | Correct | 2 ms | 1516 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 1644 KB | Correct answer: answer = 323501 |
60 | Correct | 4 ms | 2028 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 1644 KB | Correct answer: answer = 761480 |
62 | Correct | 5 ms | 2028 KB | Correct answer: answer = 758932 |
63 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1000000 |
64 | Correct | 10 ms | 3564 KB | Correct answer: answer = 750500 |
65 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1000000 |
66 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
67 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
68 | Correct | 2 ms | 1664 KB | Correct answer: answer = 1000000 |
69 | Correct | 2 ms | 1516 KB | Correct answer: answer = 994009 |
70 | Correct | 2 ms | 1516 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 1644 KB | Correct answer: answer = 25454 |
72 | Correct | 4 ms | 2156 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 1516 KB | Correct answer: answer = 37486 |
74 | Correct | 3 ms | 1772 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 1644 KB | Correct answer: answer = 158008 |
76 | Correct | 2 ms | 1644 KB | Correct answer: answer = 51860 |
77 | Correct | 2 ms | 1516 KB | Correct answer: answer = 12985 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 1536 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 1516 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 1516 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 1516 KB | Correct answer: answer = 210 |
7 | Correct | 2 ms | 1516 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2374 |
11 | Correct | 3 ms | 1516 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 1516 KB | Correct answer: answer = 49 |
13 | Correct | 2 ms | 1516 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 1516 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
18 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 1516 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
21 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
22 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
23 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 1516 KB | Correct answer: answer = 5 |
25 | Correct | 2 ms | 1516 KB | Correct answer: answer = 41 |
26 | Correct | 2 ms | 1516 KB | Correct answer: answer = 71923 |
27 | Correct | 2 ms | 1516 KB | Correct answer: answer = 77137 |
28 | Correct | 6 ms | 2284 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
30 | Correct | 10 ms | 3564 KB | Correct answer: answer = 500 |
31 | Correct | 2 ms | 1516 KB | Correct answer: answer = 32 |
32 | Correct | 2 ms | 1516 KB | Correct answer: answer = 130050 |
33 | Correct | 3 ms | 1772 KB | Correct answer: answer = 5110 |
34 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2626 |
35 | Correct | 2 ms | 1772 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 1772 KB | Correct answer: answer = 7580 |
37 | Correct | 5 ms | 2540 KB | Correct answer: answer = 1904 |
38 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 1644 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 1900 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
42 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
43 | Correct | 5 ms | 2028 KB | Correct answer: answer = 2040 |
44 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2 |
45 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
46 | Correct | 2 ms | 1516 KB | Correct answer: answer = 9 |
47 | Correct | 2 ms | 1516 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 1516 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 1516 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 1516 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 1516 KB | Correct answer: answer = 400 |
52 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996004 |
53 | Correct | 2 ms | 1548 KB | Correct answer: answer = 997310 |
54 | Correct | 2 ms | 1536 KB | Correct answer: answer = 990781 |
55 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 1516 KB | Correct answer: answer = 484 |
57 | Correct | 2 ms | 1516 KB | Correct answer: answer = 484 |
58 | Correct | 2 ms | 1516 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 1644 KB | Correct answer: answer = 323501 |
60 | Correct | 4 ms | 2028 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 1644 KB | Correct answer: answer = 761480 |
62 | Correct | 5 ms | 2028 KB | Correct answer: answer = 758932 |
63 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1000000 |
64 | Correct | 10 ms | 3564 KB | Correct answer: answer = 750500 |
65 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1000000 |
66 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
67 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
68 | Correct | 2 ms | 1664 KB | Correct answer: answer = 1000000 |
69 | Correct | 2 ms | 1516 KB | Correct answer: answer = 994009 |
70 | Correct | 2 ms | 1516 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 1644 KB | Correct answer: answer = 25454 |
72 | Correct | 4 ms | 2156 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 1516 KB | Correct answer: answer = 37486 |
74 | Correct | 3 ms | 1772 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 1644 KB | Correct answer: answer = 158008 |
76 | Correct | 2 ms | 1644 KB | Correct answer: answer = 51860 |
77 | Correct | 2 ms | 1516 KB | Correct answer: answer = 12985 |
78 | Correct | 6 ms | 5484 KB | Correct answer: answer = 997864126212 |
79 | Correct | 6 ms | 5484 KB | Correct answer: answer = 998608411647 |
80 | Correct | 8 ms | 5868 KB | Correct answer: answer = 995265560477 |
81 | Correct | 3 ms | 1900 KB | Correct answer: answer = 10125000 |
82 | Correct | 4 ms | 2028 KB | Correct answer: answer = 2291668 |
83 | Correct | 9 ms | 3692 KB | Correct answer: answer = 42388 |
84 | Correct | 32 ms | 9936 KB | Correct answer: answer = 10318 |
85 | Correct | 150 ms | 31724 KB | Correct answer: answer = 3416 |
86 | Correct | 7 ms | 5740 KB | Correct answer: answer = 331708193881 |
87 | Correct | 47 ms | 13676 KB | Correct answer: answer = 2861193756 |
88 | Correct | 319 ms | 63340 KB | Correct answer: answer = 114646930 |
89 | Correct | 11 ms | 3820 KB | Correct answer: answer = 9280921 |
90 | Correct | 54 ms | 21868 KB | Correct answer: answer = 999984053400 |
91 | Correct | 230 ms | 37484 KB | Correct answer: answer = 750935949134 |
92 | Correct | 6 ms | 5484 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 6 ms | 5484 KB | Correct answer: answer = 998762383161 |
94 | Correct | 14 ms | 7532 KB | Correct answer: answer = 23017412908 |
95 | Correct | 10 ms | 6124 KB | Correct answer: answer = 728143410622 |
96 | Correct | 6 ms | 5484 KB | Correct answer: answer = 2 |
97 | Correct | 8 ms | 6252 KB | Correct answer: answer = 1824916 |
98 | Correct | 123 ms | 34028 KB | Correct answer: answer = 10680029 |
99 | Correct | 51 ms | 18284 KB | Correct answer: answer = 18351700 |
100 | Correct | 7 ms | 5868 KB | Correct answer: answer = 16040026 |
101 | Correct | 6 ms | 5484 KB | Correct answer: answer = 253968628325 |
102 | Correct | 106 ms | 17772 KB | Correct answer: answer = 10267 |
103 | Correct | 365 ms | 68104 KB | Correct answer: answer = 2582408 |
104 | Correct | 6 ms | 5484 KB | Correct answer: answer = 78024964781 |
105 | Correct | 6 ms | 5484 KB | Correct answer: answer = 9866346457 |
106 | Correct | 8 ms | 5996 KB | Correct answer: answer = 3327720949 |
107 | Correct | 23 ms | 9580 KB | Correct answer: answer = 86064128360 |
108 | Correct | 114 ms | 25708 KB | Correct answer: answer = 12698259150 |
109 | Correct | 433 ms | 80876 KB | Correct answer: answer = 1185259288 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 1536 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 1516 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 1516 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 1516 KB | Correct answer: answer = 210 |
7 | Correct | 2 ms | 1516 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2374 |
11 | Correct | 3 ms | 1516 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 1516 KB | Correct answer: answer = 49 |
13 | Correct | 2 ms | 1516 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 1516 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
18 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 1516 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
21 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
22 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
23 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 1516 KB | Correct answer: answer = 5 |
25 | Correct | 2 ms | 1516 KB | Correct answer: answer = 41 |
26 | Correct | 2 ms | 1516 KB | Correct answer: answer = 71923 |
27 | Correct | 2 ms | 1516 KB | Correct answer: answer = 77137 |
28 | Correct | 6 ms | 2284 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
30 | Correct | 10 ms | 3564 KB | Correct answer: answer = 500 |
31 | Correct | 2 ms | 1516 KB | Correct answer: answer = 32 |
32 | Correct | 2 ms | 1516 KB | Correct answer: answer = 130050 |
33 | Correct | 3 ms | 1772 KB | Correct answer: answer = 5110 |
34 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2626 |
35 | Correct | 2 ms | 1772 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 1772 KB | Correct answer: answer = 7580 |
37 | Correct | 5 ms | 2540 KB | Correct answer: answer = 1904 |
38 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 1644 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 1900 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
42 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
43 | Correct | 5 ms | 2028 KB | Correct answer: answer = 2040 |
44 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2 |
45 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
46 | Correct | 2 ms | 1516 KB | Correct answer: answer = 9 |
47 | Correct | 2 ms | 1516 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 1516 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 1516 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 1516 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 1516 KB | Correct answer: answer = 400 |
52 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996004 |
53 | Correct | 2 ms | 1548 KB | Correct answer: answer = 997310 |
54 | Correct | 2 ms | 1536 KB | Correct answer: answer = 990781 |
55 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 1516 KB | Correct answer: answer = 484 |
57 | Correct | 2 ms | 1516 KB | Correct answer: answer = 484 |
58 | Correct | 2 ms | 1516 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 1644 KB | Correct answer: answer = 323501 |
60 | Correct | 4 ms | 2028 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 1644 KB | Correct answer: answer = 761480 |
62 | Correct | 5 ms | 2028 KB | Correct answer: answer = 758932 |
63 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1000000 |
64 | Correct | 10 ms | 3564 KB | Correct answer: answer = 750500 |
65 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1000000 |
66 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
67 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
68 | Correct | 2 ms | 1664 KB | Correct answer: answer = 1000000 |
69 | Correct | 2 ms | 1516 KB | Correct answer: answer = 994009 |
70 | Correct | 2 ms | 1516 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 1644 KB | Correct answer: answer = 25454 |
72 | Correct | 4 ms | 2156 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 1516 KB | Correct answer: answer = 37486 |
74 | Correct | 3 ms | 1772 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 1644 KB | Correct answer: answer = 158008 |
76 | Correct | 2 ms | 1644 KB | Correct answer: answer = 51860 |
77 | Correct | 2 ms | 1516 KB | Correct answer: answer = 12985 |
78 | Correct | 6 ms | 5484 KB | Correct answer: answer = 997864126212 |
79 | Correct | 6 ms | 5484 KB | Correct answer: answer = 998608411647 |
80 | Correct | 8 ms | 5868 KB | Correct answer: answer = 995265560477 |
81 | Correct | 3 ms | 1900 KB | Correct answer: answer = 10125000 |
82 | Correct | 4 ms | 2028 KB | Correct answer: answer = 2291668 |
83 | Correct | 9 ms | 3692 KB | Correct answer: answer = 42388 |
84 | Correct | 32 ms | 9936 KB | Correct answer: answer = 10318 |
85 | Correct | 150 ms | 31724 KB | Correct answer: answer = 3416 |
86 | Correct | 7 ms | 5740 KB | Correct answer: answer = 331708193881 |
87 | Correct | 47 ms | 13676 KB | Correct answer: answer = 2861193756 |
88 | Correct | 319 ms | 63340 KB | Correct answer: answer = 114646930 |
89 | Correct | 11 ms | 3820 KB | Correct answer: answer = 9280921 |
90 | Correct | 54 ms | 21868 KB | Correct answer: answer = 999984053400 |
91 | Correct | 230 ms | 37484 KB | Correct answer: answer = 750935949134 |
92 | Correct | 6 ms | 5484 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 6 ms | 5484 KB | Correct answer: answer = 998762383161 |
94 | Correct | 14 ms | 7532 KB | Correct answer: answer = 23017412908 |
95 | Correct | 10 ms | 6124 KB | Correct answer: answer = 728143410622 |
96 | Correct | 6 ms | 5484 KB | Correct answer: answer = 2 |
97 | Correct | 8 ms | 6252 KB | Correct answer: answer = 1824916 |
98 | Correct | 123 ms | 34028 KB | Correct answer: answer = 10680029 |
99 | Correct | 51 ms | 18284 KB | Correct answer: answer = 18351700 |
100 | Correct | 7 ms | 5868 KB | Correct answer: answer = 16040026 |
101 | Correct | 6 ms | 5484 KB | Correct answer: answer = 253968628325 |
102 | Correct | 106 ms | 17772 KB | Correct answer: answer = 10267 |
103 | Correct | 365 ms | 68104 KB | Correct answer: answer = 2582408 |
104 | Correct | 6 ms | 5484 KB | Correct answer: answer = 78024964781 |
105 | Correct | 6 ms | 5484 KB | Correct answer: answer = 9866346457 |
106 | Correct | 8 ms | 5996 KB | Correct answer: answer = 3327720949 |
107 | Correct | 23 ms | 9580 KB | Correct answer: answer = 86064128360 |
108 | Correct | 114 ms | 25708 KB | Correct answer: answer = 12698259150 |
109 | Correct | 433 ms | 80876 KB | Correct answer: answer = 1185259288 |
110 | Correct | 18 ms | 6124 KB | Correct answer: answer = 999889968863 |
111 | Correct | 19 ms | 6252 KB | Correct answer: answer = 999861384931 |
112 | Correct | 18 ms | 6124 KB | Correct answer: answer = 999811809929 |
113 | Correct | 18 ms | 6252 KB | Correct answer: answer = 999869756441 |
114 | Correct | 23 ms | 7136 KB | Correct answer: answer = 1700000000 |
115 | Correct | 75 ms | 19040 KB | Correct answer: answer = 131666670 |
116 | Correct | 9 ms | 3564 KB | Correct answer: answer = 89478486 |
117 | Correct | 44 ms | 11280 KB | Correct answer: answer = 4971040 |
118 | Correct | 77 ms | 19556 KB | Correct answer: answer = 2711494 |
119 | Correct | 283 ms | 56660 KB | Correct answer: answer = 25252530 |
120 | Correct | 127 ms | 31608 KB | Correct answer: answer = 62500000 |
121 | Correct | 29 ms | 10080 KB | Correct answer: answer = 333175097780 |
122 | Correct | 87 ms | 20704 KB | Correct answer: answer = 33121180179 |
123 | Correct | 238 ms | 57568 KB | Correct answer: answer = 9802314015 |
124 | Correct | 229 ms | 56664 KB | Correct answer: answer = 32567551 |
125 | Correct | 287 ms | 60508 KB | Correct answer: answer = 997525000000 |
126 | Correct | 217 ms | 54036 KB | Correct answer: answer = 752723538884 |
127 | Correct | 17 ms | 6764 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 18 ms | 6892 KB | Correct answer: answer = 999978000121 |
129 | Correct | 20 ms | 7240 KB | Correct answer: answer = 745986144735 |
130 | Correct | 15 ms | 6380 KB | Correct answer: answer = 2 |
131 | Correct | 52 ms | 16496 KB | Correct answer: answer = 277966670 |
132 | Correct | 36 ms | 11488 KB | Correct answer: answer = 2500900082 |
133 | Correct | 19 ms | 7148 KB | Correct answer: answer = 301248349636 |
134 | Correct | 132 ms | 28644 KB | Correct answer: answer = 14118891 |
135 | Correct | 19 ms | 6892 KB | Correct answer: answer = 14384977265 |
136 | Correct | 20 ms | 7148 KB | Correct answer: answer = 3681368330 |
137 | Correct | 21 ms | 7532 KB | Correct answer: answer = 2720316816 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 1536 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 1516 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 1516 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 1516 KB | Correct answer: answer = 210 |
7 | Correct | 2 ms | 1516 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2374 |
11 | Correct | 3 ms | 1516 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 1516 KB | Correct answer: answer = 49 |
13 | Correct | 2 ms | 1516 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 1516 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 1516 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
18 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 1516 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 1516 KB | Correct answer: answer = 10000 |
21 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
22 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
23 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 1516 KB | Correct answer: answer = 5 |
25 | Correct | 2 ms | 1516 KB | Correct answer: answer = 41 |
26 | Correct | 2 ms | 1516 KB | Correct answer: answer = 71923 |
27 | Correct | 2 ms | 1516 KB | Correct answer: answer = 77137 |
28 | Correct | 6 ms | 2284 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
30 | Correct | 10 ms | 3564 KB | Correct answer: answer = 500 |
31 | Correct | 2 ms | 1516 KB | Correct answer: answer = 32 |
32 | Correct | 2 ms | 1516 KB | Correct answer: answer = 130050 |
33 | Correct | 3 ms | 1772 KB | Correct answer: answer = 5110 |
34 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2626 |
35 | Correct | 2 ms | 1772 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 1772 KB | Correct answer: answer = 7580 |
37 | Correct | 5 ms | 2540 KB | Correct answer: answer = 1904 |
38 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 1644 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 1900 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
42 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1 |
43 | Correct | 5 ms | 2028 KB | Correct answer: answer = 2040 |
44 | Correct | 2 ms | 1516 KB | Correct answer: answer = 2 |
45 | Correct | 2 ms | 1516 KB | Correct answer: answer = 4 |
46 | Correct | 2 ms | 1516 KB | Correct answer: answer = 9 |
47 | Correct | 2 ms | 1516 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 1516 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 1516 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 1516 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 1516 KB | Correct answer: answer = 400 |
52 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996004 |
53 | Correct | 2 ms | 1548 KB | Correct answer: answer = 997310 |
54 | Correct | 2 ms | 1536 KB | Correct answer: answer = 990781 |
55 | Correct | 2 ms | 1516 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 1516 KB | Correct answer: answer = 484 |
57 | Correct | 2 ms | 1516 KB | Correct answer: answer = 484 |
58 | Correct | 2 ms | 1516 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 1644 KB | Correct answer: answer = 323501 |
60 | Correct | 4 ms | 2028 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 1644 KB | Correct answer: answer = 761480 |
62 | Correct | 5 ms | 2028 KB | Correct answer: answer = 758932 |
63 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1000000 |
64 | Correct | 10 ms | 3564 KB | Correct answer: answer = 750500 |
65 | Correct | 2 ms | 1516 KB | Correct answer: answer = 1000000 |
66 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
67 | Correct | 2 ms | 1516 KB | Correct answer: answer = 250000 |
68 | Correct | 2 ms | 1664 KB | Correct answer: answer = 1000000 |
69 | Correct | 2 ms | 1516 KB | Correct answer: answer = 994009 |
70 | Correct | 2 ms | 1516 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 1644 KB | Correct answer: answer = 25454 |
72 | Correct | 4 ms | 2156 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 1516 KB | Correct answer: answer = 37486 |
74 | Correct | 3 ms | 1772 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 1644 KB | Correct answer: answer = 158008 |
76 | Correct | 2 ms | 1644 KB | Correct answer: answer = 51860 |
77 | Correct | 2 ms | 1516 KB | Correct answer: answer = 12985 |
78 | Correct | 6 ms | 5484 KB | Correct answer: answer = 997864126212 |
79 | Correct | 6 ms | 5484 KB | Correct answer: answer = 998608411647 |
80 | Correct | 8 ms | 5868 KB | Correct answer: answer = 995265560477 |
81 | Correct | 3 ms | 1900 KB | Correct answer: answer = 10125000 |
82 | Correct | 4 ms | 2028 KB | Correct answer: answer = 2291668 |
83 | Correct | 9 ms | 3692 KB | Correct answer: answer = 42388 |
84 | Correct | 32 ms | 9936 KB | Correct answer: answer = 10318 |
85 | Correct | 150 ms | 31724 KB | Correct answer: answer = 3416 |
86 | Correct | 7 ms | 5740 KB | Correct answer: answer = 331708193881 |
87 | Correct | 47 ms | 13676 KB | Correct answer: answer = 2861193756 |
88 | Correct | 319 ms | 63340 KB | Correct answer: answer = 114646930 |
89 | Correct | 11 ms | 3820 KB | Correct answer: answer = 9280921 |
90 | Correct | 54 ms | 21868 KB | Correct answer: answer = 999984053400 |
91 | Correct | 230 ms | 37484 KB | Correct answer: answer = 750935949134 |
92 | Correct | 6 ms | 5484 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 6 ms | 5484 KB | Correct answer: answer = 998762383161 |
94 | Correct | 14 ms | 7532 KB | Correct answer: answer = 23017412908 |
95 | Correct | 10 ms | 6124 KB | Correct answer: answer = 728143410622 |
96 | Correct | 6 ms | 5484 KB | Correct answer: answer = 2 |
97 | Correct | 8 ms | 6252 KB | Correct answer: answer = 1824916 |
98 | Correct | 123 ms | 34028 KB | Correct answer: answer = 10680029 |
99 | Correct | 51 ms | 18284 KB | Correct answer: answer = 18351700 |
100 | Correct | 7 ms | 5868 KB | Correct answer: answer = 16040026 |
101 | Correct | 6 ms | 5484 KB | Correct answer: answer = 253968628325 |
102 | Correct | 106 ms | 17772 KB | Correct answer: answer = 10267 |
103 | Correct | 365 ms | 68104 KB | Correct answer: answer = 2582408 |
104 | Correct | 6 ms | 5484 KB | Correct answer: answer = 78024964781 |
105 | Correct | 6 ms | 5484 KB | Correct answer: answer = 9866346457 |
106 | Correct | 8 ms | 5996 KB | Correct answer: answer = 3327720949 |
107 | Correct | 23 ms | 9580 KB | Correct answer: answer = 86064128360 |
108 | Correct | 114 ms | 25708 KB | Correct answer: answer = 12698259150 |
109 | Correct | 433 ms | 80876 KB | Correct answer: answer = 1185259288 |
110 | Correct | 18 ms | 6124 KB | Correct answer: answer = 999889968863 |
111 | Correct | 19 ms | 6252 KB | Correct answer: answer = 999861384931 |
112 | Correct | 18 ms | 6124 KB | Correct answer: answer = 999811809929 |
113 | Correct | 18 ms | 6252 KB | Correct answer: answer = 999869756441 |
114 | Correct | 23 ms | 7136 KB | Correct answer: answer = 1700000000 |
115 | Correct | 75 ms | 19040 KB | Correct answer: answer = 131666670 |
116 | Correct | 9 ms | 3564 KB | Correct answer: answer = 89478486 |
117 | Correct | 44 ms | 11280 KB | Correct answer: answer = 4971040 |
118 | Correct | 77 ms | 19556 KB | Correct answer: answer = 2711494 |
119 | Correct | 283 ms | 56660 KB | Correct answer: answer = 25252530 |
120 | Correct | 127 ms | 31608 KB | Correct answer: answer = 62500000 |
121 | Correct | 29 ms | 10080 KB | Correct answer: answer = 333175097780 |
122 | Correct | 87 ms | 20704 KB | Correct answer: answer = 33121180179 |
123 | Correct | 238 ms | 57568 KB | Correct answer: answer = 9802314015 |
124 | Correct | 229 ms | 56664 KB | Correct answer: answer = 32567551 |
125 | Correct | 287 ms | 60508 KB | Correct answer: answer = 997525000000 |
126 | Correct | 217 ms | 54036 KB | Correct answer: answer = 752723538884 |
127 | Correct | 17 ms | 6764 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 18 ms | 6892 KB | Correct answer: answer = 999978000121 |
129 | Correct | 20 ms | 7240 KB | Correct answer: answer = 745986144735 |
130 | Correct | 15 ms | 6380 KB | Correct answer: answer = 2 |
131 | Correct | 52 ms | 16496 KB | Correct answer: answer = 277966670 |
132 | Correct | 36 ms | 11488 KB | Correct answer: answer = 2500900082 |
133 | Correct | 19 ms | 7148 KB | Correct answer: answer = 301248349636 |
134 | Correct | 132 ms | 28644 KB | Correct answer: answer = 14118891 |
135 | Correct | 19 ms | 6892 KB | Correct answer: answer = 14384977265 |
136 | Correct | 20 ms | 7148 KB | Correct answer: answer = 3681368330 |
137 | Correct | 21 ms | 7532 KB | Correct answer: answer = 2720316816 |
138 | Correct | 31 ms | 8356 KB | Correct answer: answer = 999976000144 |
139 | Correct | 32 ms | 8300 KB | Correct answer: answer = 999856102410 |
140 | Correct | 32 ms | 8300 KB | Correct answer: answer = 999958401531 |
141 | Correct | 34 ms | 9068 KB | Correct answer: answer = 999769649944 |
142 | Correct | 59 ms | 14616 KB | Correct answer: answer = 999874525918 |
143 | Runtime error | 43 ms | 16092 KB | Execution killed with signal 11 |
144 | Halted | 0 ms | 0 KB | - |