Submission #23410

# Submission time Handle Problem Language Result Execution time Memory
23410 2017-05-08T19:41:39 Z Bruteforceman Aliens (IOI16_aliens) C++11
25 / 100
2000 ms 127640 KB
#include "aliens.h"
#include "bits/stdc++.h"
using namespace std;

typedef pair <int, int> pii;
vector <pii> range;

bool comp(pii a, pii b) {
    if(a.first == b.first) {
        return a.second > b.second;
    } else {
        return a.first < b.first;
    }
}

long long count(int x, int y) {
    if(x <= y) return 1LL * (y - x + 1) * (y - x + 1);
    return 0;
}
long long dp[4005][4005];

long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) {
    range.clear();
    for(int i = 0; i < n; i++) {
        int x = min(r[i], c[i]);
        int y = max(r[i], c[i]);
        range.push_back(make_pair(x, y));
    }
    const int inf = 1e8;
    const long long INF = 1e16;

    multiset <int> s;
    vector <pii> sweep;
    for(int i = 0; i < n; i++) {
        sweep.push_back(make_pair(range[i].first, inf));
        sweep.push_back(make_pair(range[i].second, range[i].first));
    }
    sort(sweep.begin(), sweep.end(), comp);
    range.clear();

    for(int i = 0; i < n+n; i++) {
        if(sweep[i].second == inf) {
            s.insert(sweep[i].first);
        } else {
            if(*s.begin() == sweep[i].second) {
                if(s.size() == 1 || *(++s.begin()) != sweep[i].second) range.push_back(pii(sweep[i].second, sweep[i].first));
            }
            s.erase(s.find(sweep[i].second));
        }
    }
    range.push_back(make_pair(-1, -1));
    sort(range.begin(), range.end());
    int sz = range.size() - 1;

    memset(dp, 0, sizeof dp);

    for(int i = 1; i <= sz; i++) {
        dp[i][0] = INF;
        for(int j = 1; j <= k; j++) {
            dp[i][j] = INF;
            for(int l = 1; l <= i; l++) {
                dp[i][j] = min(dp[i][j], dp[l - 1][j - 1] + count(range[l].first, range[i].second) - count(range[l].first, range[l-1].second));
            }
        }
    }
    return dp[sz][k];
}
/*
int main() {
    int n, m, k;
    assert(3 == scanf("%d %d %d", &n, &m, &k));
    std::vector<int> 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;
}
*/
# Verdict Execution time Memory Grader output
1 Correct 0 ms 127340 KB Correct answer: answer = 4
2 Correct 6 ms 127340 KB Correct answer: answer = 4
3 Correct 6 ms 127340 KB Correct answer: answer = 4
4 Correct 13 ms 127340 KB Correct answer: answer = 12
5 Correct 6 ms 127340 KB Correct answer: answer = 52
6 Correct 3 ms 127340 KB Correct answer: answer = 210
7 Correct 6 ms 127340 KB Correct answer: answer = 88
8 Correct 0 ms 127340 KB Correct answer: answer = 7696
9 Correct 13 ms 127340 KB Correct answer: answer = 1
10 Correct 3 ms 127340 KB Correct answer: answer = 2374
11 Correct 6 ms 127340 KB Correct answer: answer = 9502
12 Correct 0 ms 127340 KB Correct answer: answer = 49
13 Correct 13 ms 127340 KB Correct answer: answer = 151
14 Correct 3 ms 127340 KB Correct answer: answer = 7550
15 Correct 6 ms 127340 KB Correct answer: answer = 7220
16 Correct 3 ms 127340 KB Correct answer: answer = 7550
17 Correct 13 ms 127340 KB Correct answer: answer = 10000
18 Correct 3 ms 127340 KB Correct answer: answer = 10000
19 Correct 9 ms 127340 KB Correct answer: answer = 624
20 Correct 0 ms 127340 KB Correct answer: answer = 10000
# Verdict Execution time Memory Grader output
1 Correct 9 ms 127340 KB Correct answer: answer = 1
2 Correct 16 ms 127340 KB Correct answer: answer = 4
3 Correct 13 ms 127340 KB Correct answer: answer = 1
4 Correct 16 ms 127340 KB Correct answer: answer = 5
5 Correct 23 ms 127340 KB Correct answer: answer = 41
6 Correct 13 ms 127340 KB Correct answer: answer = 71923
7 Correct 6 ms 127340 KB Correct answer: answer = 77137
8 Correct 83 ms 127340 KB Correct answer: answer = 764
9 Correct 6 ms 127340 KB Correct answer: answer = 250000
10 Correct 253 ms 127340 KB Correct answer: answer = 500
11 Correct 9 ms 127340 KB Correct answer: answer = 32
12 Correct 13 ms 127340 KB Correct answer: answer = 130050
13 Correct 19 ms 127340 KB Correct answer: answer = 5110
14 Correct 6 ms 127340 KB Correct answer: answer = 2626
15 Correct 19 ms 127340 KB Correct answer: answer = 796
16 Correct 13 ms 127340 KB Correct answer: answer = 7580
17 Correct 63 ms 127340 KB Correct answer: answer = 1904
18 Correct 9 ms 127340 KB Correct answer: answer = 996004
19 Correct 13 ms 127340 KB Correct answer: answer = 38817
20 Correct 26 ms 127340 KB Correct answer: answer = 4096
21 Correct 9 ms 127340 KB Correct answer: answer = 1
22 Correct 9 ms 127340 KB Correct answer: answer = 1
23 Correct 63 ms 127340 KB Correct answer: answer = 2040
24 Correct 6 ms 127340 KB Correct answer: answer = 2
# Verdict Execution time Memory Grader output
1 Correct 0 ms 127340 KB Correct answer: answer = 4
2 Correct 6 ms 127340 KB Correct answer: answer = 4
3 Correct 6 ms 127340 KB Correct answer: answer = 4
4 Correct 13 ms 127340 KB Correct answer: answer = 12
5 Correct 6 ms 127340 KB Correct answer: answer = 52
6 Correct 3 ms 127340 KB Correct answer: answer = 210
7 Correct 6 ms 127340 KB Correct answer: answer = 88
8 Correct 0 ms 127340 KB Correct answer: answer = 7696
9 Correct 13 ms 127340 KB Correct answer: answer = 1
10 Correct 3 ms 127340 KB Correct answer: answer = 2374
11 Correct 6 ms 127340 KB Correct answer: answer = 9502
12 Correct 0 ms 127340 KB Correct answer: answer = 49
13 Correct 13 ms 127340 KB Correct answer: answer = 151
14 Correct 3 ms 127340 KB Correct answer: answer = 7550
15 Correct 6 ms 127340 KB Correct answer: answer = 7220
16 Correct 3 ms 127340 KB Correct answer: answer = 7550
17 Correct 13 ms 127340 KB Correct answer: answer = 10000
18 Correct 3 ms 127340 KB Correct answer: answer = 10000
19 Correct 9 ms 127340 KB Correct answer: answer = 624
20 Correct 0 ms 127340 KB Correct answer: answer = 10000
21 Correct 9 ms 127340 KB Correct answer: answer = 1
22 Correct 16 ms 127340 KB Correct answer: answer = 4
23 Correct 13 ms 127340 KB Correct answer: answer = 1
24 Correct 16 ms 127340 KB Correct answer: answer = 5
25 Correct 23 ms 127340 KB Correct answer: answer = 41
26 Correct 13 ms 127340 KB Correct answer: answer = 71923
27 Correct 6 ms 127340 KB Correct answer: answer = 77137
28 Correct 83 ms 127340 KB Correct answer: answer = 764
29 Correct 6 ms 127340 KB Correct answer: answer = 250000
30 Correct 253 ms 127340 KB Correct answer: answer = 500
31 Correct 9 ms 127340 KB Correct answer: answer = 32
32 Correct 13 ms 127340 KB Correct answer: answer = 130050
33 Correct 19 ms 127340 KB Correct answer: answer = 5110
34 Correct 6 ms 127340 KB Correct answer: answer = 2626
35 Correct 19 ms 127340 KB Correct answer: answer = 796
36 Correct 13 ms 127340 KB Correct answer: answer = 7580
37 Correct 63 ms 127340 KB Correct answer: answer = 1904
38 Correct 9 ms 127340 KB Correct answer: answer = 996004
39 Correct 13 ms 127340 KB Correct answer: answer = 38817
40 Correct 26 ms 127340 KB Correct answer: answer = 4096
41 Correct 9 ms 127340 KB Correct answer: answer = 1
42 Correct 9 ms 127340 KB Correct answer: answer = 1
43 Correct 63 ms 127340 KB Correct answer: answer = 2040
44 Correct 6 ms 127340 KB Correct answer: answer = 2
45 Correct 9 ms 127340 KB Correct answer: answer = 4
46 Correct 3 ms 127340 KB Correct answer: answer = 9
47 Correct 3 ms 127340 KB Correct answer: answer = 9
48 Correct 9 ms 127340 KB Correct answer: answer = 21
49 Correct 9 ms 127340 KB Correct answer: answer = 71
50 Correct 13 ms 127340 KB Correct answer: answer = 77
51 Correct 6 ms 127340 KB Correct answer: answer = 400
52 Correct 6 ms 127340 KB Correct answer: answer = 996004
53 Correct 0 ms 127340 KB Correct answer: answer = 997310
54 Correct 6 ms 127340 KB Correct answer: answer = 990781
55 Correct 16 ms 127340 KB Correct answer: answer = 996545
56 Correct 9 ms 127340 KB Correct answer: answer = 484
57 Correct 6 ms 127340 KB Correct answer: answer = 484
58 Correct 23 ms 127340 KB Correct answer: answer = 63501
59 Correct 16 ms 127340 KB Correct answer: answer = 323501
60 Correct 63 ms 127340 KB Correct answer: answer = 752500
61 Correct 23 ms 127340 KB Correct answer: answer = 761480
62 Correct 46 ms 127340 KB Correct answer: answer = 758932
63 Correct 9 ms 127340 KB Correct answer: answer = 1000000
64 Correct 326 ms 127340 KB Correct answer: answer = 750500
65 Correct 16 ms 127340 KB Correct answer: answer = 1000000
66 Correct 13 ms 127340 KB Correct answer: answer = 250000
67 Correct 6 ms 127340 KB Correct answer: answer = 250000
68 Correct 16 ms 127340 KB Correct answer: answer = 1000000
69 Correct 23 ms 127340 KB Correct answer: answer = 994009
70 Correct 6 ms 127340 KB Correct answer: answer = 59315
71 Correct 19 ms 127340 KB Correct answer: answer = 25454
72 Correct 39 ms 127340 KB Correct answer: answer = 1504
73 Correct 13 ms 127340 KB Correct answer: answer = 37486
74 Correct 26 ms 127340 KB Correct answer: answer = 4284
75 Correct 16 ms 127340 KB Correct answer: answer = 158008
76 Correct 9 ms 127340 KB Correct answer: answer = 51860
77 Correct 9 ms 127340 KB Correct answer: answer = 12985
# Verdict Execution time Memory Grader output
1 Correct 0 ms 127340 KB Correct answer: answer = 4
2 Correct 6 ms 127340 KB Correct answer: answer = 4
3 Correct 6 ms 127340 KB Correct answer: answer = 4
4 Correct 13 ms 127340 KB Correct answer: answer = 12
5 Correct 6 ms 127340 KB Correct answer: answer = 52
6 Correct 3 ms 127340 KB Correct answer: answer = 210
7 Correct 6 ms 127340 KB Correct answer: answer = 88
8 Correct 0 ms 127340 KB Correct answer: answer = 7696
9 Correct 13 ms 127340 KB Correct answer: answer = 1
10 Correct 3 ms 127340 KB Correct answer: answer = 2374
11 Correct 6 ms 127340 KB Correct answer: answer = 9502
12 Correct 0 ms 127340 KB Correct answer: answer = 49
13 Correct 13 ms 127340 KB Correct answer: answer = 151
14 Correct 3 ms 127340 KB Correct answer: answer = 7550
15 Correct 6 ms 127340 KB Correct answer: answer = 7220
16 Correct 3 ms 127340 KB Correct answer: answer = 7550
17 Correct 13 ms 127340 KB Correct answer: answer = 10000
18 Correct 3 ms 127340 KB Correct answer: answer = 10000
19 Correct 9 ms 127340 KB Correct answer: answer = 624
20 Correct 0 ms 127340 KB Correct answer: answer = 10000
21 Correct 9 ms 127340 KB Correct answer: answer = 1
22 Correct 16 ms 127340 KB Correct answer: answer = 4
23 Correct 13 ms 127340 KB Correct answer: answer = 1
24 Correct 16 ms 127340 KB Correct answer: answer = 5
25 Correct 23 ms 127340 KB Correct answer: answer = 41
26 Correct 13 ms 127340 KB Correct answer: answer = 71923
27 Correct 6 ms 127340 KB Correct answer: answer = 77137
28 Correct 83 ms 127340 KB Correct answer: answer = 764
29 Correct 6 ms 127340 KB Correct answer: answer = 250000
30 Correct 253 ms 127340 KB Correct answer: answer = 500
31 Correct 9 ms 127340 KB Correct answer: answer = 32
32 Correct 13 ms 127340 KB Correct answer: answer = 130050
33 Correct 19 ms 127340 KB Correct answer: answer = 5110
34 Correct 6 ms 127340 KB Correct answer: answer = 2626
35 Correct 19 ms 127340 KB Correct answer: answer = 796
36 Correct 13 ms 127340 KB Correct answer: answer = 7580
37 Correct 63 ms 127340 KB Correct answer: answer = 1904
38 Correct 9 ms 127340 KB Correct answer: answer = 996004
39 Correct 13 ms 127340 KB Correct answer: answer = 38817
40 Correct 26 ms 127340 KB Correct answer: answer = 4096
41 Correct 9 ms 127340 KB Correct answer: answer = 1
42 Correct 9 ms 127340 KB Correct answer: answer = 1
43 Correct 63 ms 127340 KB Correct answer: answer = 2040
44 Correct 6 ms 127340 KB Correct answer: answer = 2
45 Correct 9 ms 127340 KB Correct answer: answer = 4
46 Correct 3 ms 127340 KB Correct answer: answer = 9
47 Correct 3 ms 127340 KB Correct answer: answer = 9
48 Correct 9 ms 127340 KB Correct answer: answer = 21
49 Correct 9 ms 127340 KB Correct answer: answer = 71
50 Correct 13 ms 127340 KB Correct answer: answer = 77
51 Correct 6 ms 127340 KB Correct answer: answer = 400
52 Correct 6 ms 127340 KB Correct answer: answer = 996004
53 Correct 0 ms 127340 KB Correct answer: answer = 997310
54 Correct 6 ms 127340 KB Correct answer: answer = 990781
55 Correct 16 ms 127340 KB Correct answer: answer = 996545
56 Correct 9 ms 127340 KB Correct answer: answer = 484
57 Correct 6 ms 127340 KB Correct answer: answer = 484
58 Correct 23 ms 127340 KB Correct answer: answer = 63501
59 Correct 16 ms 127340 KB Correct answer: answer = 323501
60 Correct 63 ms 127340 KB Correct answer: answer = 752500
61 Correct 23 ms 127340 KB Correct answer: answer = 761480
62 Correct 46 ms 127340 KB Correct answer: answer = 758932
63 Correct 9 ms 127340 KB Correct answer: answer = 1000000
64 Correct 326 ms 127340 KB Correct answer: answer = 750500
65 Correct 16 ms 127340 KB Correct answer: answer = 1000000
66 Correct 13 ms 127340 KB Correct answer: answer = 250000
67 Correct 6 ms 127340 KB Correct answer: answer = 250000
68 Correct 16 ms 127340 KB Correct answer: answer = 1000000
69 Correct 23 ms 127340 KB Correct answer: answer = 994009
70 Correct 6 ms 127340 KB Correct answer: answer = 59315
71 Correct 19 ms 127340 KB Correct answer: answer = 25454
72 Correct 39 ms 127340 KB Correct answer: answer = 1504
73 Correct 13 ms 127340 KB Correct answer: answer = 37486
74 Correct 26 ms 127340 KB Correct answer: answer = 4284
75 Correct 16 ms 127340 KB Correct answer: answer = 158008
76 Correct 9 ms 127340 KB Correct answer: answer = 51860
77 Correct 9 ms 127340 KB Correct answer: answer = 12985
78 Correct 16 ms 127640 KB Correct answer: answer = 997864126212
79 Correct 13 ms 127640 KB Correct answer: answer = 998608411647
80 Correct 9 ms 127640 KB Correct answer: answer = 995265560477
81 Correct 239 ms 127640 KB Correct answer: answer = 10125000
82 Correct 746 ms 127640 KB Correct answer: answer = 2291668
83 Correct 1296 ms 127480 KB Correct answer: answer = 42388
84 Execution timed out 2000 ms 127480 KB Execution timed out
85 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 127340 KB Correct answer: answer = 4
2 Correct 6 ms 127340 KB Correct answer: answer = 4
3 Correct 6 ms 127340 KB Correct answer: answer = 4
4 Correct 13 ms 127340 KB Correct answer: answer = 12
5 Correct 6 ms 127340 KB Correct answer: answer = 52
6 Correct 3 ms 127340 KB Correct answer: answer = 210
7 Correct 6 ms 127340 KB Correct answer: answer = 88
8 Correct 0 ms 127340 KB Correct answer: answer = 7696
9 Correct 13 ms 127340 KB Correct answer: answer = 1
10 Correct 3 ms 127340 KB Correct answer: answer = 2374
11 Correct 6 ms 127340 KB Correct answer: answer = 9502
12 Correct 0 ms 127340 KB Correct answer: answer = 49
13 Correct 13 ms 127340 KB Correct answer: answer = 151
14 Correct 3 ms 127340 KB Correct answer: answer = 7550
15 Correct 6 ms 127340 KB Correct answer: answer = 7220
16 Correct 3 ms 127340 KB Correct answer: answer = 7550
17 Correct 13 ms 127340 KB Correct answer: answer = 10000
18 Correct 3 ms 127340 KB Correct answer: answer = 10000
19 Correct 9 ms 127340 KB Correct answer: answer = 624
20 Correct 0 ms 127340 KB Correct answer: answer = 10000
21 Correct 9 ms 127340 KB Correct answer: answer = 1
22 Correct 16 ms 127340 KB Correct answer: answer = 4
23 Correct 13 ms 127340 KB Correct answer: answer = 1
24 Correct 16 ms 127340 KB Correct answer: answer = 5
25 Correct 23 ms 127340 KB Correct answer: answer = 41
26 Correct 13 ms 127340 KB Correct answer: answer = 71923
27 Correct 6 ms 127340 KB Correct answer: answer = 77137
28 Correct 83 ms 127340 KB Correct answer: answer = 764
29 Correct 6 ms 127340 KB Correct answer: answer = 250000
30 Correct 253 ms 127340 KB Correct answer: answer = 500
31 Correct 9 ms 127340 KB Correct answer: answer = 32
32 Correct 13 ms 127340 KB Correct answer: answer = 130050
33 Correct 19 ms 127340 KB Correct answer: answer = 5110
34 Correct 6 ms 127340 KB Correct answer: answer = 2626
35 Correct 19 ms 127340 KB Correct answer: answer = 796
36 Correct 13 ms 127340 KB Correct answer: answer = 7580
37 Correct 63 ms 127340 KB Correct answer: answer = 1904
38 Correct 9 ms 127340 KB Correct answer: answer = 996004
39 Correct 13 ms 127340 KB Correct answer: answer = 38817
40 Correct 26 ms 127340 KB Correct answer: answer = 4096
41 Correct 9 ms 127340 KB Correct answer: answer = 1
42 Correct 9 ms 127340 KB Correct answer: answer = 1
43 Correct 63 ms 127340 KB Correct answer: answer = 2040
44 Correct 6 ms 127340 KB Correct answer: answer = 2
45 Correct 9 ms 127340 KB Correct answer: answer = 4
46 Correct 3 ms 127340 KB Correct answer: answer = 9
47 Correct 3 ms 127340 KB Correct answer: answer = 9
48 Correct 9 ms 127340 KB Correct answer: answer = 21
49 Correct 9 ms 127340 KB Correct answer: answer = 71
50 Correct 13 ms 127340 KB Correct answer: answer = 77
51 Correct 6 ms 127340 KB Correct answer: answer = 400
52 Correct 6 ms 127340 KB Correct answer: answer = 996004
53 Correct 0 ms 127340 KB Correct answer: answer = 997310
54 Correct 6 ms 127340 KB Correct answer: answer = 990781
55 Correct 16 ms 127340 KB Correct answer: answer = 996545
56 Correct 9 ms 127340 KB Correct answer: answer = 484
57 Correct 6 ms 127340 KB Correct answer: answer = 484
58 Correct 23 ms 127340 KB Correct answer: answer = 63501
59 Correct 16 ms 127340 KB Correct answer: answer = 323501
60 Correct 63 ms 127340 KB Correct answer: answer = 752500
61 Correct 23 ms 127340 KB Correct answer: answer = 761480
62 Correct 46 ms 127340 KB Correct answer: answer = 758932
63 Correct 9 ms 127340 KB Correct answer: answer = 1000000
64 Correct 326 ms 127340 KB Correct answer: answer = 750500
65 Correct 16 ms 127340 KB Correct answer: answer = 1000000
66 Correct 13 ms 127340 KB Correct answer: answer = 250000
67 Correct 6 ms 127340 KB Correct answer: answer = 250000
68 Correct 16 ms 127340 KB Correct answer: answer = 1000000
69 Correct 23 ms 127340 KB Correct answer: answer = 994009
70 Correct 6 ms 127340 KB Correct answer: answer = 59315
71 Correct 19 ms 127340 KB Correct answer: answer = 25454
72 Correct 39 ms 127340 KB Correct answer: answer = 1504
73 Correct 13 ms 127340 KB Correct answer: answer = 37486
74 Correct 26 ms 127340 KB Correct answer: answer = 4284
75 Correct 16 ms 127340 KB Correct answer: answer = 158008
76 Correct 9 ms 127340 KB Correct answer: answer = 51860
77 Correct 9 ms 127340 KB Correct answer: answer = 12985
78 Correct 16 ms 127640 KB Correct answer: answer = 997864126212
79 Correct 13 ms 127640 KB Correct answer: answer = 998608411647
80 Correct 9 ms 127640 KB Correct answer: answer = 995265560477
81 Correct 239 ms 127640 KB Correct answer: answer = 10125000
82 Correct 746 ms 127640 KB Correct answer: answer = 2291668
83 Correct 1296 ms 127480 KB Correct answer: answer = 42388
84 Execution timed out 2000 ms 127480 KB Execution timed out
85 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 127340 KB Correct answer: answer = 4
2 Correct 6 ms 127340 KB Correct answer: answer = 4
3 Correct 6 ms 127340 KB Correct answer: answer = 4
4 Correct 13 ms 127340 KB Correct answer: answer = 12
5 Correct 6 ms 127340 KB Correct answer: answer = 52
6 Correct 3 ms 127340 KB Correct answer: answer = 210
7 Correct 6 ms 127340 KB Correct answer: answer = 88
8 Correct 0 ms 127340 KB Correct answer: answer = 7696
9 Correct 13 ms 127340 KB Correct answer: answer = 1
10 Correct 3 ms 127340 KB Correct answer: answer = 2374
11 Correct 6 ms 127340 KB Correct answer: answer = 9502
12 Correct 0 ms 127340 KB Correct answer: answer = 49
13 Correct 13 ms 127340 KB Correct answer: answer = 151
14 Correct 3 ms 127340 KB Correct answer: answer = 7550
15 Correct 6 ms 127340 KB Correct answer: answer = 7220
16 Correct 3 ms 127340 KB Correct answer: answer = 7550
17 Correct 13 ms 127340 KB Correct answer: answer = 10000
18 Correct 3 ms 127340 KB Correct answer: answer = 10000
19 Correct 9 ms 127340 KB Correct answer: answer = 624
20 Correct 0 ms 127340 KB Correct answer: answer = 10000
21 Correct 9 ms 127340 KB Correct answer: answer = 1
22 Correct 16 ms 127340 KB Correct answer: answer = 4
23 Correct 13 ms 127340 KB Correct answer: answer = 1
24 Correct 16 ms 127340 KB Correct answer: answer = 5
25 Correct 23 ms 127340 KB Correct answer: answer = 41
26 Correct 13 ms 127340 KB Correct answer: answer = 71923
27 Correct 6 ms 127340 KB Correct answer: answer = 77137
28 Correct 83 ms 127340 KB Correct answer: answer = 764
29 Correct 6 ms 127340 KB Correct answer: answer = 250000
30 Correct 253 ms 127340 KB Correct answer: answer = 500
31 Correct 9 ms 127340 KB Correct answer: answer = 32
32 Correct 13 ms 127340 KB Correct answer: answer = 130050
33 Correct 19 ms 127340 KB Correct answer: answer = 5110
34 Correct 6 ms 127340 KB Correct answer: answer = 2626
35 Correct 19 ms 127340 KB Correct answer: answer = 796
36 Correct 13 ms 127340 KB Correct answer: answer = 7580
37 Correct 63 ms 127340 KB Correct answer: answer = 1904
38 Correct 9 ms 127340 KB Correct answer: answer = 996004
39 Correct 13 ms 127340 KB Correct answer: answer = 38817
40 Correct 26 ms 127340 KB Correct answer: answer = 4096
41 Correct 9 ms 127340 KB Correct answer: answer = 1
42 Correct 9 ms 127340 KB Correct answer: answer = 1
43 Correct 63 ms 127340 KB Correct answer: answer = 2040
44 Correct 6 ms 127340 KB Correct answer: answer = 2
45 Correct 9 ms 127340 KB Correct answer: answer = 4
46 Correct 3 ms 127340 KB Correct answer: answer = 9
47 Correct 3 ms 127340 KB Correct answer: answer = 9
48 Correct 9 ms 127340 KB Correct answer: answer = 21
49 Correct 9 ms 127340 KB Correct answer: answer = 71
50 Correct 13 ms 127340 KB Correct answer: answer = 77
51 Correct 6 ms 127340 KB Correct answer: answer = 400
52 Correct 6 ms 127340 KB Correct answer: answer = 996004
53 Correct 0 ms 127340 KB Correct answer: answer = 997310
54 Correct 6 ms 127340 KB Correct answer: answer = 990781
55 Correct 16 ms 127340 KB Correct answer: answer = 996545
56 Correct 9 ms 127340 KB Correct answer: answer = 484
57 Correct 6 ms 127340 KB Correct answer: answer = 484
58 Correct 23 ms 127340 KB Correct answer: answer = 63501
59 Correct 16 ms 127340 KB Correct answer: answer = 323501
60 Correct 63 ms 127340 KB Correct answer: answer = 752500
61 Correct 23 ms 127340 KB Correct answer: answer = 761480
62 Correct 46 ms 127340 KB Correct answer: answer = 758932
63 Correct 9 ms 127340 KB Correct answer: answer = 1000000
64 Correct 326 ms 127340 KB Correct answer: answer = 750500
65 Correct 16 ms 127340 KB Correct answer: answer = 1000000
66 Correct 13 ms 127340 KB Correct answer: answer = 250000
67 Correct 6 ms 127340 KB Correct answer: answer = 250000
68 Correct 16 ms 127340 KB Correct answer: answer = 1000000
69 Correct 23 ms 127340 KB Correct answer: answer = 994009
70 Correct 6 ms 127340 KB Correct answer: answer = 59315
71 Correct 19 ms 127340 KB Correct answer: answer = 25454
72 Correct 39 ms 127340 KB Correct answer: answer = 1504
73 Correct 13 ms 127340 KB Correct answer: answer = 37486
74 Correct 26 ms 127340 KB Correct answer: answer = 4284
75 Correct 16 ms 127340 KB Correct answer: answer = 158008
76 Correct 9 ms 127340 KB Correct answer: answer = 51860
77 Correct 9 ms 127340 KB Correct answer: answer = 12985
78 Correct 16 ms 127640 KB Correct answer: answer = 997864126212
79 Correct 13 ms 127640 KB Correct answer: answer = 998608411647
80 Correct 9 ms 127640 KB Correct answer: answer = 995265560477
81 Correct 239 ms 127640 KB Correct answer: answer = 10125000
82 Correct 746 ms 127640 KB Correct answer: answer = 2291668
83 Correct 1296 ms 127480 KB Correct answer: answer = 42388
84 Execution timed out 2000 ms 127480 KB Execution timed out
85 Halted 0 ms 0 KB -