# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
389020 | 2021-04-13T13:33:37 Z | mehrdad_sohrabi | Aliens (IOI16_aliens) | C++14 | 273 ms | 25652 KB |
// Black lives matter #include <bits/stdc++.h> #include "aliens.h" /// 500 485 462 A4 using namespace std; typedef long long int ll; typedef complex<double> point; typedef long double ld; #define pb push_back #define pii pair < ll , ll > #define F first #define S second //#define endl '\n' #define int long long #define sync ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math") #define kill(x) return cout<<x<<'\n', 0; const int N=5e4+10,M=1e6+100,inf=(ll)1e15; ll dp[N][2]; ll A[M]; vector <pii> B; void solve(ll l,ll r,ll L,ll R,ll k){ if (r<l) return; ll mid=(r+l)/2; ll id=0,mx=inf; for (int i=L;i<=min(R,mid);i++){ ll z=0; if (i>1){ if (B[i-1].F<B[i-2].S){ z=(B[i-2].S-B[i-1].F)*((B[i-2].S-B[i-1].F)); } } ll x=dp[i-1][(k-1)%2]+(B[mid-1].S-B[i-1].F)*(B[mid-1].S-B[i-1].F)-z; if (mx>x){ mx=x; id=i; } } dp[mid][k%2]=mx; // cout << l << " " << r << " " << mid << " " << k << " " << mx << endl; solve(l,mid-1,L,id,k); solve(mid+1,r,id,R,k); } long long take_photos(int32_t n, int32_t m, int32_t k, std::vector<int32_t> r, std::vector<int32_t> c){ for (int i=0;i<M;i++) A[i]=i; for (int i=0;i<n;i++){ ll x=r[i],y=c[i]; A[max(x,y)]=min(A[max(x,y)],min(x,y)-1); } for (int i=0;i<m;i++){ if (A[i]<i){ while(B.size() && B.back().F>=A[i]) B.pop_back(); B.pb({A[i],i}); } } // for (auto u : B){ // cout << u.F << " " << u.S << endl; //} ll t=B.size(); for (int i=1;i<=t;i++){ dp[i][1]=(B[i-1].S-B[0].F)*(B[i-1].S-B[0].F); } for (int i=2;i<=k;i++){ solve(1,t,1,t,i); } return dp[t][k%2]; } /* int32_t main() { int n, m, k; assert(3 == scanf("%d %d %d", &n, &m, &k)); std::vector<int32_t> r(n), c(n); for (int i = 0; i < n; i++) { assert(2 == scanf("%d %d", &r[i], &c[i])); } long long ans = take_photos(n, m, k, r, c); printf("%lld\n", ans); return 0; } */ /* 5 7 2 0 3 4 4 4 6 4 5 4 6 */ //take_photos(5, 7, 2, [0, 4, 4, 4, 4], [3, 4, 6, 5, 6])
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 8012 KB | Correct answer: answer = 4 |
2 | Correct | 5 ms | 8024 KB | Correct answer: answer = 4 |
3 | Correct | 4 ms | 8012 KB | Correct answer: answer = 4 |
4 | Correct | 4 ms | 8012 KB | Correct answer: answer = 12 |
5 | Correct | 5 ms | 8012 KB | Correct answer: answer = 52 |
6 | Correct | 5 ms | 8012 KB | Correct answer: answer = 210 |
7 | Correct | 4 ms | 8012 KB | Correct answer: answer = 88 |
8 | Correct | 4 ms | 8024 KB | Correct answer: answer = 7696 |
9 | Correct | 4 ms | 8048 KB | Correct answer: answer = 1 |
10 | Correct | 4 ms | 8012 KB | Correct answer: answer = 2374 |
11 | Correct | 5 ms | 8012 KB | Correct answer: answer = 9502 |
12 | Correct | 4 ms | 8012 KB | Correct answer: answer = 49 |
13 | Correct | 4 ms | 8140 KB | Correct answer: answer = 151 |
14 | Correct | 4 ms | 8012 KB | Correct answer: answer = 7550 |
15 | Correct | 4 ms | 8108 KB | Correct answer: answer = 7220 |
16 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7550 |
17 | Correct | 4 ms | 8104 KB | Correct answer: answer = 10000 |
18 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
19 | Correct | 4 ms | 8012 KB | Correct answer: answer = 624 |
20 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 8012 KB | Correct answer: answer = 1 |
2 | Correct | 4 ms | 8016 KB | Correct answer: answer = 4 |
3 | Correct | 4 ms | 8064 KB | Correct answer: answer = 1 |
4 | Correct | 5 ms | 8012 KB | Correct answer: answer = 5 |
5 | Correct | 4 ms | 8052 KB | Correct answer: answer = 41 |
6 | Correct | 4 ms | 8012 KB | Correct answer: answer = 71923 |
7 | Correct | 5 ms | 8140 KB | Correct answer: answer = 77137 |
8 | Correct | 8 ms | 8160 KB | Correct answer: answer = 764 |
9 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
10 | Correct | 10 ms | 8140 KB | Correct answer: answer = 500 |
11 | Correct | 4 ms | 8012 KB | Correct answer: answer = 32 |
12 | Correct | 5 ms | 8140 KB | Correct answer: answer = 130050 |
13 | Correct | 5 ms | 8140 KB | Correct answer: answer = 5110 |
14 | Correct | 4 ms | 8140 KB | Correct answer: answer = 2626 |
15 | Correct | 5 ms | 8140 KB | Correct answer: answer = 796 |
16 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7580 |
17 | Correct | 6 ms | 8052 KB | Correct answer: answer = 1904 |
18 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996004 |
19 | Correct | 5 ms | 8052 KB | Correct answer: answer = 38817 |
20 | Correct | 7 ms | 8140 KB | Correct answer: answer = 4096 |
21 | Correct | 4 ms | 8140 KB | Correct answer: answer = 1 |
22 | Correct | 4 ms | 8144 KB | Correct answer: answer = 1 |
23 | Correct | 6 ms | 8140 KB | Correct answer: answer = 2040 |
24 | Correct | 5 ms | 8264 KB | Correct answer: answer = 2 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 8012 KB | Correct answer: answer = 4 |
2 | Correct | 5 ms | 8024 KB | Correct answer: answer = 4 |
3 | Correct | 4 ms | 8012 KB | Correct answer: answer = 4 |
4 | Correct | 4 ms | 8012 KB | Correct answer: answer = 12 |
5 | Correct | 5 ms | 8012 KB | Correct answer: answer = 52 |
6 | Correct | 5 ms | 8012 KB | Correct answer: answer = 210 |
7 | Correct | 4 ms | 8012 KB | Correct answer: answer = 88 |
8 | Correct | 4 ms | 8024 KB | Correct answer: answer = 7696 |
9 | Correct | 4 ms | 8048 KB | Correct answer: answer = 1 |
10 | Correct | 4 ms | 8012 KB | Correct answer: answer = 2374 |
11 | Correct | 5 ms | 8012 KB | Correct answer: answer = 9502 |
12 | Correct | 4 ms | 8012 KB | Correct answer: answer = 49 |
13 | Correct | 4 ms | 8140 KB | Correct answer: answer = 151 |
14 | Correct | 4 ms | 8012 KB | Correct answer: answer = 7550 |
15 | Correct | 4 ms | 8108 KB | Correct answer: answer = 7220 |
16 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7550 |
17 | Correct | 4 ms | 8104 KB | Correct answer: answer = 10000 |
18 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
19 | Correct | 4 ms | 8012 KB | Correct answer: answer = 624 |
20 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
21 | Correct | 4 ms | 8012 KB | Correct answer: answer = 1 |
22 | Correct | 4 ms | 8016 KB | Correct answer: answer = 4 |
23 | Correct | 4 ms | 8064 KB | Correct answer: answer = 1 |
24 | Correct | 5 ms | 8012 KB | Correct answer: answer = 5 |
25 | Correct | 4 ms | 8052 KB | Correct answer: answer = 41 |
26 | Correct | 4 ms | 8012 KB | Correct answer: answer = 71923 |
27 | Correct | 5 ms | 8140 KB | Correct answer: answer = 77137 |
28 | Correct | 8 ms | 8160 KB | Correct answer: answer = 764 |
29 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
30 | Correct | 10 ms | 8140 KB | Correct answer: answer = 500 |
31 | Correct | 4 ms | 8012 KB | Correct answer: answer = 32 |
32 | Correct | 5 ms | 8140 KB | Correct answer: answer = 130050 |
33 | Correct | 5 ms | 8140 KB | Correct answer: answer = 5110 |
34 | Correct | 4 ms | 8140 KB | Correct answer: answer = 2626 |
35 | Correct | 5 ms | 8140 KB | Correct answer: answer = 796 |
36 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7580 |
37 | Correct | 6 ms | 8052 KB | Correct answer: answer = 1904 |
38 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996004 |
39 | Correct | 5 ms | 8052 KB | Correct answer: answer = 38817 |
40 | Correct | 7 ms | 8140 KB | Correct answer: answer = 4096 |
41 | Correct | 4 ms | 8140 KB | Correct answer: answer = 1 |
42 | Correct | 4 ms | 8144 KB | Correct answer: answer = 1 |
43 | Correct | 6 ms | 8140 KB | Correct answer: answer = 2040 |
44 | Correct | 5 ms | 8264 KB | Correct answer: answer = 2 |
45 | Correct | 4 ms | 8012 KB | Correct answer: answer = 4 |
46 | Correct | 4 ms | 8012 KB | Correct answer: answer = 9 |
47 | Correct | 4 ms | 8012 KB | Correct answer: answer = 9 |
48 | Correct | 4 ms | 8012 KB | Correct answer: answer = 21 |
49 | Correct | 4 ms | 8012 KB | Correct answer: answer = 71 |
50 | Correct | 4 ms | 8012 KB | Correct answer: answer = 77 |
51 | Correct | 4 ms | 8012 KB | Correct answer: answer = 400 |
52 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996004 |
53 | Correct | 4 ms | 8012 KB | Correct answer: answer = 997310 |
54 | Correct | 4 ms | 8140 KB | Correct answer: answer = 990781 |
55 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996545 |
56 | Correct | 4 ms | 8012 KB | Correct answer: answer = 484 |
57 | Correct | 4 ms | 8140 KB | Correct answer: answer = 484 |
58 | Correct | 5 ms | 8152 KB | Correct answer: answer = 63501 |
59 | Correct | 5 ms | 8140 KB | Correct answer: answer = 323501 |
60 | Correct | 6 ms | 8140 KB | Correct answer: answer = 752500 |
61 | Correct | 5 ms | 8140 KB | Correct answer: answer = 761480 |
62 | Correct | 5 ms | 8140 KB | Correct answer: answer = 758932 |
63 | Correct | 4 ms | 8012 KB | Correct answer: answer = 1000000 |
64 | Correct | 10 ms | 8140 KB | Correct answer: answer = 750500 |
65 | Correct | 4 ms | 8140 KB | Correct answer: answer = 1000000 |
66 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
67 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
68 | Correct | 5 ms | 8012 KB | Correct answer: answer = 1000000 |
69 | Correct | 4 ms | 8140 KB | Correct answer: answer = 994009 |
70 | Correct | 4 ms | 8140 KB | Correct answer: answer = 59315 |
71 | Correct | 5 ms | 8140 KB | Correct answer: answer = 25454 |
72 | Correct | 6 ms | 8140 KB | Correct answer: answer = 1504 |
73 | Correct | 4 ms | 8140 KB | Correct answer: answer = 37486 |
74 | Correct | 5 ms | 8144 KB | Correct answer: answer = 4284 |
75 | Correct | 5 ms | 8012 KB | Correct answer: answer = 158008 |
76 | Correct | 4 ms | 8140 KB | Correct answer: answer = 51860 |
77 | Correct | 4 ms | 8140 KB | Correct answer: answer = 12985 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 8012 KB | Correct answer: answer = 4 |
2 | Correct | 5 ms | 8024 KB | Correct answer: answer = 4 |
3 | Correct | 4 ms | 8012 KB | Correct answer: answer = 4 |
4 | Correct | 4 ms | 8012 KB | Correct answer: answer = 12 |
5 | Correct | 5 ms | 8012 KB | Correct answer: answer = 52 |
6 | Correct | 5 ms | 8012 KB | Correct answer: answer = 210 |
7 | Correct | 4 ms | 8012 KB | Correct answer: answer = 88 |
8 | Correct | 4 ms | 8024 KB | Correct answer: answer = 7696 |
9 | Correct | 4 ms | 8048 KB | Correct answer: answer = 1 |
10 | Correct | 4 ms | 8012 KB | Correct answer: answer = 2374 |
11 | Correct | 5 ms | 8012 KB | Correct answer: answer = 9502 |
12 | Correct | 4 ms | 8012 KB | Correct answer: answer = 49 |
13 | Correct | 4 ms | 8140 KB | Correct answer: answer = 151 |
14 | Correct | 4 ms | 8012 KB | Correct answer: answer = 7550 |
15 | Correct | 4 ms | 8108 KB | Correct answer: answer = 7220 |
16 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7550 |
17 | Correct | 4 ms | 8104 KB | Correct answer: answer = 10000 |
18 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
19 | Correct | 4 ms | 8012 KB | Correct answer: answer = 624 |
20 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
21 | Correct | 4 ms | 8012 KB | Correct answer: answer = 1 |
22 | Correct | 4 ms | 8016 KB | Correct answer: answer = 4 |
23 | Correct | 4 ms | 8064 KB | Correct answer: answer = 1 |
24 | Correct | 5 ms | 8012 KB | Correct answer: answer = 5 |
25 | Correct | 4 ms | 8052 KB | Correct answer: answer = 41 |
26 | Correct | 4 ms | 8012 KB | Correct answer: answer = 71923 |
27 | Correct | 5 ms | 8140 KB | Correct answer: answer = 77137 |
28 | Correct | 8 ms | 8160 KB | Correct answer: answer = 764 |
29 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
30 | Correct | 10 ms | 8140 KB | Correct answer: answer = 500 |
31 | Correct | 4 ms | 8012 KB | Correct answer: answer = 32 |
32 | Correct | 5 ms | 8140 KB | Correct answer: answer = 130050 |
33 | Correct | 5 ms | 8140 KB | Correct answer: answer = 5110 |
34 | Correct | 4 ms | 8140 KB | Correct answer: answer = 2626 |
35 | Correct | 5 ms | 8140 KB | Correct answer: answer = 796 |
36 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7580 |
37 | Correct | 6 ms | 8052 KB | Correct answer: answer = 1904 |
38 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996004 |
39 | Correct | 5 ms | 8052 KB | Correct answer: answer = 38817 |
40 | Correct | 7 ms | 8140 KB | Correct answer: answer = 4096 |
41 | Correct | 4 ms | 8140 KB | Correct answer: answer = 1 |
42 | Correct | 4 ms | 8144 KB | Correct answer: answer = 1 |
43 | Correct | 6 ms | 8140 KB | Correct answer: answer = 2040 |
44 | Correct | 5 ms | 8264 KB | Correct answer: answer = 2 |
45 | Correct | 4 ms | 8012 KB | Correct answer: answer = 4 |
46 | Correct | 4 ms | 8012 KB | Correct answer: answer = 9 |
47 | Correct | 4 ms | 8012 KB | Correct answer: answer = 9 |
48 | Correct | 4 ms | 8012 KB | Correct answer: answer = 21 |
49 | Correct | 4 ms | 8012 KB | Correct answer: answer = 71 |
50 | Correct | 4 ms | 8012 KB | Correct answer: answer = 77 |
51 | Correct | 4 ms | 8012 KB | Correct answer: answer = 400 |
52 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996004 |
53 | Correct | 4 ms | 8012 KB | Correct answer: answer = 997310 |
54 | Correct | 4 ms | 8140 KB | Correct answer: answer = 990781 |
55 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996545 |
56 | Correct | 4 ms | 8012 KB | Correct answer: answer = 484 |
57 | Correct | 4 ms | 8140 KB | Correct answer: answer = 484 |
58 | Correct | 5 ms | 8152 KB | Correct answer: answer = 63501 |
59 | Correct | 5 ms | 8140 KB | Correct answer: answer = 323501 |
60 | Correct | 6 ms | 8140 KB | Correct answer: answer = 752500 |
61 | Correct | 5 ms | 8140 KB | Correct answer: answer = 761480 |
62 | Correct | 5 ms | 8140 KB | Correct answer: answer = 758932 |
63 | Correct | 4 ms | 8012 KB | Correct answer: answer = 1000000 |
64 | Correct | 10 ms | 8140 KB | Correct answer: answer = 750500 |
65 | Correct | 4 ms | 8140 KB | Correct answer: answer = 1000000 |
66 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
67 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
68 | Correct | 5 ms | 8012 KB | Correct answer: answer = 1000000 |
69 | Correct | 4 ms | 8140 KB | Correct answer: answer = 994009 |
70 | Correct | 4 ms | 8140 KB | Correct answer: answer = 59315 |
71 | Correct | 5 ms | 8140 KB | Correct answer: answer = 25454 |
72 | Correct | 6 ms | 8140 KB | Correct answer: answer = 1504 |
73 | Correct | 4 ms | 8140 KB | Correct answer: answer = 37486 |
74 | Correct | 5 ms | 8144 KB | Correct answer: answer = 4284 |
75 | Correct | 5 ms | 8012 KB | Correct answer: answer = 158008 |
76 | Correct | 4 ms | 8140 KB | Correct answer: answer = 51860 |
77 | Correct | 4 ms | 8140 KB | Correct answer: answer = 12985 |
78 | Correct | 6 ms | 8140 KB | Correct answer: answer = 997864126212 |
79 | Correct | 6 ms | 8192 KB | Correct answer: answer = 998608411647 |
80 | Correct | 6 ms | 8136 KB | Correct answer: answer = 995265560477 |
81 | Correct | 5 ms | 8268 KB | Correct answer: answer = 10125000 |
82 | Correct | 6 ms | 8344 KB | Correct answer: answer = 2291668 |
83 | Correct | 11 ms | 8140 KB | Correct answer: answer = 42388 |
84 | Correct | 30 ms | 8256 KB | Correct answer: answer = 10318 |
85 | Correct | 80 ms | 8232 KB | Correct answer: answer = 3416 |
86 | Correct | 7 ms | 8268 KB | Correct answer: answer = 331708193881 |
87 | Correct | 60 ms | 8360 KB | Correct answer: answer = 2861193756 |
88 | Correct | 233 ms | 8268 KB | Correct answer: answer = 114646930 |
89 | Correct | 12 ms | 8268 KB | Correct answer: answer = 9280921 |
90 | Correct | 46 ms | 8268 KB | Correct answer: answer = 999984053400 |
91 | Correct | 171 ms | 8268 KB | Correct answer: answer = 750935949134 |
92 | Correct | 6 ms | 8140 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 6 ms | 8140 KB | Correct answer: answer = 998762383161 |
94 | Correct | 15 ms | 8268 KB | Correct answer: answer = 23017412908 |
95 | Correct | 7 ms | 8140 KB | Correct answer: answer = 728143410622 |
96 | Correct | 6 ms | 8136 KB | Correct answer: answer = 2 |
97 | Correct | 8 ms | 8268 KB | Correct answer: answer = 1824916 |
98 | Correct | 75 ms | 8368 KB | Correct answer: answer = 10680029 |
99 | Correct | 42 ms | 8272 KB | Correct answer: answer = 18351700 |
100 | Correct | 6 ms | 8268 KB | Correct answer: answer = 16040026 |
101 | Correct | 6 ms | 8140 KB | Correct answer: answer = 253968628325 |
102 | Correct | 99 ms | 8240 KB | Correct answer: answer = 10267 |
103 | Correct | 229 ms | 8364 KB | Correct answer: answer = 2582408 |
104 | Correct | 6 ms | 8140 KB | Correct answer: answer = 78024964781 |
105 | Correct | 6 ms | 8140 KB | Correct answer: answer = 9866346457 |
106 | Correct | 8 ms | 8212 KB | Correct answer: answer = 3327720949 |
107 | Correct | 16 ms | 8200 KB | Correct answer: answer = 86064128360 |
108 | Correct | 58 ms | 8228 KB | Correct answer: answer = 12698259150 |
109 | Correct | 224 ms | 8336 KB | Correct answer: answer = 1185259288 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 8012 KB | Correct answer: answer = 4 |
2 | Correct | 5 ms | 8024 KB | Correct answer: answer = 4 |
3 | Correct | 4 ms | 8012 KB | Correct answer: answer = 4 |
4 | Correct | 4 ms | 8012 KB | Correct answer: answer = 12 |
5 | Correct | 5 ms | 8012 KB | Correct answer: answer = 52 |
6 | Correct | 5 ms | 8012 KB | Correct answer: answer = 210 |
7 | Correct | 4 ms | 8012 KB | Correct answer: answer = 88 |
8 | Correct | 4 ms | 8024 KB | Correct answer: answer = 7696 |
9 | Correct | 4 ms | 8048 KB | Correct answer: answer = 1 |
10 | Correct | 4 ms | 8012 KB | Correct answer: answer = 2374 |
11 | Correct | 5 ms | 8012 KB | Correct answer: answer = 9502 |
12 | Correct | 4 ms | 8012 KB | Correct answer: answer = 49 |
13 | Correct | 4 ms | 8140 KB | Correct answer: answer = 151 |
14 | Correct | 4 ms | 8012 KB | Correct answer: answer = 7550 |
15 | Correct | 4 ms | 8108 KB | Correct answer: answer = 7220 |
16 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7550 |
17 | Correct | 4 ms | 8104 KB | Correct answer: answer = 10000 |
18 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
19 | Correct | 4 ms | 8012 KB | Correct answer: answer = 624 |
20 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
21 | Correct | 4 ms | 8012 KB | Correct answer: answer = 1 |
22 | Correct | 4 ms | 8016 KB | Correct answer: answer = 4 |
23 | Correct | 4 ms | 8064 KB | Correct answer: answer = 1 |
24 | Correct | 5 ms | 8012 KB | Correct answer: answer = 5 |
25 | Correct | 4 ms | 8052 KB | Correct answer: answer = 41 |
26 | Correct | 4 ms | 8012 KB | Correct answer: answer = 71923 |
27 | Correct | 5 ms | 8140 KB | Correct answer: answer = 77137 |
28 | Correct | 8 ms | 8160 KB | Correct answer: answer = 764 |
29 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
30 | Correct | 10 ms | 8140 KB | Correct answer: answer = 500 |
31 | Correct | 4 ms | 8012 KB | Correct answer: answer = 32 |
32 | Correct | 5 ms | 8140 KB | Correct answer: answer = 130050 |
33 | Correct | 5 ms | 8140 KB | Correct answer: answer = 5110 |
34 | Correct | 4 ms | 8140 KB | Correct answer: answer = 2626 |
35 | Correct | 5 ms | 8140 KB | Correct answer: answer = 796 |
36 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7580 |
37 | Correct | 6 ms | 8052 KB | Correct answer: answer = 1904 |
38 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996004 |
39 | Correct | 5 ms | 8052 KB | Correct answer: answer = 38817 |
40 | Correct | 7 ms | 8140 KB | Correct answer: answer = 4096 |
41 | Correct | 4 ms | 8140 KB | Correct answer: answer = 1 |
42 | Correct | 4 ms | 8144 KB | Correct answer: answer = 1 |
43 | Correct | 6 ms | 8140 KB | Correct answer: answer = 2040 |
44 | Correct | 5 ms | 8264 KB | Correct answer: answer = 2 |
45 | Correct | 4 ms | 8012 KB | Correct answer: answer = 4 |
46 | Correct | 4 ms | 8012 KB | Correct answer: answer = 9 |
47 | Correct | 4 ms | 8012 KB | Correct answer: answer = 9 |
48 | Correct | 4 ms | 8012 KB | Correct answer: answer = 21 |
49 | Correct | 4 ms | 8012 KB | Correct answer: answer = 71 |
50 | Correct | 4 ms | 8012 KB | Correct answer: answer = 77 |
51 | Correct | 4 ms | 8012 KB | Correct answer: answer = 400 |
52 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996004 |
53 | Correct | 4 ms | 8012 KB | Correct answer: answer = 997310 |
54 | Correct | 4 ms | 8140 KB | Correct answer: answer = 990781 |
55 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996545 |
56 | Correct | 4 ms | 8012 KB | Correct answer: answer = 484 |
57 | Correct | 4 ms | 8140 KB | Correct answer: answer = 484 |
58 | Correct | 5 ms | 8152 KB | Correct answer: answer = 63501 |
59 | Correct | 5 ms | 8140 KB | Correct answer: answer = 323501 |
60 | Correct | 6 ms | 8140 KB | Correct answer: answer = 752500 |
61 | Correct | 5 ms | 8140 KB | Correct answer: answer = 761480 |
62 | Correct | 5 ms | 8140 KB | Correct answer: answer = 758932 |
63 | Correct | 4 ms | 8012 KB | Correct answer: answer = 1000000 |
64 | Correct | 10 ms | 8140 KB | Correct answer: answer = 750500 |
65 | Correct | 4 ms | 8140 KB | Correct answer: answer = 1000000 |
66 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
67 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
68 | Correct | 5 ms | 8012 KB | Correct answer: answer = 1000000 |
69 | Correct | 4 ms | 8140 KB | Correct answer: answer = 994009 |
70 | Correct | 4 ms | 8140 KB | Correct answer: answer = 59315 |
71 | Correct | 5 ms | 8140 KB | Correct answer: answer = 25454 |
72 | Correct | 6 ms | 8140 KB | Correct answer: answer = 1504 |
73 | Correct | 4 ms | 8140 KB | Correct answer: answer = 37486 |
74 | Correct | 5 ms | 8144 KB | Correct answer: answer = 4284 |
75 | Correct | 5 ms | 8012 KB | Correct answer: answer = 158008 |
76 | Correct | 4 ms | 8140 KB | Correct answer: answer = 51860 |
77 | Correct | 4 ms | 8140 KB | Correct answer: answer = 12985 |
78 | Correct | 6 ms | 8140 KB | Correct answer: answer = 997864126212 |
79 | Correct | 6 ms | 8192 KB | Correct answer: answer = 998608411647 |
80 | Correct | 6 ms | 8136 KB | Correct answer: answer = 995265560477 |
81 | Correct | 5 ms | 8268 KB | Correct answer: answer = 10125000 |
82 | Correct | 6 ms | 8344 KB | Correct answer: answer = 2291668 |
83 | Correct | 11 ms | 8140 KB | Correct answer: answer = 42388 |
84 | Correct | 30 ms | 8256 KB | Correct answer: answer = 10318 |
85 | Correct | 80 ms | 8232 KB | Correct answer: answer = 3416 |
86 | Correct | 7 ms | 8268 KB | Correct answer: answer = 331708193881 |
87 | Correct | 60 ms | 8360 KB | Correct answer: answer = 2861193756 |
88 | Correct | 233 ms | 8268 KB | Correct answer: answer = 114646930 |
89 | Correct | 12 ms | 8268 KB | Correct answer: answer = 9280921 |
90 | Correct | 46 ms | 8268 KB | Correct answer: answer = 999984053400 |
91 | Correct | 171 ms | 8268 KB | Correct answer: answer = 750935949134 |
92 | Correct | 6 ms | 8140 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 6 ms | 8140 KB | Correct answer: answer = 998762383161 |
94 | Correct | 15 ms | 8268 KB | Correct answer: answer = 23017412908 |
95 | Correct | 7 ms | 8140 KB | Correct answer: answer = 728143410622 |
96 | Correct | 6 ms | 8136 KB | Correct answer: answer = 2 |
97 | Correct | 8 ms | 8268 KB | Correct answer: answer = 1824916 |
98 | Correct | 75 ms | 8368 KB | Correct answer: answer = 10680029 |
99 | Correct | 42 ms | 8272 KB | Correct answer: answer = 18351700 |
100 | Correct | 6 ms | 8268 KB | Correct answer: answer = 16040026 |
101 | Correct | 6 ms | 8140 KB | Correct answer: answer = 253968628325 |
102 | Correct | 99 ms | 8240 KB | Correct answer: answer = 10267 |
103 | Correct | 229 ms | 8364 KB | Correct answer: answer = 2582408 |
104 | Correct | 6 ms | 8140 KB | Correct answer: answer = 78024964781 |
105 | Correct | 6 ms | 8140 KB | Correct answer: answer = 9866346457 |
106 | Correct | 8 ms | 8212 KB | Correct answer: answer = 3327720949 |
107 | Correct | 16 ms | 8200 KB | Correct answer: answer = 86064128360 |
108 | Correct | 58 ms | 8228 KB | Correct answer: answer = 12698259150 |
109 | Correct | 224 ms | 8336 KB | Correct answer: answer = 1185259288 |
110 | Correct | 18 ms | 8928 KB | Correct answer: answer = 999889968863 |
111 | Correct | 19 ms | 8908 KB | Correct answer: answer = 999861384931 |
112 | Correct | 19 ms | 8824 KB | Correct answer: answer = 999811809929 |
113 | Correct | 18 ms | 8892 KB | Correct answer: answer = 999869756441 |
114 | Correct | 19 ms | 10560 KB | Correct answer: answer = 1700000000 |
115 | Correct | 53 ms | 11072 KB | Correct answer: answer = 131666670 |
116 | Correct | 9 ms | 9160 KB | Correct answer: answer = 89478486 |
117 | Correct | 41 ms | 9172 KB | Correct answer: answer = 4971040 |
118 | Correct | 81 ms | 9172 KB | Correct answer: answer = 2711494 |
119 | Correct | 209 ms | 11168 KB | Correct answer: answer = 25252530 |
120 | Correct | 95 ms | 11172 KB | Correct answer: answer = 62500000 |
121 | Correct | 25 ms | 11160 KB | Correct answer: answer = 333175097780 |
122 | Correct | 94 ms | 11240 KB | Correct answer: answer = 33121180179 |
123 | Correct | 272 ms | 11240 KB | Correct answer: answer = 9802314015 |
124 | Correct | 168 ms | 11188 KB | Correct answer: answer = 32567551 |
125 | Correct | 213 ms | 11220 KB | Correct answer: answer = 997525000000 |
126 | Correct | 233 ms | 11072 KB | Correct answer: answer = 752723538884 |
127 | Correct | 20 ms | 9412 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 18 ms | 9572 KB | Correct answer: answer = 999978000121 |
129 | Correct | 20 ms | 9540 KB | Correct answer: answer = 745986144735 |
130 | Correct | 15 ms | 9036 KB | Correct answer: answer = 2 |
131 | Correct | 38 ms | 11164 KB | Correct answer: answer = 277966670 |
132 | Correct | 22 ms | 11164 KB | Correct answer: answer = 2500900082 |
133 | Correct | 18 ms | 9764 KB | Correct answer: answer = 301248349636 |
134 | Correct | 273 ms | 9680 KB | Correct answer: answer = 14118891 |
135 | Correct | 19 ms | 9548 KB | Correct answer: answer = 14384977265 |
136 | Correct | 20 ms | 9540 KB | Correct answer: answer = 3681368330 |
137 | Correct | 22 ms | 9548 KB | Correct answer: answer = 2720316816 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 8012 KB | Correct answer: answer = 4 |
2 | Correct | 5 ms | 8024 KB | Correct answer: answer = 4 |
3 | Correct | 4 ms | 8012 KB | Correct answer: answer = 4 |
4 | Correct | 4 ms | 8012 KB | Correct answer: answer = 12 |
5 | Correct | 5 ms | 8012 KB | Correct answer: answer = 52 |
6 | Correct | 5 ms | 8012 KB | Correct answer: answer = 210 |
7 | Correct | 4 ms | 8012 KB | Correct answer: answer = 88 |
8 | Correct | 4 ms | 8024 KB | Correct answer: answer = 7696 |
9 | Correct | 4 ms | 8048 KB | Correct answer: answer = 1 |
10 | Correct | 4 ms | 8012 KB | Correct answer: answer = 2374 |
11 | Correct | 5 ms | 8012 KB | Correct answer: answer = 9502 |
12 | Correct | 4 ms | 8012 KB | Correct answer: answer = 49 |
13 | Correct | 4 ms | 8140 KB | Correct answer: answer = 151 |
14 | Correct | 4 ms | 8012 KB | Correct answer: answer = 7550 |
15 | Correct | 4 ms | 8108 KB | Correct answer: answer = 7220 |
16 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7550 |
17 | Correct | 4 ms | 8104 KB | Correct answer: answer = 10000 |
18 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
19 | Correct | 4 ms | 8012 KB | Correct answer: answer = 624 |
20 | Correct | 4 ms | 8012 KB | Correct answer: answer = 10000 |
21 | Correct | 4 ms | 8012 KB | Correct answer: answer = 1 |
22 | Correct | 4 ms | 8016 KB | Correct answer: answer = 4 |
23 | Correct | 4 ms | 8064 KB | Correct answer: answer = 1 |
24 | Correct | 5 ms | 8012 KB | Correct answer: answer = 5 |
25 | Correct | 4 ms | 8052 KB | Correct answer: answer = 41 |
26 | Correct | 4 ms | 8012 KB | Correct answer: answer = 71923 |
27 | Correct | 5 ms | 8140 KB | Correct answer: answer = 77137 |
28 | Correct | 8 ms | 8160 KB | Correct answer: answer = 764 |
29 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
30 | Correct | 10 ms | 8140 KB | Correct answer: answer = 500 |
31 | Correct | 4 ms | 8012 KB | Correct answer: answer = 32 |
32 | Correct | 5 ms | 8140 KB | Correct answer: answer = 130050 |
33 | Correct | 5 ms | 8140 KB | Correct answer: answer = 5110 |
34 | Correct | 4 ms | 8140 KB | Correct answer: answer = 2626 |
35 | Correct | 5 ms | 8140 KB | Correct answer: answer = 796 |
36 | Correct | 4 ms | 8140 KB | Correct answer: answer = 7580 |
37 | Correct | 6 ms | 8052 KB | Correct answer: answer = 1904 |
38 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996004 |
39 | Correct | 5 ms | 8052 KB | Correct answer: answer = 38817 |
40 | Correct | 7 ms | 8140 KB | Correct answer: answer = 4096 |
41 | Correct | 4 ms | 8140 KB | Correct answer: answer = 1 |
42 | Correct | 4 ms | 8144 KB | Correct answer: answer = 1 |
43 | Correct | 6 ms | 8140 KB | Correct answer: answer = 2040 |
44 | Correct | 5 ms | 8264 KB | Correct answer: answer = 2 |
45 | Correct | 4 ms | 8012 KB | Correct answer: answer = 4 |
46 | Correct | 4 ms | 8012 KB | Correct answer: answer = 9 |
47 | Correct | 4 ms | 8012 KB | Correct answer: answer = 9 |
48 | Correct | 4 ms | 8012 KB | Correct answer: answer = 21 |
49 | Correct | 4 ms | 8012 KB | Correct answer: answer = 71 |
50 | Correct | 4 ms | 8012 KB | Correct answer: answer = 77 |
51 | Correct | 4 ms | 8012 KB | Correct answer: answer = 400 |
52 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996004 |
53 | Correct | 4 ms | 8012 KB | Correct answer: answer = 997310 |
54 | Correct | 4 ms | 8140 KB | Correct answer: answer = 990781 |
55 | Correct | 4 ms | 8140 KB | Correct answer: answer = 996545 |
56 | Correct | 4 ms | 8012 KB | Correct answer: answer = 484 |
57 | Correct | 4 ms | 8140 KB | Correct answer: answer = 484 |
58 | Correct | 5 ms | 8152 KB | Correct answer: answer = 63501 |
59 | Correct | 5 ms | 8140 KB | Correct answer: answer = 323501 |
60 | Correct | 6 ms | 8140 KB | Correct answer: answer = 752500 |
61 | Correct | 5 ms | 8140 KB | Correct answer: answer = 761480 |
62 | Correct | 5 ms | 8140 KB | Correct answer: answer = 758932 |
63 | Correct | 4 ms | 8012 KB | Correct answer: answer = 1000000 |
64 | Correct | 10 ms | 8140 KB | Correct answer: answer = 750500 |
65 | Correct | 4 ms | 8140 KB | Correct answer: answer = 1000000 |
66 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
67 | Correct | 4 ms | 8140 KB | Correct answer: answer = 250000 |
68 | Correct | 5 ms | 8012 KB | Correct answer: answer = 1000000 |
69 | Correct | 4 ms | 8140 KB | Correct answer: answer = 994009 |
70 | Correct | 4 ms | 8140 KB | Correct answer: answer = 59315 |
71 | Correct | 5 ms | 8140 KB | Correct answer: answer = 25454 |
72 | Correct | 6 ms | 8140 KB | Correct answer: answer = 1504 |
73 | Correct | 4 ms | 8140 KB | Correct answer: answer = 37486 |
74 | Correct | 5 ms | 8144 KB | Correct answer: answer = 4284 |
75 | Correct | 5 ms | 8012 KB | Correct answer: answer = 158008 |
76 | Correct | 4 ms | 8140 KB | Correct answer: answer = 51860 |
77 | Correct | 4 ms | 8140 KB | Correct answer: answer = 12985 |
78 | Correct | 6 ms | 8140 KB | Correct answer: answer = 997864126212 |
79 | Correct | 6 ms | 8192 KB | Correct answer: answer = 998608411647 |
80 | Correct | 6 ms | 8136 KB | Correct answer: answer = 995265560477 |
81 | Correct | 5 ms | 8268 KB | Correct answer: answer = 10125000 |
82 | Correct | 6 ms | 8344 KB | Correct answer: answer = 2291668 |
83 | Correct | 11 ms | 8140 KB | Correct answer: answer = 42388 |
84 | Correct | 30 ms | 8256 KB | Correct answer: answer = 10318 |
85 | Correct | 80 ms | 8232 KB | Correct answer: answer = 3416 |
86 | Correct | 7 ms | 8268 KB | Correct answer: answer = 331708193881 |
87 | Correct | 60 ms | 8360 KB | Correct answer: answer = 2861193756 |
88 | Correct | 233 ms | 8268 KB | Correct answer: answer = 114646930 |
89 | Correct | 12 ms | 8268 KB | Correct answer: answer = 9280921 |
90 | Correct | 46 ms | 8268 KB | Correct answer: answer = 999984053400 |
91 | Correct | 171 ms | 8268 KB | Correct answer: answer = 750935949134 |
92 | Correct | 6 ms | 8140 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 6 ms | 8140 KB | Correct answer: answer = 998762383161 |
94 | Correct | 15 ms | 8268 KB | Correct answer: answer = 23017412908 |
95 | Correct | 7 ms | 8140 KB | Correct answer: answer = 728143410622 |
96 | Correct | 6 ms | 8136 KB | Correct answer: answer = 2 |
97 | Correct | 8 ms | 8268 KB | Correct answer: answer = 1824916 |
98 | Correct | 75 ms | 8368 KB | Correct answer: answer = 10680029 |
99 | Correct | 42 ms | 8272 KB | Correct answer: answer = 18351700 |
100 | Correct | 6 ms | 8268 KB | Correct answer: answer = 16040026 |
101 | Correct | 6 ms | 8140 KB | Correct answer: answer = 253968628325 |
102 | Correct | 99 ms | 8240 KB | Correct answer: answer = 10267 |
103 | Correct | 229 ms | 8364 KB | Correct answer: answer = 2582408 |
104 | Correct | 6 ms | 8140 KB | Correct answer: answer = 78024964781 |
105 | Correct | 6 ms | 8140 KB | Correct answer: answer = 9866346457 |
106 | Correct | 8 ms | 8212 KB | Correct answer: answer = 3327720949 |
107 | Correct | 16 ms | 8200 KB | Correct answer: answer = 86064128360 |
108 | Correct | 58 ms | 8228 KB | Correct answer: answer = 12698259150 |
109 | Correct | 224 ms | 8336 KB | Correct answer: answer = 1185259288 |
110 | Correct | 18 ms | 8928 KB | Correct answer: answer = 999889968863 |
111 | Correct | 19 ms | 8908 KB | Correct answer: answer = 999861384931 |
112 | Correct | 19 ms | 8824 KB | Correct answer: answer = 999811809929 |
113 | Correct | 18 ms | 8892 KB | Correct answer: answer = 999869756441 |
114 | Correct | 19 ms | 10560 KB | Correct answer: answer = 1700000000 |
115 | Correct | 53 ms | 11072 KB | Correct answer: answer = 131666670 |
116 | Correct | 9 ms | 9160 KB | Correct answer: answer = 89478486 |
117 | Correct | 41 ms | 9172 KB | Correct answer: answer = 4971040 |
118 | Correct | 81 ms | 9172 KB | Correct answer: answer = 2711494 |
119 | Correct | 209 ms | 11168 KB | Correct answer: answer = 25252530 |
120 | Correct | 95 ms | 11172 KB | Correct answer: answer = 62500000 |
121 | Correct | 25 ms | 11160 KB | Correct answer: answer = 333175097780 |
122 | Correct | 94 ms | 11240 KB | Correct answer: answer = 33121180179 |
123 | Correct | 272 ms | 11240 KB | Correct answer: answer = 9802314015 |
124 | Correct | 168 ms | 11188 KB | Correct answer: answer = 32567551 |
125 | Correct | 213 ms | 11220 KB | Correct answer: answer = 997525000000 |
126 | Correct | 233 ms | 11072 KB | Correct answer: answer = 752723538884 |
127 | Correct | 20 ms | 9412 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 18 ms | 9572 KB | Correct answer: answer = 999978000121 |
129 | Correct | 20 ms | 9540 KB | Correct answer: answer = 745986144735 |
130 | Correct | 15 ms | 9036 KB | Correct answer: answer = 2 |
131 | Correct | 38 ms | 11164 KB | Correct answer: answer = 277966670 |
132 | Correct | 22 ms | 11164 KB | Correct answer: answer = 2500900082 |
133 | Correct | 18 ms | 9764 KB | Correct answer: answer = 301248349636 |
134 | Correct | 273 ms | 9680 KB | Correct answer: answer = 14118891 |
135 | Correct | 19 ms | 9548 KB | Correct answer: answer = 14384977265 |
136 | Correct | 20 ms | 9540 KB | Correct answer: answer = 3681368330 |
137 | Correct | 22 ms | 9548 KB | Correct answer: answer = 2720316816 |
138 | Correct | 33 ms | 10948 KB | Correct answer: answer = 999976000144 |
139 | Correct | 33 ms | 10924 KB | Correct answer: answer = 999856102410 |
140 | Correct | 33 ms | 10932 KB | Correct answer: answer = 999958401531 |
141 | Correct | 35 ms | 11036 KB | Correct answer: answer = 999769649944 |
142 | Correct | 48 ms | 10928 KB | Correct answer: answer = 999874525918 |
143 | Runtime error | 43 ms | 25652 KB | Execution killed with signal 11 |
144 | Halted | 0 ms | 0 KB | - |