Submission #43021

# Submission time Handle Problem Language Result Execution time Memory
43021 2018-03-08T06:06:12 Z nonocut Aliens (IOI16_aliens) C++14
25 / 100
171 ms 3692 KB
#include "aliens.h"
#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define pii pair<ll,ll>
#define X first
#define Y second
const int maxn = 1e3 + 5;
const ll inf = 1e12;

int n,m,k,sz;
pii p[maxn];

ll mem[maxn][maxn];

ll getpow(ll x) {
    return x*x;
}

ll f(int x, int k) {
    if(x==sz) return 0;
    if(!mem[x][k]) {
        mem[x][k] = inf;
        for(int y=x;y<sz;y++) {
            if(k) {
                mem[x][k] = min(mem[x][k], getpow(p[y].Y-p[x].X+1) + f(y+1,k-1) - (y+1<sz ? getpow(max(0LL,p[y].Y-p[y+1].X+1)) : 0));
//                printf("%d %d -> %d : %lld + %lld - %lld\n",x,k,y,getpow(p[y].Y-p[x].X+1) , f(y+1,k-1) , (y+1<sz ? getpow(max(0,p[y].Y-p[y+1].X+1)) : 0));
            }
        }
//        printf("mem %d %d = %lld\n",x,k,mem[x][k]);
    }
    return mem[x][k];
}

bool cmp(pii x, pii y) {
    if(x.X!=y.X) return x.X<y.X;
    return x.Y>y.Y;
}

