# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
32078 | 2017-09-24T08:27:26 Z | osmanorhan | Aliens (IOI16_aliens) | C++14 | 2000 ms | 356440 KB |
#include "aliens.h" #include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define all( x ) x.begin(), x.end() #define umin( x, y ) x = min( x, (y) ) #define umax( x, y ) x = max( x, (y) ) using namespace std; typedef long long Lint; typedef pair<int,int> ii; bool comp( const ii &a, const ii &b ) { return a.se < b.se; } Lint sq( Lint x ) { return x*x; } int n; vector< vector<Lint> > dn; vector<Lint> dp; vector<ii> v, v2; void f( int l, int r, int optl, int optr, int n ) { if( l > r ) return; int m = (l+r)/2; int optm = m; Lint mini = 1e18; for(int i=max(m,optl);i<=optr;i++) { Lint val = sq(v[i].se-v[m].fi+1) - dp[m] + dn[i+1][n-1]; if( mini > val ) { mini = val; optm = i; } } dn[m][n] = mini; f( l, m-1, optl, optm, n ); f( m+1, r, optm, optr, n ); } long long take_photos(int N, int m, int k, vector<int> r, vector<int> c) { n = N; for(int i=0;i<r.size();i++) { if( r[i] > c[i] ) swap( r[i], c[i] ); v.pb( ii( r[i], c[i] ) ); } sort( all( v ), comp ); for(int i=0;i<v.size();i++) { while( v2.size() && v2[v2.size()-1].fi >= v[i].fi ) v2.pop_back(); v2.pb( v[i] ); } v = v2; //for(int i=0;i<v.size();i++) //printf("-- %d %d\n",v[i].fi,v[i].se); dp.resize(v.size()); for(int i=0;i<dp.size();i++) dp[i] = i? sq( max( 0, v[i-1].se-v[i].fi+1 ) ):0; dn.resize(v.size()+1); for(int i=0;i<dn.size();i++) dn[i].resize( k+1 ); n = v.size(); for(int i=0;i<=k-1;i++) dn[n][i] = 0; for(int i=0;i<n;i++) dn[i][0] = 1e18; //printf("asd\n"); for(int j=1;j<=k;j++) { f( 0, n-1, 0, n-1, j ); //for(int i=0;i<n;i++) printf("%d ",dn[i][j]); printf(" ---- j=%d\n",j); } return dn[0][k]; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 2024 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 2024 KB | Correct answer: answer = 52 |
6 | Correct | 0 ms | 2024 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 2024 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2374 |
11 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 2024 KB | Correct answer: answer = 49 |
13 | Correct | 0 ms | 2024 KB | Correct answer: answer = 151 |
14 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7220 |
16 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
17 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
19 | Correct | 0 ms | 2024 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
2 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
4 | Correct | 0 ms | 2024 KB | Correct answer: answer = 5 |
5 | Correct | 0 ms | 2024 KB | Correct answer: answer = 41 |
6 | Correct | 0 ms | 2024 KB | Correct answer: answer = 71923 |
7 | Correct | 0 ms | 2024 KB | Correct answer: answer = 77137 |
8 | Correct | 3 ms | 2816 KB | Correct answer: answer = 764 |
9 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
10 | Correct | 9 ms | 4004 KB | Correct answer: answer = 500 |
11 | Correct | 0 ms | 2024 KB | Correct answer: answer = 32 |
12 | Correct | 0 ms | 2024 KB | Correct answer: answer = 130050 |
13 | Correct | 0 ms | 2288 KB | Correct answer: answer = 5110 |
14 | Correct | 0 ms | 2156 KB | Correct answer: answer = 2626 |
15 | Correct | 0 ms | 2288 KB | Correct answer: answer = 796 |
16 | Correct | 0 ms | 2156 KB | Correct answer: answer = 7580 |
17 | Correct | 0 ms | 2552 KB | Correct answer: answer = 1904 |
18 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996004 |
19 | Correct | 0 ms | 2156 KB | Correct answer: answer = 38817 |
20 | Correct | 0 ms | 2420 KB | Correct answer: answer = 4096 |
21 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
22 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
23 | Correct | 0 ms | 2552 KB | Correct answer: answer = 2040 |
24 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 2024 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 2024 KB | Correct answer: answer = 52 |
6 | Correct | 0 ms | 2024 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 2024 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2374 |
11 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 2024 KB | Correct answer: answer = 49 |
13 | Correct | 0 ms | 2024 KB | Correct answer: answer = 151 |
14 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7220 |
16 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
17 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
19 | Correct | 0 ms | 2024 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
22 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
23 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
24 | Correct | 0 ms | 2024 KB | Correct answer: answer = 5 |
25 | Correct | 0 ms | 2024 KB | Correct answer: answer = 41 |
26 | Correct | 0 ms | 2024 KB | Correct answer: answer = 71923 |
27 | Correct | 0 ms | 2024 KB | Correct answer: answer = 77137 |
28 | Correct | 3 ms | 2816 KB | Correct answer: answer = 764 |
29 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
30 | Correct | 9 ms | 4004 KB | Correct answer: answer = 500 |
31 | Correct | 0 ms | 2024 KB | Correct answer: answer = 32 |
32 | Correct | 0 ms | 2024 KB | Correct answer: answer = 130050 |
33 | Correct | 0 ms | 2288 KB | Correct answer: answer = 5110 |
34 | Correct | 0 ms | 2156 KB | Correct answer: answer = 2626 |
35 | Correct | 0 ms | 2288 KB | Correct answer: answer = 796 |
36 | Correct | 0 ms | 2156 KB | Correct answer: answer = 7580 |
37 | Correct | 0 ms | 2552 KB | Correct answer: answer = 1904 |
38 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996004 |
39 | Correct | 0 ms | 2156 KB | Correct answer: answer = 38817 |
40 | Correct | 0 ms | 2420 KB | Correct answer: answer = 4096 |
41 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
42 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
43 | Correct | 0 ms | 2552 KB | Correct answer: answer = 2040 |
44 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2 |
45 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
46 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9 |
47 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9 |
48 | Correct | 0 ms | 2024 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 2024 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 2024 KB | Correct answer: answer = 77 |
51 | Correct | 0 ms | 2024 KB | Correct answer: answer = 400 |
52 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996004 |
53 | Correct | 0 ms | 2024 KB | Correct answer: answer = 997310 |
54 | Correct | 0 ms | 2024 KB | Correct answer: answer = 990781 |
55 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996545 |
56 | Correct | 0 ms | 2024 KB | Correct answer: answer = 484 |
57 | Correct | 0 ms | 2024 KB | Correct answer: answer = 484 |
58 | Correct | 0 ms | 2156 KB | Correct answer: answer = 63501 |
59 | Correct | 0 ms | 2156 KB | Correct answer: answer = 323501 |
60 | Correct | 0 ms | 2420 KB | Correct answer: answer = 752500 |
61 | Correct | 0 ms | 2156 KB | Correct answer: answer = 761480 |
62 | Correct | 0 ms | 2552 KB | Correct answer: answer = 758932 |
63 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
64 | Correct | 6 ms | 4004 KB | Correct answer: answer = 750500 |
65 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
66 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
67 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
68 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
69 | Correct | 0 ms | 2024 KB | Correct answer: answer = 994009 |
70 | Correct | 0 ms | 2156 KB | Correct answer: answer = 59315 |
71 | Correct | 0 ms | 2156 KB | Correct answer: answer = 25454 |
72 | Correct | 0 ms | 2420 KB | Correct answer: answer = 1504 |
73 | Correct | 0 ms | 2024 KB | Correct answer: answer = 37486 |
74 | Correct | 0 ms | 2288 KB | Correct answer: answer = 4284 |
75 | Correct | 0 ms | 2288 KB | Correct answer: answer = 158008 |
76 | Correct | 0 ms | 2156 KB | Correct answer: answer = 51860 |
77 | Correct | 0 ms | 2024 KB | Correct answer: answer = 12985 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 2024 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 2024 KB | Correct answer: answer = 52 |
6 | Correct | 0 ms | 2024 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 2024 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2374 |
11 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 2024 KB | Correct answer: answer = 49 |
13 | Correct | 0 ms | 2024 KB | Correct answer: answer = 151 |
14 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7220 |
16 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
17 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
19 | Correct | 0 ms | 2024 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
22 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
23 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
24 | Correct | 0 ms | 2024 KB | Correct answer: answer = 5 |
25 | Correct | 0 ms | 2024 KB | Correct answer: answer = 41 |
26 | Correct | 0 ms | 2024 KB | Correct answer: answer = 71923 |
27 | Correct | 0 ms | 2024 KB | Correct answer: answer = 77137 |
28 | Correct | 3 ms | 2816 KB | Correct answer: answer = 764 |
29 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
30 | Correct | 9 ms | 4004 KB | Correct answer: answer = 500 |
31 | Correct | 0 ms | 2024 KB | Correct answer: answer = 32 |
32 | Correct | 0 ms | 2024 KB | Correct answer: answer = 130050 |
33 | Correct | 0 ms | 2288 KB | Correct answer: answer = 5110 |
34 | Correct | 0 ms | 2156 KB | Correct answer: answer = 2626 |
35 | Correct | 0 ms | 2288 KB | Correct answer: answer = 796 |
36 | Correct | 0 ms | 2156 KB | Correct answer: answer = 7580 |
37 | Correct | 0 ms | 2552 KB | Correct answer: answer = 1904 |
38 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996004 |
39 | Correct | 0 ms | 2156 KB | Correct answer: answer = 38817 |
40 | Correct | 0 ms | 2420 KB | Correct answer: answer = 4096 |
41 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
42 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
43 | Correct | 0 ms | 2552 KB | Correct answer: answer = 2040 |
44 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2 |
45 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
46 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9 |
47 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9 |
48 | Correct | 0 ms | 2024 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 2024 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 2024 KB | Correct answer: answer = 77 |
51 | Correct | 0 ms | 2024 KB | Correct answer: answer = 400 |
52 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996004 |
53 | Correct | 0 ms | 2024 KB | Correct answer: answer = 997310 |
54 | Correct | 0 ms | 2024 KB | Correct answer: answer = 990781 |
55 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996545 |
56 | Correct | 0 ms | 2024 KB | Correct answer: answer = 484 |
57 | Correct | 0 ms | 2024 KB | Correct answer: answer = 484 |
58 | Correct | 0 ms | 2156 KB | Correct answer: answer = 63501 |
59 | Correct | 0 ms | 2156 KB | Correct answer: answer = 323501 |
60 | Correct | 0 ms | 2420 KB | Correct answer: answer = 752500 |
61 | Correct | 0 ms | 2156 KB | Correct answer: answer = 761480 |
62 | Correct | 0 ms | 2552 KB | Correct answer: answer = 758932 |
63 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
64 | Correct | 6 ms | 4004 KB | Correct answer: answer = 750500 |
65 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
66 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
67 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
68 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
69 | Correct | 0 ms | 2024 KB | Correct answer: answer = 994009 |
70 | Correct | 0 ms | 2156 KB | Correct answer: answer = 59315 |
71 | Correct | 0 ms | 2156 KB | Correct answer: answer = 25454 |
72 | Correct | 0 ms | 2420 KB | Correct answer: answer = 1504 |
73 | Correct | 0 ms | 2024 KB | Correct answer: answer = 37486 |
74 | Correct | 0 ms | 2288 KB | Correct answer: answer = 4284 |
75 | Correct | 0 ms | 2288 KB | Correct answer: answer = 158008 |
76 | Correct | 0 ms | 2156 KB | Correct answer: answer = 51860 |
77 | Correct | 0 ms | 2024 KB | Correct answer: answer = 12985 |
78 | Correct | 0 ms | 2164 KB | Correct answer: answer = 997864126212 |
79 | Correct | 0 ms | 2164 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 2436 KB | Correct answer: answer = 995265560477 |
81 | Correct | 0 ms | 2352 KB | Correct answer: answer = 10125000 |
82 | Correct | 3 ms | 2616 KB | Correct answer: answer = 2291668 |
83 | Correct | 9 ms | 3748 KB | Correct answer: answer = 42388 |
84 | Correct | 46 ms | 8764 KB | Correct answer: answer = 10318 |
85 | Correct | 166 ms | 24032 KB | Correct answer: answer = 3416 |
86 | Correct | 0 ms | 2484 KB | Correct answer: answer = 331708193881 |
87 | Correct | 69 ms | 9612 KB | Correct answer: answer = 2861193756 |
88 | Correct | 563 ms | 44008 KB | Correct answer: answer = 114646930 |
89 | Correct | 13 ms | 4068 KB | Correct answer: answer = 9280921 |
90 | Correct | 83 ms | 11724 KB | Correct answer: answer = 999984053400 |
91 | Correct | 423 ms | 33492 KB | Correct answer: answer = 750935949134 |
92 | Correct | 0 ms | 2164 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 0 ms | 2164 KB | Correct answer: answer = 998762383161 |
94 | Correct | 16 ms | 3540 KB | Correct answer: answer = 23017412908 |
95 | Correct | 0 ms | 2828 KB | Correct answer: answer = 728143410622 |
96 | Correct | 0 ms | 2164 KB | Correct answer: answer = 2 |
97 | Correct | 3 ms | 2616 KB | Correct answer: answer = 1824916 |
98 | Correct | 193 ms | 18196 KB | Correct answer: answer = 10680029 |
99 | Correct | 76 ms | 10404 KB | Correct answer: answer = 18351700 |
100 | Correct | 3 ms | 2352 KB | Correct answer: answer = 16040026 |
101 | Correct | 0 ms | 2164 KB | Correct answer: answer = 253968628325 |
102 | Correct | 139 ms | 17868 KB | Correct answer: answer = 10267 |
103 | Correct | 859 ms | 57352 KB | Correct answer: answer = 2582408 |
104 | Correct | 0 ms | 2164 KB | Correct answer: answer = 78024964781 |
105 | Correct | 0 ms | 2164 KB | Correct answer: answer = 9866346457 |
106 | Correct | 3 ms | 2560 KB | Correct answer: answer = 3327720949 |
107 | Correct | 19 ms | 5860 KB | Correct answer: answer = 86064128360 |
108 | Correct | 99 ms | 19296 KB | Correct answer: answer = 12698259150 |
109 | Correct | 696 ms | 64464 KB | Correct answer: answer = 1185259288 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 2024 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 2024 KB | Correct answer: answer = 52 |
6 | Correct | 0 ms | 2024 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 2024 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2374 |
11 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 2024 KB | Correct answer: answer = 49 |
13 | Correct | 0 ms | 2024 KB | Correct answer: answer = 151 |
14 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7220 |
16 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
17 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
19 | Correct | 0 ms | 2024 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
22 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
23 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
24 | Correct | 0 ms | 2024 KB | Correct answer: answer = 5 |
25 | Correct | 0 ms | 2024 KB | Correct answer: answer = 41 |
26 | Correct | 0 ms | 2024 KB | Correct answer: answer = 71923 |
27 | Correct | 0 ms | 2024 KB | Correct answer: answer = 77137 |
28 | Correct | 3 ms | 2816 KB | Correct answer: answer = 764 |
29 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
30 | Correct | 9 ms | 4004 KB | Correct answer: answer = 500 |
31 | Correct | 0 ms | 2024 KB | Correct answer: answer = 32 |
32 | Correct | 0 ms | 2024 KB | Correct answer: answer = 130050 |
33 | Correct | 0 ms | 2288 KB | Correct answer: answer = 5110 |
34 | Correct | 0 ms | 2156 KB | Correct answer: answer = 2626 |
35 | Correct | 0 ms | 2288 KB | Correct answer: answer = 796 |
36 | Correct | 0 ms | 2156 KB | Correct answer: answer = 7580 |
37 | Correct | 0 ms | 2552 KB | Correct answer: answer = 1904 |
38 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996004 |
39 | Correct | 0 ms | 2156 KB | Correct answer: answer = 38817 |
40 | Correct | 0 ms | 2420 KB | Correct answer: answer = 4096 |
41 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
42 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
43 | Correct | 0 ms | 2552 KB | Correct answer: answer = 2040 |
44 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2 |
45 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
46 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9 |
47 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9 |
48 | Correct | 0 ms | 2024 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 2024 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 2024 KB | Correct answer: answer = 77 |
51 | Correct | 0 ms | 2024 KB | Correct answer: answer = 400 |
52 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996004 |
53 | Correct | 0 ms | 2024 KB | Correct answer: answer = 997310 |
54 | Correct | 0 ms | 2024 KB | Correct answer: answer = 990781 |
55 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996545 |
56 | Correct | 0 ms | 2024 KB | Correct answer: answer = 484 |
57 | Correct | 0 ms | 2024 KB | Correct answer: answer = 484 |
58 | Correct | 0 ms | 2156 KB | Correct answer: answer = 63501 |
59 | Correct | 0 ms | 2156 KB | Correct answer: answer = 323501 |
60 | Correct | 0 ms | 2420 KB | Correct answer: answer = 752500 |
61 | Correct | 0 ms | 2156 KB | Correct answer: answer = 761480 |
62 | Correct | 0 ms | 2552 KB | Correct answer: answer = 758932 |
63 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
64 | Correct | 6 ms | 4004 KB | Correct answer: answer = 750500 |
65 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
66 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
67 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
68 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
69 | Correct | 0 ms | 2024 KB | Correct answer: answer = 994009 |
70 | Correct | 0 ms | 2156 KB | Correct answer: answer = 59315 |
71 | Correct | 0 ms | 2156 KB | Correct answer: answer = 25454 |
72 | Correct | 0 ms | 2420 KB | Correct answer: answer = 1504 |
73 | Correct | 0 ms | 2024 KB | Correct answer: answer = 37486 |
74 | Correct | 0 ms | 2288 KB | Correct answer: answer = 4284 |
75 | Correct | 0 ms | 2288 KB | Correct answer: answer = 158008 |
76 | Correct | 0 ms | 2156 KB | Correct answer: answer = 51860 |
77 | Correct | 0 ms | 2024 KB | Correct answer: answer = 12985 |
78 | Correct | 0 ms | 2164 KB | Correct answer: answer = 997864126212 |
79 | Correct | 0 ms | 2164 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 2436 KB | Correct answer: answer = 995265560477 |
81 | Correct | 0 ms | 2352 KB | Correct answer: answer = 10125000 |
82 | Correct | 3 ms | 2616 KB | Correct answer: answer = 2291668 |
83 | Correct | 9 ms | 3748 KB | Correct answer: answer = 42388 |
84 | Correct | 46 ms | 8764 KB | Correct answer: answer = 10318 |
85 | Correct | 166 ms | 24032 KB | Correct answer: answer = 3416 |
86 | Correct | 0 ms | 2484 KB | Correct answer: answer = 331708193881 |
87 | Correct | 69 ms | 9612 KB | Correct answer: answer = 2861193756 |
88 | Correct | 563 ms | 44008 KB | Correct answer: answer = 114646930 |
89 | Correct | 13 ms | 4068 KB | Correct answer: answer = 9280921 |
90 | Correct | 83 ms | 11724 KB | Correct answer: answer = 999984053400 |
91 | Correct | 423 ms | 33492 KB | Correct answer: answer = 750935949134 |
92 | Correct | 0 ms | 2164 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 0 ms | 2164 KB | Correct answer: answer = 998762383161 |
94 | Correct | 16 ms | 3540 KB | Correct answer: answer = 23017412908 |
95 | Correct | 0 ms | 2828 KB | Correct answer: answer = 728143410622 |
96 | Correct | 0 ms | 2164 KB | Correct answer: answer = 2 |
97 | Correct | 3 ms | 2616 KB | Correct answer: answer = 1824916 |
98 | Correct | 193 ms | 18196 KB | Correct answer: answer = 10680029 |
99 | Correct | 76 ms | 10404 KB | Correct answer: answer = 18351700 |
100 | Correct | 3 ms | 2352 KB | Correct answer: answer = 16040026 |
101 | Correct | 0 ms | 2164 KB | Correct answer: answer = 253968628325 |
102 | Correct | 139 ms | 17868 KB | Correct answer: answer = 10267 |
103 | Correct | 859 ms | 57352 KB | Correct answer: answer = 2582408 |
104 | Correct | 0 ms | 2164 KB | Correct answer: answer = 78024964781 |
105 | Correct | 0 ms | 2164 KB | Correct answer: answer = 9866346457 |
106 | Correct | 3 ms | 2560 KB | Correct answer: answer = 3327720949 |
107 | Correct | 19 ms | 5860 KB | Correct answer: answer = 86064128360 |
108 | Correct | 99 ms | 19296 KB | Correct answer: answer = 12698259150 |
109 | Correct | 696 ms | 64464 KB | Correct answer: answer = 1185259288 |
110 | Correct | 19 ms | 3660 KB | Correct answer: answer = 999889968863 |
111 | Correct | 29 ms | 3660 KB | Correct answer: answer = 999861384931 |
112 | Correct | 23 ms | 3660 KB | Correct answer: answer = 999811809929 |
113 | Correct | 16 ms | 3660 KB | Correct answer: answer = 999869756441 |
114 | Correct | 33 ms | 6932 KB | Correct answer: answer = 1700000000 |
115 | Correct | 106 ms | 14060 KB | Correct answer: answer = 131666670 |
116 | Correct | 3 ms | 3800 KB | Correct answer: answer = 89478486 |
117 | Correct | 63 ms | 10268 KB | Correct answer: answer = 4971040 |
118 | Correct | 119 ms | 16076 KB | Correct answer: answer = 2711494 |
119 | Correct | 546 ms | 45212 KB | Correct answer: answer = 25252530 |
120 | Correct | 223 ms | 21848 KB | Correct answer: answer = 62500000 |
121 | Correct | 29 ms | 7688 KB | Correct answer: answer = 333175097780 |
122 | Correct | 186 ms | 17588 KB | Correct answer: answer = 33121180179 |
123 | Correct | 633 ms | 44252 KB | Correct answer: answer = 9802314015 |
124 | Correct | 503 ms | 36632 KB | Correct answer: answer = 32567551 |
125 | Correct | 563 ms | 45212 KB | Correct answer: answer = 997525000000 |
126 | Correct | 629 ms | 42332 KB | Correct answer: answer = 752723538884 |
127 | Correct | 16 ms | 3660 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 23 ms | 3660 KB | Correct answer: answer = 999978000121 |
129 | Correct | 23 ms | 3660 KB | Correct answer: answer = 745986144735 |
130 | Correct | 9 ms | 3660 KB | Correct answer: answer = 2 |
131 | Correct | 76 ms | 10100 KB | Correct answer: answer = 277966670 |
132 | Correct | 29 ms | 6932 KB | Correct answer: answer = 2500900082 |
133 | Correct | 26 ms | 3804 KB | Correct answer: answer = 301248349636 |
134 | Correct | 293 ms | 23596 KB | Correct answer: answer = 14118891 |
135 | Correct | 19 ms | 3660 KB | Correct answer: answer = 14384977265 |
136 | Correct | 23 ms | 3660 KB | Correct answer: answer = 3681368330 |
137 | Correct | 26 ms | 3928 KB | Correct answer: answer = 2720316816 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 2024 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 2024 KB | Correct answer: answer = 52 |
6 | Correct | 0 ms | 2024 KB | Correct answer: answer = 210 |
7 | Correct | 0 ms | 2024 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2374 |
11 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 2024 KB | Correct answer: answer = 49 |
13 | Correct | 0 ms | 2024 KB | Correct answer: answer = 151 |
14 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7220 |
16 | Correct | 0 ms | 2024 KB | Correct answer: answer = 7550 |
17 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
19 | Correct | 0 ms | 2024 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 2024 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
22 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
23 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
24 | Correct | 0 ms | 2024 KB | Correct answer: answer = 5 |
25 | Correct | 0 ms | 2024 KB | Correct answer: answer = 41 |
26 | Correct | 0 ms | 2024 KB | Correct answer: answer = 71923 |
27 | Correct | 0 ms | 2024 KB | Correct answer: answer = 77137 |
28 | Correct | 3 ms | 2816 KB | Correct answer: answer = 764 |
29 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
30 | Correct | 9 ms | 4004 KB | Correct answer: answer = 500 |
31 | Correct | 0 ms | 2024 KB | Correct answer: answer = 32 |
32 | Correct | 0 ms | 2024 KB | Correct answer: answer = 130050 |
33 | Correct | 0 ms | 2288 KB | Correct answer: answer = 5110 |
34 | Correct | 0 ms | 2156 KB | Correct answer: answer = 2626 |
35 | Correct | 0 ms | 2288 KB | Correct answer: answer = 796 |
36 | Correct | 0 ms | 2156 KB | Correct answer: answer = 7580 |
37 | Correct | 0 ms | 2552 KB | Correct answer: answer = 1904 |
38 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996004 |
39 | Correct | 0 ms | 2156 KB | Correct answer: answer = 38817 |
40 | Correct | 0 ms | 2420 KB | Correct answer: answer = 4096 |
41 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
42 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1 |
43 | Correct | 0 ms | 2552 KB | Correct answer: answer = 2040 |
44 | Correct | 0 ms | 2024 KB | Correct answer: answer = 2 |
45 | Correct | 0 ms | 2024 KB | Correct answer: answer = 4 |
46 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9 |
47 | Correct | 0 ms | 2024 KB | Correct answer: answer = 9 |
48 | Correct | 0 ms | 2024 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 2024 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 2024 KB | Correct answer: answer = 77 |
51 | Correct | 0 ms | 2024 KB | Correct answer: answer = 400 |
52 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996004 |
53 | Correct | 0 ms | 2024 KB | Correct answer: answer = 997310 |
54 | Correct | 0 ms | 2024 KB | Correct answer: answer = 990781 |
55 | Correct | 0 ms | 2024 KB | Correct answer: answer = 996545 |
56 | Correct | 0 ms | 2024 KB | Correct answer: answer = 484 |
57 | Correct | 0 ms | 2024 KB | Correct answer: answer = 484 |
58 | Correct | 0 ms | 2156 KB | Correct answer: answer = 63501 |
59 | Correct | 0 ms | 2156 KB | Correct answer: answer = 323501 |
60 | Correct | 0 ms | 2420 KB | Correct answer: answer = 752500 |
61 | Correct | 0 ms | 2156 KB | Correct answer: answer = 761480 |
62 | Correct | 0 ms | 2552 KB | Correct answer: answer = 758932 |
63 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
64 | Correct | 6 ms | 4004 KB | Correct answer: answer = 750500 |
65 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
66 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
67 | Correct | 0 ms | 2024 KB | Correct answer: answer = 250000 |
68 | Correct | 0 ms | 2024 KB | Correct answer: answer = 1000000 |
69 | Correct | 0 ms | 2024 KB | Correct answer: answer = 994009 |
70 | Correct | 0 ms | 2156 KB | Correct answer: answer = 59315 |
71 | Correct | 0 ms | 2156 KB | Correct answer: answer = 25454 |
72 | Correct | 0 ms | 2420 KB | Correct answer: answer = 1504 |
73 | Correct | 0 ms | 2024 KB | Correct answer: answer = 37486 |
74 | Correct | 0 ms | 2288 KB | Correct answer: answer = 4284 |
75 | Correct | 0 ms | 2288 KB | Correct answer: answer = 158008 |
76 | Correct | 0 ms | 2156 KB | Correct answer: answer = 51860 |
77 | Correct | 0 ms | 2024 KB | Correct answer: answer = 12985 |
78 | Correct | 0 ms | 2164 KB | Correct answer: answer = 997864126212 |
79 | Correct | 0 ms | 2164 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 2436 KB | Correct answer: answer = 995265560477 |
81 | Correct | 0 ms | 2352 KB | Correct answer: answer = 10125000 |
82 | Correct | 3 ms | 2616 KB | Correct answer: answer = 2291668 |
83 | Correct | 9 ms | 3748 KB | Correct answer: answer = 42388 |
84 | Correct | 46 ms | 8764 KB | Correct answer: answer = 10318 |
85 | Correct | 166 ms | 24032 KB | Correct answer: answer = 3416 |
86 | Correct | 0 ms | 2484 KB | Correct answer: answer = 331708193881 |
87 | Correct | 69 ms | 9612 KB | Correct answer: answer = 2861193756 |
88 | Correct | 563 ms | 44008 KB | Correct answer: answer = 114646930 |
89 | Correct | 13 ms | 4068 KB | Correct answer: answer = 9280921 |
90 | Correct | 83 ms | 11724 KB | Correct answer: answer = 999984053400 |
91 | Correct | 423 ms | 33492 KB | Correct answer: answer = 750935949134 |
92 | Correct | 0 ms | 2164 KB | Correct answer: answer = 1000000000000 |
93 | Correct | 0 ms | 2164 KB | Correct answer: answer = 998762383161 |
94 | Correct | 16 ms | 3540 KB | Correct answer: answer = 23017412908 |
95 | Correct | 0 ms | 2828 KB | Correct answer: answer = 728143410622 |
96 | Correct | 0 ms | 2164 KB | Correct answer: answer = 2 |
97 | Correct | 3 ms | 2616 KB | Correct answer: answer = 1824916 |
98 | Correct | 193 ms | 18196 KB | Correct answer: answer = 10680029 |
99 | Correct | 76 ms | 10404 KB | Correct answer: answer = 18351700 |
100 | Correct | 3 ms | 2352 KB | Correct answer: answer = 16040026 |
101 | Correct | 0 ms | 2164 KB | Correct answer: answer = 253968628325 |
102 | Correct | 139 ms | 17868 KB | Correct answer: answer = 10267 |
103 | Correct | 859 ms | 57352 KB | Correct answer: answer = 2582408 |
104 | Correct | 0 ms | 2164 KB | Correct answer: answer = 78024964781 |
105 | Correct | 0 ms | 2164 KB | Correct answer: answer = 9866346457 |
106 | Correct | 3 ms | 2560 KB | Correct answer: answer = 3327720949 |
107 | Correct | 19 ms | 5860 KB | Correct answer: answer = 86064128360 |
108 | Correct | 99 ms | 19296 KB | Correct answer: answer = 12698259150 |
109 | Correct | 696 ms | 64464 KB | Correct answer: answer = 1185259288 |
110 | Correct | 19 ms | 3660 KB | Correct answer: answer = 999889968863 |
111 | Correct | 29 ms | 3660 KB | Correct answer: answer = 999861384931 |
112 | Correct | 23 ms | 3660 KB | Correct answer: answer = 999811809929 |
113 | Correct | 16 ms | 3660 KB | Correct answer: answer = 999869756441 |
114 | Correct | 33 ms | 6932 KB | Correct answer: answer = 1700000000 |
115 | Correct | 106 ms | 14060 KB | Correct answer: answer = 131666670 |
116 | Correct | 3 ms | 3800 KB | Correct answer: answer = 89478486 |
117 | Correct | 63 ms | 10268 KB | Correct answer: answer = 4971040 |
118 | Correct | 119 ms | 16076 KB | Correct answer: answer = 2711494 |
119 | Correct | 546 ms | 45212 KB | Correct answer: answer = 25252530 |
120 | Correct | 223 ms | 21848 KB | Correct answer: answer = 62500000 |
121 | Correct | 29 ms | 7688 KB | Correct answer: answer = 333175097780 |
122 | Correct | 186 ms | 17588 KB | Correct answer: answer = 33121180179 |
123 | Correct | 633 ms | 44252 KB | Correct answer: answer = 9802314015 |
124 | Correct | 503 ms | 36632 KB | Correct answer: answer = 32567551 |
125 | Correct | 563 ms | 45212 KB | Correct answer: answer = 997525000000 |
126 | Correct | 629 ms | 42332 KB | Correct answer: answer = 752723538884 |
127 | Correct | 16 ms | 3660 KB | Correct answer: answer = 1000000000000 |
128 | Correct | 23 ms | 3660 KB | Correct answer: answer = 999978000121 |
129 | Correct | 23 ms | 3660 KB | Correct answer: answer = 745986144735 |
130 | Correct | 9 ms | 3660 KB | Correct answer: answer = 2 |
131 | Correct | 76 ms | 10100 KB | Correct answer: answer = 277966670 |
132 | Correct | 29 ms | 6932 KB | Correct answer: answer = 2500900082 |
133 | Correct | 26 ms | 3804 KB | Correct answer: answer = 301248349636 |
134 | Correct | 293 ms | 23596 KB | Correct answer: answer = 14118891 |
135 | Correct | 19 ms | 3660 KB | Correct answer: answer = 14384977265 |
136 | Correct | 23 ms | 3660 KB | Correct answer: answer = 3681368330 |
137 | Correct | 26 ms | 3928 KB | Correct answer: answer = 2720316816 |
138 | Correct | 56 ms | 5212 KB | Correct answer: answer = 999976000144 |
139 | Correct | 46 ms | 5212 KB | Correct answer: answer = 999856102410 |
140 | Correct | 43 ms | 5212 KB | Correct answer: answer = 999958401531 |
141 | Correct | 49 ms | 5324 KB | Correct answer: answer = 999769649944 |
142 | Correct | 73 ms | 10948 KB | Correct answer: answer = 999874525918 |
143 | Correct | 73 ms | 11888 KB | Correct answer: answer = 6050000000 |
144 | Correct | 173 ms | 18224 KB | Correct answer: answer = 1112500000 |
145 | Correct | 33 ms | 8208 KB | Correct answer: answer = 4294967296 |
146 | Correct | 363 ms | 32760 KB | Correct answer: answer = 87652406 |
147 | Execution timed out | 2000 ms | 356440 KB | Execution timed out |
148 | Halted | 0 ms | 0 KB | - |