QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#178410 | #4295. Check Markers | NYCU_Yamada# | AC ✓ | 20ms | 6364kb | C++20 | 2.3kb | 2023-09-13 23:14:43 | 2023-09-13 23:14:45 |
Judging History
answer
#ifndef Yamada
#define Yamada
#include Yamada __FILE__ Yamada
void solve() {
int N; cin >> N;
vector<int> A(N), B(N);
for (int &x : A) cin >> x;
for (int &x : B) cin >> x;
int sumA = accumulate(ALL(A), int(0));
int sumB = accumulate(ALL(B), int(0));
int cnt1 = 0, cnt2 = 0;
for (int i = 0; i < N; ++i) {
if (sumB - B[i] > sumA and B[i] > sumA - A[i]) {
return cout << "NO" << "\n", void();
}
else if (sumB - B[i] > sumA) {
++cnt1;
}
else if (B[i] > sumA - A[i]) {
++cnt2;
}
}
if (cnt1 == N or cnt2 >= 2) cout << "NO" << "\n";
else cout << "YES" << "\n";
}
signed main() {
IOS();
int t = 1; cin >> t;
for (int i = 1; i <= t; ++i) solve();
return 0;
}
#else
#ifdef local
#define _GLIBCXX_DEBUG 1
#endif
#pragma GCC optimize("Ofast", "unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define int int64_t
// #define double __float80
using pii = pair<int, int>;
template <typename T> using MaxHeap = std::priority_queue<T>;
template <typename T> using MinHeap = std::priority_queue<T, vector<T>, greater<T>>;
// #define X first
// #define Y second
#define eb emplace_back
#define ef emplace_front
#define ee emplace
#define pb pop_back
#define pf pop_front
#define SZ(a) (int)((a).size())
#define ALL(a) begin(a), end(a)
#define RALL(a) rbegin(a), rend(a)
#ifdef local
#define IOS() void()
#define debug(...) \
fprintf(stderr, "%sAt [%s], line %d: (%s) = ", "\u001b[33m", __FUNCTION__, __LINE__, #__VA_ARGS__), \
_do(__VA_ARGS__), fprintf(stderr, "%s", "\u001b[0m")
template <typename T> void _do(T &&_t) {cerr << _t << "\n";}
template <typename T, typename ...U> void _do(T &&_t, U &&..._u) {cerr << _t << ", ", _do(_u...);}
#else
#define IOS() ios_base::sync_with_stdio(0); cin.tie(0)
#define debug(...) void()
#define endl '\n'
#endif
// mt19937_64 rng(steady::chrono_clock::now().time_since_epoch().count());
template <typename T, typename U> bool chmin(T &lhs, U rhs) {return lhs > rhs ? lhs = rhs, 1 : 0;}
template <typename T, typename U> bool chmax(T &lhs, U rhs) {return lhs < rhs ? lhs = rhs, 1 : 0;}
#endif
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3644kb
input:
3 3 1 2 1 2 1 1 2 1 1 2 2 4 1 1 1 1 2 1 2 1
output:
YES NO YES
result:
ok 3 token(s): yes count is 2, no count is 1
Test #2:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
100 4 1 4 1 5 4 1 4 1 4 3 3 2 5 1 2 3 1 4 0 1 1 4 3 1 3 5 4 1 0 1 5 5 5 5 3 4 0 4 4 0 4 3 1 0 4 2 3 5 4 0 3 4 4 4 5 5 4 0 4 1 2 0 4 5 2 0 2 4 5 1 1 4 5 0 3 3 1 1 3 1 4 2 4 5 5 4 5 3 1 4 0 3 0 2 1 3 5 3 4 4 2 2 1 0 2 5 3 4 4 0 2 2 4 2 5 3 4 4 2 4 3 1 4 1 5 4 2 3 3 3 5 3 0 4 4 3 4 1 0 4 0 4 2 4 4 1 0 ...
output:
YES YES NO NO YES YES YES YES YES YES NO YES NO YES YES YES NO YES YES YES YES YES NO YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES NO YES YES NO YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO YES YES YES YES YES YES NO YES YES YES YES YES YES Y...
result:
ok 100 token(s): yes count is 83, no count is 17
Test #3:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
100 5 4 5 4 0 2 0 0 0 3 2 5 1 1 2 1 2 5 0 0 4 4 5 3 4 4 0 4 5 0 0 4 0 5 5 5 0 5 4 1 3 5 5 3 5 1 0 1 0 4 0 2 4 0 0 5 0 3 3 0 3 5 4 5 3 3 5 5 3 0 5 1 5 0 3 1 0 5 4 4 2 2 0 3 4 2 4 2 5 0 3 2 3 4 4 3 1 1 5 5 5 5 2 1 5 0 0 5 2 2 5 0 3 1 3 0 2 1 4 0 3 5 5 2 4 5 5 5 4 1 0 5 5 0 1 1 1 5 1 0 5 4 5 5 4 3 1 4 ...
output:
YES NO YES YES YES NO YES YES YES YES YES YES NO YES YES YES NO YES YES YES YES NO YES YES NO YES YES YES YES YES YES YES YES YES NO YES YES YES YES NO YES YES NO YES NO NO YES NO YES NO YES NO YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES ...
result:
ok 100 token(s): yes count is 79, no count is 21
Test #4:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
100 4 0 6 3 7 10 10 3 6 4 9 6 1 4 7 5 6 3 4 8 7 3 2 2 9 3 0 4 10 8 2 2 9 10 2 7 4 2 4 7 7 10 5 4 0 4 2 4 9 2 0 2 0 3 4 6 10 10 4 6 9 1 1 4 0 8 2 8 3 7 9 7 4 10 5 0 7 0 6 4 5 4 6 10 8 4 0 5 9 10 4 5 2 5 9 9 8 1 2 4 8 4 1 3 7 7 10 8 4 8 10 7 10 6 4 6 6 4 8 6 7 0 5 0 7 7 4 6 4 8 2 4 6 10 5 4 3 9 6 5 7 ...
output:
NO YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES NO NO YES YES YES YES NO YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES NO YES YES YES NO YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO...
result:
ok 100 token(s): yes count is 86, no count is 14
Test #5:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
100 5 0 2 6 7 7 6 6 10 2 6 5 10 10 6 6 5 7 2 5 3 3 5 1 6 6 1 5 8 2 8 10 10 5 5 1 7 10 7 4 0 4 9 9 5 2 4 9 4 0 5 10 2 9 7 5 8 8 8 5 0 5 2 8 5 7 5 0 7 5 0 1 1 10 7 0 1 5 4 2 8 0 2 8 8 1 7 8 5 1 9 0 4 9 8 9 1 2 8 5 5 2 2 5 8 10 10 2 1 5 5 6 5 6 5 4 9 6 10 7 5 5 6 0 5 5 0 0 1 9 9 4 5 10 2 10 6 9 0 7 1 3...
output:
YES YES NO YES NO YES YES NO YES YES NO YES YES YES YES YES YES YES YES YES NO YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES...
result:
ok 100 token(s): yes count is 87, no count is 13
Test #6:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
100 10 1 1 1 3 0 2 3 3 1 1 2 2 0 3 3 1 2 3 3 1 10 2 0 1 0 0 3 0 3 3 0 3 0 2 0 0 2 3 2 3 2 10 0 0 3 2 3 1 0 0 3 3 1 2 2 2 1 3 1 1 3 1 10 3 0 3 1 0 1 1 0 3 1 2 1 2 2 3 0 3 2 0 0 10 0 1 0 0 1 0 3 2 0 1 3 3 3 3 0 3 1 0 2 1 10 1 1 3 2 3 2 2 1 1 3 0 1 0 1 1 2 1 0 2 0 10 3 2 1 1 2 1 3 1 3 1 2 0 3 3 2 0 3 0...
output:
NO NO YES YES NO YES YES YES NO YES NO YES YES YES YES YES NO YES YES YES NO YES NO YES YES YES YES NO YES YES NO YES YES YES YES YES YES YES YES YES NO YES YES YES YES NO YES YES YES YES YES YES YES NO YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES NO NO YES YES YES NO YES YES Y...
result:
ok 100 token(s): yes count is 77, no count is 23
Test #7:
score: 0
Accepted
time: 20ms
memory: 3616kb
input:
83521 2 4 13 0 12 2 9 15 0 13 2 8 2 1 10 2 16 7 2 8 2 13 9 15 10 2 3 9 14 4 2 8 16 11 10 2 8 15 1 9 2 11 12 15 5 2 3 10 11 1 2 11 0 15 10 2 13 10 0 9 2 7 0 5 13 2 1 5 13 1 2 15 10 13 8 2 0 5 3 15 2 11 15 2 11 2 8 14 16 0 2 12 0 5 10 2 2 16 13 6 2 10 12 0 2 2 6 2 6 8 2 4 5 1 1 2 14 7 3 4 2 4 13 1 8 2...
output:
YES YES YES YES YES NO YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES NO YES YES YES YES NO YES NO YES YES YES NO YES NO YES YES YES YES NO YES YES NO YES YES YES NO YES YES YES YES YES NO YES YES NO YES YES NO YES YES YES YES YES YES YES YES YES YES NO YES YES NO NO YES NO YES NO YES YE...
result:
ok 83521 token(s): yes count is 65025, no count is 18496
Test #8:
score: 0
Accepted
time: 13ms
memory: 3680kb
input:
46656 3 0 5 2 1 4 2 3 4 4 5 3 1 1 3 4 3 0 1 0 4 3 1 3 2 2 3 0 3 3 2 3 0 0 0 3 2 5 4 5 2 4 3 4 2 0 4 1 4 3 3 5 1 2 1 4 3 1 5 2 2 5 2 3 0 3 4 2 0 2 3 2 3 5 1 3 0 3 5 4 1 1 0 0 3 0 0 0 4 0 2 3 1 2 2 2 5 0 3 2 3 0 4 3 2 3 5 1 4 1 0 5 3 5 0 4 2 0 5 3 0 3 1 1 1 0 3 4 1 3 2 0 0 3 4 0 5 3 1 0 3 4 1 4 5 3 5 ...
output:
YES YES YES YES YES YES YES YES YES YES YES YES NO YES NO YES YES YES YES YES YES YES YES YES NO YES YES YES YES NO YES NO YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES NO NO YES YES YES YES NO YES YES YES YES NO YES YES YES NO NO YES YES YES YES NO YE...
result:
ok 46656 token(s): yes count is 39537, no count is 7119
Test #9:
score: 0
Accepted
time: 3ms
memory: 3684kb
input:
6561 4 0 1 2 2 2 2 2 1 4 1 2 1 2 0 0 0 0 4 0 0 0 2 0 0 2 1 4 1 2 0 1 1 0 1 0 4 0 0 0 2 2 0 1 0 4 2 1 0 0 2 0 2 0 4 0 2 2 0 1 1 0 0 4 0 0 1 0 0 1 1 0 4 2 0 1 2 2 2 2 1 4 1 0 1 1 2 1 2 2 4 2 2 0 2 0 2 2 0 4 0 0 1 2 0 2 1 1 4 0 2 1 2 0 0 1 0 4 2 0 2 2 2 2 2 1 4 0 1 1 0 0 1 0 0 4 2 0 2 2 1 2 0 2 4 2 2 0...
output:
YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES NO YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES NO YES YES NO YES YES NO YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES ...
result:
ok 6561 token(s): yes count is 5560, no count is 1001
Test #10:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
1024 5 0 0 0 0 1 1 0 1 0 0 5 0 0 1 0 0 1 0 1 1 0 5 1 0 0 1 1 1 1 1 0 1 5 1 1 1 1 1 1 1 1 0 1 5 0 0 1 1 0 0 0 1 0 1 5 1 1 0 1 0 0 1 0 1 0 5 1 0 0 0 0 1 0 0 0 0 5 0 1 1 1 1 0 1 0 0 0 5 1 0 1 1 0 1 1 0 1 0 5 1 0 1 0 1 1 0 1 0 0 5 1 1 1 0 0 0 1 1 0 1 5 1 1 1 1 0 1 0 0 1 1 5 0 1 1 1 1 0 1 0 1 1 5 1 1 0 0...
output:
YES NO YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES NO NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YE...
result:
ok 1024 token(s): yes count is 848, no count is 176
Test #11:
score: 0
Accepted
time: 2ms
memory: 3580kb
input:
4096 6 1 1 1 0 1 1 1 1 1 0 0 1 6 1 0 1 0 0 1 1 0 1 0 0 1 6 0 1 1 0 1 0 1 0 0 1 0 1 6 0 0 0 0 1 1 0 0 0 0 0 0 6 0 1 0 0 1 1 0 0 0 0 0 0 6 1 0 0 1 1 1 1 1 0 1 1 1 6 0 0 0 0 1 1 1 0 0 0 0 1 6 0 1 0 0 1 1 0 1 0 1 1 1 6 0 1 0 0 0 1 1 1 1 0 0 1 6 0 1 1 1 1 0 0 0 0 1 1 0 6 0 1 0 0 1 1 0 0 1 1 1 0 6 1 0 1 0...
output:
YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES NO NO NO NO YES YES YES NO YES NO NO YES YES YES YES YES YES YES YES YES YES NO YES NO NO YES YES YES YES YES YES YES YES NO YES NO YES YES NO YES YES YES YES YES YES NO NO YES YES YES NO YES YES YES YES NO YES NO YES YES YES YES YES YES NO ...
result:
ok 4096 token(s): yes count is 3302, no count is 794
Test #12:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
100 2 931650290 434331180 752635746 456751397 2 951274581 335272760 303002756 726510212 2 222187131 227937695 498879642 702611092 2 594722520 211601816 719408611 907802003 2 48128195 393732190 467724336 998575289 2 660878497 340970866 150579260 114648228 2 404965667 842726938 66605240 703626793 2 14...
output:
YES YES NO NO NO YES YES NO YES NO YES YES YES YES YES NO YES YES YES NO YES YES YES YES YES YES NO YES YES NO YES NO YES YES NO YES NO YES YES YES YES YES NO YES NO NO YES YES NO YES YES YES YES NO YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES NO NO YES YES YES YES YES YES YES NO YES Y...
result:
ok 100 token(s): yes count is 71, no count is 29
Test #13:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
100 3 399200346 418177982 608782504 653719089 550106965 60649913 3 700303210 142914740 81882187 739679903 711559736 926617652 3 428713168 438317216 496171043 77074168 42164990 189686423 3 585955751 350213435 567085801 69415112 857193048 701123529 3 192380794 773622228 984349367 428068213 778366563 3...
output:
YES NO YES YES YES NO YES YES YES YES YES NO YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES NO YES YES NO YES YES YES YES YES YES YES Y...
result:
ok 100 token(s): yes count is 90, no count is 10
Test #14:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
100 10 463450166 22271467 490927644 988529802 58264116 947459829 773643074 507145873 599638377 23474031 101664962 838319917 196472227 493042091 179608422 81804929 194237643 52851992 3704258 123013388 10 239856047 561170837 70761073 830724366 797755915 89525074 25326047 374422385 369728099 395885058 ...
output:
YES NO YES NO YES YES YES NO YES YES YES YES NO YES YES YES YES YES YES YES NO YES YES YES NO NO NO YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES NO NO YES YES YES YES YES NO YES NO YES NO YES NO YES NO YES YES NO YES YES YES NO YES YES YES YES YES YES YES YES YES YES NO NO YES YES NO Y...
result:
ok 100 token(s): yes count is 76, no count is 24
Test #15:
score: 0
Accepted
time: 1ms
memory: 3636kb
input:
100 100 2 17 14 9 7 4 10 3 4 11 13 8 11 12 4 20 9 19 9 6 12 16 11 5 1 19 10 19 17 10 16 3 18 15 9 12 1 16 16 2 7 17 6 4 10 19 14 2 3 12 16 1 8 17 12 0 4 4 1 11 5 3 14 7 5 11 20 20 14 16 3 9 4 13 2 10 3 17 3 18 20 10 10 7 4 0 7 16 18 15 0 2 18 7 18 16 15 11 4 3 13 5 8 16 9 19 8 5 12 1 20 16 0 10 8 3 ...
output:
NO NO YES NO NO YES NO YES NO YES NO YES NO NO YES YES YES YES YES NO NO YES NO YES NO YES NO NO YES YES YES NO NO NO YES NO YES YES YES NO NO NO YES NO YES YES YES NO YES YES NO NO YES YES YES YES YES YES YES YES YES NO YES YES NO NO YES YES YES YES YES NO YES YES NO YES YES NO YES YES NO YES YES Y...
result:
ok 100 token(s): yes count is 61, no count is 39
Test #16:
score: 0
Accepted
time: 7ms
memory: 3696kb
input:
100 1000 15 10 3 20 8 1 6 9 11 7 0 18 0 19 17 4 10 15 5 2 7 2 7 0 10 13 12 9 13 11 14 17 13 2 19 17 16 9 10 14 14 16 20 13 12 13 14 9 0 2 19 4 15 9 3 0 7 9 12 7 20 1 0 10 12 12 0 14 15 20 4 12 5 7 12 7 8 18 3 16 0 9 12 16 6 0 10 11 20 1 2 1 12 8 6 1 12 2 0 20 3 9 5 19 14 8 20 14 15 18 3 13 5 11 18 2...
output:
YES NO YES NO YES NO YES NO YES NO YES YES NO NO NO NO NO YES NO NO NO YES YES YES YES NO NO YES YES YES NO NO YES NO YES NO NO YES NO YES YES NO NO YES YES YES YES NO YES YES NO YES YES YES NO NO YES YES YES NO YES NO YES YES YES YES YES YES YES YES YES YES YES YES NO YES NO YES YES YES YES NO YES ...
result:
ok 100 token(s): yes count is 60, no count is 40
Test #17:
score: 0
Accepted
time: 11ms
memory: 3660kb
input:
20 10000 1 5 16 12 14 2 18 1 6 19 6 20 0 17 16 15 6 10 12 10 19 2 6 13 9 15 0 14 18 13 3 11 4 2 18 3 0 11 13 10 5 2 6 8 13 14 19 9 2 7 14 7 6 7 16 19 11 18 5 2 5 5 7 16 9 0 13 11 17 13 7 20 9 7 11 12 4 3 4 20 11 18 7 17 9 13 13 2 13 3 6 2 16 20 13 14 19 14 0 7 15 2 18 7 3 15 8 11 17 14 16 3 7 8 9 14...
output:
YES NO YES NO NO YES YES YES YES NO YES NO NO YES YES NO YES NO NO YES
result:
ok 20 token(s): yes count is 11, no count is 9
Test #18:
score: 0
Accepted
time: 15ms
memory: 4800kb
input:
2 100000 0 0 4 19 5 14 7 5 5 13 15 3 10 20 7 15 16 3 18 3 3 1 11 14 13 4 8 1 2 11 7 15 12 19 8 10 17 10 12 14 12 15 2 14 7 1 19 8 9 10 17 20 20 8 4 11 8 3 16 11 8 1 18 8 1 14 14 14 14 19 15 15 5 9 0 12 13 19 16 7 18 11 15 20 6 20 14 1 9 0 0 1 6 7 18 0 3 0 3 12 8 3 10 5 1 18 5 8 1 19 17 1 9 17 13 8 4...
output:
YES NO
result:
ok 2 token(s): yes count is 1, no count is 1
Test #19:
score: 0
Accepted
time: 9ms
memory: 6364kb
input:
1 200000 8 7 4 0 7 3 3 2 10 8 3 16 8 7 3 8 15 6 20 18 2 9 4 8 9 18 7 11 6 11 15 2 0 5 18 5 10 20 11 14 2 18 10 11 20 18 16 7 4 18 1 18 4 20 3 4 16 18 0 16 1 9 15 1 17 0 7 10 17 18 15 14 18 0 0 15 3 5 9 9 11 4 19 17 8 6 4 2 14 13 7 8 19 10 9 19 6 15 6 13 2 13 11 15 16 10 13 5 11 15 13 10 9 15 17 7 5 ...
output:
YES
result:
ok YES
Test #20:
score: 0
Accepted
time: 8ms
memory: 6292kb
input:
1 200000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
YES
result:
ok YES
Test #21:
score: 0
Accepted
time: 14ms
memory: 6260kb
input:
1 200000 0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 1 1 1 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0 1 0...
output:
YES
result:
ok YES
Test #22:
score: 0
Accepted
time: 13ms
memory: 6212kb
input:
1 200000 2 1 2 0 1 1 2 2 0 0 2 2 0 2 0 0 1 0 2 0 2 0 0 1 2 0 1 1 0 2 0 2 0 0 1 0 2 0 0 0 2 1 0 0 0 2 0 1 0 1 1 1 2 1 0 0 1 0 0 1 1 2 0 1 1 0 1 0 0 2 0 0 0 2 2 0 2 2 0 1 0 2 0 0 1 2 1 1 0 1 0 1 2 2 0 0 0 0 1 2 2 2 2 0 1 1 0 1 2 2 0 0 0 1 1 2 0 1 1 2 1 0 2 1 2 2 0 2 2 0 0 0 1 1 0 1 2 1 2 1 1 1 2 0 0 1...
output:
NO
result:
ok NO
Test #23:
score: 0
Accepted
time: 10ms
memory: 6296kb
input:
1 200000 1 1 1 1 2 3 3 0 1 1 1 0 1 0 2 3 2 3 2 2 1 2 1 3 2 2 2 2 0 0 2 3 2 0 2 3 3 1 2 2 3 3 2 2 3 2 3 3 3 3 0 2 1 2 0 2 1 0 2 3 3 1 1 0 0 1 3 1 3 2 2 3 3 3 0 2 3 2 3 2 2 3 2 3 2 0 1 0 0 0 1 3 2 3 3 0 1 3 1 3 2 0 0 1 0 1 2 1 0 2 0 3 0 3 3 0 0 1 3 0 1 3 3 1 2 0 2 2 2 3 1 3 2 2 3 1 0 2 0 0 3 0 3 3 1 3...
output:
NO
result:
ok NO