# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
393937 |
2021-04-25T01:21:23 Z |
KoD |
Duathlon (APIO18_duathlon) |
C++17 |
|
141 ms |
30492 KB |
#include <bits/stdc++.h>
using i32 = std::int32_t;
using u32 = std::uint32_t;
using i64 = std::int64_t;
using u64 = std::uint64_t;
using i128 = __int128_t;
using u128 = __uint128_t;
using isize = std::ptrdiff_t;
using usize = std::size_t;
class rep {
struct Iter {
usize itr;
constexpr Iter(const usize pos) noexcept : itr(pos) {}
constexpr void operator++() noexcept { ++itr; }
constexpr bool operator!=(const Iter& other) const noexcept {
return itr != other.itr;
}
constexpr usize operator*() const noexcept { return itr; }
};
const Iter first, last;
public:
explicit constexpr rep(const usize first, const usize last) noexcept
: first(first), last(std::max(first, last)) {}
constexpr Iter begin() const noexcept { return first; }
constexpr Iter end() const noexcept { return last; }
};
template <class F> struct RecLambda : private F {
template <class G>
explicit constexpr RecLambda(G&& g) : F(std::forward<G>(g)) {}
template <class... Args>
constexpr decltype(auto) operator()(Args&&... args) const {
return F::operator()(*this, std::forward<Args>(args)...);
}
};
template <class G> explicit RecLambda(G&&) -> RecLambda<std::decay_t<G>>;
template <class T> bool setmin(T& lhs, const T& rhs) {
if (lhs > rhs) {
lhs = rhs;
return true;
}
return false;
}
template <class T> using Vec = std::vector<T>;
void APIO18A_main() {
usize N, M;
std::cin >> N >> M;
Vec<Vec<usize>> graph(N);
while (M--) {
usize a, b;
std::cin >> a >> b;
a -= 1;
b -= 1;
graph[a].push_back(b);
graph[b].push_back(a);
}
Vec<Vec<usize>> bctree(N);
const auto add_node = [&] {
const auto ret = bctree.size();
bctree.push_back({});
return ret;
};
Vec<usize> depth(N), ord(N), low(N);
usize time = 0;
std::stack<usize> store;
const auto dfs = RecLambda(
[&](auto&& dfs, const usize u, const usize p, const usize d) -> void {
depth[u] = d;
ord[u] = low[u] = time;
time += 1;
store.push(u);
for (const auto v : graph[u])
if (v != p) {
if (depth[v] == 0) {
dfs(v, u, d + 1);
if (ord[u] <= low[v]) {
const auto node = add_node();
bctree[u].push_back(node);
while (bctree[node].empty() or
bctree[node].back() != v) {
bctree[node].push_back(store.top());
store.pop();
}
}
setmin(low[u], low[v]);
} else {
setmin(low[u], ord[v]);
}
}
});
Vec<usize> roots;
for (const auto root : rep(0, N)) {
if (depth[root] == 0) {
dfs(root, root, 1);
roots.push_back(root);
}
}
Vec<usize> subtree(bctree.size());
u64 ans = 0;
usize whole = 0;
const auto calc = RecLambda([&](auto&& dfs, const usize u) -> void {
subtree[u] = (u < N);
for (const auto v : bctree[u]) {
dfs(v);
subtree[u] += subtree[v];
if (u >= N) {
ans -= (u64)bctree[u].size() * subtree[v] * (subtree[v] - 1);
}
}
});
const auto flush = RecLambda([&](auto&& dfs, const usize u) -> void {
if (u >= N) {
ans -= (u64)bctree[u].size() * (whole - subtree[u]) *
(whole - subtree[u] - 1);
}
for (const auto v : bctree[u]) {
dfs(v);
}
});
for (const auto root : roots) {
calc(root);
whole = subtree[root];
ans += (u64)whole * (whole - 1) * (whole - 2);
flush(root);
}
std::cout << ans << '\n';
}
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
APIO18A_main();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
316 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
1 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
328 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
1 ms |
204 KB |
Output is correct |
16 |
Correct |
1 ms |
208 KB |
Output is correct |
17 |
Correct |
1 ms |
320 KB |
Output is correct |
18 |
Correct |
1 ms |
316 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
204 KB |
Output is correct |
23 |
Correct |
1 ms |
204 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
1 ms |
204 KB |
Output is correct |
26 |
Correct |
1 ms |
204 KB |
Output is correct |
27 |
Correct |
1 ms |
208 KB |
Output is correct |
28 |
Correct |
1 ms |
316 KB |
Output is correct |
29 |
Correct |
1 ms |
204 KB |
Output is correct |
30 |
Correct |
1 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
316 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
1 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
328 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
1 ms |
204 KB |
Output is correct |
16 |
Correct |
1 ms |
208 KB |
Output is correct |
17 |
Correct |
1 ms |
320 KB |
Output is correct |
18 |
Correct |
1 ms |
316 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
204 KB |
Output is correct |
23 |
Correct |
1 ms |
204 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
1 ms |
204 KB |
Output is correct |
26 |
Correct |
1 ms |
204 KB |
Output is correct |
27 |
Correct |
1 ms |
208 KB |
Output is correct |
28 |
Correct |
1 ms |
316 KB |
Output is correct |
29 |
Correct |
1 ms |
204 KB |
Output is correct |
30 |
Correct |
1 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
1 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
204 KB |
Output is correct |
39 |
Correct |
1 ms |
204 KB |
Output is correct |
40 |
Correct |
1 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
312 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
1 ms |
204 KB |
Output is correct |
44 |
Correct |
1 ms |
276 KB |
Output is correct |
45 |
Correct |
1 ms |
312 KB |
Output is correct |
46 |
Correct |
1 ms |
204 KB |
Output is correct |
47 |
Correct |
1 ms |
204 KB |
Output is correct |
48 |
Correct |
1 ms |
308 KB |
Output is correct |
49 |
Correct |
1 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
204 KB |
Output is correct |
52 |
Correct |
1 ms |
204 KB |
Output is correct |
53 |
Correct |
1 ms |
316 KB |
Output is correct |
54 |
Correct |
1 ms |
332 KB |
Output is correct |
55 |
Correct |
1 ms |
204 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
1 ms |
204 KB |
Output is correct |
58 |
Correct |
1 ms |
204 KB |
Output is correct |
59 |
Correct |
1 ms |
204 KB |
Output is correct |
60 |
Correct |
1 ms |
316 KB |
Output is correct |
61 |
Correct |
1 ms |
204 KB |
Output is correct |
62 |
Correct |
1 ms |
204 KB |
Output is correct |
63 |
Correct |
1 ms |
204 KB |
Output is correct |
64 |
Correct |
1 ms |
204 KB |
Output is correct |
65 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
88 ms |
26356 KB |
Output is correct |
2 |
Correct |
83 ms |
27380 KB |
Output is correct |
3 |
Correct |
107 ms |
24068 KB |
Output is correct |
4 |
Correct |
96 ms |
25436 KB |
Output is correct |
5 |
Correct |
92 ms |
20384 KB |
Output is correct |
6 |
Correct |
106 ms |
23468 KB |
Output is correct |
7 |
Correct |
118 ms |
21912 KB |
Output is correct |
8 |
Correct |
107 ms |
22504 KB |
Output is correct |
9 |
Correct |
101 ms |
20064 KB |
Output is correct |
10 |
Correct |
105 ms |
20004 KB |
Output is correct |
11 |
Correct |
83 ms |
17264 KB |
Output is correct |
12 |
Correct |
78 ms |
17180 KB |
Output is correct |
13 |
Correct |
76 ms |
17256 KB |
Output is correct |
14 |
Correct |
71 ms |
17064 KB |
Output is correct |
15 |
Correct |
56 ms |
15916 KB |
Output is correct |
16 |
Correct |
56 ms |
15644 KB |
Output is correct |
17 |
Correct |
10 ms |
10020 KB |
Output is correct |
18 |
Correct |
10 ms |
10020 KB |
Output is correct |
19 |
Correct |
10 ms |
9936 KB |
Output is correct |
20 |
Correct |
10 ms |
10012 KB |
Output is correct |
21 |
Correct |
10 ms |
10020 KB |
Output is correct |
22 |
Correct |
10 ms |
10020 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
460 KB |
Output is correct |
2 |
Correct |
1 ms |
460 KB |
Output is correct |
3 |
Correct |
1 ms |
460 KB |
Output is correct |
4 |
Correct |
2 ms |
588 KB |
Output is correct |
5 |
Correct |
1 ms |
588 KB |
Output is correct |
6 |
Correct |
3 ms |
588 KB |
Output is correct |
7 |
Correct |
1 ms |
580 KB |
Output is correct |
8 |
Correct |
1 ms |
580 KB |
Output is correct |
9 |
Correct |
1 ms |
460 KB |
Output is correct |
10 |
Correct |
1 ms |
460 KB |
Output is correct |
11 |
Correct |
1 ms |
460 KB |
Output is correct |
12 |
Correct |
1 ms |
460 KB |
Output is correct |
13 |
Correct |
1 ms |
460 KB |
Output is correct |
14 |
Correct |
1 ms |
460 KB |
Output is correct |
15 |
Correct |
1 ms |
444 KB |
Output is correct |
16 |
Correct |
1 ms |
460 KB |
Output is correct |
17 |
Correct |
1 ms |
460 KB |
Output is correct |
18 |
Correct |
1 ms |
460 KB |
Output is correct |
19 |
Correct |
1 ms |
460 KB |
Output is correct |
20 |
Correct |
1 ms |
460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
102 ms |
20276 KB |
Output is correct |
2 |
Correct |
109 ms |
21204 KB |
Output is correct |
3 |
Correct |
105 ms |
21224 KB |
Output is correct |
4 |
Correct |
103 ms |
21212 KB |
Output is correct |
5 |
Correct |
108 ms |
21292 KB |
Output is correct |
6 |
Correct |
129 ms |
30492 KB |
Output is correct |
7 |
Correct |
129 ms |
27140 KB |
Output is correct |
8 |
Correct |
118 ms |
25608 KB |
Output is correct |
9 |
Correct |
110 ms |
24188 KB |
Output is correct |
10 |
Correct |
95 ms |
21176 KB |
Output is correct |
11 |
Correct |
101 ms |
21272 KB |
Output is correct |
12 |
Correct |
98 ms |
21164 KB |
Output is correct |
13 |
Correct |
104 ms |
21148 KB |
Output is correct |
14 |
Correct |
90 ms |
20404 KB |
Output is correct |
15 |
Correct |
79 ms |
19440 KB |
Output is correct |
16 |
Correct |
50 ms |
16364 KB |
Output is correct |
17 |
Correct |
66 ms |
20284 KB |
Output is correct |
18 |
Correct |
67 ms |
20376 KB |
Output is correct |
19 |
Correct |
60 ms |
20740 KB |
Output is correct |
20 |
Correct |
69 ms |
20352 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
460 KB |
Output is correct |
2 |
Correct |
1 ms |
460 KB |
Output is correct |
3 |
Correct |
1 ms |
460 KB |
Output is correct |
4 |
Correct |
1 ms |
460 KB |
Output is correct |
5 |
Correct |
1 ms |
460 KB |
Output is correct |
6 |
Correct |
1 ms |
460 KB |
Output is correct |
7 |
Correct |
1 ms |
460 KB |
Output is correct |
8 |
Correct |
1 ms |
460 KB |
Output is correct |
9 |
Correct |
1 ms |
460 KB |
Output is correct |
10 |
Correct |
1 ms |
452 KB |
Output is correct |
11 |
Correct |
1 ms |
460 KB |
Output is correct |
12 |
Correct |
1 ms |
460 KB |
Output is correct |
13 |
Correct |
1 ms |
460 KB |
Output is correct |
14 |
Correct |
1 ms |
460 KB |
Output is correct |
15 |
Correct |
1 ms |
460 KB |
Output is correct |
16 |
Correct |
1 ms |
460 KB |
Output is correct |
17 |
Correct |
1 ms |
460 KB |
Output is correct |
18 |
Correct |
1 ms |
460 KB |
Output is correct |
19 |
Correct |
1 ms |
460 KB |
Output is correct |
20 |
Correct |
1 ms |
460 KB |
Output is correct |
21 |
Correct |
1 ms |
460 KB |
Output is correct |
22 |
Correct |
1 ms |
452 KB |
Output is correct |
23 |
Correct |
1 ms |
460 KB |
Output is correct |
24 |
Correct |
1 ms |
460 KB |
Output is correct |
25 |
Correct |
1 ms |
444 KB |
Output is correct |
26 |
Correct |
1 ms |
332 KB |
Output is correct |
27 |
Correct |
1 ms |
332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
100 ms |
20284 KB |
Output is correct |
2 |
Correct |
119 ms |
21380 KB |
Output is correct |
3 |
Correct |
123 ms |
20504 KB |
Output is correct |
4 |
Correct |
108 ms |
18844 KB |
Output is correct |
5 |
Correct |
94 ms |
16744 KB |
Output is correct |
6 |
Correct |
86 ms |
15844 KB |
Output is correct |
7 |
Correct |
90 ms |
15552 KB |
Output is correct |
8 |
Correct |
93 ms |
14748 KB |
Output is correct |
9 |
Correct |
83 ms |
14636 KB |
Output is correct |
10 |
Correct |
101 ms |
14404 KB |
Output is correct |
11 |
Correct |
68 ms |
14148 KB |
Output is correct |
12 |
Correct |
65 ms |
14088 KB |
Output is correct |
13 |
Correct |
72 ms |
14148 KB |
Output is correct |
14 |
Correct |
73 ms |
17140 KB |
Output is correct |
15 |
Correct |
120 ms |
26652 KB |
Output is correct |
16 |
Correct |
116 ms |
24472 KB |
Output is correct |
17 |
Correct |
124 ms |
24860 KB |
Output is correct |
18 |
Correct |
115 ms |
23000 KB |
Output is correct |
19 |
Correct |
107 ms |
18952 KB |
Output is correct |
20 |
Correct |
111 ms |
18824 KB |
Output is correct |
21 |
Correct |
103 ms |
18844 KB |
Output is correct |
22 |
Correct |
86 ms |
17820 KB |
Output is correct |
23 |
Correct |
85 ms |
16856 KB |
Output is correct |
24 |
Correct |
87 ms |
19972 KB |
Output is correct |
25 |
Correct |
93 ms |
20140 KB |
Output is correct |
26 |
Correct |
90 ms |
19188 KB |
Output is correct |
27 |
Correct |
92 ms |
19120 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
316 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
1 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
328 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
1 ms |
204 KB |
Output is correct |
16 |
Correct |
1 ms |
208 KB |
Output is correct |
17 |
Correct |
1 ms |
320 KB |
Output is correct |
18 |
Correct |
1 ms |
316 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
204 KB |
Output is correct |
23 |
Correct |
1 ms |
204 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
1 ms |
204 KB |
Output is correct |
26 |
Correct |
1 ms |
204 KB |
Output is correct |
27 |
Correct |
1 ms |
208 KB |
Output is correct |
28 |
Correct |
1 ms |
316 KB |
Output is correct |
29 |
Correct |
1 ms |
204 KB |
Output is correct |
30 |
Correct |
1 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
1 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
204 KB |
Output is correct |
39 |
Correct |
1 ms |
204 KB |
Output is correct |
40 |
Correct |
1 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
312 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
1 ms |
204 KB |
Output is correct |
44 |
Correct |
1 ms |
276 KB |
Output is correct |
45 |
Correct |
1 ms |
312 KB |
Output is correct |
46 |
Correct |
1 ms |
204 KB |
Output is correct |
47 |
Correct |
1 ms |
204 KB |
Output is correct |
48 |
Correct |
1 ms |
308 KB |
Output is correct |
49 |
Correct |
1 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
204 KB |
Output is correct |
52 |
Correct |
1 ms |
204 KB |
Output is correct |
53 |
Correct |
1 ms |
316 KB |
Output is correct |
54 |
Correct |
1 ms |
332 KB |
Output is correct |
55 |
Correct |
1 ms |
204 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
1 ms |
204 KB |
Output is correct |
58 |
Correct |
1 ms |
204 KB |
Output is correct |
59 |
Correct |
1 ms |
204 KB |
Output is correct |
60 |
Correct |
1 ms |
316 KB |
Output is correct |
61 |
Correct |
1 ms |
204 KB |
Output is correct |
62 |
Correct |
1 ms |
204 KB |
Output is correct |
63 |
Correct |
1 ms |
204 KB |
Output is correct |
64 |
Correct |
1 ms |
204 KB |
Output is correct |
65 |
Correct |
1 ms |
204 KB |
Output is correct |
66 |
Correct |
1 ms |
332 KB |
Output is correct |
67 |
Correct |
1 ms |
460 KB |
Output is correct |
68 |
Correct |
1 ms |
460 KB |
Output is correct |
69 |
Correct |
1 ms |
460 KB |
Output is correct |
70 |
Correct |
2 ms |
464 KB |
Output is correct |
71 |
Correct |
1 ms |
460 KB |
Output is correct |
72 |
Correct |
1 ms |
460 KB |
Output is correct |
73 |
Correct |
1 ms |
460 KB |
Output is correct |
74 |
Correct |
1 ms |
460 KB |
Output is correct |
75 |
Correct |
1 ms |
460 KB |
Output is correct |
76 |
Correct |
1 ms |
332 KB |
Output is correct |
77 |
Correct |
1 ms |
460 KB |
Output is correct |
78 |
Correct |
1 ms |
460 KB |
Output is correct |
79 |
Correct |
1 ms |
460 KB |
Output is correct |
80 |
Correct |
1 ms |
460 KB |
Output is correct |
81 |
Correct |
1 ms |
460 KB |
Output is correct |
82 |
Correct |
1 ms |
460 KB |
Output is correct |
83 |
Correct |
1 ms |
460 KB |
Output is correct |
84 |
Correct |
1 ms |
460 KB |
Output is correct |
85 |
Correct |
1 ms |
460 KB |
Output is correct |
86 |
Correct |
1 ms |
460 KB |
Output is correct |
87 |
Correct |
1 ms |
460 KB |
Output is correct |
88 |
Correct |
1 ms |
460 KB |
Output is correct |
89 |
Correct |
1 ms |
464 KB |
Output is correct |
90 |
Correct |
1 ms |
460 KB |
Output is correct |
91 |
Correct |
1 ms |
460 KB |
Output is correct |
92 |
Correct |
1 ms |
460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
316 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
1 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
328 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
1 ms |
204 KB |
Output is correct |
16 |
Correct |
1 ms |
208 KB |
Output is correct |
17 |
Correct |
1 ms |
320 KB |
Output is correct |
18 |
Correct |
1 ms |
316 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
204 KB |
Output is correct |
22 |
Correct |
1 ms |
204 KB |
Output is correct |
23 |
Correct |
1 ms |
204 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
1 ms |
204 KB |
Output is correct |
26 |
Correct |
1 ms |
204 KB |
Output is correct |
27 |
Correct |
1 ms |
208 KB |
Output is correct |
28 |
Correct |
1 ms |
316 KB |
Output is correct |
29 |
Correct |
1 ms |
204 KB |
Output is correct |
30 |
Correct |
1 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
204 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
1 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
204 KB |
Output is correct |
39 |
Correct |
1 ms |
204 KB |
Output is correct |
40 |
Correct |
1 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
312 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
1 ms |
204 KB |
Output is correct |
44 |
Correct |
1 ms |
276 KB |
Output is correct |
45 |
Correct |
1 ms |
312 KB |
Output is correct |
46 |
Correct |
1 ms |
204 KB |
Output is correct |
47 |
Correct |
1 ms |
204 KB |
Output is correct |
48 |
Correct |
1 ms |
308 KB |
Output is correct |
49 |
Correct |
1 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
204 KB |
Output is correct |
52 |
Correct |
1 ms |
204 KB |
Output is correct |
53 |
Correct |
1 ms |
316 KB |
Output is correct |
54 |
Correct |
1 ms |
332 KB |
Output is correct |
55 |
Correct |
1 ms |
204 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
1 ms |
204 KB |
Output is correct |
58 |
Correct |
1 ms |
204 KB |
Output is correct |
59 |
Correct |
1 ms |
204 KB |
Output is correct |
60 |
Correct |
1 ms |
316 KB |
Output is correct |
61 |
Correct |
1 ms |
204 KB |
Output is correct |
62 |
Correct |
1 ms |
204 KB |
Output is correct |
63 |
Correct |
1 ms |
204 KB |
Output is correct |
64 |
Correct |
1 ms |
204 KB |
Output is correct |
65 |
Correct |
1 ms |
204 KB |
Output is correct |
66 |
Correct |
88 ms |
26356 KB |
Output is correct |
67 |
Correct |
83 ms |
27380 KB |
Output is correct |
68 |
Correct |
107 ms |
24068 KB |
Output is correct |
69 |
Correct |
96 ms |
25436 KB |
Output is correct |
70 |
Correct |
92 ms |
20384 KB |
Output is correct |
71 |
Correct |
106 ms |
23468 KB |
Output is correct |
72 |
Correct |
118 ms |
21912 KB |
Output is correct |
73 |
Correct |
107 ms |
22504 KB |
Output is correct |
74 |
Correct |
101 ms |
20064 KB |
Output is correct |
75 |
Correct |
105 ms |
20004 KB |
Output is correct |
76 |
Correct |
83 ms |
17264 KB |
Output is correct |
77 |
Correct |
78 ms |
17180 KB |
Output is correct |
78 |
Correct |
76 ms |
17256 KB |
Output is correct |
79 |
Correct |
71 ms |
17064 KB |
Output is correct |
80 |
Correct |
56 ms |
15916 KB |
Output is correct |
81 |
Correct |
56 ms |
15644 KB |
Output is correct |
82 |
Correct |
10 ms |
10020 KB |
Output is correct |
83 |
Correct |
10 ms |
10020 KB |
Output is correct |
84 |
Correct |
10 ms |
9936 KB |
Output is correct |
85 |
Correct |
10 ms |
10012 KB |
Output is correct |
86 |
Correct |
10 ms |
10020 KB |
Output is correct |
87 |
Correct |
10 ms |
10020 KB |
Output is correct |
88 |
Correct |
1 ms |
460 KB |
Output is correct |
89 |
Correct |
1 ms |
460 KB |
Output is correct |
90 |
Correct |
1 ms |
460 KB |
Output is correct |
91 |
Correct |
2 ms |
588 KB |
Output is correct |
92 |
Correct |
1 ms |
588 KB |
Output is correct |
93 |
Correct |
3 ms |
588 KB |
Output is correct |
94 |
Correct |
1 ms |
580 KB |
Output is correct |
95 |
Correct |
1 ms |
580 KB |
Output is correct |
96 |
Correct |
1 ms |
460 KB |
Output is correct |
97 |
Correct |
1 ms |
460 KB |
Output is correct |
98 |
Correct |
1 ms |
460 KB |
Output is correct |
99 |
Correct |
1 ms |
460 KB |
Output is correct |
100 |
Correct |
1 ms |
460 KB |
Output is correct |
101 |
Correct |
1 ms |
460 KB |
Output is correct |
102 |
Correct |
1 ms |
444 KB |
Output is correct |
103 |
Correct |
1 ms |
460 KB |
Output is correct |
104 |
Correct |
1 ms |
460 KB |
Output is correct |
105 |
Correct |
1 ms |
460 KB |
Output is correct |
106 |
Correct |
1 ms |
460 KB |
Output is correct |
107 |
Correct |
1 ms |
460 KB |
Output is correct |
108 |
Correct |
102 ms |
20276 KB |
Output is correct |
109 |
Correct |
109 ms |
21204 KB |
Output is correct |
110 |
Correct |
105 ms |
21224 KB |
Output is correct |
111 |
Correct |
103 ms |
21212 KB |
Output is correct |
112 |
Correct |
108 ms |
21292 KB |
Output is correct |
113 |
Correct |
129 ms |
30492 KB |
Output is correct |
114 |
Correct |
129 ms |
27140 KB |
Output is correct |
115 |
Correct |
118 ms |
25608 KB |
Output is correct |
116 |
Correct |
110 ms |
24188 KB |
Output is correct |
117 |
Correct |
95 ms |
21176 KB |
Output is correct |
118 |
Correct |
101 ms |
21272 KB |
Output is correct |
119 |
Correct |
98 ms |
21164 KB |
Output is correct |
120 |
Correct |
104 ms |
21148 KB |
Output is correct |
121 |
Correct |
90 ms |
20404 KB |
Output is correct |
122 |
Correct |
79 ms |
19440 KB |
Output is correct |
123 |
Correct |
50 ms |
16364 KB |
Output is correct |
124 |
Correct |
66 ms |
20284 KB |
Output is correct |
125 |
Correct |
67 ms |
20376 KB |
Output is correct |
126 |
Correct |
60 ms |
20740 KB |
Output is correct |
127 |
Correct |
69 ms |
20352 KB |
Output is correct |
128 |
Correct |
1 ms |
460 KB |
Output is correct |
129 |
Correct |
1 ms |
460 KB |
Output is correct |
130 |
Correct |
1 ms |
460 KB |
Output is correct |
131 |
Correct |
1 ms |
460 KB |
Output is correct |
132 |
Correct |
1 ms |
460 KB |
Output is correct |
133 |
Correct |
1 ms |
460 KB |
Output is correct |
134 |
Correct |
1 ms |
460 KB |
Output is correct |
135 |
Correct |
1 ms |
460 KB |
Output is correct |
136 |
Correct |
1 ms |
460 KB |
Output is correct |
137 |
Correct |
1 ms |
452 KB |
Output is correct |
138 |
Correct |
1 ms |
460 KB |
Output is correct |
139 |
Correct |
1 ms |
460 KB |
Output is correct |
140 |
Correct |
1 ms |
460 KB |
Output is correct |
141 |
Correct |
1 ms |
460 KB |
Output is correct |
142 |
Correct |
1 ms |
460 KB |
Output is correct |
143 |
Correct |
1 ms |
460 KB |
Output is correct |
144 |
Correct |
1 ms |
460 KB |
Output is correct |
145 |
Correct |
1 ms |
460 KB |
Output is correct |
146 |
Correct |
1 ms |
460 KB |
Output is correct |
147 |
Correct |
1 ms |
460 KB |
Output is correct |
148 |
Correct |
1 ms |
460 KB |
Output is correct |
149 |
Correct |
1 ms |
452 KB |
Output is correct |
150 |
Correct |
1 ms |
460 KB |
Output is correct |
151 |
Correct |
1 ms |
460 KB |
Output is correct |
152 |
Correct |
1 ms |
444 KB |
Output is correct |
153 |
Correct |
1 ms |
332 KB |
Output is correct |
154 |
Correct |
1 ms |
332 KB |
Output is correct |
155 |
Correct |
100 ms |
20284 KB |
Output is correct |
156 |
Correct |
119 ms |
21380 KB |
Output is correct |
157 |
Correct |
123 ms |
20504 KB |
Output is correct |
158 |
Correct |
108 ms |
18844 KB |
Output is correct |
159 |
Correct |
94 ms |
16744 KB |
Output is correct |
160 |
Correct |
86 ms |
15844 KB |
Output is correct |
161 |
Correct |
90 ms |
15552 KB |
Output is correct |
162 |
Correct |
93 ms |
14748 KB |
Output is correct |
163 |
Correct |
83 ms |
14636 KB |
Output is correct |
164 |
Correct |
101 ms |
14404 KB |
Output is correct |
165 |
Correct |
68 ms |
14148 KB |
Output is correct |
166 |
Correct |
65 ms |
14088 KB |
Output is correct |
167 |
Correct |
72 ms |
14148 KB |
Output is correct |
168 |
Correct |
73 ms |
17140 KB |
Output is correct |
169 |
Correct |
120 ms |
26652 KB |
Output is correct |
170 |
Correct |
116 ms |
24472 KB |
Output is correct |
171 |
Correct |
124 ms |
24860 KB |
Output is correct |
172 |
Correct |
115 ms |
23000 KB |
Output is correct |
173 |
Correct |
107 ms |
18952 KB |
Output is correct |
174 |
Correct |
111 ms |
18824 KB |
Output is correct |
175 |
Correct |
103 ms |
18844 KB |
Output is correct |
176 |
Correct |
86 ms |
17820 KB |
Output is correct |
177 |
Correct |
85 ms |
16856 KB |
Output is correct |
178 |
Correct |
87 ms |
19972 KB |
Output is correct |
179 |
Correct |
93 ms |
20140 KB |
Output is correct |
180 |
Correct |
90 ms |
19188 KB |
Output is correct |
181 |
Correct |
92 ms |
19120 KB |
Output is correct |
182 |
Correct |
1 ms |
332 KB |
Output is correct |
183 |
Correct |
1 ms |
460 KB |
Output is correct |
184 |
Correct |
1 ms |
460 KB |
Output is correct |
185 |
Correct |
1 ms |
460 KB |
Output is correct |
186 |
Correct |
2 ms |
464 KB |
Output is correct |
187 |
Correct |
1 ms |
460 KB |
Output is correct |
188 |
Correct |
1 ms |
460 KB |
Output is correct |
189 |
Correct |
1 ms |
460 KB |
Output is correct |
190 |
Correct |
1 ms |
460 KB |
Output is correct |
191 |
Correct |
1 ms |
460 KB |
Output is correct |
192 |
Correct |
1 ms |
332 KB |
Output is correct |
193 |
Correct |
1 ms |
460 KB |
Output is correct |
194 |
Correct |
1 ms |
460 KB |
Output is correct |
195 |
Correct |
1 ms |
460 KB |
Output is correct |
196 |
Correct |
1 ms |
460 KB |
Output is correct |
197 |
Correct |
1 ms |
460 KB |
Output is correct |
198 |
Correct |
1 ms |
460 KB |
Output is correct |
199 |
Correct |
1 ms |
460 KB |
Output is correct |
200 |
Correct |
1 ms |
460 KB |
Output is correct |
201 |
Correct |
1 ms |
460 KB |
Output is correct |
202 |
Correct |
1 ms |
460 KB |
Output is correct |
203 |
Correct |
1 ms |
460 KB |
Output is correct |
204 |
Correct |
1 ms |
460 KB |
Output is correct |
205 |
Correct |
1 ms |
464 KB |
Output is correct |
206 |
Correct |
1 ms |
460 KB |
Output is correct |
207 |
Correct |
1 ms |
460 KB |
Output is correct |
208 |
Correct |
1 ms |
460 KB |
Output is correct |
209 |
Correct |
10 ms |
9912 KB |
Output is correct |
210 |
Correct |
54 ms |
16028 KB |
Output is correct |
211 |
Correct |
85 ms |
20280 KB |
Output is correct |
212 |
Correct |
114 ms |
23320 KB |
Output is correct |
213 |
Correct |
141 ms |
26132 KB |
Output is correct |
214 |
Correct |
53 ms |
17400 KB |
Output is correct |
215 |
Correct |
58 ms |
16912 KB |
Output is correct |
216 |
Correct |
110 ms |
19236 KB |
Output is correct |
217 |
Correct |
101 ms |
17164 KB |
Output is correct |
218 |
Correct |
85 ms |
14916 KB |
Output is correct |
219 |
Correct |
80 ms |
14272 KB |
Output is correct |
220 |
Correct |
73 ms |
14168 KB |
Output is correct |
221 |
Correct |
78 ms |
14148 KB |
Output is correct |
222 |
Correct |
82 ms |
15572 KB |
Output is correct |
223 |
Correct |
117 ms |
20824 KB |
Output is correct |
224 |
Correct |
113 ms |
19744 KB |
Output is correct |
225 |
Correct |
104 ms |
16736 KB |
Output is correct |
226 |
Correct |
102 ms |
16668 KB |
Output is correct |
227 |
Correct |
109 ms |
16720 KB |
Output is correct |
228 |
Correct |
89 ms |
16176 KB |
Output is correct |
229 |
Correct |
78 ms |
15672 KB |
Output is correct |
230 |
Correct |
90 ms |
16780 KB |
Output is correct |
231 |
Correct |
102 ms |
16892 KB |
Output is correct |