Submission #389075

# Submission time Handle Problem Language Result Execution time Memory
389075 2021-04-13T15:20:15 Z alishahali1382 Aliens (IOI16_aliens) C++14
41 / 100
1814 ms 762188 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 sz;
	inline void Add(pll x){
		while (sz && Inter(A[sz-1].second, x)<=A[sz-1].first) sz--;
		if (!sz) A[sz++]={-INF, x};
		else A[sz]={Inter(A[sz-1].second, x), x}, sz++;
	}
	inline ll Get(ll x){
		pll p=(upper_bound(A, A+sz, make_pair(x, pll(INF, INF)))-1)->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({A[i].first, -val});
		}
		for (int t=1; t<=k; t++){
			dp[i][t]=_sq(A[i].second+1)-cht[t-1].Get(2*A[i].second+2);
		}
	}
	return dp[n][k];
}
# Verdict Execution time Memory Grader output
1 Correct 231 ms 503688 KB Correct answer: answer = 4
2 Correct 236 ms 503796 KB Correct answer: answer = 4
3 Correct 229 ms 503828 KB Correct answer: answer = 4
4 Correct 228 ms 503808 KB Correct answer: answer = 12
5 Correct 227 ms 503748 KB Correct answer: answer = 52
6 Correct 231 ms 503748 KB Correct answer: answer = 210
7 Correct 232 ms 503748 KB Correct answer: answer = 88
8 Correct 233 ms 503748 KB Correct answer: answer = 7696
9 Correct 231 ms 503852 KB Correct answer: answer = 1
10 Correct 239 ms 503720 KB Correct answer: answer = 2374
11 Correct 235 ms 503784 KB Correct answer: answer = 9502
12 Correct 235 ms 503700 KB Correct answer: answer = 49
13 Correct 230 ms 503876 KB Correct answer: answer = 151
14 Correct 235 ms 503728 KB Correct answer: answer = 7550
15 Correct 231 ms 503820 KB Correct answer: answer = 7220
16 Correct 232 ms 503752 KB Correct answer: answer = 7550
17 Correct 227 ms 503696 KB Correct answer: answer = 10000
18 Correct 233 ms 503828 KB Correct answer: answer = 10000
19 Correct 230 ms 503744 KB Correct answer: answer = 624
20 Correct 234 ms 503740 KB Correct answer: answer = 10000
# Verdict Execution time Memory Grader output
1 Correct 235 ms 503732 KB Correct answer: answer = 1
2 Correct 233 ms 503716 KB Correct answer: answer = 4
3 Correct 230 ms 503748 KB Correct answer: answer = 1
4 Correct 231 ms 503704 KB Correct answer: answer = 5
5 Correct 238 ms 503764 KB Correct answer: answer = 41
6 Correct 234 ms 503700 KB Correct answer: answer = 71923
7 Correct 230 ms 503748 KB Correct answer: answer = 77137
8 Correct 233 ms 503740 KB Correct answer: answer = 764
9 Correct 233 ms 503800 KB Correct answer: answer = 250000
10 Correct 251 ms 503760 KB Correct answer: answer = 500
11 Correct 231 ms 503752 KB Correct answer: answer = 32
12 Correct 235 ms 503732 KB Correct answer: answer = 130050
13 Correct 228 ms 503792 KB Correct answer: answer = 5110
14 Correct 227 ms 503708 KB Correct answer: answer = 2626
15 Correct 231 ms 503748 KB Correct answer: answer = 796
16 Correct 233 ms 503852 KB Correct answer: answer = 7580
17 Correct 233 ms 503748 KB Correct answer: answer = 1904
18 Correct 228 ms 503748 KB Correct answer: answer = 996004
19 Correct 230 ms 503748 KB Correct answer: answer = 38817
20 Correct 236 ms 503832 KB Correct answer: answer = 4096
21 Correct 230 ms 503876 KB Correct answer: answer = 1
22 Correct 233 ms 503828 KB Correct answer: answer = 1
23 Correct 232 ms 503764 KB Correct answer: answer = 2040
24 Correct 244 ms 503748 KB Correct answer: answer = 2
# Verdict Execution time Memory Grader output
1 Correct 231 ms 503688 KB Correct answer: answer = 4
2 Correct 236 ms 503796 KB Correct answer: answer = 4
3 Correct 229 ms 503828 KB Correct answer: answer = 4
4 Correct 228 ms 503808 KB Correct answer: answer = 12
5 Correct 227 ms 503748 KB Correct answer: answer = 52
6 Correct 231 ms 503748 KB Correct answer: answer = 210
7 Correct 232 ms 503748 KB Correct answer: answer = 88
8 Correct 233 ms 503748 KB Correct answer: answer = 7696
9 Correct 231 ms 503852 KB Correct answer: answer = 1
10 Correct 239 ms 503720 KB Correct answer: answer = 2374
11 Correct 235 ms 503784 KB Correct answer: answer = 9502
12 Correct 235 ms 503700 KB Correct answer: answer = 49
13 Correct 230 ms 503876 KB Correct answer: answer = 151
14 Correct 235 ms 503728 KB Correct answer: answer = 7550
15 Correct 231 ms 503820 KB Correct answer: answer = 7220
16 Correct 232 ms 503752 KB Correct answer: answer = 7550
17 Correct 227 ms 503696 KB Correct answer: answer = 10000
18 Correct 233 ms 503828 KB Correct answer: answer = 10000
19 Correct 230 ms 503744 KB Correct answer: answer = 624
20 Correct 234 ms 503740 KB Correct answer: answer = 10000
21 Correct 235 ms 503732 KB Correct answer: answer = 1
22 Correct 233 ms 503716 KB Correct answer: answer = 4
23 Correct 230 ms 503748 KB Correct answer: answer = 1
24 Correct 231 ms 503704 KB Correct answer: answer = 5
25 Correct 238 ms 503764 KB Correct answer: answer = 41
26 Correct 234 ms 503700 KB Correct answer: answer = 71923
27 Correct 230 ms 503748 KB Correct answer: answer = 77137
28 Correct 233 ms 503740 KB Correct answer: answer = 764
29 Correct 233 ms 503800 KB Correct answer: answer = 250000
30 Correct 251 ms 503760 KB Correct answer: answer = 500
31 Correct 231 ms 503752 KB Correct answer: answer = 32
32 Correct 235 ms 503732 KB Correct answer: answer = 130050
33 Correct 228 ms 503792 KB Correct answer: answer = 5110
34 Correct 227 ms 503708 KB Correct answer: answer = 2626
35 Correct 231 ms 503748 KB Correct answer: answer = 796
36 Correct 233 ms 503852 KB Correct answer: answer = 7580
37 Correct 233 ms 503748 KB Correct answer: answer = 1904
38 Correct 228 ms 503748 KB Correct answer: answer = 996004
39 Correct 230 ms 503748 KB Correct answer: answer = 38817
40 Correct 236 ms 503832 KB Correct answer: answer = 4096
41 Correct 230 ms 503876 KB Correct answer: answer = 1
42 Correct 233 ms 503828 KB Correct answer: answer = 1
43 Correct 232 ms 503764 KB Correct answer: answer = 2040
44 Correct 244 ms 503748 KB Correct answer: answer = 2
45 Correct 235 ms 503740 KB Correct answer: answer = 4
46 Correct 233 ms 503808 KB Correct answer: answer = 9
47 Correct 231 ms 503884 KB Correct answer: answer = 9
48 Correct 228 ms 503780 KB Correct answer: answer = 21
49 Correct 236 ms 503704 KB Correct answer: answer = 71
50 Correct 233 ms 503736 KB Correct answer: answer = 77
51 Correct 239 ms 503772 KB Correct answer: answer = 400
52 Correct 230 ms 503860 KB Correct answer: answer = 996004
53 Correct 232 ms 503904 KB Correct answer: answer = 997310
54 Correct 233 ms 503748 KB Correct answer: answer = 990781
55 Correct 230 ms 503748 KB Correct answer: answer = 996545
56 Correct 230 ms 503744 KB Correct answer: answer = 484
57 Correct 228 ms 503748 KB Correct answer: answer = 484
58 Correct 229 ms 503736 KB Correct answer: answer = 63501
59 Correct 232 ms 503748 KB Correct answer: answer = 323501
60 Correct 234 ms 503748 KB Correct answer: answer = 752500
61 Correct 232 ms 503772 KB Correct answer: answer = 761480
62 Correct 239 ms 503928 KB Correct answer: answer = 758932
63 Correct 232 ms 503704 KB Correct answer: answer = 1000000
64 Correct 250 ms 503820 KB Correct answer: answer = 750500
65 Correct 234 ms 503760 KB Correct answer: answer = 1000000
66 Correct 251 ms 503788 KB Correct answer: answer = 250000
67 Correct 235 ms 503748 KB Correct answer: answer = 250000
68 Correct 230 ms 503916 KB Correct answer: answer = 1000000
69 Correct 230 ms 503804 KB Correct answer: answer = 994009
70 Correct 241 ms 503748 KB Correct answer: answer = 59315
71 Correct 237 ms 503748 KB Correct answer: answer = 25454
72 Correct 232 ms 503780 KB Correct answer: answer = 1504
73 Correct 230 ms 503908 KB Correct answer: answer = 37486
74 Correct 234 ms 503876 KB Correct answer: answer = 4284
75 Correct 231 ms 503880 KB Correct answer: answer = 158008
76 Correct 231 ms 503748 KB Correct answer: answer = 51860
77 Correct 227 ms 503876 KB Correct answer: answer = 12985
# Verdict Execution time Memory Grader output
1 Correct 231 ms 503688 KB Correct answer: answer = 4
2 Correct 236 ms 503796 KB Correct answer: answer = 4
3 Correct 229 ms 503828 KB Correct answer: answer = 4
4 Correct 228 ms 503808 KB Correct answer: answer = 12
5 Correct 227 ms 503748 KB Correct answer: answer = 52
6 Correct 231 ms 503748 KB Correct answer: answer = 210
7 Correct 232 ms 503748 KB Correct answer: answer = 88
8 Correct 233 ms 503748 KB Correct answer: answer = 7696
9 Correct 231 ms 503852 KB Correct answer: answer = 1
10 Correct 239 ms 503720 KB Correct answer: answer = 2374
11 Correct 235 ms 503784 KB Correct answer: answer = 9502
12 Correct 235 ms 503700 KB Correct answer: answer = 49
13 Correct 230 ms 503876 KB Correct answer: answer = 151
14 Correct 235 ms 503728 KB Correct answer: answer = 7550
15 Correct 231 ms 503820 KB Correct answer: answer = 7220
16 Correct 232 ms 503752 KB Correct answer: answer = 7550
17 Correct 227 ms 503696 KB Correct answer: answer = 10000
18 Correct 233 ms 503828 KB Correct answer: answer = 10000
19 Correct 230 ms 503744 KB Correct answer: answer = 624
20 Correct 234 ms 503740 KB Correct answer: answer = 10000
21 Correct 235 ms 503732 KB Correct answer: answer = 1
22 Correct 233 ms 503716 KB Correct answer: answer = 4
23 Correct 230 ms 503748 KB Correct answer: answer = 1
24 Correct 231 ms 503704 KB Correct answer: answer = 5
25 Correct 238 ms 503764 KB Correct answer: answer = 41
26 Correct 234 ms 503700 KB Correct answer: answer = 71923
27 Correct 230 ms 503748 KB Correct answer: answer = 77137
28 Correct 233 ms 503740 KB Correct answer: answer = 764
29 Correct 233 ms 503800 KB Correct answer: answer = 250000
30 Correct 251 ms 503760 KB Correct answer: answer = 500
31 Correct 231 ms 503752 KB Correct answer: answer = 32
32 Correct 235 ms 503732 KB Correct answer: answer = 130050
33 Correct 228 ms 503792 KB Correct answer: answer = 5110
34 Correct 227 ms 503708 KB Correct answer: answer = 2626
35 Correct 231 ms 503748 KB Correct answer: answer = 796
36 Correct 233 ms 503852 KB Correct answer: answer = 7580
37 Correct 233 ms 503748 KB Correct answer: answer = 1904
38 Correct 228 ms 503748 KB Correct answer: answer = 996004
39 Correct 230 ms 503748 KB Correct answer: answer = 38817
40 Correct 236 ms 503832 KB Correct answer: answer = 4096
41 Correct 230 ms 503876 KB Correct answer: answer = 1
42 Correct 233 ms 503828 KB Correct answer: answer = 1
43 Correct 232 ms 503764 KB Correct answer: answer = 2040
44 Correct 244 ms 503748 KB Correct answer: answer = 2
45 Correct 235 ms 503740 KB Correct answer: answer = 4
46 Correct 233 ms 503808 KB Correct answer: answer = 9
47 Correct 231 ms 503884 KB Correct answer: answer = 9
48 Correct 228 ms 503780 KB Correct answer: answer = 21
49 Correct 236 ms 503704 KB Correct answer: answer = 71
50 Correct 233 ms 503736 KB Correct answer: answer = 77
51 Correct 239 ms 503772 KB Correct answer: answer = 400
52 Correct 230 ms 503860 KB Correct answer: answer = 996004
53 Correct 232 ms 503904 KB Correct answer: answer = 997310
54 Correct 233 ms 503748 KB Correct answer: answer = 990781
55 Correct 230 ms 503748 KB Correct answer: answer = 996545
56 Correct 230 ms 503744 KB Correct answer: answer = 484
57 Correct 228 ms 503748 KB Correct answer: answer = 484
58 Correct 229 ms 503736 KB Correct answer: answer = 63501
59 Correct 232 ms 503748 KB Correct answer: answer = 323501
60 Correct 234 ms 503748 KB Correct answer: answer = 752500
61 Correct 232 ms 503772 KB Correct answer: answer = 761480
62 Correct 239 ms 503928 KB Correct answer: answer = 758932
63 Correct 232 ms 503704 KB Correct answer: answer = 1000000
64 Correct 250 ms 503820 KB Correct answer: answer = 750500
65 Correct 234 ms 503760 KB Correct answer: answer = 1000000
66 Correct 251 ms 503788 KB Correct answer: answer = 250000
67 Correct 235 ms 503748 KB Correct answer: answer = 250000
68 Correct 230 ms 503916 KB Correct answer: answer = 1000000
69 Correct 230 ms 503804 KB Correct answer: answer = 994009
70 Correct 241 ms 503748 KB Correct answer: answer = 59315
71 Correct 237 ms 503748 KB Correct answer: answer = 25454
72 Correct 232 ms 503780 KB Correct answer: answer = 1504
73 Correct 230 ms 503908 KB Correct answer: answer = 37486
74 Correct 234 ms 503876 KB Correct answer: answer = 4284
75 Correct 231 ms 503880 KB Correct answer: answer = 158008
76 Correct 231 ms 503748 KB Correct answer: answer = 51860
77 Correct 227 ms 503876 KB Correct answer: answer = 12985
78 Correct 243 ms 503920 KB Correct answer: answer = 997864126212
79 Correct 238 ms 503912 KB Correct answer: answer = 998608411647
80 Correct 232 ms 503960 KB Correct answer: answer = 995265560477
81 Correct 231 ms 503956 KB Correct answer: answer = 10125000
82 Correct 235 ms 503924 KB Correct answer: answer = 2291668
83 Correct 246 ms 503876 KB Correct answer: answer = 42388
84 Correct 337 ms 503888 KB Correct answer: answer = 10318
85 Correct 725 ms 504004 KB Correct answer: answer = 3416
86 Correct 235 ms 504000 KB Correct answer: answer = 331708193881
87 Correct 293 ms 503972 KB Correct answer: answer = 2861193756
88 Correct 1214 ms 504008 KB Correct answer: answer = 114646930
89 Correct 243 ms 503968 KB Correct answer: answer = 9280921
90 Correct 382 ms 504028 KB Correct answer: answer = 999984053400
91 Correct 938 ms 504132 KB Correct answer: answer = 750935949134
92 Correct 234 ms 504040 KB Correct answer: answer = 1000000000000
93 Correct 230 ms 503908 KB Correct answer: answer = 998762383161
94 Correct 244 ms 503948 KB Correct answer: answer = 23017412908
95 Correct 234 ms 503992 KB Correct answer: answer = 728143410622
96 Correct 231 ms 503876 KB Correct answer: answer = 2
97 Correct 233 ms 503888 KB Correct answer: answer = 1824916
98 Correct 541 ms 504004 KB Correct answer: answer = 10680029
99 Correct 333 ms 504004 KB Correct answer: answer = 18351700
100 Correct 231 ms 504016 KB Correct answer: answer = 16040026
101 Correct 235 ms 503948 KB Correct answer: answer = 253968628325
102 Correct 561 ms 504040 KB Correct answer: answer = 10267
103 Correct 1616 ms 504004 KB Correct answer: answer = 2582408
104 Correct 238 ms 504004 KB Correct answer: answer = 78024964781
105 Correct 232 ms 503876 KB Correct answer: answer = 9866346457
106 Correct 236 ms 503984 KB Correct answer: answer = 3327720949
107 Correct 237 ms 503876 KB Correct answer: answer = 86064128360
108 Correct 304 ms 503968 KB Correct answer: answer = 12698259150
109 Correct 1814 ms 504128 KB Correct answer: answer = 1185259288
# Verdict Execution time Memory Grader output
1 Correct 231 ms 503688 KB Correct answer: answer = 4
2 Correct 236 ms 503796 KB Correct answer: answer = 4
3 Correct 229 ms 503828 KB Correct answer: answer = 4
4 Correct 228 ms 503808 KB Correct answer: answer = 12
5 Correct 227 ms 503748 KB Correct answer: answer = 52
6 Correct 231 ms 503748 KB Correct answer: answer = 210
7 Correct 232 ms 503748 KB Correct answer: answer = 88
8 Correct 233 ms 503748 KB Correct answer: answer = 7696
9 Correct 231 ms 503852 KB Correct answer: answer = 1
10 Correct 239 ms 503720 KB Correct answer: answer = 2374
11 Correct 235 ms 503784 KB Correct answer: answer = 9502
12 Correct 235 ms 503700 KB Correct answer: answer = 49
13 Correct 230 ms 503876 KB Correct answer: answer = 151
14 Correct 235 ms 503728 KB Correct answer: answer = 7550
15 Correct 231 ms 503820 KB Correct answer: answer = 7220
16 Correct 232 ms 503752 KB Correct answer: answer = 7550
17 Correct 227 ms 503696 KB Correct answer: answer = 10000
18 Correct 233 ms 503828 KB Correct answer: answer = 10000
19 Correct 230 ms 503744 KB Correct answer: answer = 624
20 Correct 234 ms 503740 KB Correct answer: answer = 10000
21 Correct 235 ms 503732 KB Correct answer: answer = 1
22 Correct 233 ms 503716 KB Correct answer: answer = 4
23 Correct 230 ms 503748 KB Correct answer: answer = 1
24 Correct 231 ms 503704 KB Correct answer: answer = 5
25 Correct 238 ms 503764 KB Correct answer: answer = 41
26 Correct 234 ms 503700 KB Correct answer: answer = 71923
27 Correct 230 ms 503748 KB Correct answer: answer = 77137
28 Correct 233 ms 503740 KB Correct answer: answer = 764
29 Correct 233 ms 503800 KB Correct answer: answer = 250000
30 Correct 251 ms 503760 KB Correct answer: answer = 500
31 Correct 231 ms 503752 KB Correct answer: answer = 32
32 Correct 235 ms 503732 KB Correct answer: answer = 130050
33 Correct 228 ms 503792 KB Correct answer: answer = 5110
34 Correct 227 ms 503708 KB Correct answer: answer = 2626
35 Correct 231 ms 503748 KB Correct answer: answer = 796
36 Correct 233 ms 503852 KB Correct answer: answer = 7580
37 Correct 233 ms 503748 KB Correct answer: answer = 1904
38 Correct 228 ms 503748 KB Correct answer: answer = 996004
39 Correct 230 ms 503748 KB Correct answer: answer = 38817
40 Correct 236 ms 503832 KB Correct answer: answer = 4096
41 Correct 230 ms 503876 KB Correct answer: answer = 1
42 Correct 233 ms 503828 KB Correct answer: answer = 1
43 Correct 232 ms 503764 KB Correct answer: answer = 2040
44 Correct 244 ms 503748 KB Correct answer: answer = 2
45 Correct 235 ms 503740 KB Correct answer: answer = 4
46 Correct 233 ms 503808 KB Correct answer: answer = 9
47 Correct 231 ms 503884 KB Correct answer: answer = 9
48 Correct 228 ms 503780 KB Correct answer: answer = 21
49 Correct 236 ms 503704 KB Correct answer: answer = 71
50 Correct 233 ms 503736 KB Correct answer: answer = 77
51 Correct 239 ms 503772 KB Correct answer: answer = 400
52 Correct 230 ms 503860 KB Correct answer: answer = 996004
53 Correct 232 ms 503904 KB Correct answer: answer = 997310
54 Correct 233 ms 503748 KB Correct answer: answer = 990781
55 Correct 230 ms 503748 KB Correct answer: answer = 996545
56 Correct 230 ms 503744 KB Correct answer: answer = 484
57 Correct 228 ms 503748 KB Correct answer: answer = 484
58 Correct 229 ms 503736 KB Correct answer: answer = 63501
59 Correct 232 ms 503748 KB Correct answer: answer = 323501
60 Correct 234 ms 503748 KB Correct answer: answer = 752500
61 Correct 232 ms 503772 KB Correct answer: answer = 761480
62 Correct 239 ms 503928 KB Correct answer: answer = 758932
63 Correct 232 ms 503704 KB Correct answer: answer = 1000000
64 Correct 250 ms 503820 KB Correct answer: answer = 750500
65 Correct 234 ms 503760 KB Correct answer: answer = 1000000
66 Correct 251 ms 503788 KB Correct answer: answer = 250000
67 Correct 235 ms 503748 KB Correct answer: answer = 250000
68 Correct 230 ms 503916 KB Correct answer: answer = 1000000
69 Correct 230 ms 503804 KB Correct answer: answer = 994009
70 Correct 241 ms 503748 KB Correct answer: answer = 59315
71 Correct 237 ms 503748 KB Correct answer: answer = 25454
72 Correct 232 ms 503780 KB Correct answer: answer = 1504
73 Correct 230 ms 503908 KB Correct answer: answer = 37486
74 Correct 234 ms 503876 KB Correct answer: answer = 4284
75 Correct 231 ms 503880 KB Correct answer: answer = 158008
76 Correct 231 ms 503748 KB Correct answer: answer = 51860
77 Correct 227 ms 503876 KB Correct answer: answer = 12985
78 Correct 243 ms 503920 KB Correct answer: answer = 997864126212
79 Correct 238 ms 503912 KB Correct answer: answer = 998608411647
80 Correct 232 ms 503960 KB Correct answer: answer = 995265560477
81 Correct 231 ms 503956 KB Correct answer: answer = 10125000
82 Correct 235 ms 503924 KB Correct answer: answer = 2291668
83 Correct 246 ms 503876 KB Correct answer: answer = 42388
84 Correct 337 ms 503888 KB Correct answer: answer = 10318
85 Correct 725 ms 504004 KB Correct answer: answer = 3416
86 Correct 235 ms 504000 KB Correct answer: answer = 331708193881
87 Correct 293 ms 503972 KB Correct answer: answer = 2861193756
88 Correct 1214 ms 504008 KB Correct answer: answer = 114646930
89 Correct 243 ms 503968 KB Correct answer: answer = 9280921
90 Correct 382 ms 504028 KB Correct answer: answer = 999984053400
91 Correct 938 ms 504132 KB Correct answer: answer = 750935949134
92 Correct 234 ms 504040 KB Correct answer: answer = 1000000000000
93 Correct 230 ms 503908 KB Correct answer: answer = 998762383161
94 Correct 244 ms 503948 KB Correct answer: answer = 23017412908
95 Correct 234 ms 503992 KB Correct answer: answer = 728143410622
96 Correct 231 ms 503876 KB Correct answer: answer = 2
97 Correct 233 ms 503888 KB Correct answer: answer = 1824916
98 Correct 541 ms 504004 KB Correct answer: answer = 10680029
99 Correct 333 ms 504004 KB Correct answer: answer = 18351700
100 Correct 231 ms 504016 KB Correct answer: answer = 16040026
101 Correct 235 ms 503948 KB Correct answer: answer = 253968628325
102 Correct 561 ms 504040 KB Correct answer: answer = 10267
103 Correct 1616 ms 504004 KB Correct answer: answer = 2582408
104 Correct 238 ms 504004 KB Correct answer: answer = 78024964781
105 Correct 232 ms 503876 KB Correct answer: answer = 9866346457
106 Correct 236 ms 503984 KB Correct answer: answer = 3327720949
107 Correct 237 ms 503876 KB Correct answer: answer = 86064128360
108 Correct 304 ms 503968 KB Correct answer: answer = 12698259150
109 Correct 1814 ms 504128 KB Correct answer: answer = 1185259288
110 Correct 257 ms 505784 KB Correct answer: answer = 999889968863
111 Correct 257 ms 505800 KB Correct answer: answer = 999861384931
112 Correct 254 ms 505904 KB Correct answer: answer = 999811809929
113 Correct 248 ms 505788 KB Correct answer: answer = 999869756441
114 Runtime error 591 ms 762188 KB Execution killed with signal 11
115 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 231 ms 503688 KB Correct answer: answer = 4
2 Correct 236 ms 503796 KB Correct answer: answer = 4
3 Correct 229 ms 503828 KB Correct answer: answer = 4
4 Correct 228 ms 503808 KB Correct answer: answer = 12
5 Correct 227 ms 503748 KB Correct answer: answer = 52
6 Correct 231 ms 503748 KB Correct answer: answer = 210
7 Correct 232 ms 503748 KB Correct answer: answer = 88
8 Correct 233 ms 503748 KB Correct answer: answer = 7696
9 Correct 231 ms 503852 KB Correct answer: answer = 1
10 Correct 239 ms 503720 KB Correct answer: answer = 2374
11 Correct 235 ms 503784 KB Correct answer: answer = 9502
12 Correct 235 ms 503700 KB Correct answer: answer = 49
13 Correct 230 ms 503876 KB Correct answer: answer = 151
14 Correct 235 ms 503728 KB Correct answer: answer = 7550
15 Correct 231 ms 503820 KB Correct answer: answer = 7220
16 Correct 232 ms 503752 KB Correct answer: answer = 7550
17 Correct 227 ms 503696 KB Correct answer: answer = 10000
18 Correct 233 ms 503828 KB Correct answer: answer = 10000
19 Correct 230 ms 503744 KB Correct answer: answer = 624
20 Correct 234 ms 503740 KB Correct answer: answer = 10000
21 Correct 235 ms 503732 KB Correct answer: answer = 1
22 Correct 233 ms 503716 KB Correct answer: answer = 4
23 Correct 230 ms 503748 KB Correct answer: answer = 1
24 Correct 231 ms 503704 KB Correct answer: answer = 5
25 Correct 238 ms 503764 KB Correct answer: answer = 41
26 Correct 234 ms 503700 KB Correct answer: answer = 71923
27 Correct 230 ms 503748 KB Correct answer: answer = 77137
28 Correct 233 ms 503740 KB Correct answer: answer = 764
29 Correct 233 ms 503800 KB Correct answer: answer = 250000
30 Correct 251 ms 503760 KB Correct answer: answer = 500
31 Correct 231 ms 503752 KB Correct answer: answer = 32
32 Correct 235 ms 503732 KB Correct answer: answer = 130050
33 Correct 228 ms 503792 KB Correct answer: answer = 5110
34 Correct 227 ms 503708 KB Correct answer: answer = 2626
35 Correct 231 ms 503748 KB Correct answer: answer = 796
36 Correct 233 ms 503852 KB Correct answer: answer = 7580
37 Correct 233 ms 503748 KB Correct answer: answer = 1904
38 Correct 228 ms 503748 KB Correct answer: answer = 996004
39 Correct 230 ms 503748 KB Correct answer: answer = 38817
40 Correct 236 ms 503832 KB Correct answer: answer = 4096
41 Correct 230 ms 503876 KB Correct answer: answer = 1
42 Correct 233 ms 503828 KB Correct answer: answer = 1
43 Correct 232 ms 503764 KB Correct answer: answer = 2040
44 Correct 244 ms 503748 KB Correct answer: answer = 2
45 Correct 235 ms 503740 KB Correct answer: answer = 4
46 Correct 233 ms 503808 KB Correct answer: answer = 9
47 Correct 231 ms 503884 KB Correct answer: answer = 9
48 Correct 228 ms 503780 KB Correct answer: answer = 21
49 Correct 236 ms 503704 KB Correct answer: answer = 71
50 Correct 233 ms 503736 KB Correct answer: answer = 77
51 Correct 239 ms 503772 KB Correct answer: answer = 400
52 Correct 230 ms 503860 KB Correct answer: answer = 996004
53 Correct 232 ms 503904 KB Correct answer: answer = 997310
54 Correct 233 ms 503748 KB Correct answer: answer = 990781
55 Correct 230 ms 503748 KB Correct answer: answer = 996545
56 Correct 230 ms 503744 KB Correct answer: answer = 484
57 Correct 228 ms 503748 KB Correct answer: answer = 484
58 Correct 229 ms 503736 KB Correct answer: answer = 63501
59 Correct 232 ms 503748 KB Correct answer: answer = 323501
60 Correct 234 ms 503748 KB Correct answer: answer = 752500
61 Correct 232 ms 503772 KB Correct answer: answer = 761480
62 Correct 239 ms 503928 KB Correct answer: answer = 758932
63 Correct 232 ms 503704 KB Correct answer: answer = 1000000
64 Correct 250 ms 503820 KB Correct answer: answer = 750500
65 Correct 234 ms 503760 KB Correct answer: answer = 1000000
66 Correct 251 ms 503788 KB Correct answer: answer = 250000
67 Correct 235 ms 503748 KB Correct answer: answer = 250000
68 Correct 230 ms 503916 KB Correct answer: answer = 1000000
69 Correct 230 ms 503804 KB Correct answer: answer = 994009
70 Correct 241 ms 503748 KB Correct answer: answer = 59315
71 Correct 237 ms 503748 KB Correct answer: answer = 25454
72 Correct 232 ms 503780 KB Correct answer: answer = 1504
73 Correct 230 ms 503908 KB Correct answer: answer = 37486
74 Correct 234 ms 503876 KB Correct answer: answer = 4284
75 Correct 231 ms 503880 KB Correct answer: answer = 158008
76 Correct 231 ms 503748 KB Correct answer: answer = 51860
77 Correct 227 ms 503876 KB Correct answer: answer = 12985
78 Correct 243 ms 503920 KB Correct answer: answer = 997864126212
79 Correct 238 ms 503912 KB Correct answer: answer = 998608411647
80 Correct 232 ms 503960 KB Correct answer: answer = 995265560477
81 Correct 231 ms 503956 KB Correct answer: answer = 10125000
82 Correct 235 ms 503924 KB Correct answer: answer = 2291668
83 Correct 246 ms 503876 KB Correct answer: answer = 42388
84 Correct 337 ms 503888 KB Correct answer: answer = 10318
85 Correct 725 ms 504004 KB Correct answer: answer = 3416
86 Correct 235 ms 504000 KB Correct answer: answer = 331708193881
87 Correct 293 ms 503972 KB Correct answer: answer = 2861193756
88 Correct 1214 ms 504008 KB Correct answer: answer = 114646930
89 Correct 243 ms 503968 KB Correct answer: answer = 9280921
90 Correct 382 ms 504028 KB Correct answer: answer = 999984053400
91 Correct 938 ms 504132 KB Correct answer: answer = 750935949134
92 Correct 234 ms 504040 KB Correct answer: answer = 1000000000000
93 Correct 230 ms 503908 KB Correct answer: answer = 998762383161
94 Correct 244 ms 503948 KB Correct answer: answer = 23017412908
95 Correct 234 ms 503992 KB Correct answer: answer = 728143410622
96 Correct 231 ms 503876 KB Correct answer: answer = 2
97 Correct 233 ms 503888 KB Correct answer: answer = 1824916
98 Correct 541 ms 504004 KB Correct answer: answer = 10680029
99 Correct 333 ms 504004 KB Correct answer: answer = 18351700
100 Correct 231 ms 504016 KB Correct answer: answer = 16040026
101 Correct 235 ms 503948 KB Correct answer: answer = 253968628325
102 Correct 561 ms 504040 KB Correct answer: answer = 10267
103 Correct 1616 ms 504004 KB Correct answer: answer = 2582408
104 Correct 238 ms 504004 KB Correct answer: answer = 78024964781
105 Correct 232 ms 503876 KB Correct answer: answer = 9866346457
106 Correct 236 ms 503984 KB Correct answer: answer = 3327720949
107 Correct 237 ms 503876 KB Correct answer: answer = 86064128360
108 Correct 304 ms 503968 KB Correct answer: answer = 12698259150
109 Correct 1814 ms 504128 KB Correct answer: answer = 1185259288
110 Correct 257 ms 505784 KB Correct answer: answer = 999889968863
111 Correct 257 ms 505800 KB Correct answer: answer = 999861384931
112 Correct 254 ms 505904 KB Correct answer: answer = 999811809929
113 Correct 248 ms 505788 KB Correct answer: answer = 999869756441
114 Runtime error 591 ms 762188 KB Execution killed with signal 11
115 Halted 0 ms 0 KB -