QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#219523 | #7147. IQ Test | ckiseki# | AC ✓ | 120ms | 33980kb | C++20 | 1.8kb | 2023-10-19 15:57:58 | 2023-10-19 15:57:58 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define all(x) begin(x), end(x)
#ifdef CKISEKI
#define safe cerr << __PRETTY_FUNCTION__ << " line " << __LINE__ << " safe\n"
#define debug(a...) debug_(#a, a)
#define orange(a...) orange_(#a, a)
void debug_(const char *s, auto ...a) {
cerr << "\e[1;32m(" << s << ") = (";
int f = 0;
(..., (cerr << (f++ ? ", " : "") << a));
cerr << ")\e[0m\n";
}
void orange_(const char *s, auto L, auto R) {
cerr << "\e[1;33m[ " << s << " ] = [ ";
for (int f = 0; L != R; ++f)
cerr << (f ? ", " : "") << *L++;
cerr << " ]\e[0m\n";
}
#else
#define safe ((void)0)
#define orange(...) safe
#define debug(...) safe
#endif
const int maxn = 200025;
int z[maxn];
void update(int p, int val) {
debug(p, val);
for (++p; p < maxn; p += p & -p)
z[p] = max(z[p], val);
}
int query(int p) {
debug(p);
int r = 0;
for (++p; p > 0; p -= p & -p)
r = max(r, z[p]);
return r;
}
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
int n;
cin >> n;
vector<map<int, array<int, 2>>> evt(n + 1);
const auto add_point = [&](int x, int y, int type) {
evt[x][y][type] += 1;
};
for (int i = 0; i < n; i++) {
char c;
int x, y;
cin >> c >> x >> y;
if (c == 'A') {
if (x <= i) add_point(x, i - x, 1);
if (y <= i) add_point(y, i - y, 0);
} else {
if (x <= i) add_point(i - x, x, 1);
if (y <= i) add_point(i - y, y, 0);
}
}
int ans = 0;
vector<pair<int,int>> nxt;
for (int i = 0; i <= n; i++) {
for (auto [j, val] : nxt) {
update(j, val);
}
nxt.clear();
for (const auto &[j, val]: evt[i]) {
int dp = query(j);
ans = max(ans, dp + max(val[0], val[1]));
update(j + 1, dp + val[0]);
nxt.emplace_back(j, dp + val[1]);
// at next i, update(j, dp + val[1]);
}
}
cout << ans << '\n';
return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3500kb
input:
2 A 0 1 B 0 1
output:
2
result:
ok 1 number(s): "2"
Test #2:
score: 0
Accepted
time: 1ms
memory: 3468kb
input:
2 A 1 2 B 0 1
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 0
Accepted
time: 1ms
memory: 3412kb
input:
1 A 1 1
output:
0
result:
ok 1 number(s): "0"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
10 A 1 1 A 1 0 B 1 0 B 3 1 B 1 0 B 1 5 A 5 6 B 3 0 A 0 0 B 8 9
output:
5
result:
ok 1 number(s): "5"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
10 A 3 0 B 0 1 B 0 2 A 1 5 B 5 2 B 3 2 B 7 2 A 4 3 B 6 0 B 2 2
output:
6
result:
ok 1 number(s): "6"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3464kb
input:
10 B 1 0 A 0 0 A 1 4 A 4 1 B 0 2 A 5 1 B 5 0 B 3 2 A 2 1 A 6 7
output:
6
result:
ok 1 number(s): "6"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
10 B 1 0 A 0 2 A 0 0 A 3 0 A 0 2 A 1 0 B 0 7 B 1 0 B 0 1 A 2 0
output:
6
result:
ok 1 number(s): "6"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
10 B 0 1 B 4 2 B 0 7 A 0 1 A 1 2 A 6 7 B 0 4 A 3 8 A 1 2 B 3 4
output:
5
result:
ok 1 number(s): "5"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
10 A 0 0 A 0 0 B 0 1 B 1 3 A 2 0 B 0 5 A 0 1 B 7 3 B 2 2 B 1 0
output:
6
result:
ok 1 number(s): "6"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3448kb
input:
10 A 1 0 B 3 1 A 1 0 B 0 3 B 0 3 B 1 2 A 3 7 B 4 1 A 2 2 A 2 2
output:
6
result:
ok 1 number(s): "6"
Test #11:
score: 0
Accepted
time: 1ms
memory: 3464kb
input:
10 B 1 1 B 0 2 A 2 2 B 2 5 B 3 3 B 3 1 A 3 5 A 3 4 B 5 1 A 0 6
output:
5
result:
ok 1 number(s): "5"
Test #12:
score: 0
Accepted
time: 1ms
memory: 3504kb
input:
10 B 0 0 A 1 1 B 2 2 B 2 1 B 3 0 A 4 3 A 4 2 B 1 2 A 4 1 A 10 0
output:
5
result:
ok 1 number(s): "5"
Test #13:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
10 A 0 0 A 1 0 B 0 2 B 2 0 A 3 2 B 7 8 A 0 1 B 2 5 B 3 1 B 9 6
output:
6
result:
ok 1 number(s): "6"
Test #14:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
100 B 1 0 A 3 1 B 4 1 B 3 1 B 2 1 B 20 8 A 2 9 A 1 4 A 17 0 A 1 7 B 25 6 A 7 26 A 8 5 A 13 9 A 16 25 B 15 17 B 21 22 B 4 18 B 39 13 A 12 3 B 39 32 B 17 31 B 29 10 B 5 2 B 6 4 A 35 19 A 59 27 B 14 3 B 15 26 B 9 36 B 8 20 A 24 15 A 19 46 A 19 77 B 46 25 A 43 11 B 21 20 B 28 34 B 23 38 B 31 32 A 31 9 A...
output:
20
result:
ok 1 number(s): "20"
Test #15:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
100 A 0 2 A 2 0 A 3 3 A 2 17 A 3 0 A 4 1 A 5 11 B 0 6 A 2 0 B 12 7 B 20 6 A 3 2 A 16 43 A 3 14 B 5 20 B 6 7 B 30 45 A 11 32 A 12 13 B 3 19 B 36 19 B 18 44 A 4 7 A 12 26 B 32 46 A 16 18 B 43 20 B 42 47 A 7 14 B 57 30 B 24 21 B 14 31 B 37 5 B 16 7 A 28 49 B 33 72 B 51 18 A 21 60 B 7 21 B 1 7 B 2 23 A ...
output:
21
result:
ok 1 number(s): "21"
Test #16:
score: 0
Accepted
time: 1ms
memory: 3520kb
input:
100 A 0 0 B 2 1 A 2 0 B 0 4 B 4 2 B 0 9 B 6 19 A 0 25 B 1 1 B 32 3 B 29 34 A 17 3 A 21 29 A 21 17 A 9 20 B 10 9 B 7 4 A 8 20 A 13 9 A 3 6 B 5 6 A 7 5 A 17 55 A 21 13 A 0 6 A 13 58 B 4 29 B 11 42 B 3 4 A 4 28 B 13 2 A 14 47 A 6 4 B 36 57 A 8 85 B 1 1 B 10 8 A 14 22 B 37 18 B 5 5 A 9 14 B 12 13 A 3 21...
output:
21
result:
ok 1 number(s): "21"
Test #17:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
100 A 2 4 A 1 0 B 1 1 A 0 1 A 2 0 A 2 2 B 1 4 B 1 0 A 18 5 A 6 11 A 0 12 A 3 14 A 1 16 A 17 0 A 15 37 A 20 11 B 22 11 B 5 23 B 9 26 A 0 2 B 17 32 A 23 0 B 18 66 A 0 7 A 5 16 A 10 17 A 17 4 B 7 29 A 19 32 B 10 7 B 5 6 B 47 26 A 10 27 B 52 47 B 10 17 B 28 47 B 54 15 B 8 5 B 1 13 A 27 26 B 11 61 B 21 2...
output:
19
result:
ok 1 number(s): "19"
Test #18:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
100 A 0 0 B 1 2 A 1 3 B 6 14 B 2 0 A 5 0 A 10 10 A 6 5 A 3 19 A 0 26 A 4 6 A 3 5 A 1 6 B 14 5 B 2 21 A 2 13 B 17 6 B 2 39 A 12 20 B 9 13 B 22 46 B 20 15 A 18 15 A 3 8 B 26 0 B 10 6 B 14 5 B 21 34 A 28 26 A 0 26 B 18 6 A 11 27 B 15 11 B 8 0 B 19 12 A 47 14 B 31 13 B 1 0 B 17 36 A 41 1 A 14 18 A 21 80...
output:
22
result:
ok 1 number(s): "22"
Test #19:
score: 0
Accepted
time: 1ms
memory: 3592kb
input:
100 B 0 0 B 0 0 A 0 11 A 3 3 A 2 1 B 9 2 A 16 10 B 3 0 B 0 10 B 12 6 A 3 5 A 9 11 A 3 13 B 14 2 A 0 4 A 1 21 B 8 18 A 11 30 B 40 12 B 9 13 A 22 25 B 10 15 B 15 6 B 0 25 A 14 8 B 38 47 B 2 11 B 50 18 B 1 13 A 7 27 B 16 14 B 16 8 A 9 25 B 53 7 A 15 9 A 56 4 A 8 1 A 56 30 B 7 63 B 49 44 B 30 4 A 44 10 ...
output:
25
result:
ok 1 number(s): "25"
Test #20:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
100 B 0 0 A 0 3 B 0 1 B 1 1 B 4 2 A 1 4 B 3 3 B 2 36 A 22 3 B 14 6 B 5 26 B 20 5 B 7 6 B 3 1 B 9 22 A 45 6 B 20 48 A 16 41 B 1 1 A 8 1 A 2 4 B 28 4 B 12 5 B 9 3 A 30 0 B 19 5 A 60 10 B 2 2 A 24 13 B 57 0 A 14 18 A 5 7 A 24 12 B 13 21 A 1 28 A 6 15 A 51 9 A 11 25 B 31 15 B 2 20 A 4 23 A 41 46 B 48 6 ...
output:
25
result:
ok 1 number(s): "25"
Test #21:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
100 B 1 0 B 0 0 A 10 2 A 0 13 B 0 7 B 0 8 B 4 2 A 14 6 A 3 0 A 4 6 B 1 0 B 9 0 B 4 1 B 5 5 B 22 1 B 32 7 B 38 2 B 14 20 A 1 16 B 24 20 A 5 18 A 7 23 A 12 18 B 18 0 B 15 5 B 34 3 A 12 19 B 23 49 B 30 62 A 5 22 A 12 2 B 10 19 B 29 33 A 34 41 B 11 5 A 33 14 A 10 8 B 33 20 B 21 45 B 16 51 B 11 2 B 14 11...
output:
20
result:
ok 1 number(s): "20"
Test #22:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
100 B 0 1 A 0 4 A 5 7 B 12 3 A 5 11 B 2 0 A 0 2 B 0 9 B 0 5 A 7 10 B 17 8 B 20 30 B 12 11 A 2 12 A 6 18 B 18 7 B 7 7 B 20 33 B 11 11 B 11 8 A 3 27 A 12 19 B 18 3 B 21 15 B 10 1 B 13 15 B 21 15 B 65 3 A 3 19 A 43 0 A 2 11 A 3 64 A 1 9 A 33 31 B 20 32 B 8 10 A 41 6 B 5 29 B 11 3 A 28 38 B 5 4 B 29 12 ...
output:
19
result:
ok 1 number(s): "19"
Test #23:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
100 A 0 0 A 3 0 A 3 10 B 0 5 A 1 7 A 0 2 B 3 24 A 3 4 B 19 23 A 8 10 A 10 1 A 2 0 B 11 5 A 29 9 B 3 5 A 28 37 B 16 6 A 21 7 A 50 20 B 20 29 A 13 35 A 19 3 A 20 1 A 16 18 A 0 16 B 55 16 A 18 2 A 5 9 B 30 36 B 9 29 A 16 39 B 38 31 A 25 3 A 38 31 A 55 17 A 20 12 A 25 75 A 21 4 B 4 10 A 42 6 A 39 22 B 4...
output:
24
result:
ok 1 number(s): "24"
Test #24:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
1000 B 0 0 B 3 0 A 1 4 B 2 1 B 6 16 A 0 6 B 3 3 B 6 4 A 13 10 A 10 15 B 14 5 A 23 7 A 4 24 A 44 6 A 22 0 A 13 10 B 12 12 B 3 5 A 14 16 B 22 0 A 14 35 B 15 28 A 20 36 B 66 25 A 1 21 B 17 34 B 13 22 A 32 4 A 0 16 A 22 59 A 10 10 B 32 61 A 1 14 B 102 20 A 15 28 A 83 41 A 46 22 B 20 45 B 20 51 B 88 38 B...
output:
74
result:
ok 1 number(s): "74"
Test #25:
score: 0
Accepted
time: 1ms
memory: 3652kb
input:
1000 A 0 0 A 1 0 A 1 7 B 3 6 A 3 3 B 0 0 A 8 7 B 5 10 B 5 1 B 3 2 A 14 1 A 17 5 B 14 4 A 3 3 A 12 2 A 24 75 A 4 42 A 5 9 B 11 4 B 3 17 B 22 18 A 5 32 B 12 3 B 3 12 A 1 12 A 4 3 B 5 33 A 1 40 A 0 9 B 17 37 A 5 20 B 0 98 B 29 35 B 63 149 B 10 4 B 19 45 A 63 7 A 31 73 A 37 19 B 41 83 B 102 1 B 26 65 A ...
output:
70
result:
ok 1 number(s): "70"
Test #26:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
1000 A 1 2 B 16 6 B 1 0 A 5 1 B 2 0 B 0 2 A 0 19 A 4 0 A 0 7 B 26 12 B 15 17 A 13 3 B 0 18 B 10 1 B 7 4 A 98 10 A 36 6 A 8 14 B 8 33 B 18 3 A 35 9 A 50 38 A 6 15 A 8 4 B 1 5 B 43 18 A 86 55 A 14 14 A 0 3 A 12 24 B 1 34 B 16 1 B 5 132 B 46 24 B 6 36 A 90 49 B 97 86 A 47 1 A 68 2 A 20 6 B 19 46 A 11 1...
output:
66
result:
ok 1 number(s): "66"
Test #27:
score: 0
Accepted
time: 1ms
memory: 3668kb
input:
1000 A 1 0 A 1 4 B 1 0 A 10 5 A 0 4 B 0 7 B 2 1 B 3 3 B 11 0 B 8 1 A 16 8 A 10 1 A 6 3 B 21 46 A 2 7 A 3 60 A 14 20 A 11 21 A 6 11 A 1 27 B 80 2 B 20 47 B 1 41 A 16 56 B 1 0 A 16 55 B 35 1 A 38 1 A 111 97 A 8 15 A 72 61 A 48 5 B 39 11 B 35 1 A 2 7 B 20 55 B 1 36 B 76 7 B 2 46 A 7 20 B 33 53 B 13 8 A...
output:
74
result:
ok 1 number(s): "74"
Test #28:
score: 0
Accepted
time: 1ms
memory: 3656kb
input:
1000 B 0 1 B 0 4 A 1 0 A 0 1 B 14 1 B 0 0 B 7 4 A 2 8 A 4 5 A 2 10 B 17 2 A 7 0 A 17 15 A 1 24 B 56 10 A 8 10 B 4 1 B 16 33 B 4 1 A 15 8 A 3 46 A 7 61 A 46 4 A 26 25 A 2 44 B 4 8 B 19 5 B 3 31 A 93 47 B 5 8 B 45 2 A 6 8 B 9 30 B 27 27 A 107 47 A 100 61 B 5 16 A 1 16 B 12 17 A 98 42 B 28 35 B 33 94 B...
output:
78
result:
ok 1 number(s): "78"
Test #29:
score: 0
Accepted
time: 1ms
memory: 3620kb
input:
1000 B 0 0 B 2 3 A 1 1 B 0 5 A 6 6 A 25 3 A 21 8 A 1 23 B 0 19 A 19 1 A 18 32 B 5 33 B 1 2 A 5 16 B 22 13 A 15 53 B 44 10 B 21 145 A 2 23 A 0 49 B 7 22 A 123 148 B 26 17 B 46 12 B 2 26 A 41 27 A 9 11 B 16 10 B 82 30 A 1 3 B 32 9 A 25 13 B 53 81 B 20 3 B 65 12 B 21 68 A 10 3 A 7 26 B 25 0 B 43 98 A 2...
output:
72
result:
ok 1 number(s): "72"
Test #30:
score: 0
Accepted
time: 1ms
memory: 3624kb
input:
1000 B 4 0 A 0 3 B 1 2 B 1 0 B 4 1 A 18 10 A 2 25 B 0 2 B 9 3 A 7 8 B 19 12 B 3 21 B 8 12 B 13 10 A 12 18 A 29 9 B 15 33 B 29 2 B 0 7 A 12 13 B 12 11 B 25 1 A 16 47 B 1 4 B 2 15 B 16 1 A 2 18 B 45 83 B 74 20 B 96 88 A 22 17 A 83 17 B 14 8 B 14 32 B 47 62 A 115 78 A 15 60 B 14 40 A 45 41 B 22 8 A 24 ...
output:
77
result:
ok 1 number(s): "77"
Test #31:
score: 0
Accepted
time: 1ms
memory: 3620kb
input:
1000 A 1 1 B 4 2 B 1 3 B 2 4 A 2 9 A 15 1 B 6 1 A 0 6 A 3 13 A 1 0 A 20 5 B 2 15 B 22 0 B 31 7 B 7 25 A 1 48 B 5 4 A 45 6 A 54 59 B 57 1 A 19 4 A 10 2 B 9 5 B 6 55 A 3 8 A 3 13 B 54 28 B 5 24 B 68 12 B 59 46 B 15 30 A 11 23 B 79 25 A 10 5 B 36 17 B 22 91 B 21 28 A 24 64 A 89 14 B 8 22 A 49 28 B 77 9...
output:
72
result:
ok 1 number(s): "72"
Test #32:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
1000 A 0 0 A 1 2 A 1 4 A 4 0 B 0 2 A 13 4 A 16 4 B 25 15 B 26 2 B 15 6 A 22 1 B 1 11 A 2 9 A 2 4 B 3 39 A 5 9 A 59 17 A 0 10 A 37 16 B 10 22 B 30 69 B 1 3 A 3 19 A 12 25 B 3 2 B 39 40 B 28 44 B 20 7 B 64 6 A 43 30 A 9 52 B 37 30 B 20 63 A 5 37 A 27 92 A 140 113 B 29 11 A 36 174 B 5 136 A 113 46 A 34...
output:
71
result:
ok 1 number(s): "71"
Test #33:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
1000 B 1 1 A 1 0 A 4 1 A 1 3 A 14 0 A 0 8 B 1 5 B 6 2 A 6 4 B 1 7 B 46 33 B 4 8 B 7 2 B 0 32 A 40 11 A 86 35 A 0 13 A 17 20 A 21 25 B 22 4 A 113 36 B 12 1 A 39 25 B 52 21 B 24 49 B 36 2 A 8 16 B 107 3 A 11 3 A 9 0 A 4 9 A 46 45 A 50 24 B 15 139 A 22 6 A 69 21 B 25 18 B 7 25 A 61 33 B 115 24 A 85 38 ...
output:
69
result:
ok 1 number(s): "69"
Test #34:
score: 0
Accepted
time: 104ms
memory: 33848kb
input:
200000 A 3 1 A 3 0 B 0 3 B 5 6 B 0 10 A 14 12 A 4 12 A 0 9 A 3 14 A 13 3 A 10 3 B 55 19 B 4 29 B 12 2 B 12 0 B 1 17 A 0 17 B 12 1 A 16 17 A 9 10 A 12 55 B 38 23 A 3 6 A 14 24 A 7 186 A 25 29 A 141 14 A 35 58 B 7 4 A 11 53 B 6 97 B 0 36 A 120 33 A 21 20 A 22 15 B 39 0 B 37 40 B 26 9 B 112 55 A 62 4 A...
output:
1069
result:
ok 1 number(s): "1069"
Test #35:
score: 0
Accepted
time: 116ms
memory: 33808kb
input:
200000 A 0 0 B 3 0 B 0 6 B 0 1 A 4 2 A 1 5 A 9 6 B 3 8 A 13 22 A 2 9 A 4 18 B 26 22 B 18 3 A 8 10 B 17 57 B 14 28 A 9 1 B 19 49 B 4 49 B 61 11 A 4 21 B 46 6 A 15 11 B 5 11 A 1 1 B 0 12 A 4 9 B 12 21 A 2 11 A 5 25 A 15 23 B 4 9 B 11 18 B 0 52 A 0 34 A 42 22 A 16 12 B 40 41 B 35 7 A 2 12 B 85 9 B 0 12...
output:
1076
result:
ok 1 number(s): "1076"
Test #36:
score: 0
Accepted
time: 114ms
memory: 33788kb
input:
200000 B 1 0 B 2 1 A 0 0 A 4 11 B 0 13 A 6 1 A 0 3 A 7 7 B 2 0 A 10 25 B 0 4 A 18 28 A 3 12 B 4 33 A 24 41 B 1 76 A 28 12 B 28 27 A 34 5 B 15 13 A 76 9 A 60 41 A 40 18 A 68 3 A 51 3 A 12 1 B 9 4 A 154 6 A 71 20 A 0 11 B 26 3 B 7 54 B 30 9 A 25 4 B 29 77 A 47 97 B 3 88 B 64 3 A 11 33 B 14 23 B 110 33...
output:
1070
result:
ok 1 number(s): "1070"
Test #37:
score: 0
Accepted
time: 105ms
memory: 33824kb
input:
200000 B 0 1 A 2 1 A 1 1 A 0 2 A 6 3 A 0 26 A 2 1 B 20 6 A 9 1 A 1 2 B 16 24 A 13 39 B 14 71 A 2 4 A 35 34 B 13 2 A 3 47 A 52 17 B 11 16 A 2 14 B 28 1 B 98 13 A 4 28 B 28 47 A 29 5 B 37 38 B 16 0 A 28 53 B 41 33 A 57 1 A 45 34 B 12 15 B 81 1 B 1 21 B 4 6 B 52 18 A 61 27 B 146 28 B 92 180 B 33 37 B 1...
output:
1074
result:
ok 1 number(s): "1074"
Test #38:
score: 0
Accepted
time: 116ms
memory: 33892kb
input:
200000 B 0 0 B 2 1 A 2 2 A 4 0 B 1 25 A 2 7 B 5 31 A 2 5 B 1 2 A 8 7 B 7 6 A 10 0 A 1 5 B 0 14 B 0 29 B 1 6 A 15 7 A 1 11 A 1 42 B 24 16 B 14 31 A 0 0 A 16 45 A 13 22 B 17 8 A 4 16 B 26 60 B 8 20 B 26 57 A 35 48 B 101 8 B 16 95 B 8 61 A 29 57 B 38 19 B 57 71 A 28 6 B 5 127 B 32 19 A 70 59 B 1 12 A 7...
output:
1074
result:
ok 1 number(s): "1074"
Test #39:
score: 0
Accepted
time: 107ms
memory: 33980kb
input:
200000 A 1 0 A 1 2 A 2 4 A 0 4 A 8 3 A 7 3 B 10 10 B 6 4 A 7 4 A 0 16 A 2 35 A 7 0 A 11 17 A 29 0 B 2 25 B 13 10 B 64 27 A 4 6 B 23 4 A 6 18 B 6 13 B 2 22 A 46 0 B 5 10 B 9 10 B 19 4 B 40 39 A 66 5 A 17 1 A 23 23 A 5 53 A 22 23 A 25 34 B 3 5 B 8 42 A 64 14 B 11 55 B 13 19 A 9 65 B 3 112 B 4 38 A 4 2...
output:
1068
result:
ok 1 number(s): "1068"
Test #40:
score: 0
Accepted
time: 100ms
memory: 33800kb
input:
200000 A 0 1 A 1 2 B 4 10 B 3 1 B 2 0 A 0 0 B 0 5 A 14 4 B 56 6 B 6 1 A 27 7 B 5 1 B 0 1 B 18 7 B 4 22 B 0 16 B 7 4 A 8 3 A 7 14 A 41 20 B 0 4 A 3 5 A 5 4 A 66 2 B 3 13 A 62 53 B 71 27 B 21 49 A 10 7 A 14 10 B 13 15 A 29 2 A 63 19 B 34 23 B 49 120 B 72 56 A 169 18 B 23 67 A 78 9 B 16 4 A 7 133 A 20 ...
output:
1066
result:
ok 1 number(s): "1066"
Test #41:
score: 0
Accepted
time: 120ms
memory: 33912kb
input:
200000 B 0 0 B 1 3 B 6 0 B 0 6 A 13 4 A 3 9 B 2 3 B 1 3 A 5 9 B 33 5 A 11 0 B 3 2 A 9 8 A 12 21 A 6 20 B 12 26 B 23 18 A 13 0 B 60 36 B 12 23 B 35 49 B 4 38 A 18 9 A 27 42 B 73 16 B 8 22 B 2 19 A 5 18 B 4 14 B 8 0 A 23 104 A 37 33 A 6 9 A 6 62 B 12 9 B 83 10 B 46 0 B 36 11 B 28 39 A 36 12 A 9 15 A 4...
output:
1069
result:
ok 1 number(s): "1069"
Test #42:
score: 0
Accepted
time: 114ms
memory: 33904kb
input:
200000 B 2 0 A 1 3 B 15 1 B 3 1 B 3 0 A 10 4 A 5 1 A 4 3 B 19 13 B 5 11 B 4 9 B 2 3 A 48 23 B 8 2 A 9 18 B 0 57 B 2 1 A 19 33 A 16 3 A 0 25 B 18 20 A 6 12 A 54 15 B 13 20 A 35 19 A 29 8 A 7 12 B 47 4 B 125 25 B 2 44 B 40 23 A 49 7 A 21 1 B 39 6 B 66 24 A 98 45 A 21 37 B 57 45 B 7 1 A 79 23 A 12 44 B...
output:
1078
result:
ok 1 number(s): "1078"
Test #43:
score: 0
Accepted
time: 104ms
memory: 33768kb
input:
200000 B 0 4 B 6 1 A 2 2 B 0 2 B 0 6 A 0 1 B 6 7 A 14 2 A 0 0 B 6 7 A 2 24 A 0 0 A 11 5 A 1 8 A 1 10 A 10 21 B 0 12 A 46 19 B 25 17 B 16 11 B 12 29 B 3 32 A 0 0 A 11 14 A 18 15 B 86 9 A 59 21 A 34 10 A 65 8 A 18 6 A 5 45 A 88 32 A 5 57 A 298 14 A 3 35 A 19 58 B 31 51 A 12 6 A 60 4 B 39 34 A 96 18 B ...
output:
1066
result:
ok 1 number(s): "1066"
Extra Test:
score: 0
Extra Test Passed