long long take_photos(int N, int M, int K, std::vector<int> R, std::vector<int> C) {
	n = N; m = M; k = K;
	//prep
	for(int i=0;i<n;i++) {
        p[i] = {R[i],C[i]};
        if(p[i].X>p[i].Y) swap(p[i].X,p[i].Y);
	}
	sort(p,p+n,cmp);
    ll cur = -inf;
	for(int i=0;i<n;i++) {
        if(p[i].Y<=cur) continue;
        p[sz++] = p[i];
        cur = p[i].Y;
	}
    ll t = f(0,k);
    return t;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 248 KB Correct answer: answer = 4
2 Correct 2 ms 480 KB Correct answer: answer = 4
3 Correct 1 ms 480 KB Correct answer: answer = 4
4 Correct 1 ms 492 KB Correct answer: answer = 12
5 Correct 1 ms 548 KB Correct answer: answer = 52
6 Correct 1 ms 664 KB Correct answer: answer = 210
7 Correct 1 ms 664 KB Correct answer: answer = 88
8 Correct 1 ms 664 KB Correct answer: answer = 7696
9 Correct 2 ms 664 KB Correct answer: answer = 1
10 Correct 1 ms 664 KB Correct answer: answer = 2374
11 Correct 1 ms 664 KB Correct answer: answer = 9502
12 Correct 1 ms 664 KB Correct answer: answer = 49
13 Correct 2 ms 748 KB Correct answer: answer = 151
14 Correct 2 ms 748 KB Correct answer: answer = 7550
15 Correct 2 ms 748 KB Correct answer: answer = 7220
16 Correct 2 ms 748 KB Correct answer: answer = 7550
17 Correct 1 ms 748 KB Correct answer: answer = 10000
18 Correct 1 ms 748 KB Correct answer: answer = 10000
19 Correct 2 ms 748 KB Correct answer: answer = 624
20 Correct 2 ms 748 KB Correct answer: answer = 10000
# Verdict Execution time Memory Grader output
1 Correct 2 ms 748 KB Correct answer: answer = 1
2 Correct 2 ms 748 KB Correct answer: answer = 4
3 Correct 1 ms 748 KB Correct answer: answer = 1
4 Correct 1 ms 748 KB Correct answer: answer = 5
5 Correct 2 ms 748 KB Correct answer: answer = 41
6 Correct 2 ms 748 KB Correct answer: answer = 71923
7 Correct 3 ms 1260 KB Correct answer: answer = 77137
8 Correct 83 ms 2672 KB Correct answer: answer = 764
9 Correct 4 ms 2672 KB Correct answer: answer = 250000
10 Correct 168 ms 3692 KB Correct answer: answer = 500
11 Correct 2 ms 3692 KB Correct answer: answer = 32
12 Correct 5 ms 3692 KB Correct answer: answer = 130050
13 Correct 47 ms 3692 KB Correct answer: answer = 5110
14 Correct 8 ms 3692 KB Correct answer: answer = 2626
15 Correct 18 ms 3692 KB Correct answer: answer = 796
16 Correct 35 ms 3692 KB Correct answer: answer = 7580
17 Correct 105 ms 3692 KB Correct answer: answer = 1904
18 Correct 3 ms 3692 KB Correct answer: answer = 996004
19 Correct 15 ms 3692 KB Correct answer: answer = 38817
20 Correct 48 ms 3692 KB Correct answer: answer = 4096
21 Correct 2 ms 3692 KB Correct answer: answer = 1
22 Correct 2 ms 3692 KB Correct answer: answer = 1
23 Correct 99 ms 3692 KB Correct answer: answer = 2040
24 Correct 2 ms 3692 KB Correct answer: answer = 2
# Verdict Execution time Memory Grader output
1 Correct 1 ms 248 KB Correct answer: answer = 4
2 Correct 2 ms 480 KB Correct answer: answer = 4
3 Correct 1 ms 480 KB Correct answer: answer = 4
4 Correct 1 ms 492 KB Correct answer: answer = 12
5 Correct 1 ms 548 KB Correct answer: answer = 52
6 Correct 1 ms 664 KB Correct answer: answer = 210
7 Correct 1 ms 664 KB Correct answer: answer = 88
8 Correct 1 ms 664 KB Correct answer: answer = 7696
9 Correct 2 ms 664 KB Correct answer: answer = 1
10 Correct 1 ms 664 KB Correct answer: answer = 2374
11 Correct 1 ms 664 KB Correct answer: answer = 9502
12 Correct 1 ms 664 KB Correct answer: answer = 49
13 Correct 2 ms 748 KB Correct answer: answer = 151
14 Correct 2 ms 748 KB Correct answer: answer = 7550
15 Correct 2 ms 748 KB Correct answer: answer = 7220
16 Correct 2 ms 748 KB Correct answer: answer = 7550
17 Correct 1 ms 748 KB Correct answer: answer = 10000
18 Correct 1 ms 748 KB Correct answer: answer = 10000
19 Correct 2 ms 748 KB Correct answer: answer = 624
20 Correct 2 ms 748 KB Correct answer: answer = 10000
21 Correct 2 ms 748 KB Correct answer: answer = 1
22 Correct 2 ms 748 KB Correct answer: answer = 4
23 Correct 1 ms 748 KB Correct answer: answer = 1
24 Correct 1 ms 748 KB Correct answer: answer = 5
25 Correct 2 ms 748 KB Correct answer: answer = 41
26 Correct 2 ms 748 KB Correct answer: answer = 71923
27 Correct 3 ms 1260 KB Correct answer: answer = 77137
28 Correct 83 ms 2672 KB Correct answer: answer = 764
29 Correct 4 ms 2672 KB Correct answer: answer = 250000
30 Correct 168 ms 3692 KB Correct answer: answer = 500
31 Correct 2 ms 3692 KB Correct answer: answer = 32
32 Correct 5 ms 3692 KB Correct answer: answer = 130050
33 Correct 47 ms 3692 KB Correct answer: answer = 5110
34 Correct 8 ms 3692 KB Correct answer: answer = 2626
35 Correct 18 ms 3692 KB Correct answer: answer = 796
36 Correct 35 ms 3692 KB Correct answer: answer = 7580
37 Correct 105 ms 3692 KB Correct answer: answer = 1904
38 Correct 3 ms 3692 KB Correct answer: answer = 996004
39 Correct 15 ms 3692 KB Correct answer: answer = 38817
40 Correct 48 ms 3692 KB Correct answer: answer = 4096
41 Correct 2 ms 3692 KB Correct answer: answer = 1
42 Correct 2 ms 3692 KB Correct answer: answer = 1
43 Correct 99 ms 3692 KB Correct answer: answer = 2040
44 Correct 2 ms 3692 KB Correct answer: answer = 2
45 Correct 1 ms 3692 KB Correct answer: answer = 4
46 Correct 1 ms 3692 KB Correct answer: answer = 9
47 Correct 1 ms 3692 KB Correct answer: answer = 9
48 Correct 2 ms 3692 KB Correct answer: answer = 21
49 Correct 1 ms 3692 KB Correct answer: answer = 71
50 Correct 1 ms 3692 KB Correct answer: answer = 77
51 Correct 1 ms 3692 KB Correct answer: answer = 400
52 Correct 2 ms 3692 KB Correct answer: answer = 996004
53 Correct 2 ms 3692 KB Correct answer: answer = 997310
54 Correct 2 ms 3692 KB Correct answer: answer = 990781
55 Correct 2 ms 3692 KB Correct answer: answer = 996545
56 Correct 2 ms 3692 KB Correct answer: answer = 484
57 Correct 2 ms 3692 KB Correct answer: answer = 484
58 Correct 6 ms 3692 KB Correct answer: answer = 63501
59 Correct 22 ms 3692 KB Correct answer: answer = 323501
60 Correct 84 ms 3692 KB Correct answer: answer = 752500
61 Correct 8 ms 3692 KB Correct answer: answer = 761480
62 Correct 20 ms 3692 KB Correct answer: answer = 758932
63 Correct 2 ms 3692 KB Correct answer: answer = 1000000
64 Correct 171 ms 3692 KB Correct answer: answer = 750500
65 Correct 2 ms 3692 KB Correct answer: answer = 1000000
66 Correct 2 ms 3692 KB Correct answer: answer = 250000
67 Correct 2 ms 3692 KB Correct answer: answer = 250000
68 Correct 2 ms 3692 KB Correct answer: answer = 1000000
69 Correct 2 ms 3692 KB Correct answer: answer = 994009
70 Correct 4 ms 3692 KB Correct answer: answer = 59315
71 Correct 9 ms 3692 KB Correct answer: answer = 25454
72 Correct 47 ms 3692 KB Correct answer: answer = 1504
73 Correct 3 ms 3692 KB Correct answer: answer = 37486
74 Correct 19 ms 3692 KB Correct answer: answer = 4284
75 Correct 3 ms 3692 KB Correct answer: answer = 158008
76 Correct 3 ms 3692 KB Correct answer: answer = 51860
77 Correct 2 ms 3692 KB Correct answer: answer = 12985
# Verdict Execution time Memory Grader output
1 Correct 1 ms 248 KB Correct answer: answer = 4
2 Correct 2 ms 480 KB Correct answer: answer = 4
3 Correct 1 ms 480 KB Correct answer: answer = 4
4 Correct 1 ms 492 KB Correct answer: answer = 12
5 Correct 1 ms 548 KB Correct answer: answer = 52
6 Correct 1 ms 664 KB Correct answer: answer = 210
7 Correct 1 ms 664 KB Correct answer: answer = 88
8 Correct 1 ms 664 KB Correct answer: answer = 7696
9 Correct 2 ms 664 KB Correct answer: answer = 1
10 Correct 1 ms 664 KB Correct answer: answer = 2374
11 Correct 1 ms 664 KB Correct answer: answer = 9502
12 Correct 1 ms 664 KB Correct answer: answer = 49
13 Correct 2 ms 748 KB Correct answer: answer = 151
14 Correct 2 ms 748 KB Correct answer: answer = 7550
15 Correct 2 ms 748 KB Correct answer: answer = 7220
16 Correct 2 ms 748 KB Correct answer: answer = 7550
17 Correct 1 ms 748 KB Correct answer: answer = 10000
18 Correct 1 ms 748 KB Correct answer: answer = 10000
19 Correct 2 ms 748 KB Correct answer: answer = 624
20 Correct 2 ms 748 KB Correct answer: answer = 10000
21 Correct 2 ms 748 KB Correct answer: answer = 1
22 Correct 2 ms 748 KB Correct answer: answer = 4
23 Correct 1 ms 748 KB Correct answer: answer = 1
24 Correct 1 ms 748 KB Correct answer: answer = 5
25 Correct 2 ms 748 KB Correct answer: answer = 41
26 Correct 2 ms 748 KB Correct answer: answer = 71923
27 Correct 3 ms 1260 KB Correct answer: answer = 77137
28 Correct 83 ms 2672 KB Correct answer: answer = 764
29 Correct 4 ms 2672 KB Correct answer: answer = 250000
30 Correct 168 ms 3692 KB Correct answer: answer = 500
31 Correct 2 ms 3692 KB Correct answer: answer = 32
32 Correct 5 ms 3692 KB Correct answer: answer = 130050
33 Correct 47 ms 3692 KB Correct answer: answer = 5110
34 Correct 8 ms 3692 KB Correct answer: answer = 2626
35 Correct 18 ms 3692 KB Correct answer: answer = 796
36 Correct 35 ms 3692 KB Correct answer: answer = 7580
37 Correct 105 ms 3692 KB Correct answer: answer = 1904
38 Correct 3 ms 3692 KB Correct answer: answer = 996004
39 Correct 15 ms 3692 KB Correct answer: answer = 38817
40 Correct 48 ms 3692 KB Correct answer: answer = 4096
41 Correct 2 ms 3692 KB Correct answer: answer = 1
42 Correct 2 ms 3692 KB Correct answer: answer = 1
43 Correct 99 ms 3692 KB Correct answer: answer = 2040
44 Correct 2 ms 3692 KB Correct answer: answer = 2
45 Correct 1 ms 3692 KB Correct answer: answer = 4
46 Correct 1 ms 3692 KB Correct answer: answer = 9
47 Correct 1 ms 3692 KB Correct answer: answer = 9
48 Correct 2 ms 3692 KB Correct answer: answer = 21
49 Correct 1 ms 3692 KB Correct answer: answer = 71
50 Correct 1 ms 3692 KB Correct answer: answer = 77
51 Correct 1 ms 3692 KB Correct answer: answer = 400
52 Correct 2 ms 3692 KB Correct answer: answer = 996004
53 Correct 2 ms 3692 KB Correct answer: answer = 997310
54 Correct 2 ms 3692 KB Correct answer: answer = 990781
55 Correct 2 ms 3692 KB Correct answer: answer = 996545
56 Correct 2 ms 3692 KB Correct answer: answer = 484
57 Correct 2 ms 3692 KB Correct answer: answer = 484
58 Correct 6 ms 3692 KB Correct answer: answer = 63501
59 Correct 22 ms 3692 KB Correct answer: answer = 323501
60 Correct 84 ms 3692 KB Correct answer: answer = 752500
61 Correct 8 ms 3692 KB Correct answer: answer = 761480
62 Correct 20 ms 3692 KB Correct answer: answer = 758932
63 Correct 2 ms 3692 KB Correct answer: answer = 1000000
64 Correct 171 ms 3692 KB Correct answer: answer = 750500
65 Correct 2 ms 3692 KB Correct answer: answer = 1000000
66 Correct 2 ms 3692 KB Correct answer: answer = 250000
67 Correct 2 ms 3692 KB Correct answer: answer = 250000
68 Correct 2 ms 3692 KB Correct answer: answer = 1000000
69 Correct 2 ms 3692 KB Correct answer: answer = 994009
70 Correct 4 ms 3692 KB Correct answer: answer = 59315
71 Correct 9 ms 3692 KB Correct answer: answer = 25454
72 Correct 47 ms 3692 KB Correct answer: answer = 1504
73 Correct 3 ms 3692 KB Correct answer: answer = 37486
74 Correct 19 ms 3692 KB Correct answer: answer = 4284
75 Correct 3 ms 3692 KB Correct answer: answer = 158008
76 Correct 3 ms 3692 KB Correct answer: answer = 51860
77 Correct 2 ms 3692 KB Correct answer: answer = 12985
78 Runtime error 3 ms 3692 KB Execution killed with signal 11 (could be triggered by violating memory limits)
79 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 248 KB Correct answer: answer = 4
2 Correct 2 ms 480 KB Correct answer: answer = 4
3 Correct 1 ms 480 KB Correct answer: answer = 4
4 Correct 1 ms 492 KB Correct answer: answer = 12
5 Correct 1 ms 548 KB Correct answer: answer = 52
6 Correct 1 ms 664 KB Correct answer: answer = 210
7 Correct 1 ms 664 KB Correct answer: answer = 88
8 Correct 1 ms 664 KB Correct answer: answer = 7696
9 Correct 2 ms 664 KB Correct answer: answer = 1
10 Correct 1 ms 664 KB Correct answer: answer = 2374
11 Correct 1 ms 664 KB Correct answer: answer = 9502
12 Correct 1 ms 664 KB Correct answer: answer = 49
13 Correct 2 ms 748 KB Correct answer: answer = 151
14 Correct 2 ms 748 KB Correct answer: answer = 7550
15 Correct 2 ms 748 KB Correct answer: answer = 7220
16 Correct 2 ms 748 KB Correct answer: answer = 7550
17 Correct 1 ms 748 KB Correct answer: answer = 10000
18 Correct 1 ms 748 KB Correct answer: answer = 10000
19 Correct 2 ms 748 KB Correct answer: answer = 624
20 Correct 2 ms 748 KB Correct answer: answer = 10000
21 Correct 2 ms 748 KB Correct answer: answer = 1
22 Correct 2 ms 748 KB Correct answer: answer = 4
23 Correct 1 ms 748 KB Correct answer: answer = 1
24 Correct 1 ms 748 KB Correct answer: answer = 5
25 Correct 2 ms 748 KB Correct answer: answer = 41
26 Correct 2 ms 748 KB Correct answer: answer = 71923
27 Correct 3 ms 1260 KB Correct answer: answer = 77137
28 Correct 83 ms 2672 KB Correct answer: answer = 764
29 Correct 4 ms 2672 KB Correct answer: answer = 250000
30 Correct 168 ms 3692 KB Correct answer: answer = 500
31 Correct 2 ms 3692 KB Correct answer: answer = 32
32 Correct 5 ms 3692 KB Correct answer: answer = 130050
33 Correct 47 ms 3692 KB Correct answer: answer = 5110
34 Correct 8 ms 3692 KB Correct answer: answer = 2626
35 Correct 18 ms 3692 KB Correct answer: answer = 796
36 Correct 35 ms 3692 KB Correct answer: answer = 7580
37 Correct 105 ms 3692 KB Correct answer: answer = 1904
38 Correct 3 ms 3692 KB Correct answer: answer = 996004
39 Correct 15 ms 3692 KB Correct answer: answer = 38817
40 Correct 48 ms 3692 KB Correct answer: answer = 4096
41 Correct 2 ms 3692 KB Correct answer: answer = 1
42 Correct 2 ms 3692 KB Correct answer: answer = 1
43 Correct 99 ms 3692 KB Correct answer: answer = 2040
44 Correct 2 ms 3692 KB Correct answer: answer = 2
45 Correct 1 ms 3692 KB Correct answer: answer = 4
46 Correct 1 ms 3692 KB Correct answer: answer = 9
47 Correct 1 ms 3692 KB Correct answer: answer = 9
48 Correct 2 ms 3692 KB Correct answer: answer = 21
49 Correct 1 ms 3692 KB Correct answer: answer = 71
50 Correct 1 ms 3692 KB Correct answer: answer = 77
51 Correct 1 ms 3692 KB Correct answer: answer = 400
52 Correct 2 ms 3692 KB Correct answer: answer = 996004
53 Correct 2 ms 3692 KB Correct answer: answer = 997310
54 Correct 2 ms 3692 KB Correct answer: answer = 990781
55 Correct 2 ms 3692 KB Correct answer: answer = 996545
56 Correct 2 ms 3692 KB Correct answer: answer = 484
57 Correct 2 ms 3692 KB Correct answer: answer = 484
58 Correct 6 ms 3692 KB Correct answer: answer = 63501
59 Correct 22 ms 3692 KB Correct answer: answer = 323501
60 Correct 84 ms 3692 KB Correct answer: answer = 752500
61 Correct 8 ms 3692 KB Correct answer: answer = 761480
62 Correct 20 ms 3692 KB Correct answer: answer = 758932
63 Correct 2 ms 3692 KB Correct answer: answer = 1000000
64 Correct 171 ms 3692 KB Correct answer: answer = 750500
65 Correct 2 ms 3692 KB Correct answer: answer = 1000000
66 Correct 2 ms 3692 KB Correct answer: answer = 250000
67 Correct 2 ms 3692 KB Correct answer: answer = 250000
68 Correct 2 ms 3692 KB Correct answer: answer = 1000000
69 Correct 2 ms 3692 KB Correct answer: answer = 994009
70 Correct 4 ms 3692 KB Correct answer: answer = 59315
71 Correct 9 ms 3692 KB Correct answer: answer = 25454
72 Correct 47 ms 3692 KB Correct answer: answer = 1504
73 Correct 3 ms 3692 KB Correct answer: answer = 37486
74 Correct 19 ms 3692 KB Correct answer: answer = 4284
75 Correct 3 ms 3692 KB Correct answer: answer = 158008
76 Correct 3 ms 3692 KB Correct answer: answer = 51860
77 Correct 2 ms 3692 KB Correct answer: answer = 12985
78 Runtime error 3 ms 3692 KB Execution killed with signal 11 (could be triggered by violating memory limits)
79 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 248 KB Correct answer: answer = 4
2 Correct 2 ms 480 KB Correct answer: answer = 4
3 Correct 1 ms 480 KB Correct answer: answer = 4
4 Correct 1 ms 492 KB Correct answer: answer = 12
5 Correct 1 ms 548 KB Correct answer: answer = 52
6 Correct 1 ms 664 KB Correct answer: answer = 210
7 Correct 1 ms 664 KB Correct answer: answer = 88
8 Correct 1 ms 664 KB Correct answer: answer = 7696
9 Correct 2 ms 664 KB Correct answer: answer = 1
10 Correct 1 ms 664 KB Correct answer: answer = 2374
11 Correct 1 ms 664 KB Correct answer: answer = 9502
12 Correct 1 ms 664 KB Correct answer: answer = 49
13 Correct 2 ms 748 KB Correct answer: answer = 151
14 Correct 2 ms 748 KB Correct answer: answer = 7550
15 Correct 2 ms 748 KB Correct answer: answer = 7220
16 Correct 2 ms 748 KB Correct answer: answer = 7550
17 Correct 1 ms 748 KB Correct answer: answer = 10000
18 Correct 1 ms 748 KB Correct answer: answer = 10000
19 Correct 2 ms 748 KB Correct answer: answer = 624
20 Correct 2 ms 748 KB Correct answer: answer = 10000
21 Correct 2 ms 748 KB Correct answer: answer = 1
22 Correct 2 ms 748 KB Correct answer: answer = 4
23 Correct 1 ms 748 KB Correct answer: answer = 1
24 Correct 1 ms 748 KB Correct answer: answer = 5
25 Correct 2 ms 748 KB Correct answer: answer = 41
26 Correct 2 ms 748 KB Correct answer: answer = 71923
27 Correct 3 ms 1260 KB Correct answer: answer = 77137
28 Correct 83 ms 2672 KB Correct answer: answer = 764
29 Correct 4 ms 2672 KB Correct answer: answer = 250000
30 Correct 168 ms 3692 KB Correct answer: answer = 500
31 Correct 2 ms 3692 KB Correct answer: answer = 32
32 Correct 5 ms 3692 KB Correct answer: answer = 130050
33 Correct 47 ms 3692 KB Correct answer: answer = 5110
34 Correct 8 ms 3692 KB Correct answer: answer = 2626
35 Correct 18 ms 3692 KB Correct answer: answer = 796
36 Correct 35 ms 3692 KB Correct answer: answer = 7580
37 Correct 105 ms 3692 KB Correct answer: answer = 1904
38 Correct 3 ms 3692 KB Correct answer: answer = 996004
39 Correct 15 ms 3692 KB Correct answer: answer = 38817
40 Correct 48 ms 3692 KB Correct answer: answer = 4096
41 Correct 2 ms 3692 KB Correct answer: answer = 1
42 Correct 2 ms 3692 KB Correct answer: answer = 1
43 Correct 99 ms 3692 KB Correct answer: answer = 2040
44 Correct 2 ms 3692 KB Correct answer: answer = 2
45 Correct 1 ms 3692 KB Correct answer: answer = 4
46 Correct 1 ms 3692 KB Correct answer: answer = 9
47 Correct 1 ms 3692 KB Correct answer: answer = 9
48 Correct 2 ms 3692 KB Correct answer: answer = 21
49 Correct 1 ms 3692 KB Correct answer: answer = 71
50 Correct 1 ms 3692 KB Correct answer: answer = 77
51 Correct 1 ms 3692 KB Correct answer: answer = 400
52 Correct 2 ms 3692 KB Correct answer: answer = 996004
53 Correct 2 ms 3692 KB Correct answer: answer = 997310
54 Correct 2 ms 3692 KB Correct answer: answer = 990781
55 Correct 2 ms 3692 KB Correct answer: answer = 996545
56 Correct 2 ms 3692 KB Correct answer: answer = 484
57 Correct 2 ms 3692 KB Correct answer: answer = 484
58 Correct 6 ms 3692 KB Correct answer: answer = 63501
59 Correct 22 ms 3692 KB Correct answer: answer = 323501
60 Correct 84 ms 3692 KB Correct answer: answer = 752500
61 Correct 8 ms 3692 KB Correct answer: answer = 761480
62 Correct 20 ms 3692 KB Correct answer: answer = 758932
63 Correct 2 ms 3692 KB Correct answer: answer = 1000000
64 Correct 171 ms 3692 KB Correct answer: answer = 750500
65 Correct 2 ms 3692 KB Correct answer: answer = 1000000
66 Correct 2 ms 3692 KB Correct answer: answer = 250000
67 Correct 2 ms 3692 KB Correct answer: answer = 250000
68 Correct 2 ms 3692 KB Correct answer: answer = 1000000
69 Correct 2 ms 3692 KB Correct answer: answer = 994009
70 Correct 4 ms 3692 KB Correct answer: answer = 59315
71 Correct 9 ms 3692 KB Correct answer: answer = 25454
72 Correct 47 ms 3692 KB Correct answer: answer = 1504
73 Correct 3 ms 3692 KB Correct answer: answer = 37486
74 Correct 19 ms 3692 KB Correct answer: answer = 4284
75 Correct 3 ms 3692 KB Correct answer: answer = 158008
76 Correct 3 ms 3692 KB Correct answer: answer = 51860
77 Correct 2 ms 3692 KB Correct answer: answer = 12985
78 Runtime error 3 ms 3692 KB Execution killed with signal 11 (could be triggered by violating memory limits)
79 Halted 0 ms 0 KB -