# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
492210 | 2021-12-06T00:33:03 Z | Lam_lai_cuoc_doi | Aliens (IOI16_aliens) | C++17 | 268 ms | 92356 KB |
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; template <class T> void read(T &x) { x = 0; register int c; while ((c = getchar()) && (c > '9' || c < '0')) ; for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + c - '0'; } constexpr bool typetest = 0; constexpr int N = 1e5 + 5; constexpr ll Inf = 1e17; int m, n, k; pair<int, int> a[N]; ll cnt[N], sum[N]; struct ConvexHullTrick { vector<ll> A, B; vector<int> line; vector<ld> point; ConvexHullTrick() { point.emplace_back(-Inf); } ld ff(int x, int y) { return (ld)1.0 * (B[y] - B[x]) / (A[x] - A[y]); } void Add(int i) { while ((int)line.size() > 2 || ((int)line.size() == 1 && A[line.back()] == A[i])) { if (A[line.back()] == A[i]) { if (B[line.back()] > B[i]) { line.pop_back(); if (!line.empty()) point.pop_back(); } else break; } else { if (ff(i, line.back()) <= ff(i, line[line.size() - 2])) { line.pop_back(); if (!line.empty()) point.pop_back(); } else break; } } if (line.empty() || A[line.back()] != A[i]) { if (!line.empty()) point.emplace_back(ff(line.back(), i)); line.emplace_back(i); } } ll More(int x) { return cnt[x - 1] * a[x].second + sum[x - 1]; } ll Get(int x) { int j = lower_bound(point.begin(), point.end(), a[x].second) - point.begin(); return A[line[j - 1]] * a[x].second + B[line[j - 1]] + More(x); } } f[4002]; long long take_photos(int N, int M, int K, vector<int> r, vector<int> c) { /* Convert */ m = M; n = N; k = K; for (int i = 1; i <= n; ++i) { a[i] = make_pair(r[i - 1] + 1, c[i - 1] + 1); if (a[i].first > a[i].second) swap(a[i].first, a[i].second); } sort(a + 1, a + n + 1, [&](const pair<int, int> &x, const pair<int, int> &y) { return x.second < y.second || (x.second == y.second && x.first > y.first); }); vector<int> s; for (int i = 1; i <= n; ++i) { while (!s.empty() && a[i].first <= a[s.back()].first) s.pop_back(); s.emplace_back(i); } n = s.size(); for (int i = 1; i <= n; ++i) a[i] = a[s[i - 1]]; /* End Convert */ long long temp(0); for (int i = 1, j = 1, now = 0; i <= m; ++i) { if (j <= n && a[j].first == i) { now = a[j].second; ++j; } if (now >= i) temp += 2 * (now - i + 1) - 1; } for (int i = 1; i <= n; ++i) { if (i == n) { cnt[i] = (a[i].second - a[i].first + 1) * 2; sum[i] = -cnt[i] * a[i].second; } else if (a[i].second < a[i + 1].first) { cnt[i] = (a[i].second - a[i].first + 1) * 2; sum[i] = -cnt[i] * a[i].second; sum[i] += -(a[i + 1].first - a[i].second - 1) * (a[i + 1].first + a[i].second) + (a[i + 1].first - a[i].second - 1); cnt[i] += 2 * (a[i + 1].first - a[i].second - 1); } else { cnt[i] = (a[i + 1].first - a[i].first) * 2; sum[i] = -cnt[i] * a[i].second; } cnt[i] += cnt[i - 1]; sum[i] += sum[i - 1]; } ll ans(Inf); for (int i = 0; i <= k && i <= n; ++i) { f[i].A.resize(n + 2, 0); f[i].B.resize(n + 2, 0); } f[0].A[0] = 0; f[0].B[0] = 0; f[0].Add(0); for (int i = 1; i <= n; ++i) for (int j = min(i, k); j; --j) { ll v = f[j - 1].Get(i); f[j].A[i] = -cnt[i]; f[j].B[i] = -sum[i] + v; f[j].Add(i); if (i == n) ans = min(ans, v); } return ans + temp; } void Read() { int m, n, k; cin >> n >> m >> k; vector<int> x(n), y(n); for (int i = 0; i < n; ++i) cin >> x[i] >> y[i]; cout << take_photos(n, m, k, x, y); } void Solve() { }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 716 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 716 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 716 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 716 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 716 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 716 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 716 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 716 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 804 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 716 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 804 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 716 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
2 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
4 | Correct | 1 ms | 716 KB | Correct answer: answer = 5 |
5 | Correct | 1 ms | 716 KB | Correct answer: answer = 41 |
6 | Correct | 1 ms | 716 KB | Correct answer: answer = 71923 |
7 | Correct | 1 ms | 844 KB | Correct answer: answer = 77137 |
8 | Correct | 6 ms | 3660 KB | Correct answer: answer = 764 |
9 | Correct | 1 ms | 844 KB | Correct answer: answer = 250000 |
10 | Correct | 11 ms | 8396 KB | Correct answer: answer = 500 |
11 | Correct | 1 ms | 716 KB | Correct answer: answer = 32 |
12 | Correct | 1 ms | 804 KB | Correct answer: answer = 130050 |
13 | Correct | 2 ms | 1740 KB | Correct answer: answer = 5110 |
14 | Correct | 1 ms | 972 KB | Correct answer: answer = 2626 |
15 | Correct | 3 ms | 1612 KB | Correct answer: answer = 796 |
16 | Correct | 3 ms | 1396 KB | Correct answer: answer = 7580 |
17 | Correct | 4 ms | 3276 KB | Correct answer: answer = 1904 |
18 | Correct | 1 ms | 844 KB | Correct answer: answer = 996004 |
19 | Correct | 2 ms | 972 KB | Correct answer: answer = 38817 |
20 | Correct | 3 ms | 1840 KB | Correct answer: answer = 4096 |
21 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 808 KB | Correct answer: answer = 1 |
23 | Correct | 8 ms | 3020 KB | Correct answer: answer = 2040 |
24 | Correct | 1 ms | 716 KB | Correct answer: answer = 2 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 716 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 716 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 716 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 716 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 716 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 716 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 716 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 716 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 804 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 716 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 804 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 716 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
24 | Correct | 1 ms | 716 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 716 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 716 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 844 KB | Correct answer: answer = 77137 |
28 | Correct | 6 ms | 3660 KB | Correct answer: answer = 764 |
29 | Correct | 1 ms | 844 KB | Correct answer: answer = 250000 |
30 | Correct | 11 ms | 8396 KB | Correct answer: answer = 500 |
31 | Correct | 1 ms | 716 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 804 KB | Correct answer: answer = 130050 |
33 | Correct | 2 ms | 1740 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 972 KB | Correct answer: answer = 2626 |
35 | Correct | 3 ms | 1612 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 1396 KB | Correct answer: answer = 7580 |
37 | Correct | 4 ms | 3276 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 844 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 972 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 1840 KB | Correct answer: answer = 4096 |
41 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 808 KB | Correct answer: answer = 1 |
43 | Correct | 8 ms | 3020 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 716 KB | Correct answer: answer = 2 |
45 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
46 | Correct | 1 ms | 716 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 716 KB | Correct answer: answer = 9 |
48 | Correct | 1 ms | 716 KB | Correct answer: answer = 21 |
49 | Correct | 1 ms | 716 KB | Correct answer: answer = 71 |
50 | Correct | 1 ms | 716 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 716 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 716 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 716 KB | Correct answer: answer = 997310 |
54 | Correct | 2 ms | 716 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 824 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 716 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 716 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 844 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 1228 KB | Correct answer: answer = 323501 |
60 | Correct | 4 ms | 2636 KB | Correct answer: answer = 752500 |
61 | Correct | 1 ms | 972 KB | Correct answer: answer = 761480 |
62 | Correct | 3 ms | 1996 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
64 | Correct | 12 ms | 8372 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 716 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 716 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 716 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 844 KB | Correct answer: answer = 59315 |
71 | Correct | 2 ms | 1356 KB | Correct answer: answer = 25454 |
72 | Correct | 3 ms | 2380 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 844 KB | Correct answer: answer = 37486 |
74 | Correct | 4 ms | 1868 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 844 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 972 KB | Correct answer: answer = 51860 |
77 | Correct | 1 ms | 844 KB | Correct answer: answer = 12985 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 716 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 716 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 716 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 716 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 716 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 716 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 716 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 716 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 804 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 716 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 804 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 716 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
24 | Correct | 1 ms | 716 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 716 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 716 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 844 KB | Correct answer: answer = 77137 |
28 | Correct | 6 ms | 3660 KB | Correct answer: answer = 764 |
29 | Correct | 1 ms | 844 KB | Correct answer: answer = 250000 |
30 | Correct | 11 ms | 8396 KB | Correct answer: answer = 500 |
31 | Correct | 1 ms | 716 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 804 KB | Correct answer: answer = 130050 |
33 | Correct | 2 ms | 1740 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 972 KB | Correct answer: answer = 2626 |
35 | Correct | 3 ms | 1612 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 1396 KB | Correct answer: answer = 7580 |
37 | Correct | 4 ms | 3276 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 844 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 972 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 1840 KB | Correct answer: answer = 4096 |
41 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 808 KB | Correct answer: answer = 1 |
43 | Correct | 8 ms | 3020 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 716 KB | Correct answer: answer = 2 |
45 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
46 | Correct | 1 ms | 716 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 716 KB | Correct answer: answer = 9 |
48 | Correct | 1 ms | 716 KB | Correct answer: answer = 21 |
49 | Correct | 1 ms | 716 KB | Correct answer: answer = 71 |
50 | Correct | 1 ms | 716 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 716 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 716 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 716 KB | Correct answer: answer = 997310 |
54 | Correct | 2 ms | 716 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 824 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 716 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 716 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 844 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 1228 KB | Correct answer: answer = 323501 |
60 | Correct | 4 ms | 2636 KB | Correct answer: answer = 752500 |
61 | Correct | 1 ms | 972 KB | Correct answer: answer = 761480 |
62 | Correct | 3 ms | 1996 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
64 | Correct | 12 ms | 8372 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 716 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 716 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 716 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 844 KB | Correct answer: answer = 59315 |
71 | Correct | 2 ms | 1356 KB | Correct answer: answer = 25454 |
72 | Correct | 3 ms | 2380 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 844 KB | Correct answer: answer = 37486 |
74 | Correct | 4 ms | 1868 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 844 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 972 KB | Correct answer: answer = 51860 |
77 | Correct | 1 ms | 844 KB | Correct answer: answer = 12985 |
78 | Correct | 3 ms | 844 KB | Correct answer: answer = 997864126212 |
79 | Correct | 3 ms | 844 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 884 KB | Correct answer: answer = 995265560477 |
81 | Correct | 3 ms | 1356 KB | Correct answer: answer = 10125000 |
82 | Correct | 4 ms | 2124 KB | Correct answer: answer = 2291668 |
83 | Correct | 19 ms | 8132 KB | Correct answer: answer = 42388 |
84 | Correct | 88 ms | 30676 KB | Correct answer: answer = 10318 |
85 | Correct | 268 ms | 92356 KB | Correct answer: answer = 3416 |
86 | Incorrect | 4 ms | 1228 KB | Wrong answer: output = 374657866841, expected = 331708193881 |
87 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 716 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 716 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 716 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 716 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 716 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 716 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 716 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 716 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 804 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 716 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 804 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 716 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
24 | Correct | 1 ms | 716 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 716 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 716 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 844 KB | Correct answer: answer = 77137 |
28 | Correct | 6 ms | 3660 KB | Correct answer: answer = 764 |
29 | Correct | 1 ms | 844 KB | Correct answer: answer = 250000 |
30 | Correct | 11 ms | 8396 KB | Correct answer: answer = 500 |
31 | Correct | 1 ms | 716 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 804 KB | Correct answer: answer = 130050 |
33 | Correct | 2 ms | 1740 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 972 KB | Correct answer: answer = 2626 |
35 | Correct | 3 ms | 1612 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 1396 KB | Correct answer: answer = 7580 |
37 | Correct | 4 ms | 3276 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 844 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 972 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 1840 KB | Correct answer: answer = 4096 |
41 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 808 KB | Correct answer: answer = 1 |
43 | Correct | 8 ms | 3020 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 716 KB | Correct answer: answer = 2 |
45 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
46 | Correct | 1 ms | 716 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 716 KB | Correct answer: answer = 9 |
48 | Correct | 1 ms | 716 KB | Correct answer: answer = 21 |
49 | Correct | 1 ms | 716 KB | Correct answer: answer = 71 |
50 | Correct | 1 ms | 716 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 716 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 716 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 716 KB | Correct answer: answer = 997310 |
54 | Correct | 2 ms | 716 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 824 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 716 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 716 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 844 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 1228 KB | Correct answer: answer = 323501 |
60 | Correct | 4 ms | 2636 KB | Correct answer: answer = 752500 |
61 | Correct | 1 ms | 972 KB | Correct answer: answer = 761480 |
62 | Correct | 3 ms | 1996 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
64 | Correct | 12 ms | 8372 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 716 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 716 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 716 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 844 KB | Correct answer: answer = 59315 |
71 | Correct | 2 ms | 1356 KB | Correct answer: answer = 25454 |
72 | Correct | 3 ms | 2380 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 844 KB | Correct answer: answer = 37486 |
74 | Correct | 4 ms | 1868 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 844 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 972 KB | Correct answer: answer = 51860 |
77 | Correct | 1 ms | 844 KB | Correct answer: answer = 12985 |
78 | Correct | 3 ms | 844 KB | Correct answer: answer = 997864126212 |
79 | Correct | 3 ms | 844 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 884 KB | Correct answer: answer = 995265560477 |
81 | Correct | 3 ms | 1356 KB | Correct answer: answer = 10125000 |
82 | Correct | 4 ms | 2124 KB | Correct answer: answer = 2291668 |
83 | Correct | 19 ms | 8132 KB | Correct answer: answer = 42388 |
84 | Correct | 88 ms | 30676 KB | Correct answer: answer = 10318 |
85 | Correct | 268 ms | 92356 KB | Correct answer: answer = 3416 |
86 | Incorrect | 4 ms | 1228 KB | Wrong answer: output = 374657866841, expected = 331708193881 |
87 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 716 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 716 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 716 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 716 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 716 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 716 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 716 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 716 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 804 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 716 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 844 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 804 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 716 KB | Correct answer: answer = 624 |
20 | Correct | 1 ms | 716 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
24 | Correct | 1 ms | 716 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 716 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 716 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 844 KB | Correct answer: answer = 77137 |
28 | Correct | 6 ms | 3660 KB | Correct answer: answer = 764 |
29 | Correct | 1 ms | 844 KB | Correct answer: answer = 250000 |
30 | Correct | 11 ms | 8396 KB | Correct answer: answer = 500 |
31 | Correct | 1 ms | 716 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 804 KB | Correct answer: answer = 130050 |
33 | Correct | 2 ms | 1740 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 972 KB | Correct answer: answer = 2626 |
35 | Correct | 3 ms | 1612 KB | Correct answer: answer = 796 |
36 | Correct | 3 ms | 1396 KB | Correct answer: answer = 7580 |
37 | Correct | 4 ms | 3276 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 844 KB | Correct answer: answer = 996004 |
39 | Correct | 2 ms | 972 KB | Correct answer: answer = 38817 |
40 | Correct | 3 ms | 1840 KB | Correct answer: answer = 4096 |
41 | Correct | 1 ms | 716 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 808 KB | Correct answer: answer = 1 |
43 | Correct | 8 ms | 3020 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 716 KB | Correct answer: answer = 2 |
45 | Correct | 1 ms | 716 KB | Correct answer: answer = 4 |
46 | Correct | 1 ms | 716 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 716 KB | Correct answer: answer = 9 |
48 | Correct | 1 ms | 716 KB | Correct answer: answer = 21 |
49 | Correct | 1 ms | 716 KB | Correct answer: answer = 71 |
50 | Correct | 1 ms | 716 KB | Correct answer: answer = 77 |
51 | Correct | 2 ms | 716 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 716 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 716 KB | Correct answer: answer = 997310 |
54 | Correct | 2 ms | 716 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 824 KB | Correct answer: answer = 996545 |
56 | Correct | 2 ms | 716 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 716 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 844 KB | Correct answer: answer = 63501 |
59 | Correct | 2 ms | 1228 KB | Correct answer: answer = 323501 |
60 | Correct | 4 ms | 2636 KB | Correct answer: answer = 752500 |
61 | Correct | 1 ms | 972 KB | Correct answer: answer = 761480 |
62 | Correct | 3 ms | 1996 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
64 | Correct | 12 ms | 8372 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
66 | Correct | 1 ms | 716 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 716 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 716 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 716 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 844 KB | Correct answer: answer = 59315 |
71 | Correct | 2 ms | 1356 KB | Correct answer: answer = 25454 |
72 | Correct | 3 ms | 2380 KB | Correct answer: answer = 1504 |
73 | Correct | 2 ms | 844 KB | Correct answer: answer = 37486 |
74 | Correct | 4 ms | 1868 KB | Correct answer: answer = 4284 |
75 | Correct | 2 ms | 844 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 972 KB | Correct answer: answer = 51860 |
77 | Correct | 1 ms | 844 KB | Correct answer: answer = 12985 |
78 | Correct | 3 ms | 844 KB | Correct answer: answer = 997864126212 |
79 | Correct | 3 ms | 844 KB | Correct answer: answer = 998608411647 |
80 | Correct | 3 ms | 884 KB | Correct answer: answer = 995265560477 |
81 | Correct | 3 ms | 1356 KB | Correct answer: answer = 10125000 |
82 | Correct | 4 ms | 2124 KB | Correct answer: answer = 2291668 |
83 | Correct | 19 ms | 8132 KB | Correct answer: answer = 42388 |
84 | Correct | 88 ms | 30676 KB | Correct answer: answer = 10318 |
85 | Correct | 268 ms | 92356 KB | Correct answer: answer = 3416 |
86 | Incorrect | 4 ms | 1228 KB | Wrong answer: output = 374657866841, expected = 331708193881 |
87 | Halted | 0 ms | 0 KB | - |