# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
389085 | 2021-04-13T15:33:23 Z | alishahali1382 | Aliens (IOI16_aliens) | C++14 | 1026 ms | 712508 KB |
#include "aliens.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define debug(x) {cerr<<#x<<"="<<x<<"\n";} #define debug2(x, y) {cerr<<#x<<", "<<#y<<" = "<<x<<", "<<y<<"\n";} #define debugp(p) {cerr<<#p<<"={"<<p.first<<", "<<p.second<<"}\n";} #define pb push_back #define all(x) x.begin(), x.end() const int inf=1000001000; const ll INF=10000000010000000; const int MAXN=4010, K=4010; int n, m, k; pii A[MAXN]; ll dp[4010][4010]; ll Inter(pll a, pll b){ if (a.first==b.first) return (a.second<=b.second?-INF:INF); return (a.second-b.second)/(b.first-a.first) + ((a.second-b.second)%(b.first-a.first)>0); } struct CHT{ pair<ll, pll> A[MAXN]; int L, R; inline void Add(pll x){ while (L<R && Inter(A[R-1].second, x)<=A[R-1].first) R--; if (L==R) A[R++]={-INF, x}; else A[R]={Inter(A[R-1].second, x), x}, R++; } inline ll Get(ll x){ while (L+1<R && A[L+1].first<=x) L++; pll p=A[L].second; return p.first*x+p.second; } } cht[K]; inline ll _sq(ll x){ return x*x;} ll take_photos(int _n, int _m, int _k, vector<int> r, vector<int> c) { k=_k; m=_m; vector<pii> vec; for (int i=0; i<_n; i++) vec.pb({min(r[i], c[i]), max(r[i], c[i])}); sort(all(vec), [](pii i, pii j){ if (i.second!=j.second) return i.second<j.second; return i.first>j.first; }); for (pii p:vec){ while (n && p.first<=A[n].first) n--; A[++n]=p; } // for (int i=1; i<=n; i++) debugp(A[i]) k=min(k, n); memset(dp, 63, sizeof(dp)); for (int i=0; i<=k; i++) dp[0][i]=0; for (int i=1; i<=n; i++){ for (int t=0; t<k; t++){ ll val=_sq(A[i].first)+dp[i-1][t]; if (i!=1 && A[i].first<=A[i-1].second) val-=_sq(A[i-1].second-A[i].first+1); cht[t].Add({2*A[i].first, -val}); } for (int t=1; t<=k; t++){ dp[i][t]=_sq(A[i].second+1)-cht[t-1].Get(A[i].second+1); } } return dp[n][k]; }
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 300 ms | 503748 KB | Correct answer: answer = 4 |
2 | Correct | 248 ms | 503744 KB | Correct answer: answer = 4 |
3 | Correct | 249 ms | 503732 KB | Correct answer: answer = 4 |
4 | Correct | 248 ms | 503704 KB | Correct answer: answer = 12 |
5 | Correct | 264 ms | 503748 KB | Correct answer: answer = 52 |
6 | Correct | 250 ms | 503776 KB | Correct answer: answer = 210 |
7 | Correct | 246 ms | 503708 KB | Correct answer: answer = 88 |
8 | Correct | 247 ms | 504008 KB | Correct answer: answer = 7696 |
9 | Correct | 245 ms | 503748 KB | Correct answer: answer = 1 |
10 | Correct | 250 ms | 503908 KB | Correct answer: answer = 2374 |
11 | Correct | 246 ms | 503760 KB | Correct answer: answer = 9502 |
12 | Correct | 246 ms | 503688 KB | Correct answer: answer = 49 |
13 | Correct | 246 ms | 503732 KB | Correct answer: answer = 151 |
14 | Correct | 247 ms | 503828 KB | Correct answer: answer = 7550 |
15 | Correct | 261 ms | 503796 KB | Correct answer: answer = 7220 |
16 | Correct | 249 ms | 503744 KB | Correct answer: answer = 7550 |
17 | Correct | 244 ms | 503892 KB | Correct answer: answer = 10000 |
18 | Correct | 248 ms | 503724 KB | Correct answer: answer = 10000 |
19 | Correct | 248 ms | 503812 KB | Correct answer: answer = 624 |
20 | Correct | 249 ms | 503808 KB | Correct answer: answer = 10000 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 246 ms | 503748 KB | Correct answer: answer = 1 |
2 | Correct | 246 ms | 503744 KB | Correct answer: answer = 4 |
3 | Correct | 277 ms | 503788 KB | Correct answer: answer = 1 |
4 | Correct | 245 ms | 503684 KB | Correct answer: answer = 5 |
5 | Correct | 245 ms | 503748 KB | Correct answer: answer = 41 |
6 | Correct | 245 ms | 503692 KB | Correct answer: answer = 71923 |
7 | Correct | 242 ms | 503876 KB | Correct answer: answer = 77137 |
8 | Correct | 249 ms | 503876 KB | Correct answer: answer = 764 |
9 | Correct | 245 ms | 503736 KB | Correct answer: answer = 250000 |
10 | Correct | 258 ms | 503708 KB | Correct answer: answer = 500 |
11 | Correct | 252 ms | 503748 KB | Correct answer: answer = 32 |
12 | Correct | 248 ms | 503796 KB | Correct answer: answer = 130050 |
13 | Correct | 247 ms | 503784 KB | Correct answer: answer = 5110 |
14 | Correct | 246 ms | 503692 KB | Correct answer: answer = 2626 |
15 | Correct | 253 ms | 503748 KB | Correct answer: answer = 796 |
16 | Correct | 250 ms | 503736 KB | Correct answer: answer = 7580 |
17 | Correct | 248 ms | 503748 KB | Correct answer: answer = 1904 |
18 | Correct | 247 ms | 503872 KB | Correct answer: answer = 996004 |
19 | Correct | 249 ms | 503800 KB | Correct answer: answer = 38817 |
20 | Correct | 247 ms | 503800 KB | Correct answer: answer = 4096 |
21 | Correct | 249 ms | 503956 KB | Correct answer: answer = 1 |
22 | Correct | 253 ms | 503876 KB | Correct answer: answer = 1 |
23 | Correct | 250 ms | 503748 KB | Correct answer: answer = 2040 |
24 | Correct | 245 ms | 503924 KB | Correct answer: answer = 2 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 300 ms | 503748 KB | Correct answer: answer = 4 |
2 | Correct | 248 ms | 503744 KB | Correct answer: answer = 4 |
3 | Correct | 249 ms | 503732 KB | Correct answer: answer = 4 |
4 | Correct | 248 ms | 503704 KB | Correct answer: answer = 12 |
5 | Correct | 264 ms | 503748 KB | Correct answer: answer = 52 |
6 | Correct | 250 ms | 503776 KB | Correct answer: answer = 210 |
7 | Correct | 246 ms | 503708 KB | Correct answer: answer = 88 |
8 | Correct | 247 ms | 504008 KB | Correct answer: answer = 7696 |
9 | Correct | 245 ms | 503748 KB | Correct answer: answer = 1 |
10 | Correct | 250 ms | 503908 KB | Correct answer: answer = 2374 |
11 | Correct | 246 ms | 503760 KB | Correct answer: answer = 9502 |
12 | Correct | 246 ms | 503688 KB | Correct answer: answer = 49 |
13 | Correct | 246 ms | 503732 KB | Correct answer: answer = 151 |
14 | Correct | 247 ms | 503828 KB | Correct answer: answer = 7550 |
15 | Correct | 261 ms | 503796 KB | Correct answer: answer = 7220 |
16 | Correct | 249 ms | 503744 KB | Correct answer: answer = 7550 |
17 | Correct | 244 ms | 503892 KB | Correct answer: answer = 10000 |
18 | Correct | 248 ms | 503724 KB | Correct answer: answer = 10000 |
19 | Correct | 248 ms | 503812 KB | Correct answer: answer = 624 |
20 | Correct | 249 ms | 503808 KB | Correct answer: answer = 10000 |
21 | Correct | 246 ms | 503748 KB | Correct answer: answer = 1 |
22 | Correct | 246 ms | 503744 KB | Correct answer: answer = 4 |
23 | Correct | 277 ms | 503788 KB | Correct answer: answer = 1 |
24 | Correct | 245 ms | 503684 KB | Correct answer: answer = 5 |
25 | Correct | 245 ms | 503748 KB | Correct answer: answer = 41 |
26 | Correct | 245 ms | 503692 KB | Correct answer: answer = 71923 |
27 | Correct | 242 ms | 503876 KB | Correct answer: answer = 77137 |
28 | Correct | 249 ms | 503876 KB | Correct answer: answer = 764 |
29 | Correct | 245 ms | 503736 KB | Correct answer: answer = 250000 |
30 | Correct | 258 ms | 503708 KB | Correct answer: answer = 500 |
31 | Correct | 252 ms | 503748 KB | Correct answer: answer = 32 |
32 | Correct | 248 ms | 503796 KB | Correct answer: answer = 130050 |
33 | Correct | 247 ms | 503784 KB | Correct answer: answer = 5110 |
34 | Correct | 246 ms | 503692 KB | Correct answer: answer = 2626 |
35 | Correct | 253 ms | 503748 KB | Correct answer: answer = 796 |
36 | Correct | 250 ms | 503736 KB | Correct answer: answer = 7580 |
37 | Correct | 248 ms | 503748 KB | Correct answer: answer = 1904 |
38 | Correct | 247 ms | 503872 KB | Correct answer: answer = 996004 |
39 | Correct | 249 ms | 503800 KB | Correct answer: answer = 38817 |
40 | Correct | 247 ms | 503800 KB | Correct answer: answer = 4096 |
41 | Correct | 249 ms | 503956 KB | Correct answer: answer = 1 |
42 | Correct | 253 ms | 503876 KB | Correct answer: answer = 1 |
43 | Correct | 250 ms | 503748 KB | Correct answer: answer = 2040 |
44 | Correct | 245 ms | 503924 KB | Correct answer: answer = 2 |
45 | Correct | 245 ms | 503748 KB | Correct answer: answer = 4 |
46 | Correct | 247 ms | 503756 KB | Correct answer: answer = 9 |
47 | Correct | 247 ms | 503716 KB | Correct answer: answer = 9 |
48 | Correct | 245 ms | 503708 KB | Correct answer: answer = 21 |
49 | Correct | 245 ms | 503712 KB | Correct answer: answer = 71 |
50 | Correct | 246 ms | 503744 KB | Correct answer: answer = 77 |
51 | Correct | 245 ms | 503748 KB | Correct answer: answer = 400 |
52 | Correct | 252 ms | 503940 KB | Correct answer: answer = 996004 |
53 | Correct | 247 ms | 503768 KB | Correct answer: answer = 997310 |
54 | Correct | 252 ms | 503840 KB | Correct answer: answer = 990781 |
55 | Correct | 246 ms | 503876 KB | Correct answer: answer = 996545 |
56 | Correct | 251 ms | 503808 KB | Correct answer: answer = 484 |
57 | Correct | 246 ms | 503748 KB | Correct answer: answer = 484 |
58 | Correct | 248 ms | 503864 KB | Correct answer: answer = 63501 |
59 | Correct | 248 ms | 503728 KB | Correct answer: answer = 323501 |
60 | Correct | 265 ms | 503736 KB | Correct answer: answer = 752500 |
61 | Correct | 248 ms | 503880 KB | Correct answer: answer = 761480 |
62 | Correct | 250 ms | 503884 KB | Correct answer: answer = 758932 |
63 | Correct | 248 ms | 503876 KB | Correct answer: answer = 1000000 |
64 | Correct | 256 ms | 503868 KB | Correct answer: answer = 750500 |
65 | Correct | 248 ms | 503796 KB | Correct answer: answer = 1000000 |
66 | Correct | 249 ms | 503784 KB | Correct answer: answer = 250000 |
67 | Correct | 247 ms | 503716 KB | Correct answer: answer = 250000 |
68 | Correct | 248 ms | 503812 KB | Correct answer: answer = 1000000 |
69 | Correct | 251 ms | 503932 KB | Correct answer: answer = 994009 |
70 | Correct | 248 ms | 503756 KB | Correct answer: answer = 59315 |
71 | Correct | 249 ms | 503748 KB | Correct answer: answer = 25454 |
72 | Correct | 253 ms | 503776 KB | Correct answer: answer = 1504 |
73 | Correct | 252 ms | 503876 KB | Correct answer: answer = 37486 |
74 | Correct | 249 ms | 503804 KB | Correct answer: answer = 4284 |
75 | Correct | 250 ms | 503792 KB | Correct answer: answer = 158008 |
76 | Correct | 248 ms | 503816 KB | Correct answer: answer = 51860 |
77 | Correct | 246 ms | 503800 KB | Correct answer: answer = 12985 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 300 ms | 503748 KB | Correct answer: answer = 4 |
2 | Correct | 248 ms | 503744 KB | Correct answer: answer = 4 |
3 | Correct | 249 ms | 503732 KB | Correct answer: answer = 4 |
4 | Correct | 248 ms | 503704 KB | Correct answer: answer = 12 |
5 | Correct | 264 ms | 503748 KB | Correct answer: answer = 52 |
6 | Correct | 250 ms | 503776 KB | Correct answer: answer = 210 |
7 | Correct | 246 ms | 503708 KB | Correct answer: answer = 88 |
8 | Correct | 247 ms | 504008 KB | Correct answer: answer = 7696 |
9 | Correct | 245 ms | 503748 KB | Correct answer: answer = 1 |
10 | Correct | 250 ms | 503908 KB | Correct answer: answer = 2374 |
11 | Correct | 246 ms | 503760 KB | Correct answer: answer = 9502 |
12 | Correct | 246 ms | 503688 KB | Correct answer: answer = 49 |
13 | Correct | 246 ms | 503732 KB | Correct answer: answer = 151 |
14 | Correct | 247 ms | 503828 KB | Correct answer: answer = 7550 |
15 | Correct | 261 ms | 503796 KB | Correct answer: answer = 7220 |
16 | Correct | 249 ms | 503744 KB | Correct answer: answer = 7550 |
17 | Correct | 244 ms | 503892 KB | Correct answer: answer = 10000 |
18 | Correct | 248 ms | 503724 KB | Correct answer: answer = 10000 |
19 | Correct | 248 ms | 503812 KB | Correct answer: answer = 624 |
20 | Correct | 249 ms | 503808 KB | Correct answer: answer = 10000 |
21 | Correct | 246 ms | 503748 KB | Correct answer: answer = 1 |
22 | Correct | 246 ms | 503744 KB | Correct answer: answer = 4 |
23 | Correct | 277 ms | 503788 KB | Correct answer: answer = 1 |
24 | Correct | 245 ms | 503684 KB | Correct answer: answer = 5 |
25 | Correct | 245 ms | 503748 KB | Correct answer: answer = 41 |
26 | Correct | 245 ms | 503692 KB | Correct answer: answer = 71923 |
27 | Correct | 242 ms | 503876 KB | Correct answer: answer = 77137 |
28 | Correct | 249 ms | 503876 KB | Correct answer: answer = 764 |
29 | Correct | 245 ms | 503736 KB | Correct answer: answer = 250000 |
30 | Correct | 258 ms | 503708 KB | Correct answer: answer = 500 |
31 | Correct | 252 ms | 503748 KB | Correct answer: answer = 32 |
32 | Correct | 248 ms | 503796 KB | Correct answer: answer = 130050 |
33 | Correct | 247 ms | 503784 KB | Correct answer: answer = 5110 |
34 | Correct | 246 ms | 503692 KB | Correct answer: answer = 2626 |
35 | Correct | 253 ms | 503748 KB | Correct answer: answer = 796 |
36 | Correct | 250 ms | 503736 KB | Correct answer: answer = 7580 |
37 | Correct | 248 ms | 503748 KB | Correct answer: answer = 1904 |
38 | Correct | 247 ms | 503872 KB | Correct answer: answer = 996004 |
39 | Correct | 249 ms | 503800 KB | Correct answer: answer = 38817 |
40 | Correct | 247 ms | 503800 KB | Correct answer: answer = 4096 |
41 | Correct | 249 ms | 503956 KB | Correct answer: answer = 1 |
42 | Correct | 253 ms | 503876 KB | Correct answer: answer = 1 |
43 | Correct | 250 ms | 503748 KB | Correct answer: answer = 2040 |
44 | Correct | 245 ms | 503924 KB | Correct answer: answer = 2 |
45 | Correct | 245 ms | 503748 KB | Correct answer: answer = 4 |
46 | Correct | 247 ms | 503756 KB | Correct answer: answer = 9 |
47 | Correct | 247 ms | 503716 KB | Correct answer: answer = 9 |
48 | Correct | 245 ms | 503708 KB | Correct answer: answer = 21 |
49 | Correct | 245 ms | 503712 KB | Correct answer: answer = 71 |
50 | Correct | 246 ms | 503744 KB | Correct answer: answer = 77 |
51 | Correct | 245 ms | 503748 KB | Correct answer: answer = 400 |
52 | Correct | 252 ms | 503940 KB | Correct answer: answer = 996004 |
53 | Correct | 247 ms | 503768 KB | Correct answer: answer = 997310 |
54 | Correct | 252 ms | 503840 KB | Correct answer: answer = 990781 |
55 | Correct | 246 ms | 503876 KB | Correct answer: answer = 996545 |
56 | Correct | 251 ms | 503808 KB | Correct answer: answer = 484 |
57 | Correct | 246 ms | 503748 KB | Correct answer: answer = 484 |
58 | Correct | 248 ms | 503864 KB | Correct answer: answer = 63501 |
59 | Correct | 248 ms | 503728 KB | Correct answer: answer = 323501 |
60 | Correct | 265 ms | 503736 KB | Correct answer: answer = 752500 |
61 | Correct | 248 ms | 503880 KB | Correct answer: answer = 761480 |
62 | Correct | 250 ms | 503884 KB | Correct answer: answer = 758932 |
63 | Correct | 248 ms | 503876 KB | Correct answer: answer = 1000000 |
64 | Correct | 256 ms | 503868 KB | Correct answer: answer = 750500 |
65 | Correct | 248 ms | 503796 KB | Correct answer: answer = 1000000 |
66 | Correct | 249 ms | 503784 KB | Correct answer: answer = 250000 |
67 | Correct | 247 ms | 503716 KB | Correct answer: answer = 250000 |
68 | Correct | 248 ms | 503812 KB | Correct answer: answer = 1000000 |
69 | Correct | 251 ms | 503932 KB | Correct answer: answer = 994009 |
70 | Correct | 248 ms | 503756 KB | Correct answer: answer = 59315 |
71 | Correct | 249 ms | 503748 KB | Correct answer: answer = 25454 |
72 | Correct | 253 ms | 503776 KB | Correct answer: answer = 1504 |
73 | Correct | 252 ms | 503876 KB | Correct answer: answer = 37486 |
74 | Correct | 249 ms | 503804 KB | Correct answer: answer = 4284 |
75 | Correct | 250 ms | 503792 KB | Correct answer: answer = 158008 |
76 | Correct | 248 ms | 503816 KB | Correct answer: answer = 51860 |
77 | Correct | 246 ms | 503800 KB | Correct answer: answer = 12985 |
78 | Correct | 252 ms | 503928 KB | Correct answer: answer = 997864126212 |
79 | Correct | 253 ms | 504040 KB | Correct answer: answer = 998608411647 |
80 | Correct | 246 ms | 504032 KB | Correct answer: answer = 995265560477 |
81 | Correct | 247 ms | 504004 KB | Correct answer: answer = 10125000 |
82 | Correct | 251 ms | 503924 KB | Correct answer: answer = 2291668 |
83 | Correct | 257 ms | 503812 KB | Correct answer: answer = 42388 |
84 | Correct | 274 ms | 503884 KB | Correct answer: answer = 10318 |
85 | Correct | 480 ms | 503900 KB | Correct answer: answer = 3416 |
86 | Correct | 252 ms | 504004 KB | Correct answer: answer = 331708193881 |
87 | Correct | 281 ms | 504012 KB | Correct answer: answer = 2861193756 |
88 | Correct | 740 ms | 504060 KB | Correct answer: answer = 114646930 |
89 | Correct | 253 ms | 503876 KB | Correct answer: answer = 9280921 |
90 | Correct | 285 ms | 503948 KB | Correct answer: answer = 999984053400 |
91 | Correct | 586 ms | 504004 KB | Correct answer: answer = 750935949134 |
92 | Correct | 258 ms | 503976 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 246 ms | 503876 KB | Correct answer: answer = 998762383161 |
94 | Correct | 254 ms | 504004 KB | Correct answer: answer = 23017412908 |
95 | Correct | 263 ms | 503940 KB | Correct answer: answer = 728143410622 |
96 | Correct | 255 ms | 503836 KB | Correct answer: answer = 2 |
97 | Correct | 261 ms | 503908 KB | Correct answer: answer = 1824916 |
98 | Correct | 343 ms | 503876 KB | Correct answer: answer = 10680029 |
99 | Correct | 283 ms | 503932 KB | Correct answer: answer = 18351700 |
100 | Correct | 250 ms | 504084 KB | Correct answer: answer = 16040026 |
101 | Correct | 278 ms | 503876 KB | Correct answer: answer = 253968628325 |
102 | Correct | 404 ms | 504000 KB | Correct answer: answer = 10267 |
103 | Correct | 869 ms | 504004 KB | Correct answer: answer = 2582408 |
104 | Correct | 251 ms | 503876 KB | Correct answer: answer = 78024964781 |
105 | Correct | 248 ms | 503884 KB | Correct answer: answer = 9866346457 |
106 | Correct | 248 ms | 504004 KB | Correct answer: answer = 3327720949 |
107 | Correct | 256 ms | 503976 KB | Correct answer: answer = 86064128360 |
108 | Correct | 287 ms | 504008 KB | Correct answer: answer = 12698259150 |
109 | Correct | 1026 ms | 504008 KB | Correct answer: answer = 1185259288 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 300 ms | 503748 KB | Correct answer: answer = 4 |
2 | Correct | 248 ms | 503744 KB | Correct answer: answer = 4 |
3 | Correct | 249 ms | 503732 KB | Correct answer: answer = 4 |
4 | Correct | 248 ms | 503704 KB | Correct answer: answer = 12 |
5 | Correct | 264 ms | 503748 KB | Correct answer: answer = 52 |
6 | Correct | 250 ms | 503776 KB | Correct answer: answer = 210 |
7 | Correct | 246 ms | 503708 KB | Correct answer: answer = 88 |
8 | Correct | 247 ms | 504008 KB | Correct answer: answer = 7696 |
9 | Correct | 245 ms | 503748 KB | Correct answer: answer = 1 |
10 | Correct | 250 ms | 503908 KB | Correct answer: answer = 2374 |
11 | Correct | 246 ms | 503760 KB | Correct answer: answer = 9502 |
12 | Correct | 246 ms | 503688 KB | Correct answer: answer = 49 |
13 | Correct | 246 ms | 503732 KB | Correct answer: answer = 151 |
14 | Correct | 247 ms | 503828 KB | Correct answer: answer = 7550 |
15 | Correct | 261 ms | 503796 KB | Correct answer: answer = 7220 |
16 | Correct | 249 ms | 503744 KB | Correct answer: answer = 7550 |
17 | Correct | 244 ms | 503892 KB | Correct answer: answer = 10000 |
18 | Correct | 248 ms | 503724 KB | Correct answer: answer = 10000 |
19 | Correct | 248 ms | 503812 KB | Correct answer: answer = 624 |
20 | Correct | 249 ms | 503808 KB | Correct answer: answer = 10000 |
21 | Correct | 246 ms | 503748 KB | Correct answer: answer = 1 |
22 | Correct | 246 ms | 503744 KB | Correct answer: answer = 4 |
23 | Correct | 277 ms | 503788 KB | Correct answer: answer = 1 |
24 | Correct | 245 ms | 503684 KB | Correct answer: answer = 5 |
25 | Correct | 245 ms | 503748 KB | Correct answer: answer = 41 |
26 | Correct | 245 ms | 503692 KB | Correct answer: answer = 71923 |
27 | Correct | 242 ms | 503876 KB | Correct answer: answer = 77137 |
28 | Correct | 249 ms | 503876 KB | Correct answer: answer = 764 |
29 | Correct | 245 ms | 503736 KB | Correct answer: answer = 250000 |
30 | Correct | 258 ms | 503708 KB | Correct answer: answer = 500 |
31 | Correct | 252 ms | 503748 KB | Correct answer: answer = 32 |
32 | Correct | 248 ms | 503796 KB | Correct answer: answer = 130050 |
33 | Correct | 247 ms | 503784 KB | Correct answer: answer = 5110 |
34 | Correct | 246 ms | 503692 KB | Correct answer: answer = 2626 |
35 | Correct | 253 ms | 503748 KB | Correct answer: answer = 796 |
36 | Correct | 250 ms | 503736 KB | Correct answer: answer = 7580 |
37 | Correct | 248 ms | 503748 KB | Correct answer: answer = 1904 |
38 | Correct | 247 ms | 503872 KB | Correct answer: answer = 996004 |
39 | Correct | 249 ms | 503800 KB | Correct answer: answer = 38817 |
40 | Correct | 247 ms | 503800 KB | Correct answer: answer = 4096 |
41 | Correct | 249 ms | 503956 KB | Correct answer: answer = 1 |
42 | Correct | 253 ms | 503876 KB | Correct answer: answer = 1 |
43 | Correct | 250 ms | 503748 KB | Correct answer: answer = 2040 |
44 | Correct | 245 ms | 503924 KB | Correct answer: answer = 2 |
45 | Correct | 245 ms | 503748 KB | Correct answer: answer = 4 |
46 | Correct | 247 ms | 503756 KB | Correct answer: answer = 9 |
47 | Correct | 247 ms | 503716 KB | Correct answer: answer = 9 |
48 | Correct | 245 ms | 503708 KB | Correct answer: answer = 21 |
49 | Correct | 245 ms | 503712 KB | Correct answer: answer = 71 |
50 | Correct | 246 ms | 503744 KB | Correct answer: answer = 77 |
51 | Correct | 245 ms | 503748 KB | Correct answer: answer = 400 |
52 | Correct | 252 ms | 503940 KB | Correct answer: answer = 996004 |
53 | Correct | 247 ms | 503768 KB | Correct answer: answer = 997310 |
54 | Correct | 252 ms | 503840 KB | Correct answer: answer = 990781 |
55 | Correct | 246 ms | 503876 KB | Correct answer: answer = 996545 |
56 | Correct | 251 ms | 503808 KB | Correct answer: answer = 484 |
57 | Correct | 246 ms | 503748 KB | Correct answer: answer = 484 |
58 | Correct | 248 ms | 503864 KB | Correct answer: answer = 63501 |
59 | Correct | 248 ms | 503728 KB | Correct answer: answer = 323501 |
60 | Correct | 265 ms | 503736 KB | Correct answer: answer = 752500 |
61 | Correct | 248 ms | 503880 KB | Correct answer: answer = 761480 |
62 | Correct | 250 ms | 503884 KB | Correct answer: answer = 758932 |
63 | Correct | 248 ms | 503876 KB | Correct answer: answer = 1000000 |
64 | Correct | 256 ms | 503868 KB | Correct answer: answer = 750500 |
65 | Correct | 248 ms | 503796 KB | Correct answer: answer = 1000000 |
66 | Correct | 249 ms | 503784 KB | Correct answer: answer = 250000 |
67 | Correct | 247 ms | 503716 KB | Correct answer: answer = 250000 |
68 | Correct | 248 ms | 503812 KB | Correct answer: answer = 1000000 |
69 | Correct | 251 ms | 503932 KB | Correct answer: answer = 994009 |
70 | Correct | 248 ms | 503756 KB | Correct answer: answer = 59315 |
71 | Correct | 249 ms | 503748 KB | Correct answer: answer = 25454 |
72 | Correct | 253 ms | 503776 KB | Correct answer: answer = 1504 |
73 | Correct | 252 ms | 503876 KB | Correct answer: answer = 37486 |
74 | Correct | 249 ms | 503804 KB | Correct answer: answer = 4284 |
75 | Correct | 250 ms | 503792 KB | Correct answer: answer = 158008 |
76 | Correct | 248 ms | 503816 KB | Correct answer: answer = 51860 |
77 | Correct | 246 ms | 503800 KB | Correct answer: answer = 12985 |
78 | Correct | 252 ms | 503928 KB | Correct answer: answer = 997864126212 |
79 | Correct | 253 ms | 504040 KB | Correct answer: answer = 998608411647 |
80 | Correct | 246 ms | 504032 KB | Correct answer: answer = 995265560477 |
81 | Correct | 247 ms | 504004 KB | Correct answer: answer = 10125000 |
82 | Correct | 251 ms | 503924 KB | Correct answer: answer = 2291668 |
83 | Correct | 257 ms | 503812 KB | Correct answer: answer = 42388 |
84 | Correct | 274 ms | 503884 KB | Correct answer: answer = 10318 |
85 | Correct | 480 ms | 503900 KB | Correct answer: answer = 3416 |
86 | Correct | 252 ms | 504004 KB | Correct answer: answer = 331708193881 |
87 | Correct | 281 ms | 504012 KB | Correct answer: answer = 2861193756 |
88 | Correct | 740 ms | 504060 KB | Correct answer: answer = 114646930 |
89 | Correct | 253 ms | 503876 KB | Correct answer: answer = 9280921 |
90 | Correct | 285 ms | 503948 KB | Correct answer: answer = 999984053400 |
91 | Correct | 586 ms | 504004 KB | Correct answer: answer = 750935949134 |
92 | Correct | 258 ms | 503976 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 246 ms | 503876 KB | Correct answer: answer = 998762383161 |
94 | Correct | 254 ms | 504004 KB | Correct answer: answer = 23017412908 |
95 | Correct | 263 ms | 503940 KB | Correct answer: answer = 728143410622 |
96 | Correct | 255 ms | 503836 KB | Correct answer: answer = 2 |
97 | Correct | 261 ms | 503908 KB | Correct answer: answer = 1824916 |
98 | Correct | 343 ms | 503876 KB | Correct answer: answer = 10680029 |
99 | Correct | 283 ms | 503932 KB | Correct answer: answer = 18351700 |
100 | Correct | 250 ms | 504084 KB | Correct answer: answer = 16040026 |
101 | Correct | 278 ms | 503876 KB | Correct answer: answer = 253968628325 |
102 | Correct | 404 ms | 504000 KB | Correct answer: answer = 10267 |
103 | Correct | 869 ms | 504004 KB | Correct answer: answer = 2582408 |
104 | Correct | 251 ms | 503876 KB | Correct answer: answer = 78024964781 |
105 | Correct | 248 ms | 503884 KB | Correct answer: answer = 9866346457 |
106 | Correct | 248 ms | 504004 KB | Correct answer: answer = 3327720949 |
107 | Correct | 256 ms | 503976 KB | Correct answer: answer = 86064128360 |
108 | Correct | 287 ms | 504008 KB | Correct answer: answer = 12698259150 |
109 | Correct | 1026 ms | 504008 KB | Correct answer: answer = 1185259288 |
110 | Correct | 266 ms | 505368 KB | Correct answer: answer = 999889968863 |
111 | Correct | 264 ms | 505440 KB | Correct answer: answer = 999861384931 |
112 | Correct | 274 ms | 505532 KB | Correct answer: answer = 999811809929 |
113 | Correct | 272 ms | 505432 KB | Correct answer: answer = 999869756441 |
114 | Runtime error | 709 ms | 712508 KB | Execution killed with signal 11 |
115 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 300 ms | 503748 KB | Correct answer: answer = 4 |
2 | Correct | 248 ms | 503744 KB | Correct answer: answer = 4 |
3 | Correct | 249 ms | 503732 KB | Correct answer: answer = 4 |
4 | Correct | 248 ms | 503704 KB | Correct answer: answer = 12 |
5 | Correct | 264 ms | 503748 KB | Correct answer: answer = 52 |
6 | Correct | 250 ms | 503776 KB | Correct answer: answer = 210 |
7 | Correct | 246 ms | 503708 KB | Correct answer: answer = 88 |
8 | Correct | 247 ms | 504008 KB | Correct answer: answer = 7696 |
9 | Correct | 245 ms | 503748 KB | Correct answer: answer = 1 |
10 | Correct | 250 ms | 503908 KB | Correct answer: answer = 2374 |
11 | Correct | 246 ms | 503760 KB | Correct answer: answer = 9502 |
12 | Correct | 246 ms | 503688 KB | Correct answer: answer = 49 |
13 | Correct | 246 ms | 503732 KB | Correct answer: answer = 151 |
14 | Correct | 247 ms | 503828 KB | Correct answer: answer = 7550 |
15 | Correct | 261 ms | 503796 KB | Correct answer: answer = 7220 |
16 | Correct | 249 ms | 503744 KB | Correct answer: answer = 7550 |
17 | Correct | 244 ms | 503892 KB | Correct answer: answer = 10000 |
18 | Correct | 248 ms | 503724 KB | Correct answer: answer = 10000 |
19 | Correct | 248 ms | 503812 KB | Correct answer: answer = 624 |
20 | Correct | 249 ms | 503808 KB | Correct answer: answer = 10000 |
21 | Correct | 246 ms | 503748 KB | Correct answer: answer = 1 |
22 | Correct | 246 ms | 503744 KB | Correct answer: answer = 4 |
23 | Correct | 277 ms | 503788 KB | Correct answer: answer = 1 |
24 | Correct | 245 ms | 503684 KB | Correct answer: answer = 5 |
25 | Correct | 245 ms | 503748 KB | Correct answer: answer = 41 |
26 | Correct | 245 ms | 503692 KB | Correct answer: answer = 71923 |
27 | Correct | 242 ms | 503876 KB | Correct answer: answer = 77137 |
28 | Correct | 249 ms | 503876 KB | Correct answer: answer = 764 |
29 | Correct | 245 ms | 503736 KB | Correct answer: answer = 250000 |
30 | Correct | 258 ms | 503708 KB | Correct answer: answer = 500 |
31 | Correct | 252 ms | 503748 KB | Correct answer: answer = 32 |
32 | Correct | 248 ms | 503796 KB | Correct answer: answer = 130050 |
33 | Correct | 247 ms | 503784 KB | Correct answer: answer = 5110 |
34 | Correct | 246 ms | 503692 KB | Correct answer: answer = 2626 |
35 | Correct | 253 ms | 503748 KB | Correct answer: answer = 796 |
36 | Correct | 250 ms | 503736 KB | Correct answer: answer = 7580 |
37 | Correct | 248 ms | 503748 KB | Correct answer: answer = 1904 |
38 | Correct | 247 ms | 503872 KB | Correct answer: answer = 996004 |
39 | Correct | 249 ms | 503800 KB | Correct answer: answer = 38817 |
40 | Correct | 247 ms | 503800 KB | Correct answer: answer = 4096 |
41 | Correct | 249 ms | 503956 KB | Correct answer: answer = 1 |
42 | Correct | 253 ms | 503876 KB | Correct answer: answer = 1 |
43 | Correct | 250 ms | 503748 KB | Correct answer: answer = 2040 |
44 | Correct | 245 ms | 503924 KB | Correct answer: answer = 2 |
45 | Correct | 245 ms | 503748 KB | Correct answer: answer = 4 |
46 | Correct | 247 ms | 503756 KB | Correct answer: answer = 9 |
47 | Correct | 247 ms | 503716 KB | Correct answer: answer = 9 |
48 | Correct | 245 ms | 503708 KB | Correct answer: answer = 21 |
49 | Correct | 245 ms | 503712 KB | Correct answer: answer = 71 |
50 | Correct | 246 ms | 503744 KB | Correct answer: answer = 77 |
51 | Correct | 245 ms | 503748 KB | Correct answer: answer = 400 |
52 | Correct | 252 ms | 503940 KB | Correct answer: answer = 996004 |
53 | Correct | 247 ms | 503768 KB | Correct answer: answer = 997310 |
54 | Correct | 252 ms | 503840 KB | Correct answer: answer = 990781 |
55 | Correct | 246 ms | 503876 KB | Correct answer: answer = 996545 |
56 | Correct | 251 ms | 503808 KB | Correct answer: answer = 484 |
57 | Correct | 246 ms | 503748 KB | Correct answer: answer = 484 |
58 | Correct | 248 ms | 503864 KB | Correct answer: answer = 63501 |
59 | Correct | 248 ms | 503728 KB | Correct answer: answer = 323501 |
60 | Correct | 265 ms | 503736 KB | Correct answer: answer = 752500 |
61 | Correct | 248 ms | 503880 KB | Correct answer: answer = 761480 |
62 | Correct | 250 ms | 503884 KB | Correct answer: answer = 758932 |
63 | Correct | 248 ms | 503876 KB | Correct answer: answer = 1000000 |
64 | Correct | 256 ms | 503868 KB | Correct answer: answer = 750500 |
65 | Correct | 248 ms | 503796 KB | Correct answer: answer = 1000000 |
66 | Correct | 249 ms | 503784 KB | Correct answer: answer = 250000 |
67 | Correct | 247 ms | 503716 KB | Correct answer: answer = 250000 |
68 | Correct | 248 ms | 503812 KB | Correct answer: answer = 1000000 |
69 | Correct | 251 ms | 503932 KB | Correct answer: answer = 994009 |
70 | Correct | 248 ms | 503756 KB | Correct answer: answer = 59315 |
71 | Correct | 249 ms | 503748 KB | Correct answer: answer = 25454 |
72 | Correct | 253 ms | 503776 KB | Correct answer: answer = 1504 |
73 | Correct | 252 ms | 503876 KB | Correct answer: answer = 37486 |
74 | Correct | 249 ms | 503804 KB | Correct answer: answer = 4284 |
75 | Correct | 250 ms | 503792 KB | Correct answer: answer = 158008 |
76 | Correct | 248 ms | 503816 KB | Correct answer: answer = 51860 |
77 | Correct | 246 ms | 503800 KB | Correct answer: answer = 12985 |
78 | Correct | 252 ms | 503928 KB | Correct answer: answer = 997864126212 |
79 | Correct | 253 ms | 504040 KB | Correct answer: answer = 998608411647 |
80 | Correct | 246 ms | 504032 KB | Correct answer: answer = 995265560477 |
81 | Correct | 247 ms | 504004 KB | Correct answer: answer = 10125000 |
82 | Correct | 251 ms | 503924 KB | Correct answer: answer = 2291668 |
83 | Correct | 257 ms | 503812 KB | Correct answer: answer = 42388 |
84 | Correct | 274 ms | 503884 KB | Correct answer: answer = 10318 |
85 | Correct | 480 ms | 503900 KB | Correct answer: answer = 3416 |
86 | Correct | 252 ms | 504004 KB | Correct answer: answer = 331708193881 |
87 | Correct | 281 ms | 504012 KB | Correct answer: answer = 2861193756 |
88 | Correct | 740 ms | 504060 KB | Correct answer: answer = 114646930 |
89 | Correct | 253 ms | 503876 KB | Correct answer: answer = 9280921 |
90 | Correct | 285 ms | 503948 KB | Correct answer: answer = 999984053400 |
91 | Correct | 586 ms | 504004 KB | Correct answer: answer = 750935949134 |
92 | Correct | 258 ms | 503976 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 246 ms | 503876 KB | Correct answer: answer = 998762383161 |
94 | Correct | 254 ms | 504004 KB | Correct answer: answer = 23017412908 |
95 | Correct | 263 ms | 503940 KB | Correct answer: answer = 728143410622 |
96 | Correct | 255 ms | 503836 KB | Correct answer: answer = 2 |
97 | Correct | 261 ms | 503908 KB | Correct answer: answer = 1824916 |
98 | Correct | 343 ms | 503876 KB | Correct answer: answer = 10680029 |
99 | Correct | 283 ms | 503932 KB | Correct answer: answer = 18351700 |
100 | Correct | 250 ms | 504084 KB | Correct answer: answer = 16040026 |
101 | Correct | 278 ms | 503876 KB | Correct answer: answer = 253968628325 |
102 | Correct | 404 ms | 504000 KB | Correct answer: answer = 10267 |
103 | Correct | 869 ms | 504004 KB | Correct answer: answer = 2582408 |
104 | Correct | 251 ms | 503876 KB | Correct answer: answer = 78024964781 |
105 | Correct | 248 ms | 503884 KB | Correct answer: answer = 9866346457 |
106 | Correct | 248 ms | 504004 KB | Correct answer: answer = 3327720949 |
107 | Correct | 256 ms | 503976 KB | Correct answer: answer = 86064128360 |
108 | Correct | 287 ms | 504008 KB | Correct answer: answer = 12698259150 |
109 | Correct | 1026 ms | 504008 KB | Correct answer: answer = 1185259288 |
110 | Correct | 266 ms | 505368 KB | Correct answer: answer = 999889968863 |
111 | Correct | 264 ms | 505440 KB | Correct answer: answer = 999861384931 |
112 | Correct | 274 ms | 505532 KB | Correct answer: answer = 999811809929 |
113 | Correct | 272 ms | 505432 KB | Correct answer: answer = 999869756441 |
114 | Runtime error | 709 ms | 712508 KB | Execution killed with signal 11 |
115 | Halted | 0 ms | 0 KB | - |