# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
492255 | 2021-12-06T09:36:20 Z | Killer2501 | Aliens (IOI16_aliens) | C++14 | 2000 ms | 10168 KB |
#include<bits/stdc++.h> #define ll long long #define fi first #define se second #define pll pair<ll, ll> #define pb push_back using namespace std; const int N = 1e5+5; const int M = 2e5+5; const ll mod = 1e9+7; const int base = 400; const ll inf = 1e16; ll ans, tong, n, k, a[N], b[N], m, c[N], d[N], t, lab[N], dp[N][2]; vector<pll> adj[N], kq; string s; pll p[N]; void cal(int l, int r, int opl, int opr, int j) { if(l > r)return; int mid = (l+r)/2; int best = mid; dp[mid][j] = inf; for(int i = opl; i <= min(mid, opr); i ++) { tong = dp[i-1][j^1] + (p[mid].se-p[i].fi+1)*(p[mid].se-p[i].fi+1); if(i > 1)tong -= max(0ll, p[i-1].se-p[i].fi+1)*max(0ll, p[i-1].se-p[i].fi+1); if(dp[mid][j] > tong) { dp[mid][j] = tong; best = i; } } cal(l, mid-1, opl, best, j); cal(mid+1, r, best, opr, j); } bool cmp(pll& x, pll& y) { if(x.fi != y.fi)return x.fi < y.fi; return x.se > y.se; } ll take_photos(int N, int M, int K, vector<int> r, vector<int> c) { n = N; m = M; k = K; for(int i = 1; i <= n; i ++) { p[i].fi = r[i-1]; p[i].se = c[i-1]; if(p[i].fi > p[i].se)swap(p[i].fi, p[i].se); } sort(p+1, p+1+n, cmp); for(int i = 1; i <= n; i ++) { if(!kq.empty() && kq.back().se >= p[i].se)continue; kq.pb(p[i]); } n = kq.size(); for(int i = 1; i <= n; i ++)p[i] = kq[i-1]; for(int i = 1; i <= n; i ++)dp[i][0] = inf; for(int j = 1; j <= k; j ++) { cal(1, n, 1, n, j&1); } return dp[n][k&1]; }
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 2632 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 2652 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 2636 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 2636 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 2636 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 2648 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 2656 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 2636 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 2636 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 2636 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 2636 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
2 | Correct | 1 ms | 2636 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
4 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5 |
5 | Correct | 1 ms | 2636 KB | Correct answer: answer = 41 |
6 | Correct | 1 ms | 2636 KB | Correct answer: answer = 71923 |
7 | Correct | 2 ms | 2636 KB | Correct answer: answer = 77137 |
8 | Correct | 5 ms | 2652 KB | Correct answer: answer = 764 |
9 | Correct | 2 ms | 2636 KB | Correct answer: answer = 250000 |
10 | Correct | 7 ms | 2636 KB | Correct answer: answer = 500 |
11 | Correct | 2 ms | 2636 KB | Correct answer: answer = 32 |
12 | Correct | 1 ms | 2636 KB | Correct answer: answer = 130050 |
13 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5110 |
14 | Correct | 2 ms | 2636 KB | Correct answer: answer = 2626 |
15 | Correct | 2 ms | 2636 KB | Correct answer: answer = 796 |
16 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7580 |
17 | Correct | 3 ms | 2636 KB | Correct answer: answer = 1904 |
18 | Correct | 2 ms | 2636 KB | Correct answer: answer = 996004 |
19 | Correct | 2 ms | 2636 KB | Correct answer: answer = 38817 |
20 | Correct | 3 ms | 2636 KB | Correct answer: answer = 4096 |
21 | Correct | 2 ms | 2636 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
23 | Correct | 3 ms | 2636 KB | Correct answer: answer = 2040 |
24 | Correct | 1 ms | 2636 KB | Correct answer: answer = 2 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 2632 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 2652 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 2636 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 2636 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 2636 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 2648 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 2656 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 2636 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 2636 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 2636 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 2636 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 2636 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 2636 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 2636 KB | Correct answer: answer = 71923 |
27 | Correct | 2 ms | 2636 KB | Correct answer: answer = 77137 |
28 | Correct | 5 ms | 2652 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 2636 KB | Correct answer: answer = 250000 |
30 | Correct | 7 ms | 2636 KB | Correct answer: answer = 500 |
31 | Correct | 2 ms | 2636 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 2636 KB | Correct answer: answer = 130050 |
33 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5110 |
34 | Correct | 2 ms | 2636 KB | Correct answer: answer = 2626 |
35 | Correct | 2 ms | 2636 KB | Correct answer: answer = 796 |
36 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7580 |
37 | Correct | 3 ms | 2636 KB | Correct answer: answer = 1904 |
38 | Correct | 2 ms | 2636 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 2636 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 2636 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 2636 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
43 | Correct | 3 ms | 2636 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 2636 KB | Correct answer: answer = 2 |
45 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
46 | Correct | 2 ms | 2652 KB | Correct answer: answer = 9 |
47 | Correct | 2 ms | 2648 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 2764 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 2636 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 2648 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 2636 KB | Correct answer: answer = 400 |
52 | Correct | 2 ms | 2636 KB | Correct answer: answer = 996004 |
53 | Correct | 3 ms | 2636 KB | Correct answer: answer = 997310 |
54 | Correct | 1 ms | 2636 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 2636 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 2636 KB | Correct answer: answer = 484 |
57 | Correct | 2 ms | 2636 KB | Correct answer: answer = 484 |
58 | Correct | 2 ms | 2636 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 2636 KB | Correct answer: answer = 323501 |
60 | Correct | 3 ms | 2636 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 2636 KB | Correct answer: answer = 761480 |
62 | Correct | 4 ms | 2636 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1000000 |
64 | Correct | 7 ms | 2636 KB | Correct answer: answer = 750500 |
65 | Correct | 2 ms | 2648 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 2636 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 2636 KB | Correct answer: answer = 250000 |
68 | Correct | 2 ms | 2636 KB | Correct answer: answer = 1000000 |
69 | Correct | 2 ms | 2652 KB | Correct answer: answer = 994009 |
70 | Correct | 2 ms | 2636 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 2636 KB | Correct answer: answer = 25454 |
72 | Correct | 4 ms | 2636 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 2636 KB | Correct answer: answer = 37486 |
74 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 2636 KB | Correct answer: answer = 158008 |
76 | Correct | 2 ms | 2636 KB | Correct answer: answer = 51860 |
77 | Correct | 2 ms | 2636 KB | Correct answer: answer = 12985 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 2632 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 2652 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 2636 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 2636 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 2636 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 2648 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 2656 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 2636 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 2636 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 2636 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 2636 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 2636 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 2636 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 2636 KB | Correct answer: answer = 71923 |
27 | Correct | 2 ms | 2636 KB | Correct answer: answer = 77137 |
28 | Correct | 5 ms | 2652 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 2636 KB | Correct answer: answer = 250000 |
30 | Correct | 7 ms | 2636 KB | Correct answer: answer = 500 |
31 | Correct | 2 ms | 2636 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 2636 KB | Correct answer: answer = 130050 |
33 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5110 |
34 | Correct | 2 ms | 2636 KB | Correct answer: answer = 2626 |
35 | Correct | 2 ms | 2636 KB | Correct answer: answer = 796 |
36 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7580 |
37 | Correct | 3 ms | 2636 KB | Correct answer: answer = 1904 |
38 | Correct | 2 ms | 2636 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 2636 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 2636 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 2636 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
43 | Correct | 3 ms | 2636 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 2636 KB | Correct answer: answer = 2 |
45 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
46 | Correct | 2 ms | 2652 KB | Correct answer: answer = 9 |
47 | Correct | 2 ms | 2648 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 2764 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 2636 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 2648 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 2636 KB | Correct answer: answer = 400 |
52 | Correct | 2 ms | 2636 KB | Correct answer: answer = 996004 |
53 | Correct | 3 ms | 2636 KB | Correct answer: answer = 997310 |
54 | Correct | 1 ms | 2636 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 2636 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 2636 KB | Correct answer: answer = 484 |
57 | Correct | 2 ms | 2636 KB | Correct answer: answer = 484 |
58 | Correct | 2 ms | 2636 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 2636 KB | Correct answer: answer = 323501 |
60 | Correct | 3 ms | 2636 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 2636 KB | Correct answer: answer = 761480 |
62 | Correct | 4 ms | 2636 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1000000 |
64 | Correct | 7 ms | 2636 KB | Correct answer: answer = 750500 |
65 | Correct | 2 ms | 2648 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 2636 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 2636 KB | Correct answer: answer = 250000 |
68 | Correct | 2 ms | 2636 KB | Correct answer: answer = 1000000 |
69 | Correct | 2 ms | 2652 KB | Correct answer: answer = 994009 |
70 | Correct | 2 ms | 2636 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 2636 KB | Correct answer: answer = 25454 |
72 | Correct | 4 ms | 2636 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 2636 KB | Correct answer: answer = 37486 |
74 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 2636 KB | Correct answer: answer = 158008 |
76 | Correct | 2 ms | 2636 KB | Correct answer: answer = 51860 |
77 | Correct | 2 ms | 2636 KB | Correct answer: answer = 12985 |
78 | Correct | 2 ms | 2764 KB | Correct answer: answer = 997864126212 |
79 | Correct | 3 ms | 2764 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 2764 KB | Correct answer: answer = 995265560477 |
81 | Correct | 3 ms | 2892 KB | Correct answer: answer = 10125000 |
82 | Correct | 3 ms | 2892 KB | Correct answer: answer = 2291668 |
83 | Correct | 8 ms | 2764 KB | Correct answer: answer = 42388 |
84 | Correct | 25 ms | 2764 KB | Correct answer: answer = 10318 |
85 | Correct | 72 ms | 2812 KB | Correct answer: answer = 3416 |
86 | Correct | 3 ms | 3020 KB | Correct answer: answer = 331708193881 |
87 | Correct | 47 ms | 3020 KB | Correct answer: answer = 2861193756 |
88 | Correct | 191 ms | 3020 KB | Correct answer: answer = 114646930 |
89 | Correct | 10 ms | 2940 KB | Correct answer: answer = 9280921 |
90 | Correct | 40 ms | 3020 KB | Correct answer: answer = 999984053400 |
91 | Correct | 157 ms | 2892 KB | Correct answer: answer = 750935949134 |
92 | Correct | 2 ms | 2764 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 2 ms | 2764 KB | Correct answer: answer = 998762383161 |
94 | Correct | 9 ms | 3020 KB | Correct answer: answer = 23017412908 |
95 | Correct | 5 ms | 2816 KB | Correct answer: answer = 728143410622 |
96 | Correct | 2 ms | 2784 KB | Correct answer: answer = 2 |
97 | Correct | 4 ms | 2892 KB | Correct answer: answer = 1824916 |
98 | Correct | 67 ms | 2896 KB | Correct answer: answer = 10680029 |
99 | Correct | 36 ms | 2892 KB | Correct answer: answer = 18351700 |
100 | Correct | 3 ms | 2892 KB | Correct answer: answer = 16040026 |
101 | Correct | 3 ms | 2764 KB | Correct answer: answer = 253968628325 |
102 | Correct | 96 ms | 2776 KB | Correct answer: answer = 10267 |
103 | Correct | 196 ms | 2916 KB | Correct answer: answer = 2582408 |
104 | Correct | 2 ms | 2764 KB | Correct answer: answer = 78024964781 |
105 | Correct | 2 ms | 2792 KB | Correct answer: answer = 9866346457 |
106 | Correct | 4 ms | 2764 KB | Correct answer: answer = 3327720949 |
107 | Correct | 12 ms | 2848 KB | Correct answer: answer = 86064128360 |
108 | Correct | 53 ms | 2860 KB | Correct answer: answer = 12698259150 |
109 | Correct | 215 ms | 2996 KB | Correct answer: answer = 1185259288 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 2632 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 2652 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 2636 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 2636 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 2636 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 2648 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 2656 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 2636 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 2636 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 2636 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 2636 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 2636 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 2636 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 2636 KB | Correct answer: answer = 71923 |
27 | Correct | 2 ms | 2636 KB | Correct answer: answer = 77137 |
28 | Correct | 5 ms | 2652 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 2636 KB | Correct answer: answer = 250000 |
30 | Correct | 7 ms | 2636 KB | Correct answer: answer = 500 |
31 | Correct | 2 ms | 2636 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 2636 KB | Correct answer: answer = 130050 |
33 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5110 |
34 | Correct | 2 ms | 2636 KB | Correct answer: answer = 2626 |
35 | Correct | 2 ms | 2636 KB | Correct answer: answer = 796 |
36 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7580 |
37 | Correct | 3 ms | 2636 KB | Correct answer: answer = 1904 |
38 | Correct | 2 ms | 2636 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 2636 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 2636 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 2636 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
43 | Correct | 3 ms | 2636 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 2636 KB | Correct answer: answer = 2 |
45 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
46 | Correct | 2 ms | 2652 KB | Correct answer: answer = 9 |
47 | Correct | 2 ms | 2648 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 2764 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 2636 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 2648 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 2636 KB | Correct answer: answer = 400 |
52 | Correct | 2 ms | 2636 KB | Correct answer: answer = 996004 |
53 | Correct | 3 ms | 2636 KB | Correct answer: answer = 997310 |
54 | Correct | 1 ms | 2636 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 2636 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 2636 KB | Correct answer: answer = 484 |
57 | Correct | 2 ms | 2636 KB | Correct answer: answer = 484 |
58 | Correct | 2 ms | 2636 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 2636 KB | Correct answer: answer = 323501 |
60 | Correct | 3 ms | 2636 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 2636 KB | Correct answer: answer = 761480 |
62 | Correct | 4 ms | 2636 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1000000 |
64 | Correct | 7 ms | 2636 KB | Correct answer: answer = 750500 |
65 | Correct | 2 ms | 2648 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 2636 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 2636 KB | Correct answer: answer = 250000 |
68 | Correct | 2 ms | 2636 KB | Correct answer: answer = 1000000 |
69 | Correct | 2 ms | 2652 KB | Correct answer: answer = 994009 |
70 | Correct | 2 ms | 2636 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 2636 KB | Correct answer: answer = 25454 |
72 | Correct | 4 ms | 2636 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 2636 KB | Correct answer: answer = 37486 |
74 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 2636 KB | Correct answer: answer = 158008 |
76 | Correct | 2 ms | 2636 KB | Correct answer: answer = 51860 |
77 | Correct | 2 ms | 2636 KB | Correct answer: answer = 12985 |
78 | Correct | 2 ms | 2764 KB | Correct answer: answer = 997864126212 |
79 | Correct | 3 ms | 2764 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 2764 KB | Correct answer: answer = 995265560477 |
81 | Correct | 3 ms | 2892 KB | Correct answer: answer = 10125000 |
82 | Correct | 3 ms | 2892 KB | Correct answer: answer = 2291668 |
83 | Correct | 8 ms | 2764 KB | Correct answer: answer = 42388 |
84 | Correct | 25 ms | 2764 KB | Correct answer: answer = 10318 |
85 | Correct | 72 ms | 2812 KB | Correct answer: answer = 3416 |
86 | Correct | 3 ms | 3020 KB | Correct answer: answer = 331708193881 |
87 | Correct | 47 ms | 3020 KB | Correct answer: answer = 2861193756 |
88 | Correct | 191 ms | 3020 KB | Correct answer: answer = 114646930 |
89 | Correct | 10 ms | 2940 KB | Correct answer: answer = 9280921 |
90 | Correct | 40 ms | 3020 KB | Correct answer: answer = 999984053400 |
91 | Correct | 157 ms | 2892 KB | Correct answer: answer = 750935949134 |
92 | Correct | 2 ms | 2764 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 2 ms | 2764 KB | Correct answer: answer = 998762383161 |
94 | Correct | 9 ms | 3020 KB | Correct answer: answer = 23017412908 |
95 | Correct | 5 ms | 2816 KB | Correct answer: answer = 728143410622 |
96 | Correct | 2 ms | 2784 KB | Correct answer: answer = 2 |
97 | Correct | 4 ms | 2892 KB | Correct answer: answer = 1824916 |
98 | Correct | 67 ms | 2896 KB | Correct answer: answer = 10680029 |
99 | Correct | 36 ms | 2892 KB | Correct answer: answer = 18351700 |
100 | Correct | 3 ms | 2892 KB | Correct answer: answer = 16040026 |
101 | Correct | 3 ms | 2764 KB | Correct answer: answer = 253968628325 |
102 | Correct | 96 ms | 2776 KB | Correct answer: answer = 10267 |
103 | Correct | 196 ms | 2916 KB | Correct answer: answer = 2582408 |
104 | Correct | 2 ms | 2764 KB | Correct answer: answer = 78024964781 |
105 | Correct | 2 ms | 2792 KB | Correct answer: answer = 9866346457 |
106 | Correct | 4 ms | 2764 KB | Correct answer: answer = 3327720949 |
107 | Correct | 12 ms | 2848 KB | Correct answer: answer = 86064128360 |
108 | Correct | 53 ms | 2860 KB | Correct answer: answer = 12698259150 |
109 | Correct | 215 ms | 2996 KB | Correct answer: answer = 1185259288 |
110 | Correct | 17 ms | 4812 KB | Correct answer: answer = 999889968863 |
111 | Correct | 16 ms | 4828 KB | Correct answer: answer = 999861384931 |
112 | Correct | 16 ms | 4908 KB | Correct answer: answer = 999811809929 |
113 | Correct | 16 ms | 4908 KB | Correct answer: answer = 999869756441 |
114 | Correct | 22 ms | 6464 KB | Correct answer: answer = 1700000000 |
115 | Correct | 50 ms | 6488 KB | Correct answer: answer = 131666670 |
116 | Correct | 7 ms | 3912 KB | Correct answer: answer = 89478486 |
117 | Correct | 36 ms | 3936 KB | Correct answer: answer = 4971040 |
118 | Correct | 61 ms | 3908 KB | Correct answer: answer = 2711494 |
119 | Correct | 186 ms | 6480 KB | Correct answer: answer = 25252530 |
120 | Correct | 88 ms | 6480 KB | Correct answer: answer = 62500000 |
121 | Correct | 23 ms | 6484 KB | Correct answer: answer = 333175097780 |
122 | Correct | 76 ms | 6464 KB | Correct answer: answer = 33121180179 |
123 | Correct | 218 ms | 6560 KB | Correct answer: answer = 9802314015 |
124 | Correct | 166 ms | 6492 KB | Correct answer: answer = 32567551 |
125 | Correct | 220 ms | 6536 KB | Correct answer: answer = 997525000000 |
126 | Correct | 214 ms | 6452 KB | Correct answer: answer = 752723538884 |
127 | Correct | 13 ms | 4812 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 17 ms | 4876 KB | Correct answer: answer = 999978000121 |
129 | Correct | 17 ms | 4832 KB | Correct answer: answer = 745986144735 |
130 | Correct | 11 ms | 4428 KB | Correct answer: answer = 2 |
131 | Correct | 38 ms | 6464 KB | Correct answer: answer = 277966670 |
132 | Correct | 21 ms | 6476 KB | Correct answer: answer = 2500900082 |
133 | Correct | 22 ms | 5072 KB | Correct answer: answer = 301248349636 |
134 | Correct | 230 ms | 4548 KB | Correct answer: answer = 14118891 |
135 | Correct | 18 ms | 4812 KB | Correct answer: answer = 14384977265 |
136 | Correct | 17 ms | 4852 KB | Correct answer: answer = 3681368330 |
137 | Correct | 20 ms | 4908 KB | Correct answer: answer = 2720316816 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
2 | Correct | 2 ms | 2632 KB | Correct answer: answer = 4 |
3 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 2652 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 2636 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 2636 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 2636 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7696 |
9 | Correct | 2 ms | 2648 KB | Correct answer: answer = 1 |
10 | Correct | 2 ms | 2656 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 2636 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 2636 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 2636 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 2636 KB | Correct answer: answer = 7220 |
16 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 2636 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 2636 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 2636 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
24 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 2636 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 2636 KB | Correct answer: answer = 71923 |
27 | Correct | 2 ms | 2636 KB | Correct answer: answer = 77137 |
28 | Correct | 5 ms | 2652 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 2636 KB | Correct answer: answer = 250000 |
30 | Correct | 7 ms | 2636 KB | Correct answer: answer = 500 |
31 | Correct | 2 ms | 2636 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 2636 KB | Correct answer: answer = 130050 |
33 | Correct | 2 ms | 2636 KB | Correct answer: answer = 5110 |
34 | Correct | 2 ms | 2636 KB | Correct answer: answer = 2626 |
35 | Correct | 2 ms | 2636 KB | Correct answer: answer = 796 |
36 | Correct | 2 ms | 2636 KB | Correct answer: answer = 7580 |
37 | Correct | 3 ms | 2636 KB | Correct answer: answer = 1904 |
38 | Correct | 2 ms | 2636 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 2636 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 2636 KB | Correct answer: answer = 4096 |
41 | Correct | 2 ms | 2636 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1 |
43 | Correct | 3 ms | 2636 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 2636 KB | Correct answer: answer = 2 |
45 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4 |
46 | Correct | 2 ms | 2652 KB | Correct answer: answer = 9 |
47 | Correct | 2 ms | 2648 KB | Correct answer: answer = 9 |
48 | Correct | 2 ms | 2764 KB | Correct answer: answer = 21 |
49 | Correct | 2 ms | 2636 KB | Correct answer: answer = 71 |
50 | Correct | 2 ms | 2648 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 2636 KB | Correct answer: answer = 400 |
52 | Correct | 2 ms | 2636 KB | Correct answer: answer = 996004 |
53 | Correct | 3 ms | 2636 KB | Correct answer: answer = 997310 |
54 | Correct | 1 ms | 2636 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 2636 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 2636 KB | Correct answer: answer = 484 |
57 | Correct | 2 ms | 2636 KB | Correct answer: answer = 484 |
58 | Correct | 2 ms | 2636 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 2636 KB | Correct answer: answer = 323501 |
60 | Correct | 3 ms | 2636 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 2636 KB | Correct answer: answer = 761480 |
62 | Correct | 4 ms | 2636 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 2636 KB | Correct answer: answer = 1000000 |
64 | Correct | 7 ms | 2636 KB | Correct answer: answer = 750500 |
65 | Correct | 2 ms | 2648 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 2636 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 2636 KB | Correct answer: answer = 250000 |
68 | Correct | 2 ms | 2636 KB | Correct answer: answer = 1000000 |
69 | Correct | 2 ms | 2652 KB | Correct answer: answer = 994009 |
70 | Correct | 2 ms | 2636 KB | Correct answer: answer = 59315 |
71 | Correct | 3 ms | 2636 KB | Correct answer: answer = 25454 |
72 | Correct | 4 ms | 2636 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 2636 KB | Correct answer: answer = 37486 |
74 | Correct | 2 ms | 2636 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 2636 KB | Correct answer: answer = 158008 |
76 | Correct | 2 ms | 2636 KB | Correct answer: answer = 51860 |
77 | Correct | 2 ms | 2636 KB | Correct answer: answer = 12985 |
78 | Correct | 2 ms | 2764 KB | Correct answer: answer = 997864126212 |
79 | Correct | 3 ms | 2764 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 2764 KB | Correct answer: answer = 995265560477 |
81 | Correct | 3 ms | 2892 KB | Correct answer: answer = 10125000 |
82 | Correct | 3 ms | 2892 KB | Correct answer: answer = 2291668 |
83 | Correct | 8 ms | 2764 KB | Correct answer: answer = 42388 |
84 | Correct | 25 ms | 2764 KB | Correct answer: answer = 10318 |
85 | Correct | 72 ms | 2812 KB | Correct answer: answer = 3416 |
86 | Correct | 3 ms | 3020 KB | Correct answer: answer = 331708193881 |
87 | Correct | 47 ms | 3020 KB | Correct answer: answer = 2861193756 |
88 | Correct | 191 ms | 3020 KB | Correct answer: answer = 114646930 |
89 | Correct | 10 ms | 2940 KB | Correct answer: answer = 9280921 |
90 | Correct | 40 ms | 3020 KB | Correct answer: answer = 999984053400 |
91 | Correct | 157 ms | 2892 KB | Correct answer: answer = 750935949134 |
92 | Correct | 2 ms | 2764 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 2 ms | 2764 KB | Correct answer: answer = 998762383161 |
94 | Correct | 9 ms | 3020 KB | Correct answer: answer = 23017412908 |
95 | Correct | 5 ms | 2816 KB | Correct answer: answer = 728143410622 |
96 | Correct | 2 ms | 2784 KB | Correct answer: answer = 2 |
97 | Correct | 4 ms | 2892 KB | Correct answer: answer = 1824916 |
98 | Correct | 67 ms | 2896 KB | Correct answer: answer = 10680029 |
99 | Correct | 36 ms | 2892 KB | Correct answer: answer = 18351700 |
100 | Correct | 3 ms | 2892 KB | Correct answer: answer = 16040026 |
101 | Correct | 3 ms | 2764 KB | Correct answer: answer = 253968628325 |
102 | Correct | 96 ms | 2776 KB | Correct answer: answer = 10267 |
103 | Correct | 196 ms | 2916 KB | Correct answer: answer = 2582408 |
104 | Correct | 2 ms | 2764 KB | Correct answer: answer = 78024964781 |
105 | Correct | 2 ms | 2792 KB | Correct answer: answer = 9866346457 |
106 | Correct | 4 ms | 2764 KB | Correct answer: answer = 3327720949 |
107 | Correct | 12 ms | 2848 KB | Correct answer: answer = 86064128360 |
108 | Correct | 53 ms | 2860 KB | Correct answer: answer = 12698259150 |
109 | Correct | 215 ms | 2996 KB | Correct answer: answer = 1185259288 |
110 | Correct | 17 ms | 4812 KB | Correct answer: answer = 999889968863 |
111 | Correct | 16 ms | 4828 KB | Correct answer: answer = 999861384931 |
112 | Correct | 16 ms | 4908 KB | Correct answer: answer = 999811809929 |
113 | Correct | 16 ms | 4908 KB | Correct answer: answer = 999869756441 |
114 | Correct | 22 ms | 6464 KB | Correct answer: answer = 1700000000 |
115 | Correct | 50 ms | 6488 KB | Correct answer: answer = 131666670 |
116 | Correct | 7 ms | 3912 KB | Correct answer: answer = 89478486 |
117 | Correct | 36 ms | 3936 KB | Correct answer: answer = 4971040 |
118 | Correct | 61 ms | 3908 KB | Correct answer: answer = 2711494 |
119 | Correct | 186 ms | 6480 KB | Correct answer: answer = 25252530 |
120 | Correct | 88 ms | 6480 KB | Correct answer: answer = 62500000 |
121 | Correct | 23 ms | 6484 KB | Correct answer: answer = 333175097780 |
122 | Correct | 76 ms | 6464 KB | Correct answer: answer = 33121180179 |
123 | Correct | 218 ms | 6560 KB | Correct answer: answer = 9802314015 |
124 | Correct | 166 ms | 6492 KB | Correct answer: answer = 32567551 |
125 | Correct | 220 ms | 6536 KB | Correct answer: answer = 997525000000 |
126 | Correct | 214 ms | 6452 KB | Correct answer: answer = 752723538884 |
127 | Correct | 13 ms | 4812 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 17 ms | 4876 KB | Correct answer: answer = 999978000121 |
129 | Correct | 17 ms | 4832 KB | Correct answer: answer = 745986144735 |
130 | Correct | 11 ms | 4428 KB | Correct answer: answer = 2 |
131 | Correct | 38 ms | 6464 KB | Correct answer: answer = 277966670 |
132 | Correct | 21 ms | 6476 KB | Correct answer: answer = 2500900082 |
133 | Correct | 22 ms | 5072 KB | Correct answer: answer = 301248349636 |
134 | Correct | 230 ms | 4548 KB | Correct answer: answer = 14118891 |
135 | Correct | 18 ms | 4812 KB | Correct answer: answer = 14384977265 |
136 | Correct | 17 ms | 4852 KB | Correct answer: answer = 3681368330 |
137 | Correct | 20 ms | 4908 KB | Correct answer: answer = 2720316816 |
138 | Correct | 34 ms | 7144 KB | Correct answer: answer = 999976000144 |
139 | Correct | 40 ms | 7148 KB | Correct answer: answer = 999856102410 |
140 | Correct | 32 ms | 7108 KB | Correct answer: answer = 999958401531 |
141 | Correct | 34 ms | 7116 KB | Correct answer: answer = 999769649944 |
142 | Correct | 42 ms | 7128 KB | Correct answer: answer = 999874525918 |
143 | Correct | 41 ms | 10168 KB | Correct answer: answer = 6050000000 |
144 | Correct | 66 ms | 10164 KB | Correct answer: answer = 1112500000 |
145 | Correct | 20 ms | 7628 KB | Correct answer: answer = 4294967296 |
146 | Correct | 142 ms | 7632 KB | Correct answer: answer = 87652406 |
147 | Correct | 1613 ms | 7644 KB | Correct answer: answer = 6297664 |
148 | Execution timed out | 2078 ms | 7616 KB | Time limit exceeded |
149 | Halted | 0 ms | 0 KB | - |