# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
492635 | 2021-12-08T09:13:48 Z | Lam_lai_cuoc_doi | Aliens (IOI16_aliens) | C++17 | 4 ms | 460 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]; int opt[N]; struct ConvexHullTrick { vector<ll> A, B; vector<int> line; vector<ld> point; ConvexHullTrick(int n = 0) { A.resize(n + 2, 0); B.resize(n + 2, 0); 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() > 1 || ((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]; } pair<ll, int> 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), opt[line[j - 1]] + 1}; } }; pair<ll, ll> Cal(ll cost) { ConvexHullTrick f(n); opt[0] = f.A[0] = 0; f.B[0] = cost; f.Add(0); for (int i = 1; i <= n; ++i) { pair<ll, int> v = f.Get(i); opt[i] = v.second; f.A[i] = -cnt[i]; f.B[i] = v.first - sum[i] + cost; f.Add(i); if (i == n) return {v.second, v.first - v.second * cost}; } return {0, 0}; } 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(); k = min(k, n); 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] += -1ll * (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); ll l = 1, mid, h = m * m; while (l <= h) { mid = (l + h) / 2; if (Cal(mid).first >= k) l = mid + 1; else h = mid - 1; } // cout << h << '\n'; pair<ll, ll> u = Cal(h); if (h == m * m) return u.second + temp; pair<ll, ll> v = Cal(l); if (v.first == u.first) return u.second + temp; ll a1 = k - u.first - k + v.first, b1 = (k - u.first) * (-v.second) + (k - v.first) * u.second; ans = -b1 / a1; 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 | 296 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 204 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 276 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 276 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 292 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 296 KB | Correct answer: answer = 1 |
2 | Correct | 1 ms | 284 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 292 KB | Correct answer: answer = 1 |
4 | Correct | 0 ms | 288 KB | Correct answer: answer = 5 |
5 | Correct | 1 ms | 204 KB | Correct answer: answer = 41 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 71923 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 77137 |
8 | Correct | 1 ms | 332 KB | Correct answer: answer = 764 |
9 | Correct | 2 ms | 332 KB | Correct answer: answer = 250000 |
10 | Correct | 1 ms | 332 KB | Correct answer: answer = 500 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 32 |
12 | Correct | 1 ms | 332 KB | Correct answer: answer = 130050 |
13 | Correct | 1 ms | 332 KB | Correct answer: answer = 5110 |
14 | Correct | 1 ms | 332 KB | Correct answer: answer = 2626 |
15 | Correct | 1 ms | 332 KB | Correct answer: answer = 796 |
16 | Correct | 2 ms | 352 KB | Correct answer: answer = 7580 |
17 | Correct | 1 ms | 332 KB | Correct answer: answer = 1904 |
18 | Correct | 1 ms | 332 KB | Correct answer: answer = 996004 |
19 | Correct | 1 ms | 332 KB | Correct answer: answer = 38817 |
20 | Correct | 1 ms | 340 KB | Correct answer: answer = 4096 |
21 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 332 KB | Correct answer: answer = 1 |
23 | Correct | 1 ms | 332 KB | Correct answer: answer = 2040 |
24 | Correct | 1 ms | 332 KB | Correct answer: answer = 2 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 296 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 204 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 276 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 276 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 292 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 296 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 284 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 292 KB | Correct answer: answer = 1 |
24 | Correct | 0 ms | 288 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 204 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 204 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 204 KB | Correct answer: answer = 77137 |
28 | Correct | 1 ms | 332 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 332 KB | Correct answer: answer = 250000 |
30 | Correct | 1 ms | 332 KB | Correct answer: answer = 500 |
31 | Correct | 1 ms | 204 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 332 KB | Correct answer: answer = 130050 |
33 | Correct | 1 ms | 332 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 332 KB | Correct answer: answer = 2626 |
35 | Correct | 1 ms | 332 KB | Correct answer: answer = 796 |
36 | Correct | 2 ms | 352 KB | Correct answer: answer = 7580 |
37 | Correct | 1 ms | 332 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 332 KB | Correct answer: answer = 996004 |
39 | Correct | 1 ms | 332 KB | Correct answer: answer = 38817 |
40 | Correct | 1 ms | 340 KB | Correct answer: answer = 4096 |
41 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 332 KB | Correct answer: answer = 1 |
43 | Correct | 1 ms | 332 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 332 KB | Correct answer: answer = 2 |
45 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
46 | Correct | 1 ms | 204 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 204 KB | Correct answer: answer = 9 |
48 | Correct | 0 ms | 204 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 304 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 204 KB | Correct answer: answer = 77 |
51 | Correct | 1 ms | 204 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 332 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 204 KB | Correct answer: answer = 997310 |
54 | Correct | 0 ms | 204 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 332 KB | Correct answer: answer = 996545 |
56 | Correct | 1 ms | 204 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 204 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 332 KB | Correct answer: answer = 63501 |
59 | Correct | 1 ms | 332 KB | Correct answer: answer = 323501 |
60 | Correct | 1 ms | 332 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 332 KB | Correct answer: answer = 761480 |
62 | Correct | 1 ms | 332 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 204 KB | Correct answer: answer = 1000000 |
64 | Correct | 1 ms | 332 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 332 KB | Correct answer: answer = 1000000 |
66 | Correct | 0 ms | 332 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 332 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 332 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 204 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 332 KB | Correct answer: answer = 59315 |
71 | Correct | 1 ms | 332 KB | Correct answer: answer = 25454 |
72 | Correct | 1 ms | 332 KB | Correct answer: answer = 1504 |
73 | Correct | 1 ms | 204 KB | Correct answer: answer = 37486 |
74 | Correct | 1 ms | 332 KB | Correct answer: answer = 4284 |
75 | Correct | 1 ms | 316 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 332 KB | Correct answer: answer = 51860 |
77 | Correct | 0 ms | 332 KB | Correct answer: answer = 12985 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 296 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 204 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 276 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 276 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 292 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 296 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 284 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 292 KB | Correct answer: answer = 1 |
24 | Correct | 0 ms | 288 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 204 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 204 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 204 KB | Correct answer: answer = 77137 |
28 | Correct | 1 ms | 332 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 332 KB | Correct answer: answer = 250000 |
30 | Correct | 1 ms | 332 KB | Correct answer: answer = 500 |
31 | Correct | 1 ms | 204 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 332 KB | Correct answer: answer = 130050 |
33 | Correct | 1 ms | 332 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 332 KB | Correct answer: answer = 2626 |
35 | Correct | 1 ms | 332 KB | Correct answer: answer = 796 |
36 | Correct | 2 ms | 352 KB | Correct answer: answer = 7580 |
37 | Correct | 1 ms | 332 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 332 KB | Correct answer: answer = 996004 |
39 | Correct | 1 ms | 332 KB | Correct answer: answer = 38817 |
40 | Correct | 1 ms | 340 KB | Correct answer: answer = 4096 |
41 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 332 KB | Correct answer: answer = 1 |
43 | Correct | 1 ms | 332 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 332 KB | Correct answer: answer = 2 |
45 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
46 | Correct | 1 ms | 204 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 204 KB | Correct answer: answer = 9 |
48 | Correct | 0 ms | 204 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 304 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 204 KB | Correct answer: answer = 77 |
51 | Correct | 1 ms | 204 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 332 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 204 KB | Correct answer: answer = 997310 |
54 | Correct | 0 ms | 204 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 332 KB | Correct answer: answer = 996545 |
56 | Correct | 1 ms | 204 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 204 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 332 KB | Correct answer: answer = 63501 |
59 | Correct | 1 ms | 332 KB | Correct answer: answer = 323501 |
60 | Correct | 1 ms | 332 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 332 KB | Correct answer: answer = 761480 |
62 | Correct | 1 ms | 332 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 204 KB | Correct answer: answer = 1000000 |
64 | Correct | 1 ms | 332 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 332 KB | Correct answer: answer = 1000000 |
66 | Correct | 0 ms | 332 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 332 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 332 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 204 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 332 KB | Correct answer: answer = 59315 |
71 | Correct | 1 ms | 332 KB | Correct answer: answer = 25454 |
72 | Correct | 1 ms | 332 KB | Correct answer: answer = 1504 |
73 | Correct | 1 ms | 204 KB | Correct answer: answer = 37486 |
74 | Correct | 1 ms | 332 KB | Correct answer: answer = 4284 |
75 | Correct | 1 ms | 316 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 332 KB | Correct answer: answer = 51860 |
77 | Correct | 0 ms | 332 KB | Correct answer: answer = 12985 |
78 | Incorrect | 4 ms | 460 KB | Wrong answer: output = 997709055044, expected = 997864126212 |
79 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 296 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 204 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 276 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 276 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 292 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 296 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 284 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 292 KB | Correct answer: answer = 1 |
24 | Correct | 0 ms | 288 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 204 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 204 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 204 KB | Correct answer: answer = 77137 |
28 | Correct | 1 ms | 332 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 332 KB | Correct answer: answer = 250000 |
30 | Correct | 1 ms | 332 KB | Correct answer: answer = 500 |
31 | Correct | 1 ms | 204 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 332 KB | Correct answer: answer = 130050 |
33 | Correct | 1 ms | 332 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 332 KB | Correct answer: answer = 2626 |
35 | Correct | 1 ms | 332 KB | Correct answer: answer = 796 |
36 | Correct | 2 ms | 352 KB | Correct answer: answer = 7580 |
37 | Correct | 1 ms | 332 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 332 KB | Correct answer: answer = 996004 |
39 | Correct | 1 ms | 332 KB | Correct answer: answer = 38817 |
40 | Correct | 1 ms | 340 KB | Correct answer: answer = 4096 |
41 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 332 KB | Correct answer: answer = 1 |
43 | Correct | 1 ms | 332 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 332 KB | Correct answer: answer = 2 |
45 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
46 | Correct | 1 ms | 204 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 204 KB | Correct answer: answer = 9 |
48 | Correct | 0 ms | 204 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 304 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 204 KB | Correct answer: answer = 77 |
51 | Correct | 1 ms | 204 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 332 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 204 KB | Correct answer: answer = 997310 |
54 | Correct | 0 ms | 204 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 332 KB | Correct answer: answer = 996545 |
56 | Correct | 1 ms | 204 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 204 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 332 KB | Correct answer: answer = 63501 |
59 | Correct | 1 ms | 332 KB | Correct answer: answer = 323501 |
60 | Correct | 1 ms | 332 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 332 KB | Correct answer: answer = 761480 |
62 | Correct | 1 ms | 332 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 204 KB | Correct answer: answer = 1000000 |
64 | Correct | 1 ms | 332 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 332 KB | Correct answer: answer = 1000000 |
66 | Correct | 0 ms | 332 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 332 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 332 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 204 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 332 KB | Correct answer: answer = 59315 |
71 | Correct | 1 ms | 332 KB | Correct answer: answer = 25454 |
72 | Correct | 1 ms | 332 KB | Correct answer: answer = 1504 |
73 | Correct | 1 ms | 204 KB | Correct answer: answer = 37486 |
74 | Correct | 1 ms | 332 KB | Correct answer: answer = 4284 |
75 | Correct | 1 ms | 316 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 332 KB | Correct answer: answer = 51860 |
77 | Correct | 0 ms | 332 KB | Correct answer: answer = 12985 |
78 | Incorrect | 4 ms | 460 KB | Wrong answer: output = 997709055044, expected = 997864126212 |
79 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 296 KB | Correct answer: answer = 4 |
2 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 0 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 0 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 0 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 0 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 0 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 0 ms | 204 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 0 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 276 KB | Correct answer: answer = 7550 |
17 | Correct | 1 ms | 276 KB | Correct answer: answer = 10000 |
18 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 292 KB | Correct answer: answer = 624 |
20 | Correct | 0 ms | 204 KB | Correct answer: answer = 10000 |
21 | Correct | 0 ms | 296 KB | Correct answer: answer = 1 |
22 | Correct | 1 ms | 284 KB | Correct answer: answer = 4 |
23 | Correct | 1 ms | 292 KB | Correct answer: answer = 1 |
24 | Correct | 0 ms | 288 KB | Correct answer: answer = 5 |
25 | Correct | 1 ms | 204 KB | Correct answer: answer = 41 |
26 | Correct | 1 ms | 204 KB | Correct answer: answer = 71923 |
27 | Correct | 1 ms | 204 KB | Correct answer: answer = 77137 |
28 | Correct | 1 ms | 332 KB | Correct answer: answer = 764 |
29 | Correct | 2 ms | 332 KB | Correct answer: answer = 250000 |
30 | Correct | 1 ms | 332 KB | Correct answer: answer = 500 |
31 | Correct | 1 ms | 204 KB | Correct answer: answer = 32 |
32 | Correct | 1 ms | 332 KB | Correct answer: answer = 130050 |
33 | Correct | 1 ms | 332 KB | Correct answer: answer = 5110 |
34 | Correct | 1 ms | 332 KB | Correct answer: answer = 2626 |
35 | Correct | 1 ms | 332 KB | Correct answer: answer = 796 |
36 | Correct | 2 ms | 352 KB | Correct answer: answer = 7580 |
37 | Correct | 1 ms | 332 KB | Correct answer: answer = 1904 |
38 | Correct | 1 ms | 332 KB | Correct answer: answer = 996004 |
39 | Correct | 1 ms | 332 KB | Correct answer: answer = 38817 |
40 | Correct | 1 ms | 340 KB | Correct answer: answer = 4096 |
41 | Correct | 0 ms | 204 KB | Correct answer: answer = 1 |
42 | Correct | 1 ms | 332 KB | Correct answer: answer = 1 |
43 | Correct | 1 ms | 332 KB | Correct answer: answer = 2040 |
44 | Correct | 1 ms | 332 KB | Correct answer: answer = 2 |
45 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
46 | Correct | 1 ms | 204 KB | Correct answer: answer = 9 |
47 | Correct | 1 ms | 204 KB | Correct answer: answer = 9 |
48 | Correct | 0 ms | 204 KB | Correct answer: answer = 21 |
49 | Correct | 0 ms | 304 KB | Correct answer: answer = 71 |
50 | Correct | 0 ms | 204 KB | Correct answer: answer = 77 |
51 | Correct | 1 ms | 204 KB | Correct answer: answer = 400 |
52 | Correct | 1 ms | 332 KB | Correct answer: answer = 996004 |
53 | Correct | 1 ms | 204 KB | Correct answer: answer = 997310 |
54 | Correct | 0 ms | 204 KB | Correct answer: answer = 990781 |
55 | Correct | 1 ms | 332 KB | Correct answer: answer = 996545 |
56 | Correct | 1 ms | 204 KB | Correct answer: answer = 484 |
57 | Correct | 1 ms | 204 KB | Correct answer: answer = 484 |
58 | Correct | 1 ms | 332 KB | Correct answer: answer = 63501 |
59 | Correct | 1 ms | 332 KB | Correct answer: answer = 323501 |
60 | Correct | 1 ms | 332 KB | Correct answer: answer = 752500 |
61 | Correct | 2 ms | 332 KB | Correct answer: answer = 761480 |
62 | Correct | 1 ms | 332 KB | Correct answer: answer = 758932 |
63 | Correct | 1 ms | 204 KB | Correct answer: answer = 1000000 |
64 | Correct | 1 ms | 332 KB | Correct answer: answer = 750500 |
65 | Correct | 1 ms | 332 KB | Correct answer: answer = 1000000 |
66 | Correct | 0 ms | 332 KB | Correct answer: answer = 250000 |
67 | Correct | 1 ms | 332 KB | Correct answer: answer = 250000 |
68 | Correct | 1 ms | 332 KB | Correct answer: answer = 1000000 |
69 | Correct | 1 ms | 204 KB | Correct answer: answer = 994009 |
70 | Correct | 1 ms | 332 KB | Correct answer: answer = 59315 |
71 | Correct | 1 ms | 332 KB | Correct answer: answer = 25454 |
72 | Correct | 1 ms | 332 KB | Correct answer: answer = 1504 |
73 | Correct | 1 ms | 204 KB | Correct answer: answer = 37486 |
74 | Correct | 1 ms | 332 KB | Correct answer: answer = 4284 |
75 | Correct | 1 ms | 316 KB | Correct answer: answer = 158008 |
76 | Correct | 1 ms | 332 KB | Correct answer: answer = 51860 |
77 | Correct | 0 ms | 332 KB | Correct answer: answer = 12985 |
78 | Incorrect | 4 ms | 460 KB | Wrong answer: output = 997709055044, expected = 997864126212 |
79 | Halted | 0 ms | 0 KB | - |