# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
70872 | 2018-08-23T14:45:56 Z | aquablitz11 | Aliens (IOI16_aliens) | C++14 | 258 ms | 37520 KB |
#include <bits/stdc++.h> #include "aliens.h" using namespace std; using ll = long long; using pli = pair<ll, int>; using pii = pair<int, int>; #define F first #define S second struct CHT { struct line { ll m, c; int cnt; line(ll m, ll c, int cnt) : m(m), c(c), cnt(cnt) {} ll get(ll x) { return m*x + c; } }; bool bad(line l1, line l2, line l3) { return (l3.c-l1.c)*(l1.m-l2.m) <= (l2.c-l1.c)*(l1.m-l3.m); } vector<line> f; int idx; void update(ll m, ll c, int cnt) { line l(m, c, cnt); while (f.size() > 1 && bad(f[f.size()-2], f[f.size()-1], l)) f.pop_back(); f.push_back(l); } pli query(ll x) { while (idx < f.size()-1 && f[idx].get(x) > f[idx+1].get(x)) ++idx; return pli(f[idx].get(x), f[idx].cnt); } void clear() { f.clear(); idx = 0; } } cht; int n; vector<pii> A; void compress() { sort(A.begin(), A.end(), [&] (pii a, pii b) { return pii(a.F, -a.S) < pii(b.F, -b.S); }); vector<pii> ret; int en = -1; for (auto x : A) if (x.S > en) ret.push_back(x), en = x.S; A = ret; n = A.size(); A.insert(A.begin(), pii(-1e7, -1e7)); } inline ll sq(ll x) { return x*x; } pli solve(ll C) { vector<pli> dp(n+1); cht.clear(); dp[0] = pli(0, 0); for (int i = 1; i <= n; ++i) { cht.update(-2*A[i].F+2, sq(A[i].F-1)+dp[i-1].F-sq(max(0, A[i-1].S-A[i].F+1)), dp[i-1].S); pli q = cht.query(A[i].S); dp[i] = pli(q.F + sq(A[i].S) + C, q.S+1); } return dp[n]; } long long take_photos(int n, int m, int k, vector<int> r, vector<int> c) { for (int i = 0; i < n; ++i) A.push_back(minmax(r[i], c[i])); compress(); ll b = 0, e = 1e17; while (b < e) { ll v = (b+e)/2; if (solve(v).S <= k) e = v; else b = v+1; } return solve(b).F - b*k; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Correct answer: answer = 4 |
2 | Correct | 3 ms | 356 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 432 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 508 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 508 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 544 KB | Correct answer: answer = 210 |
7 | Correct | 3 ms | 544 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 544 KB | Correct answer: answer = 7696 |
9 | Correct | 3 ms | 544 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 544 KB | Correct answer: answer = 2374 |
11 | Correct | 2 ms | 560 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 560 KB | Correct answer: answer = 49 |
13 | Correct | 3 ms | 560 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 560 KB | Correct answer: answer = 7220 |
16 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
17 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
18 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 560 KB | Correct answer: answer = 624 |
20 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 560 KB | Correct answer: answer = 1 |
2 | Correct | 2 ms | 560 KB | Correct answer: answer = 4 |
3 | Correct | 3 ms | 560 KB | Correct answer: answer = 1 |
4 | Correct | 2 ms | 560 KB | Correct answer: answer = 5 |
5 | Correct | 3 ms | 560 KB | Correct answer: answer = 41 |
6 | Correct | 2 ms | 560 KB | Correct answer: answer = 71923 |
7 | Correct | 3 ms | 616 KB | Correct answer: answer = 77137 |
8 | Correct | 3 ms | 616 KB | Correct answer: answer = 764 |
9 | Correct | 4 ms | 616 KB | Correct answer: answer = 250000 |
10 | Correct | 4 ms | 620 KB | Correct answer: answer = 500 |
11 | Correct | 3 ms | 620 KB | Correct answer: answer = 32 |
12 | Correct | 4 ms | 628 KB | Correct answer: answer = 130050 |
13 | Correct | 4 ms | 632 KB | Correct answer: answer = 5110 |
14 | Correct | 3 ms | 644 KB | Correct answer: answer = 2626 |
15 | Correct | 3 ms | 644 KB | Correct answer: answer = 796 |
16 | Correct | 3 ms | 648 KB | Correct answer: answer = 7580 |
17 | Correct | 3 ms | 652 KB | Correct answer: answer = 1904 |
18 | Correct | 3 ms | 652 KB | Correct answer: answer = 996004 |
19 | Correct | 6 ms | 652 KB | Correct answer: answer = 38817 |
20 | Correct | 4 ms | 656 KB | Correct answer: answer = 4096 |
21 | Correct | 2 ms | 660 KB | Correct answer: answer = 1 |
22 | Correct | 3 ms | 660 KB | Correct answer: answer = 1 |
23 | Correct | 3 ms | 668 KB | Correct answer: answer = 2040 |
24 | Correct | 2 ms | 668 KB | Correct answer: answer = 2 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Correct answer: answer = 4 |
2 | Correct | 3 ms | 356 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 432 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 508 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 508 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 544 KB | Correct answer: answer = 210 |
7 | Correct | 3 ms | 544 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 544 KB | Correct answer: answer = 7696 |
9 | Correct | 3 ms | 544 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 544 KB | Correct answer: answer = 2374 |
11 | Correct | 2 ms | 560 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 560 KB | Correct answer: answer = 49 |
13 | Correct | 3 ms | 560 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 560 KB | Correct answer: answer = 7220 |
16 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
17 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
18 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 560 KB | Correct answer: answer = 624 |
20 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
21 | Correct | 4 ms | 560 KB | Correct answer: answer = 1 |
22 | Correct | 2 ms | 560 KB | Correct answer: answer = 4 |
23 | Correct | 3 ms | 560 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 560 KB | Correct answer: answer = 5 |
25 | Correct | 3 ms | 560 KB | Correct answer: answer = 41 |
26 | Correct | 2 ms | 560 KB | Correct answer: answer = 71923 |
27 | Correct | 3 ms | 616 KB | Correct answer: answer = 77137 |
28 | Correct | 3 ms | 616 KB | Correct answer: answer = 764 |
29 | Correct | 4 ms | 616 KB | Correct answer: answer = 250000 |
30 | Correct | 4 ms | 620 KB | Correct answer: answer = 500 |
31 | Correct | 3 ms | 620 KB | Correct answer: answer = 32 |
32 | Correct | 4 ms | 628 KB | Correct answer: answer = 130050 |
33 | Correct | 4 ms | 632 KB | Correct answer: answer = 5110 |
34 | Correct | 3 ms | 644 KB | Correct answer: answer = 2626 |
35 | Correct | 3 ms | 644 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 648 KB | Correct answer: answer = 7580 |
37 | Correct | 3 ms | 652 KB | Correct answer: answer = 1904 |
38 | Correct | 3 ms | 652 KB | Correct answer: answer = 996004 |
39 | Correct | 6 ms | 652 KB | Correct answer: answer = 38817 |
40 | Correct | 4 ms | 656 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 660 KB | Correct answer: answer = 1 |
42 | Correct | 3 ms | 660 KB | Correct answer: answer = 1 |
43 | Correct | 3 ms | 668 KB | Correct answer: answer = 2040 |
44 | Correct | 2 ms | 668 KB | Correct answer: answer = 2 |
45 | Correct | 3 ms | 668 KB | Correct answer: answer = 4 |
46 | Correct | 3 ms | 668 KB | Correct answer: answer = 9 |
47 | Correct | 3 ms | 668 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 668 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 668 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 668 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 668 KB | Correct answer: answer = 400 |
52 | Correct | 3 ms | 688 KB | Correct answer: answer = 996004 |
53 | Correct | 3 ms | 692 KB | Correct answer: answer = 997310 |
54 | Correct | 3 ms | 696 KB | Correct answer: answer = 990781 |
55 | Correct | 4 ms | 700 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 708 KB | Correct answer: answer = 484 |
57 | Correct | 4 ms | 708 KB | Correct answer: answer = 484 |
58 | Correct | 4 ms | 712 KB | Correct answer: answer = 63501 |
59 | Correct | 4 ms | 712 KB | Correct answer: answer = 323501 |
60 | Correct | 3 ms | 720 KB | Correct answer: answer = 752500 |
61 | Correct | 3 ms | 724 KB | Correct answer: answer = 761480 |
62 | Correct | 3 ms | 728 KB | Correct answer: answer = 758932 |
63 | Correct | 2 ms | 836 KB | Correct answer: answer = 1000000 |
64 | Correct | 4 ms | 836 KB | Correct answer: answer = 750500 |
65 | Correct | 3 ms | 836 KB | Correct answer: answer = 1000000 |
66 | Correct | 3 ms | 836 KB | Correct answer: answer = 250000 |
67 | Correct | 3 ms | 836 KB | Correct answer: answer = 250000 |
68 | Correct | 4 ms | 836 KB | Correct answer: answer = 1000000 |
69 | Correct | 3 ms | 836 KB | Correct answer: answer = 994009 |
70 | Correct | 4 ms | 836 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 884 KB | Correct answer: answer = 25454 |
72 | Correct | 3 ms | 884 KB | Correct answer: answer = 1504 |
73 | Correct | 4 ms | 884 KB | Correct answer: answer = 37486 |
74 | Correct | 3 ms | 884 KB | Correct answer: answer = 4284 |
75 | Correct | 3 ms | 884 KB | Correct answer: answer = 158008 |
76 | Correct | 4 ms | 884 KB | Correct answer: answer = 51860 |
77 | Correct | 3 ms | 904 KB | Correct answer: answer = 12985 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Correct answer: answer = 4 |
2 | Correct | 3 ms | 356 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 432 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 508 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 508 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 544 KB | Correct answer: answer = 210 |
7 | Correct | 3 ms | 544 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 544 KB | Correct answer: answer = 7696 |
9 | Correct | 3 ms | 544 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 544 KB | Correct answer: answer = 2374 |
11 | Correct | 2 ms | 560 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 560 KB | Correct answer: answer = 49 |
13 | Correct | 3 ms | 560 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 560 KB | Correct answer: answer = 7220 |
16 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
17 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
18 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 560 KB | Correct answer: answer = 624 |
20 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
21 | Correct | 4 ms | 560 KB | Correct answer: answer = 1 |
22 | Correct | 2 ms | 560 KB | Correct answer: answer = 4 |
23 | Correct | 3 ms | 560 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 560 KB | Correct answer: answer = 5 |
25 | Correct | 3 ms | 560 KB | Correct answer: answer = 41 |
26 | Correct | 2 ms | 560 KB | Correct answer: answer = 71923 |
27 | Correct | 3 ms | 616 KB | Correct answer: answer = 77137 |
28 | Correct | 3 ms | 616 KB | Correct answer: answer = 764 |
29 | Correct | 4 ms | 616 KB | Correct answer: answer = 250000 |
30 | Correct | 4 ms | 620 KB | Correct answer: answer = 500 |
31 | Correct | 3 ms | 620 KB | Correct answer: answer = 32 |
32 | Correct | 4 ms | 628 KB | Correct answer: answer = 130050 |
33 | Correct | 4 ms | 632 KB | Correct answer: answer = 5110 |
34 | Correct | 3 ms | 644 KB | Correct answer: answer = 2626 |
35 | Correct | 3 ms | 644 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 648 KB | Correct answer: answer = 7580 |
37 | Correct | 3 ms | 652 KB | Correct answer: answer = 1904 |
38 | Correct | 3 ms | 652 KB | Correct answer: answer = 996004 |
39 | Correct | 6 ms | 652 KB | Correct answer: answer = 38817 |
40 | Correct | 4 ms | 656 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 660 KB | Correct answer: answer = 1 |
42 | Correct | 3 ms | 660 KB | Correct answer: answer = 1 |
43 | Correct | 3 ms | 668 KB | Correct answer: answer = 2040 |
44 | Correct | 2 ms | 668 KB | Correct answer: answer = 2 |
45 | Correct | 3 ms | 668 KB | Correct answer: answer = 4 |
46 | Correct | 3 ms | 668 KB | Correct answer: answer = 9 |
47 | Correct | 3 ms | 668 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 668 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 668 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 668 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 668 KB | Correct answer: answer = 400 |
52 | Correct | 3 ms | 688 KB | Correct answer: answer = 996004 |
53 | Correct | 3 ms | 692 KB | Correct answer: answer = 997310 |
54 | Correct | 3 ms | 696 KB | Correct answer: answer = 990781 |
55 | Correct | 4 ms | 700 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 708 KB | Correct answer: answer = 484 |
57 | Correct | 4 ms | 708 KB | Correct answer: answer = 484 |
58 | Correct | 4 ms | 712 KB | Correct answer: answer = 63501 |
59 | Correct | 4 ms | 712 KB | Correct answer: answer = 323501 |
60 | Correct | 3 ms | 720 KB | Correct answer: answer = 752500 |
61 | Correct | 3 ms | 724 KB | Correct answer: answer = 761480 |
62 | Correct | 3 ms | 728 KB | Correct answer: answer = 758932 |
63 | Correct | 2 ms | 836 KB | Correct answer: answer = 1000000 |
64 | Correct | 4 ms | 836 KB | Correct answer: answer = 750500 |
65 | Correct | 3 ms | 836 KB | Correct answer: answer = 1000000 |
66 | Correct | 3 ms | 836 KB | Correct answer: answer = 250000 |
67 | Correct | 3 ms | 836 KB | Correct answer: answer = 250000 |
68 | Correct | 4 ms | 836 KB | Correct answer: answer = 1000000 |
69 | Correct | 3 ms | 836 KB | Correct answer: answer = 994009 |
70 | Correct | 4 ms | 836 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 884 KB | Correct answer: answer = 25454 |
72 | Correct | 3 ms | 884 KB | Correct answer: answer = 1504 |
73 | Correct | 4 ms | 884 KB | Correct answer: answer = 37486 |
74 | Correct | 3 ms | 884 KB | Correct answer: answer = 4284 |
75 | Correct | 3 ms | 884 KB | Correct answer: answer = 158008 |
76 | Correct | 4 ms | 884 KB | Correct answer: answer = 51860 |
77 | Correct | 3 ms | 904 KB | Correct answer: answer = 12985 |
78 | Correct | 6 ms | 928 KB | Correct answer: answer = 997864126212 |
79 | Correct | 5 ms | 984 KB | Correct answer: answer = 998608411647 |
80 | Correct | 6 ms | 1040 KB | Correct answer: answer = 995265560477 |
81 | Correct | 10 ms | 1224 KB | Correct answer: answer = 10125000 |
82 | Correct | 10 ms | 1316 KB | Correct answer: answer = 2291668 |
83 | Correct | 6 ms | 1316 KB | Correct answer: answer = 42388 |
84 | Correct | 6 ms | 1316 KB | Correct answer: answer = 10318 |
85 | Correct | 6 ms | 1316 KB | Correct answer: answer = 3416 |
86 | Correct | 13 ms | 1316 KB | Correct answer: answer = 331708193881 |
87 | Correct | 14 ms | 1316 KB | Correct answer: answer = 2861193756 |
88 | Correct | 11 ms | 1456 KB | Correct answer: answer = 114646930 |
89 | Correct | 9 ms | 1512 KB | Correct answer: answer = 9280921 |
90 | Correct | 9 ms | 1680 KB | Correct answer: answer = 999984053400 |
91 | Correct | 13 ms | 1680 KB | Correct answer: answer = 750935949134 |
92 | Correct | 4 ms | 1680 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 5 ms | 1680 KB | Correct answer: answer = 998762383161 |
94 | Correct | 13 ms | 1680 KB | Correct answer: answer = 23017412908 |
95 | Correct | 6 ms | 1708 KB | Correct answer: answer = 728143410622 |
96 | Correct | 4 ms | 1744 KB | Correct answer: answer = 2 |
97 | Correct | 10 ms | 1888 KB | Correct answer: answer = 1824916 |
98 | Correct | 12 ms | 1928 KB | Correct answer: answer = 10680029 |
99 | Correct | 10 ms | 1976 KB | Correct answer: answer = 18351700 |
100 | Correct | 9 ms | 2044 KB | Correct answer: answer = 16040026 |
101 | Correct | 5 ms | 2044 KB | Correct answer: answer = 253968628325 |
102 | Correct | 8 ms | 2044 KB | Correct answer: answer = 10267 |
103 | Correct | 12 ms | 2136 KB | Correct answer: answer = 2582408 |
104 | Correct | 6 ms | 2136 KB | Correct answer: answer = 78024964781 |
105 | Correct | 5 ms | 2136 KB | Correct answer: answer = 9866346457 |
106 | Correct | 5 ms | 2168 KB | Correct answer: answer = 3327720949 |
107 | Correct | 5 ms | 2224 KB | Correct answer: answer = 86064128360 |
108 | Correct | 6 ms | 2280 KB | Correct answer: answer = 12698259150 |
109 | Correct | 10 ms | 2464 KB | Correct answer: answer = 1185259288 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Correct answer: answer = 4 |
2 | Correct | 3 ms | 356 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 432 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 508 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 508 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 544 KB | Correct answer: answer = 210 |
7 | Correct | 3 ms | 544 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 544 KB | Correct answer: answer = 7696 |
9 | Correct | 3 ms | 544 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 544 KB | Correct answer: answer = 2374 |
11 | Correct | 2 ms | 560 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 560 KB | Correct answer: answer = 49 |
13 | Correct | 3 ms | 560 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 560 KB | Correct answer: answer = 7220 |
16 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
17 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
18 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 560 KB | Correct answer: answer = 624 |
20 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
21 | Correct | 4 ms | 560 KB | Correct answer: answer = 1 |
22 | Correct | 2 ms | 560 KB | Correct answer: answer = 4 |
23 | Correct | 3 ms | 560 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 560 KB | Correct answer: answer = 5 |
25 | Correct | 3 ms | 560 KB | Correct answer: answer = 41 |
26 | Correct | 2 ms | 560 KB | Correct answer: answer = 71923 |
27 | Correct | 3 ms | 616 KB | Correct answer: answer = 77137 |
28 | Correct | 3 ms | 616 KB | Correct answer: answer = 764 |
29 | Correct | 4 ms | 616 KB | Correct answer: answer = 250000 |
30 | Correct | 4 ms | 620 KB | Correct answer: answer = 500 |
31 | Correct | 3 ms | 620 KB | Correct answer: answer = 32 |
32 | Correct | 4 ms | 628 KB | Correct answer: answer = 130050 |
33 | Correct | 4 ms | 632 KB | Correct answer: answer = 5110 |
34 | Correct | 3 ms | 644 KB | Correct answer: answer = 2626 |
35 | Correct | 3 ms | 644 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 648 KB | Correct answer: answer = 7580 |
37 | Correct | 3 ms | 652 KB | Correct answer: answer = 1904 |
38 | Correct | 3 ms | 652 KB | Correct answer: answer = 996004 |
39 | Correct | 6 ms | 652 KB | Correct answer: answer = 38817 |
40 | Correct | 4 ms | 656 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 660 KB | Correct answer: answer = 1 |
42 | Correct | 3 ms | 660 KB | Correct answer: answer = 1 |
43 | Correct | 3 ms | 668 KB | Correct answer: answer = 2040 |
44 | Correct | 2 ms | 668 KB | Correct answer: answer = 2 |
45 | Correct | 3 ms | 668 KB | Correct answer: answer = 4 |
46 | Correct | 3 ms | 668 KB | Correct answer: answer = 9 |
47 | Correct | 3 ms | 668 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 668 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 668 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 668 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 668 KB | Correct answer: answer = 400 |
52 | Correct | 3 ms | 688 KB | Correct answer: answer = 996004 |
53 | Correct | 3 ms | 692 KB | Correct answer: answer = 997310 |
54 | Correct | 3 ms | 696 KB | Correct answer: answer = 990781 |
55 | Correct | 4 ms | 700 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 708 KB | Correct answer: answer = 484 |
57 | Correct | 4 ms | 708 KB | Correct answer: answer = 484 |
58 | Correct | 4 ms | 712 KB | Correct answer: answer = 63501 |
59 | Correct | 4 ms | 712 KB | Correct answer: answer = 323501 |
60 | Correct | 3 ms | 720 KB | Correct answer: answer = 752500 |
61 | Correct | 3 ms | 724 KB | Correct answer: answer = 761480 |
62 | Correct | 3 ms | 728 KB | Correct answer: answer = 758932 |
63 | Correct | 2 ms | 836 KB | Correct answer: answer = 1000000 |
64 | Correct | 4 ms | 836 KB | Correct answer: answer = 750500 |
65 | Correct | 3 ms | 836 KB | Correct answer: answer = 1000000 |
66 | Correct | 3 ms | 836 KB | Correct answer: answer = 250000 |
67 | Correct | 3 ms | 836 KB | Correct answer: answer = 250000 |
68 | Correct | 4 ms | 836 KB | Correct answer: answer = 1000000 |
69 | Correct | 3 ms | 836 KB | Correct answer: answer = 994009 |
70 | Correct | 4 ms | 836 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 884 KB | Correct answer: answer = 25454 |
72 | Correct | 3 ms | 884 KB | Correct answer: answer = 1504 |
73 | Correct | 4 ms | 884 KB | Correct answer: answer = 37486 |
74 | Correct | 3 ms | 884 KB | Correct answer: answer = 4284 |
75 | Correct | 3 ms | 884 KB | Correct answer: answer = 158008 |
76 | Correct | 4 ms | 884 KB | Correct answer: answer = 51860 |
77 | Correct | 3 ms | 904 KB | Correct answer: answer = 12985 |
78 | Correct | 6 ms | 928 KB | Correct answer: answer = 997864126212 |
79 | Correct | 5 ms | 984 KB | Correct answer: answer = 998608411647 |
80 | Correct | 6 ms | 1040 KB | Correct answer: answer = 995265560477 |
81 | Correct | 10 ms | 1224 KB | Correct answer: answer = 10125000 |
82 | Correct | 10 ms | 1316 KB | Correct answer: answer = 2291668 |
83 | Correct | 6 ms | 1316 KB | Correct answer: answer = 42388 |
84 | Correct | 6 ms | 1316 KB | Correct answer: answer = 10318 |
85 | Correct | 6 ms | 1316 KB | Correct answer: answer = 3416 |
86 | Correct | 13 ms | 1316 KB | Correct answer: answer = 331708193881 |
87 | Correct | 14 ms | 1316 KB | Correct answer: answer = 2861193756 |
88 | Correct | 11 ms | 1456 KB | Correct answer: answer = 114646930 |
89 | Correct | 9 ms | 1512 KB | Correct answer: answer = 9280921 |
90 | Correct | 9 ms | 1680 KB | Correct answer: answer = 999984053400 |
91 | Correct | 13 ms | 1680 KB | Correct answer: answer = 750935949134 |
92 | Correct | 4 ms | 1680 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 5 ms | 1680 KB | Correct answer: answer = 998762383161 |
94 | Correct | 13 ms | 1680 KB | Correct answer: answer = 23017412908 |
95 | Correct | 6 ms | 1708 KB | Correct answer: answer = 728143410622 |
96 | Correct | 4 ms | 1744 KB | Correct answer: answer = 2 |
97 | Correct | 10 ms | 1888 KB | Correct answer: answer = 1824916 |
98 | Correct | 12 ms | 1928 KB | Correct answer: answer = 10680029 |
99 | Correct | 10 ms | 1976 KB | Correct answer: answer = 18351700 |
100 | Correct | 9 ms | 2044 KB | Correct answer: answer = 16040026 |
101 | Correct | 5 ms | 2044 KB | Correct answer: answer = 253968628325 |
102 | Correct | 8 ms | 2044 KB | Correct answer: answer = 10267 |
103 | Correct | 12 ms | 2136 KB | Correct answer: answer = 2582408 |
104 | Correct | 6 ms | 2136 KB | Correct answer: answer = 78024964781 |
105 | Correct | 5 ms | 2136 KB | Correct answer: answer = 9866346457 |
106 | Correct | 5 ms | 2168 KB | Correct answer: answer = 3327720949 |
107 | Correct | 5 ms | 2224 KB | Correct answer: answer = 86064128360 |
108 | Correct | 6 ms | 2280 KB | Correct answer: answer = 12698259150 |
109 | Correct | 10 ms | 2464 KB | Correct answer: answer = 1185259288 |
110 | Correct | 27 ms | 4308 KB | Correct answer: answer = 999889968863 |
111 | Correct | 26 ms | 5020 KB | Correct answer: answer = 999861384931 |
112 | Correct | 25 ms | 5660 KB | Correct answer: answer = 999811809929 |
113 | Correct | 27 ms | 6336 KB | Correct answer: answer = 999869756441 |
114 | Correct | 104 ms | 9812 KB | Correct answer: answer = 1700000000 |
115 | Correct | 131 ms | 10256 KB | Correct answer: answer = 131666670 |
116 | Correct | 32 ms | 10256 KB | Correct answer: answer = 89478486 |
117 | Correct | 32 ms | 10256 KB | Correct answer: answer = 4971040 |
118 | Correct | 30 ms | 10256 KB | Correct answer: answer = 2711494 |
119 | Correct | 101 ms | 11340 KB | Correct answer: answer = 25252530 |
120 | Correct | 95 ms | 12032 KB | Correct answer: answer = 62500000 |
121 | Correct | 122 ms | 12032 KB | Correct answer: answer = 333175097780 |
122 | Correct | 115 ms | 12032 KB | Correct answer: answer = 33121180179 |
123 | Correct | 128 ms | 12032 KB | Correct answer: answer = 9802314015 |
124 | Correct | 99 ms | 14528 KB | Correct answer: answer = 32567551 |
125 | Correct | 96 ms | 15320 KB | Correct answer: answer = 997525000000 |
126 | Correct | 125 ms | 15320 KB | Correct answer: answer = 752723538884 |
127 | Correct | 20 ms | 15320 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 29 ms | 15320 KB | Correct answer: answer = 999978000121 |
129 | Correct | 31 ms | 15320 KB | Correct answer: answer = 745986144735 |
130 | Correct | 17 ms | 15320 KB | Correct answer: answer = 2 |
131 | Correct | 105 ms | 18660 KB | Correct answer: answer = 277966670 |
132 | Correct | 88 ms | 19200 KB | Correct answer: answer = 2500900082 |
133 | Correct | 37 ms | 19200 KB | Correct answer: answer = 301248349636 |
134 | Correct | 56 ms | 19200 KB | Correct answer: answer = 14118891 |
135 | Correct | 30 ms | 19200 KB | Correct answer: answer = 14384977265 |
136 | Correct | 31 ms | 19200 KB | Correct answer: answer = 3681368330 |
137 | Correct | 29 ms | 19224 KB | Correct answer: answer = 2720316816 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Correct answer: answer = 4 |
2 | Correct | 3 ms | 356 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 432 KB | Correct answer: answer = 4 |
4 | Correct | 2 ms | 508 KB | Correct answer: answer = 12 |
5 | Correct | 2 ms | 508 KB | Correct answer: answer = 52 |
6 | Correct | 2 ms | 544 KB | Correct answer: answer = 210 |
7 | Correct | 3 ms | 544 KB | Correct answer: answer = 88 |
8 | Correct | 2 ms | 544 KB | Correct answer: answer = 7696 |
9 | Correct | 3 ms | 544 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 544 KB | Correct answer: answer = 2374 |
11 | Correct | 2 ms | 560 KB | Correct answer: answer = 9502 |
12 | Correct | 2 ms | 560 KB | Correct answer: answer = 49 |
13 | Correct | 3 ms | 560 KB | Correct answer: answer = 151 |
14 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
15 | Correct | 2 ms | 560 KB | Correct answer: answer = 7220 |
16 | Correct | 3 ms | 560 KB | Correct answer: answer = 7550 |
17 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
18 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
19 | Correct | 2 ms | 560 KB | Correct answer: answer = 624 |
20 | Correct | 3 ms | 560 KB | Correct answer: answer = 10000 |
21 | Correct | 4 ms | 560 KB | Correct answer: answer = 1 |
22 | Correct | 2 ms | 560 KB | Correct answer: answer = 4 |
23 | Correct | 3 ms | 560 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 560 KB | Correct answer: answer = 5 |
25 | Correct | 3 ms | 560 KB | Correct answer: answer = 41 |
26 | Correct | 2 ms | 560 KB | Correct answer: answer = 71923 |
27 | Correct | 3 ms | 616 KB | Correct answer: answer = 77137 |
28 | Correct | 3 ms | 616 KB | Correct answer: answer = 764 |
29 | Correct | 4 ms | 616 KB | Correct answer: answer = 250000 |
30 | Correct | 4 ms | 620 KB | Correct answer: answer = 500 |
31 | Correct | 3 ms | 620 KB | Correct answer: answer = 32 |
32 | Correct | 4 ms | 628 KB | Correct answer: answer = 130050 |
33 | Correct | 4 ms | 632 KB | Correct answer: answer = 5110 |
34 | Correct | 3 ms | 644 KB | Correct answer: answer = 2626 |
35 | Correct | 3 ms | 644 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 648 KB | Correct answer: answer = 7580 |
37 | Correct | 3 ms | 652 KB | Correct answer: answer = 1904 |
38 | Correct | 3 ms | 652 KB | Correct answer: answer = 996004 |
39 | Correct | 6 ms | 652 KB | Correct answer: answer = 38817 |
40 | Correct | 4 ms | 656 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 660 KB | Correct answer: answer = 1 |
42 | Correct | 3 ms | 660 KB | Correct answer: answer = 1 |
43 | Correct | 3 ms | 668 KB | Correct answer: answer = 2040 |
44 | Correct | 2 ms | 668 KB | Correct answer: answer = 2 |
45 | Correct | 3 ms | 668 KB | Correct answer: answer = 4 |
46 | Correct | 3 ms | 668 KB | Correct answer: answer = 9 |
47 | Correct | 3 ms | 668 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 668 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 668 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 668 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 668 KB | Correct answer: answer = 400 |
52 | Correct | 3 ms | 688 KB | Correct answer: answer = 996004 |
53 | Correct | 3 ms | 692 KB | Correct answer: answer = 997310 |
54 | Correct | 3 ms | 696 KB | Correct answer: answer = 990781 |
55 | Correct | 4 ms | 700 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 708 KB | Correct answer: answer = 484 |
57 | Correct | 4 ms | 708 KB | Correct answer: answer = 484 |
58 | Correct | 4 ms | 712 KB | Correct answer: answer = 63501 |
59 | Correct | 4 ms | 712 KB | Correct answer: answer = 323501 |
60 | Correct | 3 ms | 720 KB | Correct answer: answer = 752500 |
61 | Correct | 3 ms | 724 KB | Correct answer: answer = 761480 |
62 | Correct | 3 ms | 728 KB | Correct answer: answer = 758932 |
63 | Correct | 2 ms | 836 KB | Correct answer: answer = 1000000 |
64 | Correct | 4 ms | 836 KB | Correct answer: answer = 750500 |
65 | Correct | 3 ms | 836 KB | Correct answer: answer = 1000000 |
66 | Correct | 3 ms | 836 KB | Correct answer: answer = 250000 |
67 | Correct | 3 ms | 836 KB | Correct answer: answer = 250000 |
68 | Correct | 4 ms | 836 KB | Correct answer: answer = 1000000 |
69 | Correct | 3 ms | 836 KB | Correct answer: answer = 994009 |
70 | Correct | 4 ms | 836 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 884 KB | Correct answer: answer = 25454 |
72 | Correct | 3 ms | 884 KB | Correct answer: answer = 1504 |
73 | Correct | 4 ms | 884 KB | Correct answer: answer = 37486 |
74 | Correct | 3 ms | 884 KB | Correct answer: answer = 4284 |
75 | Correct | 3 ms | 884 KB | Correct answer: answer = 158008 |
76 | Correct | 4 ms | 884 KB | Correct answer: answer = 51860 |
77 | Correct | 3 ms | 904 KB | Correct answer: answer = 12985 |
78 | Correct | 6 ms | 928 KB | Correct answer: answer = 997864126212 |
79 | Correct | 5 ms | 984 KB | Correct answer: answer = 998608411647 |
80 | Correct | 6 ms | 1040 KB | Correct answer: answer = 995265560477 |
81 | Correct | 10 ms | 1224 KB | Correct answer: answer = 10125000 |
82 | Correct | 10 ms | 1316 KB | Correct answer: answer = 2291668 |
83 | Correct | 6 ms | 1316 KB | Correct answer: answer = 42388 |
84 | Correct | 6 ms | 1316 KB | Correct answer: answer = 10318 |
85 | Correct | 6 ms | 1316 KB | Correct answer: answer = 3416 |
86 | Correct | 13 ms | 1316 KB | Correct answer: answer = 331708193881 |
87 | Correct | 14 ms | 1316 KB | Correct answer: answer = 2861193756 |
88 | Correct | 11 ms | 1456 KB | Correct answer: answer = 114646930 |
89 | Correct | 9 ms | 1512 KB | Correct answer: answer = 9280921 |
90 | Correct | 9 ms | 1680 KB | Correct answer: answer = 999984053400 |
91 | Correct | 13 ms | 1680 KB | Correct answer: answer = 750935949134 |
92 | Correct | 4 ms | 1680 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 5 ms | 1680 KB | Correct answer: answer = 998762383161 |
94 | Correct | 13 ms | 1680 KB | Correct answer: answer = 23017412908 |
95 | Correct | 6 ms | 1708 KB | Correct answer: answer = 728143410622 |
96 | Correct | 4 ms | 1744 KB | Correct answer: answer = 2 |
97 | Correct | 10 ms | 1888 KB | Correct answer: answer = 1824916 |
98 | Correct | 12 ms | 1928 KB | Correct answer: answer = 10680029 |
99 | Correct | 10 ms | 1976 KB | Correct answer: answer = 18351700 |
100 | Correct | 9 ms | 2044 KB | Correct answer: answer = 16040026 |
101 | Correct | 5 ms | 2044 KB | Correct answer: answer = 253968628325 |
102 | Correct | 8 ms | 2044 KB | Correct answer: answer = 10267 |
103 | Correct | 12 ms | 2136 KB | Correct answer: answer = 2582408 |
104 | Correct | 6 ms | 2136 KB | Correct answer: answer = 78024964781 |
105 | Correct | 5 ms | 2136 KB | Correct answer: answer = 9866346457 |
106 | Correct | 5 ms | 2168 KB | Correct answer: answer = 3327720949 |
107 | Correct | 5 ms | 2224 KB | Correct answer: answer = 86064128360 |
108 | Correct | 6 ms | 2280 KB | Correct answer: answer = 12698259150 |
109 | Correct | 10 ms | 2464 KB | Correct answer: answer = 1185259288 |
110 | Correct | 27 ms | 4308 KB | Correct answer: answer = 999889968863 |
111 | Correct | 26 ms | 5020 KB | Correct answer: answer = 999861384931 |
112 | Correct | 25 ms | 5660 KB | Correct answer: answer = 999811809929 |
113 | Correct | 27 ms | 6336 KB | Correct answer: answer = 999869756441 |
114 | Correct | 104 ms | 9812 KB | Correct answer: answer = 1700000000 |
115 | Correct | 131 ms | 10256 KB | Correct answer: answer = 131666670 |
116 | Correct | 32 ms | 10256 KB | Correct answer: answer = 89478486 |
117 | Correct | 32 ms | 10256 KB | Correct answer: answer = 4971040 |
118 | Correct | 30 ms | 10256 KB | Correct answer: answer = 2711494 |
119 | Correct | 101 ms | 11340 KB | Correct answer: answer = 25252530 |
120 | Correct | 95 ms | 12032 KB | Correct answer: answer = 62500000 |
121 | Correct | 122 ms | 12032 KB | Correct answer: answer = 333175097780 |
122 | Correct | 115 ms | 12032 KB | Correct answer: answer = 33121180179 |
123 | Correct | 128 ms | 12032 KB | Correct answer: answer = 9802314015 |
124 | Correct | 99 ms | 14528 KB | Correct answer: answer = 32567551 |
125 | Correct | 96 ms | 15320 KB | Correct answer: answer = 997525000000 |
126 | Correct | 125 ms | 15320 KB | Correct answer: answer = 752723538884 |
127 | Correct | 20 ms | 15320 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 29 ms | 15320 KB | Correct answer: answer = 999978000121 |
129 | Correct | 31 ms | 15320 KB | Correct answer: answer = 745986144735 |
130 | Correct | 17 ms | 15320 KB | Correct answer: answer = 2 |
131 | Correct | 105 ms | 18660 KB | Correct answer: answer = 277966670 |
132 | Correct | 88 ms | 19200 KB | Correct answer: answer = 2500900082 |
133 | Correct | 37 ms | 19200 KB | Correct answer: answer = 301248349636 |
134 | Correct | 56 ms | 19200 KB | Correct answer: answer = 14118891 |
135 | Correct | 30 ms | 19200 KB | Correct answer: answer = 14384977265 |
136 | Correct | 31 ms | 19200 KB | Correct answer: answer = 3681368330 |
137 | Correct | 29 ms | 19224 KB | Correct answer: answer = 2720316816 |
138 | Correct | 59 ms | 21808 KB | Correct answer: answer = 999976000144 |
139 | Correct | 57 ms | 23160 KB | Correct answer: answer = 999856102410 |
140 | Correct | 61 ms | 24508 KB | Correct answer: answer = 999958401531 |
141 | Correct | 58 ms | 25852 KB | Correct answer: answer = 999769649944 |
142 | Correct | 62 ms | 27208 KB | Correct answer: answer = 999874525918 |
143 | Correct | 200 ms | 34292 KB | Correct answer: answer = 6050000000 |
144 | Correct | 201 ms | 35460 KB | Correct answer: answer = 1112500000 |
145 | Correct | 112 ms | 35460 KB | Correct answer: answer = 4294967296 |
146 | Correct | 134 ms | 35460 KB | Correct answer: answer = 87652406 |
147 | Correct | 132 ms | 35460 KB | Correct answer: answer = 6297664 |
148 | Correct | 112 ms | 35460 KB | Correct answer: answer = 196612 |
149 | Correct | 203 ms | 37384 KB | Correct answer: answer = 15015100 |
150 | Correct | 196 ms | 37384 KB | Correct answer: answer = 25000000 |
151 | Correct | 258 ms | 37384 KB | Correct answer: answer = 333230209550 |
152 | Correct | 244 ms | 37384 KB | Correct answer: answer = 917123769 |
153 | Correct | 234 ms | 37384 KB | Correct answer: answer = 95162 |
154 | Correct | 219 ms | 37508 KB | Correct answer: answer = 382616191 |
155 | Correct | 202 ms | 37508 KB | Correct answer: answer = 990033333400 |
156 | Correct | 204 ms | 37512 KB | Correct answer: answer = 990000100000 |
157 | Correct | 228 ms | 37512 KB | Correct answer: answer = 749998188180 |
158 | Correct | 43 ms | 37512 KB | Correct answer: answer = 1000000000000 |
159 | Correct | 72 ms | 37512 KB | Correct answer: answer = 999988000036 |
160 | Correct | 48 ms | 37512 KB | Correct answer: answer = 744929274393 |
161 | Correct | 24 ms | 37512 KB | Correct answer: answer = 2 |
162 | Correct | 174 ms | 37520 KB | Correct answer: answer = 1300024 |
163 | Correct | 179 ms | 37520 KB | Correct answer: answer = 5000700010 |
164 | Correct | 74 ms | 37520 KB | Correct answer: answer = 354997100800 |
165 | Correct | 96 ms | 37520 KB | Correct answer: answer = 257000 |
166 | Correct | 99 ms | 37520 KB | Correct answer: answer = 3765323 |
167 | Correct | 103 ms | 37520 KB | Correct answer: answer = 1525903 |
168 | Correct | 51 ms | 37520 KB | Correct answer: answer = 67618137730 |
169 | Correct | 50 ms | 37520 KB | Correct answer: answer = 12656680171 |
170 | Correct | 64 ms | 37520 KB | Correct answer: answer = 579831736 |
171 | Correct | 107 ms | 37520 KB | Correct answer: answer = 23605611 |
172 | Correct | 67 ms | 37520 KB | Correct answer: answer = 7052481200 |
173 | Correct | 76 ms | 37520 KB | Correct answer: answer = 1314039500 |
174 | Correct | 74 ms | 37520 KB | Correct answer: answer = 302484000 |
175 | Correct | 126 ms | 37520 KB | Correct answer: answer = 52348480 |