// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #include <x86intrin.h>
#include <bits/stdc++.h>
#include <chrono>
#include <random>
// @author: Vlapos
namespace operators
{
template <typename T1, typename T2>
std::istream &operator>>(std::istream &in, std::pair<T1, T2> &x)
{
in >> x.first >> x.second;
return in;
}
template <typename T1, typename T2>
std::ostream &operator<<(std::ostream &out, std::pair<T1, T2> x)
{
out << x.first << " " << x.second;
return out;
}
template <typename T1>
std::istream &operator>>(std::istream &in, std::vector<T1> &x)
{
for (auto &i : x)
in >> i;
return in;
}
template <typename T1>
std::ostream &operator<<(std::ostream &out, std::vector<T1> &x)
{
for (auto &i : x)
out << i << " ";
return out;
}
template <typename T1>
std::ostream &operator<<(std::ostream &out, std::set<T1> &x)
{
for (auto &i : x)
out << i << " ";
return out;
}
}
// name spaces
using namespace std;
using namespace operators;
// end of name spaces
// defines
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define f first
#define s second
#define uint unsigned int
#define all(vc) vc.begin(), vc.end()
// end of defines
// usefull stuff
void boost()
{
ios_base ::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
}
inline int getbit(int &x, int &bt) { return (x >> bt) & 1; }
const int dx4[4] = {-1, 0, 0, 1};
const int dy4[4] = {0, -1, 1, 0};
const int dx8[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int dy8[8] = {-1, -0, 1, -1, 1, -1, 0, 1};
const ll INF = (1e18) + 500;
const int BIG = (1e9) * 2 + 100;
const int MAXN = (1e5) + 5;
const int MOD7 = (1e9) + 7;
const int MOD9 = (1e9) + 9;
const uint MODFFT = 998244353;
// #define int ll
struct test
{
vector<vector<int>> tree, G;
vector<vector<int>> jump, jumpE, IDS, IDE;
vector<int> tin, tout, was;
int CNT = 0;
int n;
int timer = 0;
bool isP(int pr, int v)
{
return tin[pr] <= tin[v] and tout[v] <= tout[pr];
}
void dfs(int v, int pr = 0)
{
tin[v] = ++timer;
jump[v][0] = pr;
{
IDS[v][0] = CNT;
G[CNT].pb(n + v);
G[CNT].pb(n + pr);
CNT++;
IDE[v][0] = CNT;
G[n * 2 + v].pb(CNT);
G[n * 2 + pr].pb(CNT);
CNT++;
}
for (int k = 1; k < 17; ++k)
{
jump[v][k] = jump[jump[v][k - 1]][k - 1];
{
IDS[v][k] = CNT;
G[CNT].pb(IDS[v][k - 1]);
G[CNT].pb(IDS[jump[v][k - 1]][k - 1]);
CNT++;
IDE[v][k] = CNT;
G[IDE[v][k - 1]].pb(CNT);
G[IDE[jump[v][k - 1]][k - 1]].pb(CNT);
CNT++;
}
}
for (auto tov : tree[v])
if (tov != pr)
dfs(tov, v);
tout[v] = ++timer;
}
void makeEdges(int v, int tov, int i)
{
{
if (!isP(v, tov))
{
int st = jump[v][0];
for (int k = 16; k >= 0; --k)
if (!isP(jump[st][k], tov))
{
// cout << i << " -> " << st << " " << k << "\n";
G[i].pb(IDS[st][k]);
st = jump[st][k];
}
while (!isP(st, tov))
{
G[i].pb(n + st);
// cout << i << " -> " << n + st << '\n';
st = jump[st][0];
}
// cout << i << " -> " << n + st << '\n';
G[i].pb(n + st);
}
if (!isP(tov, v))
{
int st = tov;
for (int k = 16; k >= 0; --k)
if (!isP(jump[st][k], v))
{
// cout << i << " -> " << st << " " << k << "\n";
G[i].pb(IDS[st][k]);
st = jump[st][k];
}
while (!isP(st, v))
{
// cout << i << " -> " << n + st << '\n';
G[i].pb(n + st);
st = jump[st][0];
}
}
}
{
if (!isP(v, tov))
{
int st = v;
for (int k = 16; k >= 0; --k)
if (!isP(jump[st][k], tov))
{
// cout << st << " " << k << " -> " << i << "!\n";
G[IDE[st][k]].pb(i);
st = jump[st][k];
}
while (!isP(st, tov))
{
G[2 * n + st].pb(i);
st = jump[st][0];
// cout << 2 * n + st << " -> " << i << '\n';
}
}
if (!isP(tov, v))
{
int st = jump[tov][0];
for (int k = 16; k >= 0; --k)
if (!isP(jump[st][k], v))
{
// cout << st << " " << k << " -> " << i << "!\n";
G[IDE[st][k]].pb(i);
st = jump[st][k];
}
while (!isP(st, v))
{
// cout << n * 2 + st << " -> " << i << '\n';
G[n * 2 + st].pb(i);
st = jump[st][0];
}
// cout << n * 2 + st << " -> " << i << '\n';
G[n * 2 + st].pb(i);
}
}
}
bool DFS(int v)
{
was[v] = 1;
for (auto tov : G[v])
if (was[tov] == 1 or (!was[tov] and DFS(tov)))
return true;
was[v] = 2;
return false;
}
void solve(int testcase)
{
boost();
cin >> n;
CNT = 3 * n;
G.resize(17 * 2 * n + 3 * n);
was.resize(17 * 2 * n + 3 * n);
jump.resize(n, vector<int>(17));
IDS.resize(n, vector<int>(17));
IDE.resize(n, vector<int>(17));
tree.resize(n);
tin.resize(n);
tout.resize(n);
for (int i = 1; i < n; ++i)
{
int v, tov;
cin >> v >> tov;
--v, --tov;
tree[v].pb(tov);
tree[tov].pb(v);
}
dfs(0);
int m;
cin >> m;
vector<pii> els;
for (int i = 0; i < m; ++i)
{
int v, tov;
cin >> v >> tov;
--v, --tov;
G[n + v].pb(i);
G[i].pb(2 * n + tov);
makeEdges(v, tov, i);
}
bool good = true;
for (int i = 0; i < n; ++i)
if (!was[i] and DFS(i))
{
good = false;
break;
}
if (good)
cout << "Yes\n";
else
cout << "No\n";
}
};
main()
{
boost();
int q = 1;
cin >> q;
for (int i = 0; i < q; i++)
{
test t;
t.solve(i);
}
return 0;
}
//[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]//
// //
// Coded by Der_Vlἀpos //
// //
//[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]//
Compilation message
jail.cpp:296:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
296 | main()
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
130 ms |
604 KB |
Output is correct |
5 |
Correct |
276 ms |
1000 KB |
Output is correct |
6 |
Correct |
12 ms |
1116 KB |
Output is correct |
7 |
Correct |
12 ms |
896 KB |
Output is correct |
8 |
Correct |
14 ms |
1128 KB |
Output is correct |
9 |
Correct |
494 ms |
15860 KB |
Output is correct |
10 |
Correct |
921 ms |
305612 KB |
Output is correct |
11 |
Correct |
54 ms |
344 KB |
Output is correct |
12 |
Correct |
296 ms |
768 KB |
Output is correct |
13 |
Correct |
1180 ms |
309448 KB |
Output is correct |
14 |
Correct |
840 ms |
309708 KB |
Output is correct |
15 |
Correct |
1100 ms |
311172 KB |
Output is correct |
16 |
Correct |
1578 ms |
319776 KB |
Output is correct |
17 |
Correct |
1208 ms |
329232 KB |
Output is correct |
18 |
Correct |
1194 ms |
313088 KB |
Output is correct |
19 |
Correct |
1160 ms |
312112 KB |
Output is correct |
20 |
Correct |
984 ms |
318672 KB |
Output is correct |
21 |
Correct |
864 ms |
312272 KB |
Output is correct |
22 |
Correct |
757 ms |
309096 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
12 ms |
1116 KB |
Output is correct |
4 |
Correct |
12 ms |
1040 KB |
Output is correct |
5 |
Correct |
12 ms |
1108 KB |
Output is correct |
6 |
Correct |
12 ms |
896 KB |
Output is correct |
7 |
Correct |
12 ms |
896 KB |
Output is correct |
8 |
Correct |
12 ms |
892 KB |
Output is correct |
9 |
Correct |
12 ms |
896 KB |
Output is correct |
10 |
Correct |
12 ms |
1096 KB |
Output is correct |
11 |
Correct |
13 ms |
1104 KB |
Output is correct |
12 |
Correct |
6 ms |
896 KB |
Output is correct |
13 |
Correct |
6 ms |
896 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
12 ms |
1116 KB |
Output is correct |
4 |
Correct |
12 ms |
1040 KB |
Output is correct |
5 |
Correct |
12 ms |
1108 KB |
Output is correct |
6 |
Correct |
12 ms |
896 KB |
Output is correct |
7 |
Correct |
12 ms |
896 KB |
Output is correct |
8 |
Correct |
12 ms |
892 KB |
Output is correct |
9 |
Correct |
12 ms |
896 KB |
Output is correct |
10 |
Correct |
12 ms |
1096 KB |
Output is correct |
11 |
Correct |
13 ms |
1104 KB |
Output is correct |
12 |
Correct |
6 ms |
896 KB |
Output is correct |
13 |
Correct |
6 ms |
896 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
12 ms |
1116 KB |
Output is correct |
17 |
Correct |
15 ms |
896 KB |
Output is correct |
18 |
Correct |
13 ms |
1108 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
12 ms |
1108 KB |
Output is correct |
21 |
Correct |
12 ms |
892 KB |
Output is correct |
22 |
Correct |
11 ms |
1116 KB |
Output is correct |
23 |
Correct |
1 ms |
544 KB |
Output is correct |
24 |
Correct |
1 ms |
604 KB |
Output is correct |
25 |
Correct |
12 ms |
896 KB |
Output is correct |
26 |
Correct |
3 ms |
1152 KB |
Output is correct |
27 |
Correct |
13 ms |
1108 KB |
Output is correct |
28 |
Correct |
3 ms |
452 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
12 ms |
1116 KB |
Output is correct |
4 |
Correct |
12 ms |
1040 KB |
Output is correct |
5 |
Correct |
12 ms |
1108 KB |
Output is correct |
6 |
Correct |
12 ms |
896 KB |
Output is correct |
7 |
Correct |
12 ms |
896 KB |
Output is correct |
8 |
Correct |
12 ms |
892 KB |
Output is correct |
9 |
Correct |
12 ms |
896 KB |
Output is correct |
10 |
Correct |
12 ms |
1096 KB |
Output is correct |
11 |
Correct |
13 ms |
1104 KB |
Output is correct |
12 |
Correct |
6 ms |
896 KB |
Output is correct |
13 |
Correct |
6 ms |
896 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
12 ms |
1116 KB |
Output is correct |
17 |
Correct |
15 ms |
896 KB |
Output is correct |
18 |
Correct |
13 ms |
1108 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
12 ms |
1108 KB |
Output is correct |
21 |
Correct |
12 ms |
892 KB |
Output is correct |
22 |
Correct |
11 ms |
1116 KB |
Output is correct |
23 |
Correct |
1 ms |
544 KB |
Output is correct |
24 |
Correct |
1 ms |
604 KB |
Output is correct |
25 |
Correct |
12 ms |
896 KB |
Output is correct |
26 |
Correct |
3 ms |
1152 KB |
Output is correct |
27 |
Correct |
13 ms |
1108 KB |
Output is correct |
28 |
Correct |
3 ms |
452 KB |
Output is correct |
29 |
Correct |
13 ms |
1116 KB |
Output is correct |
30 |
Correct |
12 ms |
1112 KB |
Output is correct |
31 |
Correct |
13 ms |
896 KB |
Output is correct |
32 |
Correct |
13 ms |
1112 KB |
Output is correct |
33 |
Correct |
12 ms |
896 KB |
Output is correct |
34 |
Correct |
11 ms |
984 KB |
Output is correct |
35 |
Correct |
13 ms |
940 KB |
Output is correct |
36 |
Correct |
9 ms |
940 KB |
Output is correct |
37 |
Correct |
7 ms |
940 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
12 ms |
1116 KB |
Output is correct |
4 |
Correct |
12 ms |
1040 KB |
Output is correct |
5 |
Correct |
12 ms |
1108 KB |
Output is correct |
6 |
Correct |
12 ms |
896 KB |
Output is correct |
7 |
Correct |
12 ms |
896 KB |
Output is correct |
8 |
Correct |
12 ms |
892 KB |
Output is correct |
9 |
Correct |
12 ms |
896 KB |
Output is correct |
10 |
Correct |
12 ms |
1096 KB |
Output is correct |
11 |
Correct |
13 ms |
1104 KB |
Output is correct |
12 |
Correct |
6 ms |
896 KB |
Output is correct |
13 |
Correct |
6 ms |
896 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
12 ms |
1116 KB |
Output is correct |
17 |
Correct |
15 ms |
896 KB |
Output is correct |
18 |
Correct |
13 ms |
1108 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
12 ms |
1108 KB |
Output is correct |
21 |
Correct |
12 ms |
892 KB |
Output is correct |
22 |
Correct |
11 ms |
1116 KB |
Output is correct |
23 |
Correct |
1 ms |
544 KB |
Output is correct |
24 |
Correct |
1 ms |
604 KB |
Output is correct |
25 |
Correct |
12 ms |
896 KB |
Output is correct |
26 |
Correct |
3 ms |
1152 KB |
Output is correct |
27 |
Correct |
13 ms |
1108 KB |
Output is correct |
28 |
Correct |
3 ms |
452 KB |
Output is correct |
29 |
Correct |
13 ms |
1116 KB |
Output is correct |
30 |
Correct |
12 ms |
1112 KB |
Output is correct |
31 |
Correct |
13 ms |
896 KB |
Output is correct |
32 |
Correct |
13 ms |
1112 KB |
Output is correct |
33 |
Correct |
12 ms |
896 KB |
Output is correct |
34 |
Correct |
11 ms |
984 KB |
Output is correct |
35 |
Correct |
13 ms |
940 KB |
Output is correct |
36 |
Correct |
9 ms |
940 KB |
Output is correct |
37 |
Correct |
7 ms |
940 KB |
Output is correct |
38 |
Correct |
497 ms |
15892 KB |
Output is correct |
39 |
Correct |
837 ms |
305780 KB |
Output is correct |
40 |
Correct |
356 ms |
15712 KB |
Output is correct |
41 |
Correct |
319 ms |
15660 KB |
Output is correct |
42 |
Correct |
310 ms |
15968 KB |
Output is correct |
43 |
Correct |
433 ms |
15592 KB |
Output is correct |
44 |
Correct |
56 ms |
2916 KB |
Output is correct |
45 |
Correct |
520 ms |
300808 KB |
Output is correct |
46 |
Correct |
479 ms |
301028 KB |
Output is correct |
47 |
Correct |
756 ms |
300404 KB |
Output is correct |
48 |
Correct |
815 ms |
300240 KB |
Output is correct |
49 |
Correct |
536 ms |
301812 KB |
Output is correct |
50 |
Correct |
448 ms |
301740 KB |
Output is correct |
51 |
Correct |
622 ms |
301676 KB |
Output is correct |
52 |
Correct |
586 ms |
301756 KB |
Output is correct |
53 |
Correct |
93 ms |
21048 KB |
Output is correct |
54 |
Correct |
505 ms |
301272 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
68 ms |
488 KB |
Output is correct |
6 |
Correct |
6 ms |
1112 KB |
Output is correct |
7 |
Correct |
7 ms |
896 KB |
Output is correct |
8 |
Correct |
1 ms |
344 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
604 KB |
Output is correct |
11 |
Correct |
2 ms |
348 KB |
Output is correct |
12 |
Correct |
13 ms |
1192 KB |
Output is correct |
13 |
Correct |
173 ms |
748 KB |
Output is correct |
14 |
Correct |
301 ms |
856 KB |
Output is correct |
15 |
Correct |
258 ms |
600 KB |
Output is correct |
16 |
Correct |
530 ms |
302792 KB |
Output is correct |
17 |
Correct |
623 ms |
308820 KB |
Output is correct |
18 |
Correct |
940 ms |
315316 KB |
Output is correct |
19 |
Correct |
573 ms |
304096 KB |
Output is correct |
20 |
Correct |
638 ms |
303892 KB |
Output is correct |
21 |
Correct |
606 ms |
304224 KB |
Output is correct |
22 |
Correct |
637 ms |
308508 KB |
Output is correct |
23 |
Correct |
678 ms |
308864 KB |
Output is correct |
24 |
Correct |
734 ms |
308644 KB |
Output is correct |
25 |
Correct |
659 ms |
308328 KB |
Output is correct |
26 |
Correct |
788 ms |
308592 KB |
Output is correct |
27 |
Correct |
766 ms |
315424 KB |
Output is correct |
28 |
Correct |
721 ms |
316948 KB |
Output is correct |
29 |
Correct |
611 ms |
313540 KB |
Output is correct |
30 |
Correct |
748 ms |
309924 KB |
Output is correct |
31 |
Correct |
642 ms |
310532 KB |
Output is correct |
32 |
Correct |
653 ms |
309404 KB |
Output is correct |
33 |
Correct |
640 ms |
310424 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
130 ms |
604 KB |
Output is correct |
5 |
Correct |
276 ms |
1000 KB |
Output is correct |
6 |
Correct |
12 ms |
1116 KB |
Output is correct |
7 |
Correct |
12 ms |
896 KB |
Output is correct |
8 |
Correct |
14 ms |
1128 KB |
Output is correct |
9 |
Correct |
494 ms |
15860 KB |
Output is correct |
10 |
Correct |
921 ms |
305612 KB |
Output is correct |
11 |
Correct |
54 ms |
344 KB |
Output is correct |
12 |
Correct |
296 ms |
768 KB |
Output is correct |
13 |
Correct |
1180 ms |
309448 KB |
Output is correct |
14 |
Correct |
840 ms |
309708 KB |
Output is correct |
15 |
Correct |
1100 ms |
311172 KB |
Output is correct |
16 |
Correct |
1578 ms |
319776 KB |
Output is correct |
17 |
Correct |
1208 ms |
329232 KB |
Output is correct |
18 |
Correct |
1194 ms |
313088 KB |
Output is correct |
19 |
Correct |
1160 ms |
312112 KB |
Output is correct |
20 |
Correct |
984 ms |
318672 KB |
Output is correct |
21 |
Correct |
864 ms |
312272 KB |
Output is correct |
22 |
Correct |
757 ms |
309096 KB |
Output is correct |
23 |
Correct |
0 ms |
344 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
12 ms |
1116 KB |
Output is correct |
26 |
Correct |
12 ms |
1040 KB |
Output is correct |
27 |
Correct |
12 ms |
1108 KB |
Output is correct |
28 |
Correct |
12 ms |
896 KB |
Output is correct |
29 |
Correct |
12 ms |
896 KB |
Output is correct |
30 |
Correct |
12 ms |
892 KB |
Output is correct |
31 |
Correct |
12 ms |
896 KB |
Output is correct |
32 |
Correct |
12 ms |
1096 KB |
Output is correct |
33 |
Correct |
13 ms |
1104 KB |
Output is correct |
34 |
Correct |
6 ms |
896 KB |
Output is correct |
35 |
Correct |
6 ms |
896 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
12 ms |
1116 KB |
Output is correct |
39 |
Correct |
15 ms |
896 KB |
Output is correct |
40 |
Correct |
13 ms |
1108 KB |
Output is correct |
41 |
Correct |
1 ms |
348 KB |
Output is correct |
42 |
Correct |
12 ms |
1108 KB |
Output is correct |
43 |
Correct |
12 ms |
892 KB |
Output is correct |
44 |
Correct |
11 ms |
1116 KB |
Output is correct |
45 |
Correct |
1 ms |
544 KB |
Output is correct |
46 |
Correct |
1 ms |
604 KB |
Output is correct |
47 |
Correct |
12 ms |
896 KB |
Output is correct |
48 |
Correct |
3 ms |
1152 KB |
Output is correct |
49 |
Correct |
13 ms |
1108 KB |
Output is correct |
50 |
Correct |
3 ms |
452 KB |
Output is correct |
51 |
Correct |
13 ms |
1116 KB |
Output is correct |
52 |
Correct |
12 ms |
1112 KB |
Output is correct |
53 |
Correct |
13 ms |
896 KB |
Output is correct |
54 |
Correct |
13 ms |
1112 KB |
Output is correct |
55 |
Correct |
12 ms |
896 KB |
Output is correct |
56 |
Correct |
11 ms |
984 KB |
Output is correct |
57 |
Correct |
13 ms |
940 KB |
Output is correct |
58 |
Correct |
9 ms |
940 KB |
Output is correct |
59 |
Correct |
7 ms |
940 KB |
Output is correct |
60 |
Correct |
497 ms |
15892 KB |
Output is correct |
61 |
Correct |
837 ms |
305780 KB |
Output is correct |
62 |
Correct |
356 ms |
15712 KB |
Output is correct |
63 |
Correct |
319 ms |
15660 KB |
Output is correct |
64 |
Correct |
310 ms |
15968 KB |
Output is correct |
65 |
Correct |
433 ms |
15592 KB |
Output is correct |
66 |
Correct |
56 ms |
2916 KB |
Output is correct |
67 |
Correct |
520 ms |
300808 KB |
Output is correct |
68 |
Correct |
479 ms |
301028 KB |
Output is correct |
69 |
Correct |
756 ms |
300404 KB |
Output is correct |
70 |
Correct |
815 ms |
300240 KB |
Output is correct |
71 |
Correct |
536 ms |
301812 KB |
Output is correct |
72 |
Correct |
448 ms |
301740 KB |
Output is correct |
73 |
Correct |
622 ms |
301676 KB |
Output is correct |
74 |
Correct |
586 ms |
301756 KB |
Output is correct |
75 |
Correct |
93 ms |
21048 KB |
Output is correct |
76 |
Correct |
505 ms |
301272 KB |
Output is correct |
77 |
Correct |
0 ms |
344 KB |
Output is correct |
78 |
Correct |
0 ms |
348 KB |
Output is correct |
79 |
Correct |
0 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
348 KB |
Output is correct |
81 |
Correct |
68 ms |
488 KB |
Output is correct |
82 |
Correct |
6 ms |
1112 KB |
Output is correct |
83 |
Correct |
7 ms |
896 KB |
Output is correct |
84 |
Correct |
1 ms |
344 KB |
Output is correct |
85 |
Correct |
1 ms |
348 KB |
Output is correct |
86 |
Correct |
1 ms |
604 KB |
Output is correct |
87 |
Correct |
2 ms |
348 KB |
Output is correct |
88 |
Correct |
13 ms |
1192 KB |
Output is correct |
89 |
Correct |
173 ms |
748 KB |
Output is correct |
90 |
Correct |
301 ms |
856 KB |
Output is correct |
91 |
Correct |
258 ms |
600 KB |
Output is correct |
92 |
Correct |
530 ms |
302792 KB |
Output is correct |
93 |
Correct |
623 ms |
308820 KB |
Output is correct |
94 |
Correct |
940 ms |
315316 KB |
Output is correct |
95 |
Correct |
573 ms |
304096 KB |
Output is correct |
96 |
Correct |
638 ms |
303892 KB |
Output is correct |
97 |
Correct |
606 ms |
304224 KB |
Output is correct |
98 |
Correct |
637 ms |
308508 KB |
Output is correct |
99 |
Correct |
678 ms |
308864 KB |
Output is correct |
100 |
Correct |
734 ms |
308644 KB |
Output is correct |
101 |
Correct |
659 ms |
308328 KB |
Output is correct |
102 |
Correct |
788 ms |
308592 KB |
Output is correct |
103 |
Correct |
766 ms |
315424 KB |
Output is correct |
104 |
Correct |
721 ms |
316948 KB |
Output is correct |
105 |
Correct |
611 ms |
313540 KB |
Output is correct |
106 |
Correct |
748 ms |
309924 KB |
Output is correct |
107 |
Correct |
642 ms |
310532 KB |
Output is correct |
108 |
Correct |
653 ms |
309404 KB |
Output is correct |
109 |
Correct |
640 ms |
310424 KB |
Output is correct |
110 |
Correct |
284 ms |
1912 KB |
Output is correct |
111 |
Correct |
225 ms |
1504 KB |
Output is correct |
112 |
Correct |
1136 ms |
313200 KB |
Output is correct |
113 |
Correct |
972 ms |
305332 KB |
Output is correct |
114 |
Correct |
731 ms |
313124 KB |
Output is correct |
115 |
Correct |
399 ms |
304260 KB |
Output is correct |
116 |
Correct |
652 ms |
308488 KB |
Output is correct |
117 |
Correct |
1067 ms |
319676 KB |
Output is correct |
118 |
Correct |
516 ms |
302776 KB |
Output is correct |
119 |
Correct |
532 ms |
302768 KB |
Output is correct |
120 |
Correct |
62 ms |
26192 KB |
Output is correct |
121 |
Correct |
865 ms |
309240 KB |
Output is correct |
122 |
Correct |
897 ms |
309436 KB |
Output is correct |
123 |
Correct |
1141 ms |
306436 KB |
Output is correct |
124 |
Correct |
999 ms |
306404 KB |
Output is correct |
125 |
Correct |
1198 ms |
306796 KB |
Output is correct |
126 |
Correct |
1672 ms |
322408 KB |
Output is correct |
127 |
Correct |
1024 ms |
314728 KB |
Output is correct |
128 |
Correct |
1010 ms |
314680 KB |
Output is correct |
129 |
Correct |
1193 ms |
314904 KB |
Output is correct |
130 |
Correct |
939 ms |
314652 KB |
Output is correct |