/*************************************
* author: marvinthang *
* created: 05.05.2023 10:12:26 *
*************************************/
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define left ___left
#define right ___right
#define TIME (1.0 * clock() / CLOCKS_PER_SEC)
#define MASK(i) (1LL << (i))
#define BIT(x, i) ((x) >> (i) & 1)
#define __builtin_popcount __builtin_popcountll
#define ALL(v) (v).begin(), (v).end()
#define REP(i, n) for (int i = 0, _n = (n); i < _n; ++i)
#define REPD(i, n) for (int i = (n); i--; )
#define FOR(i, a, b) for (int i = (a), _b = (b); i < _b; ++i)
#define FORD(i, b, a) for (int i = (b), _a = (a); --i >= _a; )
#define FORE(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i)
#define FORDE(i, b, a) for (int i = (b), _a = (a); i >= _a; --i)
#define scan_op(...) istream & operator >> (istream &in, __VA_ARGS__ &u)
#define print_op(...) ostream & operator << (ostream &out, const __VA_ARGS__ &u)
#ifdef LOCAL
#include "debug.h"
#else
#define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
#define DB(...) 23
#define db(...) 23
#define debug(...) 23
#endif
template <class U, class V> scan_op(pair <U, V>) { return in >> u.first >> u.second; }
template <class T> scan_op(vector <T>) { for (size_t i = 0; i < u.size(); ++i) in >> u[i]; return in; }
template <class U, class V> print_op(pair <U, V>) { return out << '(' << u.first << ", " << u.second << ')'; }
template <size_t i, class T> ostream & print_tuple_utils(ostream &out, const T &tup) { if constexpr(i == tuple_size<T>::value) return out << ")"; else return print_tuple_utils<i + 1, T>(out << (i ? ", " : "(") << get<i>(tup), tup); }
template <class ...U> print_op(tuple<U...>) { return print_tuple_utils<0, tuple<U...>>(out, u); }
template <class Con, class = decltype(begin(declval<Con>()))> typename enable_if <!is_same<Con, string>::value, ostream&>::type operator << (ostream &out, const Con &con) { out << '{'; for (__typeof(con.begin()) it = con.begin(); it != con.end(); ++it) out << (it == con.begin() ? "" : ", ") << *it; return out << '}'; }
template <class A, class B> bool minimize(A &a, B b) { if (a > b) { a = b; return true; } return false; }
template <class A, class B> bool maximize(A &a, B b) { if (a < b) { a = b; return true; } return false; }
// end of template
const int MAX = 3e5 + 5;
int N, M;
int L[MAX], R[MAX];
int cnt[MAX];
void init(void) {
cin >> N >> M;
REP(i, M) {
cin >> L[i] >> R[i];
++cnt[L[i]];
--cnt[R[i] + 1];
if (R[i] < L[i]) {
++cnt[1];
R[i] += N;
}
}
FORE(i, 1, N) {
cnt[i] += cnt[i - 1];
cnt[i + N] = cnt[i + N + N] = cnt[i];
}
}
vector <pair <int, int>> adj[MAX];
int dist[MAX];
pair <int, int> trace[MAX];
bool res[MAX];
void process(void) {
FORE(i, 1, N) if (cnt[i] < 2) return void(cout << "impossible\n");
REP(i, M) {
adj[L[i] - 1].emplace_back(R[i], i);
adj[L[i] + N - 1].emplace_back(R[i] + N, i);
}
int st = -1, len = -1;
REP(i, M) {
int l = R[i] - L[i] + 1;
if (st == -1 || len < l) {
st = i;
len = l;
}
}
memset(dist, 0x3f, sizeof(dist));
deque <int> dq;
dist[R[st]] = 0;
dq.push_back(R[st]);
int e = L[st] + N - 1;
while (!dq.empty()) {
int u = dq.front(); dq.pop_front();
int p = u - 1;
if (p >= L[st] && cnt[u] > 2 && minimize(dist[p], dist[u])) {
dq.push_front(p);
trace[p] = make_pair(u, M);
}
for (auto [v, id]: adj[u]) {
if (v <= R[st] + N && minimize(dist[v], dist[u] + 1)) {
dq.push_back(v);
trace[v] = make_pair(u, id);
}
}
}
if (dist[e] > M) return void(cout << "impossible\n");
res[st] = 1;
while (e != R[st]) {
res[trace[e].se] = 1;
e = trace[e].fi;
}
REP(i, M) cout << res[i];
}
int main(void) {
ios_base::sync_with_stdio(false); cin.tie(nullptr); // cout.tie(nullptr);
file("B");
init();
process();
cerr << "Time elapsed: " << TIME << " s.\n";
return (0^0);
}
Compilation message
alternating.cpp: In function 'int main()':
alternating.cpp:30:61: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
alternating.cpp:119:2: note: in expansion of macro 'file'
119 | file("B");
| ^~~~
alternating.cpp:30:94: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
alternating.cpp:119:2: note: in expansion of macro 'file'
119 | file("B");
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
8532 KB |
Output is correct |
2 |
Correct |
4 ms |
8532 KB |
Output is correct |
3 |
Correct |
5 ms |
8536 KB |
Output is correct |
4 |
Correct |
4 ms |
8532 KB |
Output is correct |
5 |
Correct |
5 ms |
8536 KB |
Output is correct |
6 |
Correct |
4 ms |
8536 KB |
Output is correct |
7 |
Correct |
5 ms |
8532 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
5 ms |
8532 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
5 ms |
8532 KB |
Output is correct |
13 |
Correct |
4 ms |
7388 KB |
Output is correct |
14 |
Correct |
4 ms |
8536 KB |
Output is correct |
15 |
Correct |
4 ms |
8532 KB |
Output is correct |
16 |
Correct |
5 ms |
8532 KB |
Output is correct |
17 |
Correct |
5 ms |
8532 KB |
Output is correct |
18 |
Correct |
5 ms |
8532 KB |
Output is correct |
19 |
Correct |
5 ms |
8532 KB |
Output is correct |
20 |
Correct |
5 ms |
8532 KB |
Output is correct |
21 |
Correct |
4 ms |
8512 KB |
Output is correct |
22 |
Correct |
5 ms |
8532 KB |
Output is correct |
23 |
Correct |
5 ms |
8532 KB |
Output is correct |
24 |
Correct |
4 ms |
8532 KB |
Output is correct |
25 |
Correct |
6 ms |
8532 KB |
Output is correct |
26 |
Correct |
5 ms |
8532 KB |
Output is correct |
27 |
Correct |
4 ms |
7380 KB |
Output is correct |
28 |
Correct |
5 ms |
8532 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
5 ms |
8532 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
8532 KB |
Output is correct |
34 |
Correct |
4 ms |
7508 KB |
Output is correct |
35 |
Correct |
4 ms |
7344 KB |
Output is correct |
36 |
Correct |
4 ms |
8532 KB |
Output is correct |
37 |
Correct |
5 ms |
8532 KB |
Output is correct |
38 |
Correct |
4 ms |
7288 KB |
Output is correct |
39 |
Correct |
4 ms |
8532 KB |
Output is correct |
40 |
Correct |
4 ms |
8568 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
8532 KB |
Output is correct |
2 |
Correct |
4 ms |
8532 KB |
Output is correct |
3 |
Correct |
5 ms |
8536 KB |
Output is correct |
4 |
Correct |
4 ms |
8532 KB |
Output is correct |
5 |
Correct |
5 ms |
8536 KB |
Output is correct |
6 |
Correct |
4 ms |
8536 KB |
Output is correct |
7 |
Correct |
5 ms |
8532 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
5 ms |
8532 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
5 ms |
8532 KB |
Output is correct |
13 |
Correct |
4 ms |
7388 KB |
Output is correct |
14 |
Correct |
4 ms |
8536 KB |
Output is correct |
15 |
Correct |
4 ms |
8532 KB |
Output is correct |
16 |
Correct |
5 ms |
8532 KB |
Output is correct |
17 |
Correct |
5 ms |
8532 KB |
Output is correct |
18 |
Correct |
5 ms |
8532 KB |
Output is correct |
19 |
Correct |
5 ms |
8532 KB |
Output is correct |
20 |
Correct |
5 ms |
8532 KB |
Output is correct |
21 |
Correct |
4 ms |
8512 KB |
Output is correct |
22 |
Correct |
5 ms |
8532 KB |
Output is correct |
23 |
Correct |
5 ms |
8532 KB |
Output is correct |
24 |
Correct |
4 ms |
8532 KB |
Output is correct |
25 |
Correct |
6 ms |
8532 KB |
Output is correct |
26 |
Correct |
5 ms |
8532 KB |
Output is correct |
27 |
Correct |
4 ms |
7380 KB |
Output is correct |
28 |
Correct |
5 ms |
8532 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
5 ms |
8532 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
8532 KB |
Output is correct |
34 |
Correct |
4 ms |
7508 KB |
Output is correct |
35 |
Correct |
4 ms |
7344 KB |
Output is correct |
36 |
Correct |
4 ms |
8532 KB |
Output is correct |
37 |
Correct |
5 ms |
8532 KB |
Output is correct |
38 |
Correct |
4 ms |
7288 KB |
Output is correct |
39 |
Correct |
4 ms |
8532 KB |
Output is correct |
40 |
Correct |
4 ms |
8568 KB |
Output is correct |
41 |
Correct |
4 ms |
8532 KB |
Output is correct |
42 |
Correct |
5 ms |
8492 KB |
Output is correct |
43 |
Correct |
5 ms |
8540 KB |
Output is correct |
44 |
Correct |
4 ms |
8532 KB |
Output is correct |
45 |
Correct |
5 ms |
8532 KB |
Output is correct |
46 |
Correct |
5 ms |
8536 KB |
Output is correct |
47 |
Correct |
4 ms |
8532 KB |
Output is correct |
48 |
Correct |
4 ms |
7384 KB |
Output is correct |
49 |
Correct |
6 ms |
8532 KB |
Output is correct |
50 |
Correct |
5 ms |
7400 KB |
Output is correct |
51 |
Correct |
5 ms |
7384 KB |
Output is correct |
52 |
Correct |
4 ms |
7384 KB |
Output is correct |
53 |
Correct |
4 ms |
7384 KB |
Output is correct |
54 |
Correct |
4 ms |
8532 KB |
Output is correct |
55 |
Correct |
5 ms |
8536 KB |
Output is correct |
56 |
Correct |
5 ms |
8532 KB |
Output is correct |
57 |
Correct |
5 ms |
8556 KB |
Output is correct |
58 |
Correct |
4 ms |
8532 KB |
Output is correct |
59 |
Correct |
4 ms |
8536 KB |
Output is correct |
60 |
Correct |
5 ms |
8532 KB |
Output is correct |
61 |
Correct |
5 ms |
8532 KB |
Output is correct |
62 |
Correct |
4 ms |
7384 KB |
Output is correct |
63 |
Correct |
5 ms |
7392 KB |
Output is correct |
64 |
Correct |
5 ms |
8532 KB |
Output is correct |
65 |
Correct |
4 ms |
7388 KB |
Output is correct |
66 |
Correct |
5 ms |
8532 KB |
Output is correct |
67 |
Correct |
4 ms |
8532 KB |
Output is correct |
68 |
Correct |
4 ms |
8532 KB |
Output is correct |
69 |
Correct |
5 ms |
8532 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
8532 KB |
Output is correct |
2 |
Correct |
4 ms |
8532 KB |
Output is correct |
3 |
Correct |
5 ms |
8536 KB |
Output is correct |
4 |
Correct |
4 ms |
8532 KB |
Output is correct |
5 |
Correct |
5 ms |
8536 KB |
Output is correct |
6 |
Correct |
4 ms |
8536 KB |
Output is correct |
7 |
Correct |
5 ms |
8532 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
5 ms |
8532 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
5 ms |
8532 KB |
Output is correct |
13 |
Correct |
4 ms |
7388 KB |
Output is correct |
14 |
Correct |
4 ms |
8536 KB |
Output is correct |
15 |
Correct |
4 ms |
8532 KB |
Output is correct |
16 |
Correct |
5 ms |
8532 KB |
Output is correct |
17 |
Correct |
5 ms |
8532 KB |
Output is correct |
18 |
Correct |
5 ms |
8532 KB |
Output is correct |
19 |
Correct |
5 ms |
8532 KB |
Output is correct |
20 |
Correct |
5 ms |
8532 KB |
Output is correct |
21 |
Correct |
4 ms |
8512 KB |
Output is correct |
22 |
Correct |
5 ms |
8532 KB |
Output is correct |
23 |
Correct |
5 ms |
8532 KB |
Output is correct |
24 |
Correct |
4 ms |
8532 KB |
Output is correct |
25 |
Correct |
6 ms |
8532 KB |
Output is correct |
26 |
Correct |
5 ms |
8532 KB |
Output is correct |
27 |
Correct |
4 ms |
7380 KB |
Output is correct |
28 |
Correct |
5 ms |
8532 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
5 ms |
8532 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
8532 KB |
Output is correct |
34 |
Correct |
4 ms |
7508 KB |
Output is correct |
35 |
Correct |
4 ms |
7344 KB |
Output is correct |
36 |
Correct |
4 ms |
8532 KB |
Output is correct |
37 |
Correct |
5 ms |
8532 KB |
Output is correct |
38 |
Correct |
4 ms |
7288 KB |
Output is correct |
39 |
Correct |
4 ms |
8532 KB |
Output is correct |
40 |
Correct |
4 ms |
8568 KB |
Output is correct |
41 |
Correct |
4 ms |
8532 KB |
Output is correct |
42 |
Correct |
5 ms |
8492 KB |
Output is correct |
43 |
Correct |
5 ms |
8540 KB |
Output is correct |
44 |
Correct |
4 ms |
8532 KB |
Output is correct |
45 |
Correct |
5 ms |
8532 KB |
Output is correct |
46 |
Correct |
5 ms |
8536 KB |
Output is correct |
47 |
Correct |
4 ms |
8532 KB |
Output is correct |
48 |
Correct |
4 ms |
7384 KB |
Output is correct |
49 |
Correct |
6 ms |
8532 KB |
Output is correct |
50 |
Correct |
5 ms |
7400 KB |
Output is correct |
51 |
Correct |
5 ms |
7384 KB |
Output is correct |
52 |
Correct |
4 ms |
7384 KB |
Output is correct |
53 |
Correct |
4 ms |
7384 KB |
Output is correct |
54 |
Correct |
4 ms |
8532 KB |
Output is correct |
55 |
Correct |
5 ms |
8536 KB |
Output is correct |
56 |
Correct |
5 ms |
8532 KB |
Output is correct |
57 |
Correct |
5 ms |
8556 KB |
Output is correct |
58 |
Correct |
4 ms |
8532 KB |
Output is correct |
59 |
Correct |
4 ms |
8536 KB |
Output is correct |
60 |
Correct |
5 ms |
8532 KB |
Output is correct |
61 |
Correct |
5 ms |
8532 KB |
Output is correct |
62 |
Correct |
4 ms |
7384 KB |
Output is correct |
63 |
Correct |
5 ms |
7392 KB |
Output is correct |
64 |
Correct |
5 ms |
8532 KB |
Output is correct |
65 |
Correct |
4 ms |
7388 KB |
Output is correct |
66 |
Correct |
5 ms |
8532 KB |
Output is correct |
67 |
Correct |
4 ms |
8532 KB |
Output is correct |
68 |
Correct |
4 ms |
8532 KB |
Output is correct |
69 |
Correct |
5 ms |
8532 KB |
Output is correct |
70 |
Correct |
4 ms |
8548 KB |
Output is correct |
71 |
Correct |
4 ms |
8676 KB |
Output is correct |
72 |
Correct |
5 ms |
8488 KB |
Output is correct |
73 |
Correct |
5 ms |
8532 KB |
Output is correct |
74 |
Correct |
5 ms |
8532 KB |
Output is correct |
75 |
Correct |
5 ms |
8532 KB |
Output is correct |
76 |
Correct |
4 ms |
7316 KB |
Output is correct |
77 |
Correct |
5 ms |
8532 KB |
Output is correct |
78 |
Correct |
4 ms |
7380 KB |
Output is correct |
79 |
Correct |
4 ms |
7380 KB |
Output is correct |
80 |
Correct |
4 ms |
7380 KB |
Output is correct |
81 |
Correct |
5 ms |
8536 KB |
Output is correct |
82 |
Correct |
4 ms |
8532 KB |
Output is correct |
83 |
Correct |
5 ms |
8540 KB |
Output is correct |
84 |
Correct |
5 ms |
8660 KB |
Output is correct |
85 |
Correct |
4 ms |
8532 KB |
Output is correct |
86 |
Correct |
4 ms |
8532 KB |
Output is correct |
87 |
Correct |
5 ms |
8532 KB |
Output is correct |
88 |
Correct |
4 ms |
8532 KB |
Output is correct |
89 |
Correct |
4 ms |
7380 KB |
Output is correct |
90 |
Correct |
5 ms |
8660 KB |
Output is correct |
91 |
Correct |
5 ms |
8532 KB |
Output is correct |
92 |
Correct |
4 ms |
8544 KB |
Output is correct |
93 |
Correct |
4 ms |
8532 KB |
Output is correct |
94 |
Correct |
4 ms |
7380 KB |
Output is correct |
95 |
Correct |
5 ms |
8532 KB |
Output is correct |
96 |
Correct |
6 ms |
8660 KB |
Output is correct |
97 |
Correct |
5 ms |
8660 KB |
Output is correct |
98 |
Correct |
5 ms |
8544 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
29 ms |
14788 KB |
Output is correct |
2 |
Correct |
5 ms |
9684 KB |
Output is correct |
3 |
Correct |
11 ms |
9484 KB |
Output is correct |
4 |
Correct |
18 ms |
13780 KB |
Output is correct |
5 |
Correct |
47 ms |
16972 KB |
Output is correct |
6 |
Correct |
20 ms |
10452 KB |
Output is correct |
7 |
Correct |
49 ms |
17484 KB |
Output is correct |
8 |
Correct |
7 ms |
10644 KB |
Output is correct |
9 |
Correct |
6 ms |
10344 KB |
Output is correct |
10 |
Correct |
50 ms |
17292 KB |
Output is correct |
11 |
Correct |
39 ms |
16076 KB |
Output is correct |
12 |
Correct |
55 ms |
17848 KB |
Output is correct |
13 |
Correct |
5 ms |
8532 KB |
Output is correct |
14 |
Correct |
5 ms |
8540 KB |
Output is correct |
15 |
Correct |
46 ms |
16420 KB |
Output is correct |
16 |
Correct |
12 ms |
9444 KB |
Output is correct |
17 |
Correct |
48 ms |
17396 KB |
Output is correct |
18 |
Correct |
31 ms |
13260 KB |
Output is correct |
19 |
Correct |
5 ms |
8660 KB |
Output is correct |
20 |
Correct |
31 ms |
14692 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
8532 KB |
Output is correct |
2 |
Correct |
4 ms |
8532 KB |
Output is correct |
3 |
Correct |
5 ms |
8536 KB |
Output is correct |
4 |
Correct |
4 ms |
8532 KB |
Output is correct |
5 |
Correct |
5 ms |
8536 KB |
Output is correct |
6 |
Correct |
4 ms |
8536 KB |
Output is correct |
7 |
Correct |
5 ms |
8532 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
5 ms |
8532 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
5 ms |
8532 KB |
Output is correct |
13 |
Correct |
4 ms |
7388 KB |
Output is correct |
14 |
Correct |
4 ms |
8536 KB |
Output is correct |
15 |
Correct |
4 ms |
8532 KB |
Output is correct |
16 |
Correct |
5 ms |
8532 KB |
Output is correct |
17 |
Correct |
5 ms |
8532 KB |
Output is correct |
18 |
Correct |
5 ms |
8532 KB |
Output is correct |
19 |
Correct |
5 ms |
8532 KB |
Output is correct |
20 |
Correct |
5 ms |
8532 KB |
Output is correct |
21 |
Correct |
4 ms |
8512 KB |
Output is correct |
22 |
Correct |
5 ms |
8532 KB |
Output is correct |
23 |
Correct |
5 ms |
8532 KB |
Output is correct |
24 |
Correct |
4 ms |
8532 KB |
Output is correct |
25 |
Correct |
6 ms |
8532 KB |
Output is correct |
26 |
Correct |
5 ms |
8532 KB |
Output is correct |
27 |
Correct |
4 ms |
7380 KB |
Output is correct |
28 |
Correct |
5 ms |
8532 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
5 ms |
8532 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
8532 KB |
Output is correct |
34 |
Correct |
4 ms |
7508 KB |
Output is correct |
35 |
Correct |
4 ms |
7344 KB |
Output is correct |
36 |
Correct |
4 ms |
8532 KB |
Output is correct |
37 |
Correct |
5 ms |
8532 KB |
Output is correct |
38 |
Correct |
4 ms |
7288 KB |
Output is correct |
39 |
Correct |
4 ms |
8532 KB |
Output is correct |
40 |
Correct |
4 ms |
8568 KB |
Output is correct |
41 |
Correct |
4 ms |
8532 KB |
Output is correct |
42 |
Correct |
5 ms |
8492 KB |
Output is correct |
43 |
Correct |
5 ms |
8540 KB |
Output is correct |
44 |
Correct |
4 ms |
8532 KB |
Output is correct |
45 |
Correct |
5 ms |
8532 KB |
Output is correct |
46 |
Correct |
5 ms |
8536 KB |
Output is correct |
47 |
Correct |
4 ms |
8532 KB |
Output is correct |
48 |
Correct |
4 ms |
7384 KB |
Output is correct |
49 |
Correct |
6 ms |
8532 KB |
Output is correct |
50 |
Correct |
5 ms |
7400 KB |
Output is correct |
51 |
Correct |
5 ms |
7384 KB |
Output is correct |
52 |
Correct |
4 ms |
7384 KB |
Output is correct |
53 |
Correct |
4 ms |
7384 KB |
Output is correct |
54 |
Correct |
4 ms |
8532 KB |
Output is correct |
55 |
Correct |
5 ms |
8536 KB |
Output is correct |
56 |
Correct |
5 ms |
8532 KB |
Output is correct |
57 |
Correct |
5 ms |
8556 KB |
Output is correct |
58 |
Correct |
4 ms |
8532 KB |
Output is correct |
59 |
Correct |
4 ms |
8536 KB |
Output is correct |
60 |
Correct |
5 ms |
8532 KB |
Output is correct |
61 |
Correct |
5 ms |
8532 KB |
Output is correct |
62 |
Correct |
4 ms |
7384 KB |
Output is correct |
63 |
Correct |
5 ms |
7392 KB |
Output is correct |
64 |
Correct |
5 ms |
8532 KB |
Output is correct |
65 |
Correct |
4 ms |
7388 KB |
Output is correct |
66 |
Correct |
5 ms |
8532 KB |
Output is correct |
67 |
Correct |
4 ms |
8532 KB |
Output is correct |
68 |
Correct |
4 ms |
8532 KB |
Output is correct |
69 |
Correct |
5 ms |
8532 KB |
Output is correct |
70 |
Correct |
4 ms |
8548 KB |
Output is correct |
71 |
Correct |
4 ms |
8676 KB |
Output is correct |
72 |
Correct |
5 ms |
8488 KB |
Output is correct |
73 |
Correct |
5 ms |
8532 KB |
Output is correct |
74 |
Correct |
5 ms |
8532 KB |
Output is correct |
75 |
Correct |
5 ms |
8532 KB |
Output is correct |
76 |
Correct |
4 ms |
7316 KB |
Output is correct |
77 |
Correct |
5 ms |
8532 KB |
Output is correct |
78 |
Correct |
4 ms |
7380 KB |
Output is correct |
79 |
Correct |
4 ms |
7380 KB |
Output is correct |
80 |
Correct |
4 ms |
7380 KB |
Output is correct |
81 |
Correct |
5 ms |
8536 KB |
Output is correct |
82 |
Correct |
4 ms |
8532 KB |
Output is correct |
83 |
Correct |
5 ms |
8540 KB |
Output is correct |
84 |
Correct |
5 ms |
8660 KB |
Output is correct |
85 |
Correct |
4 ms |
8532 KB |
Output is correct |
86 |
Correct |
4 ms |
8532 KB |
Output is correct |
87 |
Correct |
5 ms |
8532 KB |
Output is correct |
88 |
Correct |
4 ms |
8532 KB |
Output is correct |
89 |
Correct |
4 ms |
7380 KB |
Output is correct |
90 |
Correct |
5 ms |
8660 KB |
Output is correct |
91 |
Correct |
5 ms |
8532 KB |
Output is correct |
92 |
Correct |
4 ms |
8544 KB |
Output is correct |
93 |
Correct |
4 ms |
8532 KB |
Output is correct |
94 |
Correct |
4 ms |
7380 KB |
Output is correct |
95 |
Correct |
5 ms |
8532 KB |
Output is correct |
96 |
Correct |
6 ms |
8660 KB |
Output is correct |
97 |
Correct |
5 ms |
8660 KB |
Output is correct |
98 |
Correct |
5 ms |
8544 KB |
Output is correct |
99 |
Correct |
29 ms |
14788 KB |
Output is correct |
100 |
Correct |
5 ms |
9684 KB |
Output is correct |
101 |
Correct |
11 ms |
9484 KB |
Output is correct |
102 |
Correct |
18 ms |
13780 KB |
Output is correct |
103 |
Correct |
47 ms |
16972 KB |
Output is correct |
104 |
Correct |
20 ms |
10452 KB |
Output is correct |
105 |
Correct |
49 ms |
17484 KB |
Output is correct |
106 |
Correct |
7 ms |
10644 KB |
Output is correct |
107 |
Correct |
6 ms |
10344 KB |
Output is correct |
108 |
Correct |
50 ms |
17292 KB |
Output is correct |
109 |
Correct |
39 ms |
16076 KB |
Output is correct |
110 |
Correct |
55 ms |
17848 KB |
Output is correct |
111 |
Correct |
5 ms |
8532 KB |
Output is correct |
112 |
Correct |
5 ms |
8540 KB |
Output is correct |
113 |
Correct |
46 ms |
16420 KB |
Output is correct |
114 |
Correct |
12 ms |
9444 KB |
Output is correct |
115 |
Correct |
48 ms |
17396 KB |
Output is correct |
116 |
Correct |
31 ms |
13260 KB |
Output is correct |
117 |
Correct |
5 ms |
8660 KB |
Output is correct |
118 |
Correct |
31 ms |
14692 KB |
Output is correct |
119 |
Correct |
6 ms |
9940 KB |
Output is correct |
120 |
Correct |
39 ms |
16516 KB |
Output is correct |
121 |
Correct |
31 ms |
14256 KB |
Output is correct |
122 |
Correct |
5 ms |
8532 KB |
Output is correct |
123 |
Correct |
6 ms |
8616 KB |
Output is correct |
124 |
Correct |
10 ms |
9180 KB |
Output is correct |
125 |
Correct |
21 ms |
12756 KB |
Output is correct |
126 |
Correct |
6 ms |
10196 KB |
Output is correct |
127 |
Correct |
11 ms |
11220 KB |
Output is correct |
128 |
Correct |
48 ms |
16052 KB |
Output is correct |
129 |
Correct |
32 ms |
14336 KB |
Output is correct |
130 |
Correct |
36 ms |
14768 KB |
Output is correct |
131 |
Correct |
6 ms |
9684 KB |
Output is correct |
132 |
Correct |
6 ms |
9940 KB |
Output is correct |
133 |
Correct |
54 ms |
17620 KB |
Output is correct |
134 |
Correct |
21 ms |
13404 KB |
Output is correct |
135 |
Correct |
7 ms |
10456 KB |
Output is correct |
136 |
Correct |
13 ms |
9684 KB |
Output is correct |
137 |
Correct |
16 ms |
10056 KB |
Output is correct |
138 |
Correct |
7 ms |
10596 KB |
Output is correct |