# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
364772 | 2021-02-10T02:11:41 Z | nandonathaniel | Aliens (IOI16_aliens) | C++14 | 274 ms | 11380 KB |
#include "aliens.h" #include<bits/stdc++.h> using namespace std; #define fi first #define se second typedef long long LL; typedef pair<LL,LL> pii; typedef pair<pii,LL> piii; vector<pii> V,point; vector<piii> line; LL N,M,K,dp[100005],opt[100005]; bool cmpV(pii A,pii B){ if(A.fi!=B.fi)return A.fi<B.fi; return A.se>B.se; } pii tpot(pii satu,pii dua){ pii jwb; jwb.fi=dua.se-satu.se; jwb.se=satu.fi-dua.fi; return jwb; } bool cmp(pii a,pii b){ return a.fi*b.se<=a.se*b.fi; } LL sq(LL a){ return a*a; } LL F(LL penalty){ line.clear(); for(LL i=1;i<=N;i++){ LL x=V[i].se; LL intersect; if(V[i].first>V[i-1].second)intersect=0; else intersect=sq(V[i-1].second-V[i].first+1); piii now={{2*V[i].fi,-(V[i].fi*V[i].fi-2*V[i].fi+1-intersect+dp[i-1])},i-1}; LL skg=line.size()-1,prev=line.size()-2; while(skg>0 && cmp(tpot(now.fi,line[skg].fi),tpot(now.fi,line[prev].fi))){ //hapus yang gamasuk hull line.pop_back(); skg--; prev--; } line.push_back(now); LL ki=1,ka=(LL)line.size()-1,add=-1e18,id; while(ki<=ka){ LL mid=(ki+ka)/2; LL l=line[mid-1].fi.fi*x+line[mid-1].fi.se; LL r=line[mid].fi.fi*x+line[mid].fi.se; if(l>add){ add=l; id=line[mid-1].se; } if(r>add){ add=r; id=line[mid].se; } if(l>r)ka=mid-1; else ki=mid+1; } if(line.size()==1){ add=line[0].fi.fi*x+line[0].fi.se; id=line[0].se; } dp[i]=-add+sq(V[i].se)+2*V[i].se+penalty; opt[i]=id; } LL noww=N,byk=0; while(noww!=0){ byk++; noww=opt[noww]; } return byk; } LL take_photos(int n, int m, int k, vector<int> r, vector<int> c) { N=(LL)n;M=(LL)m;K=(LL)k; for(LL i=0;i<N;i++){ if(r[i]>c[i])swap(r[i],c[i]); point.push_back(make_pair((LL)r[i],(LL)c[i])); } sort(point.begin(),point.end(),cmpV); point.erase(unique(point.begin(),point.end()),point.end()); V.push_back(make_pair(-1,-1)); V.push_back(point[0]); pii last=point[0]; for(LL i=1;i<N;i++){ if(point[i].se>last.se){ V.push_back(point[i]); last=point[i]; } } N=V.size()-1; K=min(K,N); LL ki=0,ka=M*M,res; while(ki<=ka){ LL mid=(ki+ka)/2; if(F(mid)>K)ki=mid+1; else{ res=mid; ka=mid-1; } } LL hey=F(res); res=dp[N]-res*k; return res; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 364 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 364 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 492 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 364 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 364 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 364 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 364 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 364 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 364 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 364 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 364 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 364 KB | Correct answer: answer = 10000 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
2 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
4 | Correct | 1 ms | 364 KB | Correct answer: answer = 5 |
5 | Correct | 1 ms | 364 KB | Correct answer: answer = 41 |
6 | Correct | 0 ms | 364 KB | Correct answer: answer = 71923 |
7 | Correct | 1 ms | 364 KB | Correct answer: answer = 77137 |
8 | Correct | 1 ms | 364 KB | Correct answer: answer = 764 |
9 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
10 | Correct | 1 ms | 364 KB | Correct answer: answer = 500 |
11 | Correct | 0 ms | 364 KB | Correct answer: answer = 32 |
12 | Correct | 1 ms | 364 KB | Correct answer: answer = 130050 |
13 | Correct | 1 ms | 364 KB | Correct answer: answer = 5110 |
14 | Correct | 1 ms | 364 KB | Correct answer: answer = 2626 |
15 | Correct | 1 ms | 364 KB | Correct answer: answer = 796 |
16 | Correct | 1 ms | 364 KB | Correct answer: answer = 7580 |
17 | Correct | 1 ms | 364 KB | Correct answer: answer = 1904 |
18 | Correct | 1 ms | 364 KB | Correct answer: answer = 996004 |
19 | Correct | 1 ms | 512 KB | Correct answer: answer = 38817 |
20 | Correct | 1 ms | 364 KB | Correct answer: answer = 4096 |
21 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
23 | Correct | 1 ms | 364 KB | Correct answer: answer = 2040 |
24 | Correct | 1 ms | 364 KB | Correct answer: answer = 2 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 364 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 364 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 492 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 364 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 364 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 364 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 364 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 364 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 364 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 364 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 364 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 364 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
22 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
24 | Correct | 1 ms | 364 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 364 KB | Correct answer: answer = 41 |
26 | Correct | 0 ms | 364 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 364 KB | Correct answer: answer = 77137 |
28 | Correct | 1 ms | 364 KB | Correct answer: answer = 764 |
29 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
30 | Correct | 1 ms | 364 KB | Correct answer: answer = 500 |
31 | Correct | 0 ms | 364 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 364 KB | Correct answer: answer = 130050 |
33 | Correct | 1 ms | 364 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 364 KB | Correct answer: answer = 2626 |
35 | Correct | 1 ms | 364 KB | Correct answer: answer = 796 |
36 | Correct | 1 ms | 364 KB | Correct answer: answer = 7580 |
37 | Correct | 1 ms | 364 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 364 KB | Correct answer: answer = 996004 |
39 | Correct | 1 ms | 512 KB | Correct answer: answer = 38817 |
40 | Correct | 1 ms | 364 KB | Correct answer: answer = 4096 |
41 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
43 | Correct | 1 ms | 364 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 364 KB | Correct answer: answer = 2 |
45 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
46 | Correct | 0 ms | 364 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 384 KB | Correct answer: answer = 9 |
48 | Correct | 1 ms | 364 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 364 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 364 KB | Correct answer: answer = 77 |
51 | Correct | 1 ms | 364 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 364 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 364 KB | Correct answer: answer = 997310 |
54 | Correct | 1 ms | 364 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 364 KB | Correct answer: answer = 996545 |
56 | Correct | 1 ms | 364 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 364 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 364 KB | Correct answer: answer = 63501 |
59 | Correct | 1 ms | 364 KB | Correct answer: answer = 323501 |
60 | Correct | 1 ms | 384 KB | Correct answer: answer = 752500 |
61 | Correct | 1 ms | 364 KB | Correct answer: answer = 761480 |
62 | Correct | 1 ms | 364 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
64 | Correct | 1 ms | 364 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 364 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 364 KB | Correct answer: answer = 59315 |
71 | Correct | 1 ms | 364 KB | Correct answer: answer = 25454 |
72 | Correct | 1 ms | 364 KB | Correct answer: answer = 1504 |
73 | Correct | 1 ms | 364 KB | Correct answer: answer = 37486 |
74 | Correct | 1 ms | 364 KB | Correct answer: answer = 4284 |
75 | Correct | 1 ms | 364 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 364 KB | Correct answer: answer = 51860 |
77 | Correct | 1 ms | 364 KB | Correct answer: answer = 12985 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 364 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 364 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 492 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 364 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 364 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 364 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 364 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 364 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 364 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 364 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 364 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 364 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
22 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
24 | Correct | 1 ms | 364 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 364 KB | Correct answer: answer = 41 |
26 | Correct | 0 ms | 364 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 364 KB | Correct answer: answer = 77137 |
28 | Correct | 1 ms | 364 KB | Correct answer: answer = 764 |
29 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
30 | Correct | 1 ms | 364 KB | Correct answer: answer = 500 |
31 | Correct | 0 ms | 364 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 364 KB | Correct answer: answer = 130050 |
33 | Correct | 1 ms | 364 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 364 KB | Correct answer: answer = 2626 |
35 | Correct | 1 ms | 364 KB | Correct answer: answer = 796 |
36 | Correct | 1 ms | 364 KB | Correct answer: answer = 7580 |
37 | Correct | 1 ms | 364 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 364 KB | Correct answer: answer = 996004 |
39 | Correct | 1 ms | 512 KB | Correct answer: answer = 38817 |
40 | Correct | 1 ms | 364 KB | Correct answer: answer = 4096 |
41 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
43 | Correct | 1 ms | 364 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 364 KB | Correct answer: answer = 2 |
45 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
46 | Correct | 0 ms | 364 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 384 KB | Correct answer: answer = 9 |
48 | Correct | 1 ms | 364 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 364 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 364 KB | Correct answer: answer = 77 |
51 | Correct | 1 ms | 364 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 364 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 364 KB | Correct answer: answer = 997310 |
54 | Correct | 1 ms | 364 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 364 KB | Correct answer: answer = 996545 |
56 | Correct | 1 ms | 364 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 364 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 364 KB | Correct answer: answer = 63501 |
59 | Correct | 1 ms | 364 KB | Correct answer: answer = 323501 |
60 | Correct | 1 ms | 384 KB | Correct answer: answer = 752500 |
61 | Correct | 1 ms | 364 KB | Correct answer: answer = 761480 |
62 | Correct | 1 ms | 364 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
64 | Correct | 1 ms | 364 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 364 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 364 KB | Correct answer: answer = 59315 |
71 | Correct | 1 ms | 364 KB | Correct answer: answer = 25454 |
72 | Correct | 1 ms | 364 KB | Correct answer: answer = 1504 |
73 | Correct | 1 ms | 364 KB | Correct answer: answer = 37486 |
74 | Correct | 1 ms | 364 KB | Correct answer: answer = 4284 |
75 | Correct | 1 ms | 364 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 364 KB | Correct answer: answer = 51860 |
77 | Correct | 1 ms | 364 KB | Correct answer: answer = 12985 |
78 | Correct | 2 ms | 492 KB | Correct answer: answer = 997864126212 |
79 | Correct | 2 ms | 492 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 492 KB | Correct answer: answer = 995265560477 |
81 | Correct | 6 ms | 620 KB | Correct answer: answer = 10125000 |
82 | Correct | 7 ms | 748 KB | Correct answer: answer = 2291668 |
83 | Correct | 3 ms | 620 KB | Correct answer: answer = 42388 |
84 | Correct | 3 ms | 620 KB | Correct answer: answer = 10318 |
85 | Correct | 4 ms | 620 KB | Correct answer: answer = 3416 |
86 | Correct | 7 ms | 620 KB | Correct answer: answer = 331708193881 |
87 | Correct | 11 ms | 620 KB | Correct answer: answer = 2861193756 |
88 | Correct | 10 ms | 768 KB | Correct answer: answer = 114646930 |
89 | Correct | 7 ms | 748 KB | Correct answer: answer = 9280921 |
90 | Correct | 8 ms | 748 KB | Correct answer: answer = 999984053400 |
91 | Correct | 9 ms | 620 KB | Correct answer: answer = 750935949134 |
92 | Correct | 2 ms | 492 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 2 ms | 492 KB | Correct answer: answer = 998762383161 |
94 | Correct | 9 ms | 620 KB | Correct answer: answer = 23017412908 |
95 | Correct | 2 ms | 492 KB | Correct answer: answer = 728143410622 |
96 | Correct | 1 ms | 492 KB | Correct answer: answer = 2 |
97 | Correct | 8 ms | 748 KB | Correct answer: answer = 1824916 |
98 | Correct | 10 ms | 620 KB | Correct answer: answer = 10680029 |
99 | Correct | 9 ms | 748 KB | Correct answer: answer = 18351700 |
100 | Correct | 5 ms | 640 KB | Correct answer: answer = 16040026 |
101 | Correct | 2 ms | 492 KB | Correct answer: answer = 253968628325 |
102 | Correct | 4 ms | 492 KB | Correct answer: answer = 10267 |
103 | Correct | 10 ms | 748 KB | Correct answer: answer = 2582408 |
104 | Correct | 2 ms | 492 KB | Correct answer: answer = 78024964781 |
105 | Correct | 2 ms | 492 KB | Correct answer: answer = 9866346457 |
106 | Correct | 3 ms | 492 KB | Correct answer: answer = 3327720949 |
107 | Correct | 2 ms | 492 KB | Correct answer: answer = 86064128360 |
108 | Correct | 3 ms | 492 KB | Correct answer: answer = 12698259150 |
109 | Correct | 10 ms | 748 KB | Correct answer: answer = 1185259288 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 364 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 364 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 492 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 364 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 364 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 364 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 364 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 364 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 364 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 364 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 364 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 364 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
22 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
24 | Correct | 1 ms | 364 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 364 KB | Correct answer: answer = 41 |
26 | Correct | 0 ms | 364 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 364 KB | Correct answer: answer = 77137 |
28 | Correct | 1 ms | 364 KB | Correct answer: answer = 764 |
29 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
30 | Correct | 1 ms | 364 KB | Correct answer: answer = 500 |
31 | Correct | 0 ms | 364 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 364 KB | Correct answer: answer = 130050 |
33 | Correct | 1 ms | 364 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 364 KB | Correct answer: answer = 2626 |
35 | Correct | 1 ms | 364 KB | Correct answer: answer = 796 |
36 | Correct | 1 ms | 364 KB | Correct answer: answer = 7580 |
37 | Correct | 1 ms | 364 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 364 KB | Correct answer: answer = 996004 |
39 | Correct | 1 ms | 512 KB | Correct answer: answer = 38817 |
40 | Correct | 1 ms | 364 KB | Correct answer: answer = 4096 |
41 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
43 | Correct | 1 ms | 364 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 364 KB | Correct answer: answer = 2 |
45 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
46 | Correct | 0 ms | 364 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 384 KB | Correct answer: answer = 9 |
48 | Correct | 1 ms | 364 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 364 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 364 KB | Correct answer: answer = 77 |
51 | Correct | 1 ms | 364 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 364 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 364 KB | Correct answer: answer = 997310 |
54 | Correct | 1 ms | 364 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 364 KB | Correct answer: answer = 996545 |
56 | Correct | 1 ms | 364 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 364 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 364 KB | Correct answer: answer = 63501 |
59 | Correct | 1 ms | 364 KB | Correct answer: answer = 323501 |
60 | Correct | 1 ms | 384 KB | Correct answer: answer = 752500 |
61 | Correct | 1 ms | 364 KB | Correct answer: answer = 761480 |
62 | Correct | 1 ms | 364 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
64 | Correct | 1 ms | 364 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 364 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 364 KB | Correct answer: answer = 59315 |
71 | Correct | 1 ms | 364 KB | Correct answer: answer = 25454 |
72 | Correct | 1 ms | 364 KB | Correct answer: answer = 1504 |
73 | Correct | 1 ms | 364 KB | Correct answer: answer = 37486 |
74 | Correct | 1 ms | 364 KB | Correct answer: answer = 4284 |
75 | Correct | 1 ms | 364 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 364 KB | Correct answer: answer = 51860 |
77 | Correct | 1 ms | 364 KB | Correct answer: answer = 12985 |
78 | Correct | 2 ms | 492 KB | Correct answer: answer = 997864126212 |
79 | Correct | 2 ms | 492 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 492 KB | Correct answer: answer = 995265560477 |
81 | Correct | 6 ms | 620 KB | Correct answer: answer = 10125000 |
82 | Correct | 7 ms | 748 KB | Correct answer: answer = 2291668 |
83 | Correct | 3 ms | 620 KB | Correct answer: answer = 42388 |
84 | Correct | 3 ms | 620 KB | Correct answer: answer = 10318 |
85 | Correct | 4 ms | 620 KB | Correct answer: answer = 3416 |
86 | Correct | 7 ms | 620 KB | Correct answer: answer = 331708193881 |
87 | Correct | 11 ms | 620 KB | Correct answer: answer = 2861193756 |
88 | Correct | 10 ms | 768 KB | Correct answer: answer = 114646930 |
89 | Correct | 7 ms | 748 KB | Correct answer: answer = 9280921 |
90 | Correct | 8 ms | 748 KB | Correct answer: answer = 999984053400 |
91 | Correct | 9 ms | 620 KB | Correct answer: answer = 750935949134 |
92 | Correct | 2 ms | 492 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 2 ms | 492 KB | Correct answer: answer = 998762383161 |
94 | Correct | 9 ms | 620 KB | Correct answer: answer = 23017412908 |
95 | Correct | 2 ms | 492 KB | Correct answer: answer = 728143410622 |
96 | Correct | 1 ms | 492 KB | Correct answer: answer = 2 |
97 | Correct | 8 ms | 748 KB | Correct answer: answer = 1824916 |
98 | Correct | 10 ms | 620 KB | Correct answer: answer = 10680029 |
99 | Correct | 9 ms | 748 KB | Correct answer: answer = 18351700 |
100 | Correct | 5 ms | 640 KB | Correct answer: answer = 16040026 |
101 | Correct | 2 ms | 492 KB | Correct answer: answer = 253968628325 |
102 | Correct | 4 ms | 492 KB | Correct answer: answer = 10267 |
103 | Correct | 10 ms | 748 KB | Correct answer: answer = 2582408 |
104 | Correct | 2 ms | 492 KB | Correct answer: answer = 78024964781 |
105 | Correct | 2 ms | 492 KB | Correct answer: answer = 9866346457 |
106 | Correct | 3 ms | 492 KB | Correct answer: answer = 3327720949 |
107 | Correct | 2 ms | 492 KB | Correct answer: answer = 86064128360 |
108 | Correct | 3 ms | 492 KB | Correct answer: answer = 12698259150 |
109 | Correct | 10 ms | 748 KB | Correct answer: answer = 1185259288 |
110 | Correct | 19 ms | 2276 KB | Correct answer: answer = 999889968863 |
111 | Correct | 20 ms | 2276 KB | Correct answer: answer = 999861384931 |
112 | Correct | 19 ms | 2276 KB | Correct answer: answer = 999811809929 |
113 | Correct | 19 ms | 2276 KB | Correct answer: answer = 999869756441 |
114 | Correct | 85 ms | 4704 KB | Correct answer: answer = 1700000000 |
115 | Correct | 123 ms | 5728 KB | Correct answer: answer = 131666670 |
116 | Correct | 33 ms | 2024 KB | Correct answer: answer = 89478486 |
117 | Correct | 32 ms | 2152 KB | Correct answer: answer = 4971040 |
118 | Correct | 31 ms | 2152 KB | Correct answer: answer = 2711494 |
119 | Correct | 111 ms | 5728 KB | Correct answer: answer = 25252530 |
120 | Correct | 114 ms | 5728 KB | Correct answer: answer = 62500000 |
121 | Correct | 92 ms | 3676 KB | Correct answer: answer = 333175097780 |
122 | Correct | 112 ms | 3552 KB | Correct answer: answer = 33121180179 |
123 | Correct | 116 ms | 3552 KB | Correct answer: answer = 9802314015 |
124 | Correct | 116 ms | 5728 KB | Correct answer: answer = 32567551 |
125 | Correct | 126 ms | 5728 KB | Correct answer: answer = 997525000000 |
126 | Correct | 104 ms | 3424 KB | Correct answer: answer = 752723538884 |
127 | Correct | 15 ms | 2276 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 18 ms | 2276 KB | Correct answer: answer = 999978000121 |
129 | Correct | 19 ms | 2276 KB | Correct answer: answer = 745986144735 |
130 | Correct | 13 ms | 2276 KB | Correct answer: answer = 2 |
131 | Correct | 131 ms | 5856 KB | Correct answer: answer = 277966670 |
132 | Correct | 79 ms | 4884 KB | Correct answer: answer = 2500900082 |
133 | Correct | 28 ms | 2276 KB | Correct answer: answer = 301248349636 |
134 | Correct | 66 ms | 2532 KB | Correct answer: answer = 14118891 |
135 | Correct | 19 ms | 2532 KB | Correct answer: answer = 14384977265 |
136 | Correct | 20 ms | 2276 KB | Correct answer: answer = 3681368330 |
137 | Correct | 20 ms | 2276 KB | Correct answer: answer = 2720316816 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 364 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 364 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 364 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 492 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 364 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 364 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 364 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 364 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 364 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 364 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 364 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 364 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 364 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 364 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 364 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 364 KB | Correct answer: answer = 1 |
22 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
24 | Correct | 1 ms | 364 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 364 KB | Correct answer: answer = 41 |
26 | Correct | 0 ms | 364 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 364 KB | Correct answer: answer = 77137 |
28 | Correct | 1 ms | 364 KB | Correct answer: answer = 764 |
29 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
30 | Correct | 1 ms | 364 KB | Correct answer: answer = 500 |
31 | Correct | 0 ms | 364 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 364 KB | Correct answer: answer = 130050 |
33 | Correct | 1 ms | 364 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 364 KB | Correct answer: answer = 2626 |
35 | Correct | 1 ms | 364 KB | Correct answer: answer = 796 |
36 | Correct | 1 ms | 364 KB | Correct answer: answer = 7580 |
37 | Correct | 1 ms | 364 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 364 KB | Correct answer: answer = 996004 |
39 | Correct | 1 ms | 512 KB | Correct answer: answer = 38817 |
40 | Correct | 1 ms | 364 KB | Correct answer: answer = 4096 |
41 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 364 KB | Correct answer: answer = 1 |
43 | Correct | 1 ms | 364 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 364 KB | Correct answer: answer = 2 |
45 | Correct | 0 ms | 364 KB | Correct answer: answer = 4 |
46 | Correct | 0 ms | 364 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 384 KB | Correct answer: answer = 9 |
48 | Correct | 1 ms | 364 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 364 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 364 KB | Correct answer: answer = 77 |
51 | Correct | 1 ms | 364 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 364 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 364 KB | Correct answer: answer = 997310 |
54 | Correct | 1 ms | 364 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 364 KB | Correct answer: answer = 996545 |
56 | Correct | 1 ms | 364 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 364 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 364 KB | Correct answer: answer = 63501 |
59 | Correct | 1 ms | 364 KB | Correct answer: answer = 323501 |
60 | Correct | 1 ms | 384 KB | Correct answer: answer = 752500 |
61 | Correct | 1 ms | 364 KB | Correct answer: answer = 761480 |
62 | Correct | 1 ms | 364 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
64 | Correct | 1 ms | 364 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 364 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 364 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 364 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 364 KB | Correct answer: answer = 59315 |
71 | Correct | 1 ms | 364 KB | Correct answer: answer = 25454 |
72 | Correct | 1 ms | 364 KB | Correct answer: answer = 1504 |
73 | Correct | 1 ms | 364 KB | Correct answer: answer = 37486 |
74 | Correct | 1 ms | 364 KB | Correct answer: answer = 4284 |
75 | Correct | 1 ms | 364 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 364 KB | Correct answer: answer = 51860 |
77 | Correct | 1 ms | 364 KB | Correct answer: answer = 12985 |
78 | Correct | 2 ms | 492 KB | Correct answer: answer = 997864126212 |
79 | Correct | 2 ms | 492 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 492 KB | Correct answer: answer = 995265560477 |
81 | Correct | 6 ms | 620 KB | Correct answer: answer = 10125000 |
82 | Correct | 7 ms | 748 KB | Correct answer: answer = 2291668 |
83 | Correct | 3 ms | 620 KB | Correct answer: answer = 42388 |
84 | Correct | 3 ms | 620 KB | Correct answer: answer = 10318 |
85 | Correct | 4 ms | 620 KB | Correct answer: answer = 3416 |
86 | Correct | 7 ms | 620 KB | Correct answer: answer = 331708193881 |
87 | Correct | 11 ms | 620 KB | Correct answer: answer = 2861193756 |
88 | Correct | 10 ms | 768 KB | Correct answer: answer = 114646930 |
89 | Correct | 7 ms | 748 KB | Correct answer: answer = 9280921 |
90 | Correct | 8 ms | 748 KB | Correct answer: answer = 999984053400 |
91 | Correct | 9 ms | 620 KB | Correct answer: answer = 750935949134 |
92 | Correct | 2 ms | 492 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 2 ms | 492 KB | Correct answer: answer = 998762383161 |
94 | Correct | 9 ms | 620 KB | Correct answer: answer = 23017412908 |
95 | Correct | 2 ms | 492 KB | Correct answer: answer = 728143410622 |
96 | Correct | 1 ms | 492 KB | Correct answer: answer = 2 |
97 | Correct | 8 ms | 748 KB | Correct answer: answer = 1824916 |
98 | Correct | 10 ms | 620 KB | Correct answer: answer = 10680029 |
99 | Correct | 9 ms | 748 KB | Correct answer: answer = 18351700 |
100 | Correct | 5 ms | 640 KB | Correct answer: answer = 16040026 |
101 | Correct | 2 ms | 492 KB | Correct answer: answer = 253968628325 |
102 | Correct | 4 ms | 492 KB | Correct answer: answer = 10267 |
103 | Correct | 10 ms | 748 KB | Correct answer: answer = 2582408 |
104 | Correct | 2 ms | 492 KB | Correct answer: answer = 78024964781 |
105 | Correct | 2 ms | 492 KB | Correct answer: answer = 9866346457 |
106 | Correct | 3 ms | 492 KB | Correct answer: answer = 3327720949 |
107 | Correct | 2 ms | 492 KB | Correct answer: answer = 86064128360 |
108 | Correct | 3 ms | 492 KB | Correct answer: answer = 12698259150 |
109 | Correct | 10 ms | 748 KB | Correct answer: answer = 1185259288 |
110 | Correct | 19 ms | 2276 KB | Correct answer: answer = 999889968863 |
111 | Correct | 20 ms | 2276 KB | Correct answer: answer = 999861384931 |
112 | Correct | 19 ms | 2276 KB | Correct answer: answer = 999811809929 |
113 | Correct | 19 ms | 2276 KB | Correct answer: answer = 999869756441 |
114 | Correct | 85 ms | 4704 KB | Correct answer: answer = 1700000000 |
115 | Correct | 123 ms | 5728 KB | Correct answer: answer = 131666670 |
116 | Correct | 33 ms | 2024 KB | Correct answer: answer = 89478486 |
117 | Correct | 32 ms | 2152 KB | Correct answer: answer = 4971040 |
118 | Correct | 31 ms | 2152 KB | Correct answer: answer = 2711494 |
119 | Correct | 111 ms | 5728 KB | Correct answer: answer = 25252530 |
120 | Correct | 114 ms | 5728 KB | Correct answer: answer = 62500000 |
121 | Correct | 92 ms | 3676 KB | Correct answer: answer = 333175097780 |
122 | Correct | 112 ms | 3552 KB | Correct answer: answer = 33121180179 |
123 | Correct | 116 ms | 3552 KB | Correct answer: answer = 9802314015 |
124 | Correct | 116 ms | 5728 KB | Correct answer: answer = 32567551 |
125 | Correct | 126 ms | 5728 KB | Correct answer: answer = 997525000000 |
126 | Correct | 104 ms | 3424 KB | Correct answer: answer = 752723538884 |
127 | Correct | 15 ms | 2276 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 18 ms | 2276 KB | Correct answer: answer = 999978000121 |
129 | Correct | 19 ms | 2276 KB | Correct answer: answer = 745986144735 |
130 | Correct | 13 ms | 2276 KB | Correct answer: answer = 2 |
131 | Correct | 131 ms | 5856 KB | Correct answer: answer = 277966670 |
132 | Correct | 79 ms | 4884 KB | Correct answer: answer = 2500900082 |
133 | Correct | 28 ms | 2276 KB | Correct answer: answer = 301248349636 |
134 | Correct | 66 ms | 2532 KB | Correct answer: answer = 14118891 |
135 | Correct | 19 ms | 2532 KB | Correct answer: answer = 14384977265 |
136 | Correct | 20 ms | 2276 KB | Correct answer: answer = 3681368330 |
137 | Correct | 20 ms | 2276 KB | Correct answer: answer = 2720316816 |
138 | Correct | 39 ms | 4064 KB | Correct answer: answer = 999976000144 |
139 | Correct | 38 ms | 4064 KB | Correct answer: answer = 999856102410 |
140 | Correct | 38 ms | 4064 KB | Correct answer: answer = 999958401531 |
141 | Correct | 40 ms | 4320 KB | Correct answer: answer = 999769649944 |
142 | Correct | 38 ms | 4064 KB | Correct answer: answer = 999874525918 |
143 | Correct | 215 ms | 9180 KB | Correct answer: answer = 6050000000 |
144 | Correct | 270 ms | 11224 KB | Correct answer: answer = 1112500000 |
145 | Correct | 89 ms | 6748 KB | Correct answer: answer = 4294967296 |
146 | Correct | 173 ms | 7384 KB | Correct answer: answer = 87652406 |
147 | Correct | 146 ms | 7512 KB | Correct answer: answer = 6297664 |
148 | Correct | 145 ms | 7512 KB | Correct answer: answer = 196612 |
149 | Correct | 234 ms | 11224 KB | Correct answer: answer = 15015100 |
150 | Correct | 232 ms | 11224 KB | Correct answer: answer = 25000000 |
151 | Correct | 184 ms | 6744 KB | Correct answer: answer = 333230209550 |
152 | Correct | 246 ms | 6872 KB | Correct answer: answer = 917123769 |
153 | Correct | 264 ms | 11224 KB | Correct answer: answer = 95162 |
154 | Correct | 247 ms | 11224 KB | Correct answer: answer = 382616191 |
155 | Correct | 252 ms | 11224 KB | Correct answer: answer = 990033333400 |
156 | Correct | 274 ms | 11224 KB | Correct answer: answer = 990000100000 |
157 | Correct | 214 ms | 9048 KB | Correct answer: answer = 749998188180 |
158 | Correct | 30 ms | 4064 KB | Correct answer: answer = 1000000000000 |
159 | Correct | 37 ms | 4064 KB | Correct answer: answer = 999988000036 |
160 | Correct | 40 ms | 4064 KB | Correct answer: answer = 744929274393 |
161 | Correct | 24 ms | 4064 KB | Correct answer: answer = 2 |
162 | Correct | 256 ms | 11380 KB | Correct answer: answer = 1300024 |
163 | Correct | 229 ms | 9556 KB | Correct answer: answer = 5000700010 |
164 | Correct | 53 ms | 4192 KB | Correct answer: answer = 354997100800 |
165 | Correct | 133 ms | 5724 KB | Correct answer: answer = 257000 |
166 | Correct | 152 ms | 5728 KB | Correct answer: answer = 3765323 |
167 | Correct | 138 ms | 5728 KB | Correct answer: answer = 1525903 |
168 | Correct | 40 ms | 4220 KB | Correct answer: answer = 67618137730 |
169 | Correct | 39 ms | 4064 KB | Correct answer: answer = 12656680171 |
170 | Correct | 43 ms | 4064 KB | Correct answer: answer = 579831736 |
171 | Correct | 102 ms | 5184 KB | Correct answer: answer = 23605611 |
172 | Correct | 44 ms | 4064 KB | Correct answer: answer = 7052481200 |
173 | Correct | 60 ms | 4600 KB | Correct answer: answer = 1314039500 |
174 | Correct | 77 ms | 5468 KB | Correct answer: answer = 302484000 |
175 | Correct | 160 ms | 6876 KB | Correct answer: answer = 52348480 |