QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#646940 | #1204. En-JOI-able Logo Design | Grand_Elf | 100 ✓ | 294ms | 187992kb | C++17 | 978b | 2024-10-17 10:18:39 | 2024-10-17 10:18:42 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 20;
int n, k, ans, v[N], cnt[N][11][3], f[N][11];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> k;
n = 1 << k * 2;
for (int i = 0; i < n; i++) {
char c;
cin >> c;
if (c == 'J') {
v[i] = 0;
} else if (c == 'O') {
v[i] = 1;
} else {
v[i] = 2;
}
}
for (int i = 0; i < n; i++) {
cnt[i][0][v[i]] = 1;
f[i][0] = 1;
}
for (int j = 1; j <= k; j++) {
for (int i = 0; i < n; i++) {
int step = 1 << (j - 1) * 2;
int i1 = (i + step) % n;
int i2 = (i1 + step) % n;
int i3 = (i2 + step) % n;
for (int t = 0; t < 3; t++) {
cnt[i][j][t] = cnt[i][j - 1][t] + cnt[i1][j - 1][t] + cnt[i2][j - 1][t] + cnt[i3][j - 1][t];
}
f[i][j] = cnt[i][j - 1][0] + cnt[i1][j - 1][1] + cnt[i2][j - 1][2] + f[i3][j - 1];
}
}
for (int i = 0; i < n; i++) {
ans = max(ans, f[i][k]);
}
cout << n - ans << '\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 30
Accepted
Test #1:
score: 30
Accepted
time: 0ms
memory: 7752kb
input:
1 OOOJ
output:
1
result:
ok single line: '1'
Test #2:
score: 30
Accepted
time: 0ms
memory: 7624kb
input:
1 JJOO
output:
1
result:
ok single line: '1'
Test #3:
score: 30
Accepted
time: 1ms
memory: 7744kb
input:
2 OJJOOJJIJIIJJOII
output:
7
result:
ok single line: '7'
Test #4:
score: 30
Accepted
time: 1ms
memory: 7744kb
input:
2 IJOIOIOJIJOJOJOI
output:
7
result:
ok single line: '7'
Test #5:
score: 30
Accepted
time: 1ms
memory: 7708kb
input:
3 IJOIIIIIIIIIIIIIIIIIJIIIIIIOIJOJIIIOIIIIIIIIJJJIIIIIJIIIIIIOIIJI
output:
36
result:
ok single line: '36'
Test #6:
score: 30
Accepted
time: 0ms
memory: 7804kb
input:
3 JJJIOIJJOOIJOJJIOIJIIOOJOOIOJJOOIJJIJIIOIIIJJOIJJIIJIJIJIOIIJJJJ
output:
33
result:
ok single line: '33'
Test #7:
score: 30
Accepted
time: 1ms
memory: 7764kb
input:
4 JIJIJJJJJIJJJJOOJJJJJOJJIJJJJJIOIJOJJIJJIJOJOJJJJJJJOJJJJJJJIOJJJOIJJOJJJOOOIJJJJJOJIOJOJIJJJOJJJJJJJJJOJJJJJJOJJJJJJJOJJJJJJJIJJJJJJJJIOJJOJJIIJJJJIJJJJJJJJIIJJJIOJJJJJJIJJIJJJIIJIJOIIJJJJJJJJJJIJIJJJOJJOJJJJOIJJJJJJJJIOOJJJIJJJOIJJJJJIJJJOJJJJOJIIJJJJJJJ
output:
154
result:
ok single line: '154'
Test #8:
score: 30
Accepted
time: 1ms
memory: 7756kb
input:
4 JIJIJIJIIIJOIIJIOJJJOIJIIJJJIOJIJJOIIOIIOJOJIOIOOOIJJJJIOJOOIJOIJIIJIIIJIIIIJOJIOJIIIOJOJJIOOJJJIJJJOJOJJIOJJJJOOOJJOJOIJOIOJJJIJJJOOOJIJIIIJIIIOIJJIIIIOJIIIOOIOJJIOJOOIIJOIOIIIOJJOIIJIOIJIIIJJOJOJOIOOOIJIJOJIIIOJOOIIIJIIOOJJIJIIIJOOJIJIIOIOJOJIOOOIIIJIJIJ
output:
148
result:
ok single line: '148'
Test #9:
score: 30
Accepted
time: 0ms
memory: 7720kb
input:
5 JOOJJJJOOOOOJOJJOJJJOOOOOJJOOOOOJOOJOJJJOJOJJOJOJOOJOJOOJJOOJJJJOOJJJJJOJOJJJJJJOJJOOJJJJJJOJJOJOJJJOOOOOOJJOJJOJJJJOOJOJJOJJJJJJJJJOJJJJJJJJOOOJJJJOJJJJOJOOOOJJJJOOJJJOJOOJOOJJJJJOJOJOJJJJOOJJJJOOJJOOJOJOJOJJJJJOJOOJJJJOOJOJJOJJJJOOJJJOJJOJJOJOOJOJJJJJOJOJJJOJJJJOOOOJOOJJOJOJJJOOOJJOJOOJJJOOJJJOO...
output:
652
result:
ok single line: '652'
Test #10:
score: 30
Accepted
time: 1ms
memory: 7804kb
input:
5 IJJJIJJOOJJIIIIIIJIJIOIIIJIIJIJIIOJJOIJJIJJJJIJIIJJIJJJIOIIIJJJIIIIIJOJJOJIIIJIJIIJOIJIJJJOJOOIIJJJIIJJIOJJIIIJJIOIIJIIOIIIJOJIIOIIIOIIIIJJIIJIIJIIJIOIOJJIIIJIJIIJIIIJIJIIJJIIJJIIJOIIOIJOIJJJJOJJOJOIIOJIIIOJIIIIJIOOOIOIJIIIIOOIJJJIJIJIIIJIJJJJIJIJJIIIJIOOJIJJIIIJIIJIOIJIIIJIJJIIIIJIOIJOIOIIJJOIIII...
output:
653
result:
ok single line: '653'
Test #11:
score: 30
Accepted
time: 0ms
memory: 7664kb
input:
1 IJJO
output:
0
result:
ok single line: '0'
Test #12:
score: 30
Accepted
time: 0ms
memory: 7752kb
input:
2 IIIJJIIJOJJIOOOI
output:
3
result:
ok single line: '3'
Test #13:
score: 30
Accepted
time: 1ms
memory: 7708kb
input:
3 JJJJJJJJJIJJJOOOOOOJOJOIOOOOOJJIIIIIOIIIIIIIIJJJJOOOIIIIIJJIIJJJ
output:
9
result:
ok single line: '9'
Test #14:
score: 30
Accepted
time: 0ms
memory: 7688kb
input:
4 IIIIIIJIIIIIIIIOIIIIIIIOIJIIIIIIIIIIIIIIIIJIIIIIIIIJIJIIJOIOJJJJIJJJJOJOOOJOOOOOOOOOOOOOJIIJIIIIIJIIIIIIJJIJOOOIIOOJJIIIJJIJJJJJJJIJJJJIJJIIJJIIJJJJJJJJOJJJJIJJJJJIJJJJJJJOJJJJJJJJJJJJIOOOOOOOOOOOOOOOOOOOJJOJIOIOOIJOIIOOOOOOOOOOJOIJOOOOJOOOOOJOJIOOIIIIIIII
output:
51
result:
ok single line: '51'
Test #15:
score: 30
Accepted
time: 1ms
memory: 7800kb
input:
5 OOOOOOOOOOOIOOOOOOJOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIOOJOOOOOOOOOOOIOOOOOOOOJOOOOOOOOOIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOJOOOOOOOOOOIOIIIIIIIIIIIIOIIIIIIOIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJIIIIIIIIIIIIIIIIIIIIIIIIIIJIIIIIIIIIIIIIIIIIIIIIIJIIIIIIIIIIOII...
output:
45
result:
ok single line: '45'
Subtask #2:
score: 70
Accepted
Dependency #1:
100%
Accepted
Test #16:
score: 70
Accepted
time: 2ms
memory: 7924kb
input:
6 OOJOIJIJOIJIIIIJIJJIIOOOOIIJOOIJOOJOIJIJJJJOIOJOOIJIIJIJIIOJJJJJJJJOIJOIOOOJIIOOIJJIIIIOIIOIIJJOIJJIJIJOOIIIIJOJOOOOOJJIJIOIIOIIOOIJJIIOIJIOJOJIOJJJIIJIJIJOOIOIIOJJIJJIJOJIIJIJOIJJIOOJOIIJIOJOIJIJIIJOIOOOJIOOIOJOIIIJOJJOOJOIJJIJIIJOIIJOJJOOJIOIIIJIJOIOIOIOIJIJOIOJIOIIJOJOJIJIIIIOIOJOIJIOIIJOIJOIII...
output:
2664
result:
ok single line: '2664'
Test #17:
score: 70
Accepted
time: 0ms
memory: 7868kb
input:
6 JIIIIOIOOJIOOOJIIOJIIJIOIJOIIOIIJIOIIOOIIOJOOJOIOIIIJIJOIOOIOOIOOOJJOIOOOJJOJOOJOOIOOOOIOIOOIOIOIJOIIIOIJIOOIOOJOOIOOIJIIIIJOOOIOJIOOOIOOIOIIOOIOOIIOJOOOOOIIIJIOOOIOIIJIIIIOOIOOJOIOJIJOIOIIOOJIIIIOOOOIOIJOOJJOIIIJOIJIIJOOJIJIOOJIOIOJIJOIOOOJIIOJIOIIIOIIIIOJOIJJIOIOIOOOOIOIIJJIIIIOOOOIOIOOIIOOIJJOO...
output:
2638
result:
ok single line: '2638'
Test #18:
score: 70
Accepted
time: 2ms
memory: 7844kb
input:
6 OIIJJOJOJIJJIIJIOJJOJIOJIJJJIJJJOIJJIIOJJIOIJJJJIIJIJJOJIIJOOOJOJOOOJIOJIJJJOIIJOJJJJJJJOJIOJJJJOJIIJIJIJIOIIJJIJIJJOJIOJJJOJJJJOJOIOIIIJOJJJJIIJIJJJJOIJIJJIJJIJIJJJIJJIJIJOIIJOJJJOJJJIIJIJOJIIJJJJIIIJJJIIOJJIJIJJIIIJIIIJJIJJOIOJOJIIOJJJJIIOIJJOJJJIJJJJIJIIOJIIJJJOJOJJJJIIJIIIJJJJIIJJOJJOOOIJIIJJJ...
output:
2655
result:
ok single line: '2655'
Test #19:
score: 70
Accepted
time: 2ms
memory: 7924kb
input:
6 OOJJJJJIOJJJJJOJOJJJJJJJJJJJJJJJJJOJJJJJJJOJOJJJJJJJOJJJOJJJJJJJOJOOJJJOJJJJJJJJJOOOJJJOJJJJJJOOJJIJJOOJJJJJOOJJJJOOJOJOOJJJJJJJJJJJJJJJJJJJJOJOJJJJOJJJJJOJJJJJJJJJJJOJJJJJJOJJOJJJOJJJJJJJJJJJOJJJJJJJJJJJOJJJJJJJJJJJJJOJJJOJJJJJJJJJOJJJJJJOJJOOJIJJJJJOJJOJJJJJJJJJOJJJJJJJJIOJJJJJJOJJJOOJJJJJOOOJJJ...
output:
2672
result:
ok single line: '2672'
Test #20:
score: 70
Accepted
time: 0ms
memory: 12036kb
input:
7 OOOIOJJJIJIIIOJIIOIJOIOIIJOJOOOOOJOIOJIIOJJJOIJOIIIJJOJOJIIIOJOJJOOIIIOJIOOJOJIIOIOIJOJIOOJJOOIOIIOIJOIOJIOIOOJJOIJOOIIOIIIOIIIIIOJOJIJOIIJIOIIJJIJIIJIJIIIIIOJOJOIOOJIOJJIOIJJIJJOJOOOIIOOJIOIJIIIOOIIOOJIOJOJJJJOJJIIOJJIOJIJJOJIOIJJOOIOJOIIJOJJIIOOJIIJJIIOJJJOJOJJJOJJOOOIJJOJJOIJJOOOOJOJJOIJJIJOOJJ...
output:
10766
result:
ok single line: '10766'
Test #21:
score: 70
Accepted
time: 4ms
memory: 12080kb
input:
7 IIJOJOIJIJJJIOJIJIIIIJIJIJOJIJOJJOJJIIOOOIOOOOJJIOIIIOOIJJJJJIOIJJIJIIOJJOJIOJOJJOJJOIOOIIJIIIOOJIJJIOOIIOJIOIJIIIOJIJJJJJIJJIIJJJIJOJOIOOJIJIJJOJJIJIIIIOJJOOIJIJJOJJJIIIOJJJIJIJIJIJJJIIJJJJJOJOIJOJOIJIOIOOJIIIIJJIJOIJOJIJOJJJOJJOJIOJJIIJIJIJIOOJJOOOIOOIOOIIIJJOJOIIOIJIIIIIJIIOIJIOJIIJIIOJIOJIJIOI...
output:
10762
result:
ok single line: '10762'
Test #22:
score: 70
Accepted
time: 0ms
memory: 10440kb
input:
7 IIJJJJIIIIIIJIIJIIIJIIIJIIIIIIIJIIJIIIIJJIJJJJIIJJIJIIJJIJJJJJIIIIJJJJJJIJIJIJJIIJJJJJJJIIJJIIJJIIJIJJIJIIJIIJJJIIIIIJJIJJIJJIJJJIIJIJJJIIJJIIIJJJJJIJIIIJIJJIIJIIIIJIIIIIJJIIIIJJIIIIJIIIJIJIJIJIJJJJIJJJJIIJJIIJIIJIIJJIIJJJJIIIIJIJIIJJJJJJIIIJIJJIJIJJJJIIIIJJJJJIIJJJIJIJIJIIIJJJIIJIIIIJJIIJJIJIIJII...
output:
10777
result:
ok single line: '10777'
Test #23:
score: 70
Accepted
time: 0ms
memory: 12392kb
input:
7 IIIOOIIOOOIOIIOIIOIIIOIJJIIOJJIOOOOIOOIIIIOOOIIOIOIIOOOOIJIJIJJOJJIIIOIOOIOOIIIOJOIIIOIOOIIIIOIJIOIOIIIIJOOJOIIIOOOJOOIIOIIIOJOIOOJIOIIJOIIIIIJOIOIIOIIIOIIJJOIOJJIOIOOIIIIIIOIOIJIOIIOIIOOOIIIIJOIJIIIIIOJIOIOJIIIIIIJOOJOOIJIJIIJIOIOIOIOIIIIOIIOJJIIOIOIIJOIOIOJIIIOOJIIOIIIIIOOIOOOIIJIIIIOJIOIIOIIOII...
output:
10767
result:
ok single line: '10767'
Test #24:
score: 70
Accepted
time: 12ms
memory: 18832kb
input:
8 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO...
output:
43690
result:
ok single line: '43690'
Test #25:
score: 70
Accepted
time: 10ms
memory: 19760kb
input:
8 IJOOJJOIJIJJOOOIJIOOJOJOJJOJJOJIJJOIIOIIIOOOOOOOJOIJOIJOIIIOOJOOIIIOJIOJIOIOIIOJIOIIOIIIJJJJJIIOOIIJOIOJOOOIIOJOOOOJIOIJIIJOIIJJIOJOJOOJJOJJJOIJIOJOOJJIJOJIJJJJJOOIIOIJIOOJIJOJIOJJOIOOOJJJJJIIOIOOIOOJIOJOIJOJOJOJOJIOIIOOIIJOOIJOOJJOIIJOOIIOJIOOIIJJOJIIJIIIOOOIJJIJIJOOIJJIOOIJOOIIJIJJOJOJOIJJOOJIOI...
output:
43361
result:
ok single line: '43361'
Test #26:
score: 70
Accepted
time: 9ms
memory: 19616kb
input:
8 IOJOIIOOIIOOOOIIOIIOIIIOJIIOJOIJIOJOOIIOIIIIIOJIIJIIOIOJOIIOOOIIIOOIJIIIIOIIJOIJIOIOIJOJJJIOIIOIJIIOIOJIIIJOIOIIOOIOOIIIIJOOOJJIOOJOIIIJOIOIJOJOIJIJOIOOJIIOIOIOIOOOIIOIOOOOIOOJOIIOOIOIJJIJIJJIJIOJIOIOIIIOOOOOJOOOOIJIIOOOOIIOIIJJIIOJJOIIOJIJOIOOIIJOOOOJOIOOOIIIIOOJIJOIIIOOOIIIOOJIIOOJJIIJIIIIOJIIOJ...
output:
43417
result:
ok single line: '43417'
Test #27:
score: 70
Accepted
time: 3ms
memory: 19228kb
input:
8 OOOIIOOOOOIIIOIIOIIIOOIJIIIOJOOIOIIOIOJIOIOIIJJIOIIJIJOIOIIOIJIOIJIOIIIIOOOOIIOOIIOOIIIIIJIOOOOIIIIOIIOIIIIIOIIIOOIOJIIOOIIOJIIIIOIOIIIIIOIIIOOIOIIIOOIOIOIJOOOOJJIIIOOIIIOIIOOOIIIIOIIIOIIIOIOIOIIIOJIIIIOIIIIIIIOIIIJIOIOIIOIIOIOOIIJIIJIIIIOOIIIIIIIOOIOOJJOIIOIIOIJOOIIIJOIOIOJIIJIOOJIIIOIJJOIOOJIJIO...
output:
43367
result:
ok single line: '43367'
Test #28:
score: 70
Accepted
time: 63ms
memory: 52608kb
input:
9 OJIIOIJIOOOOJJOJOIJJIOOJOIJOJOIJIOJOJJJIIOIOIJIOOOIIJIJOOOJIJIJOOOIIJOOJOJIJIOIJIOJJJJOOOIJOJOJOIJOIJJOIOOOJOOOIIIJJJJIJJIIJIJJIJOJIJIIJJOJOOIJIOIIJOJJOJJOOOJOJJIIIJJJIIIOOOJOJIIOIIIOOIOOOOOIOJIJJIJJJOJOIIJIOJJOOIJOJJIJIJIJIIJOOIOOJIIIIIIOJIJJJJOIOJJJJJIOOOOIOIOIIJOJJIOOIOJIOIJIJIIIOJOJIJJJOIIJOJI...
output:
174326
result:
ok single line: '174326'
Test #29:
score: 70
Accepted
time: 58ms
memory: 57508kb
input:
9 IIJOJOIOJIIOIJIJJJJJJIJIJJJIOJIIOJIIJOJOIOOIIJJJIIOIJIJIJIIJJIIIIJOOIOOJIJOOJIOOIOJJJIJJIJJOJIOOIIJOJJJOIOJIJOJIJOOJJIJIJIJOJJIOIJOOJIIIJJOIIJIJJIIJIOJIJIIIOIIJJJIJJIJIIJIJIIIJOIIIIJIJJIIJOJJJJIIIIJJOJJIJOOIIJIJIJIIIIJIIJOJIJJJJJJOJJIJJIOJIJJOIIOOIIJJJJOJIIJIOIOJIIIJJIJIJIIOJIJJIOOIIOJIIIOOOOOIIII...
output:
174037
result:
ok single line: '174037'
Test #30:
score: 70
Accepted
time: 67ms
memory: 57360kb
input:
9 OOOOOOOOOOOOOJOOOOIOOOOOOOOOOOOOOOOOOOOIOOOOOOOJOOOOOIOOOOOOOOIIOOJOOOOJOOOOOOOOJOIOOOOOOOOOOOIOOOIOOOOOIOOOOOOJOOIIOIOOOOIOOOIOJOOOOOJOIOOOOOOOJIOJOIJIOOJOOOOOIIOOOOOOOOOOOOOOOIOOIOIJOOOIOIOOOOOOOOOOIIOOJOIOOOOOOOOIOOOOIOOOOOOOIOOIOOOOOOOOOOOIOOOJIIJOOOOOOOOOIOIIJOOOOOOOOOJOOOOOOOOOOOOJIOIOJOOOOO...
output:
174244
result:
ok single line: '174244'
Test #31:
score: 70
Accepted
time: 62ms
memory: 52552kb
input:
9 OOOOOOOOIOOIOIIIOOIIOOIOOIOIOJOOOOOOOOIJOIIIOIOOIOIIOIIOIOIJOOJOIOIIJOJOJIOJJIOOOIOIOJJOOOIOOOOOIIOOIOOOJJIOJIIIOOOOIIOOIJJIOIOJOJOOOOOOOOIIJOOOIOOIJOIOJJIJJJOOOOOOJJOOOOOJIOOJOOOIJOOIOIIIOOOOIIOOIIOOIOJOOJJOOIOIIOIOOJJIOIOOOIIIJJOJOIOJIJOOIIJOOOOOJJJIOOOOOIJIOOIOIOJOIIJOOIOOOIOOIIOOOJOOOOOOOIIOJO...
output:
174075
result:
ok single line: '174075'
Test #32:
score: 70
Accepted
time: 292ms
memory: 187908kb
input:
10 JIOIOJIOIJJJOOJJIJOIJOIOIIOOJIJIIIOIOOIOJOIJIOOJOOIJIIOIIOOIJOOOIJOIOIOJOJIOIJOIOOJIIOJJOIJIOJJIOOJOJOOOOJJJIIIOOJIIIOOIIIJIJIJIOOJIOIJOJIJIJJJOOOIIIJOIIIOOIOOOJOIOIJOJOIIIOIJIIOJOOOOIOOJJIIOIJOOOIOIOOOJIOIOJJOOOJIOOIIIIJIIOJIOJJOJOIIOJJJJIJJOOIIOIOJJIOJIOIOOOJJIJOJOOIOJOOIJOIIOOJIOJJIIJOIIJJJIIO...
output:
698099
result:
ok single line: '698099'
Test #33:
score: 70
Accepted
time: 285ms
memory: 187976kb
input:
10 OIOJOOIOIOJJJOOIIOJOJJOOOJJOIJIIJJOIIIJIIJOOJJOIJOIJIOIIJIJOIIIIIOIIOOIOOOOJOOJOIOJOIJIIIJIOIJJJIIIOOIIJOJOJIOOJIJJJIOOJIOJOJIJOJJJOJOOJOOIOOIIOIIOJJIIJIJOJOJOOJIIJOIOIOIOIOJJOIOJIOIJIOIIOIIJJJJOJOIJIIIOOIIIOOOOJOJJIJIOOJIJJOIJIOIJOIOOIOJOOIOIIOIJJOJJJOJIOJIJOOOJOOJOOOIIOJJOOOJIOOIIIJIIJJJOOJOIOO...
output:
698050
result:
ok single line: '698050'
Test #34:
score: 70
Accepted
time: 279ms
memory: 187976kb
input:
10 JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ...
output:
699050
result:
ok single line: '699050'
Test #35:
score: 70
Accepted
time: 292ms
memory: 187992kb
input:
10 IIOIIIIIIIIIIOIIIIIIIIIOOIOOOIOIIIIIOIIIIIOIIIIOOIIIOIIIIOIIIIIIIIOIOIIIOOOIIOIIIOIIIIIOIIOIOOIIIIIIIIIIIIIOIIIIIIIIIOIIIOIIIIIOOIOIIIOIIIIIIIIIIIIIOIIOIOIIIIIOIIIIIIIIIIIIIOIIIOIIOIOIOOIIIIIIIIIIIIIIIIIIIIIOOOIIOIIIIIIOIIIOIIIOIIIIIIIIIIOIIOIIIOOIOOIIIIIIIIOIOIOOIIOIIIIOOIOOOIIOIIIOIIIIIIIIIOIOI...
output:
698124
result:
ok single line: '698124'
Test #36:
score: 70
Accepted
time: 0ms
memory: 7856kb
input:
6 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO...
output:
9
result:
ok single line: '9'
Test #37:
score: 70
Accepted
time: 2ms
memory: 7868kb
input:
6 OOOIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIOOOOOOOOOOOOOOOOOOOOOOIIIIIIIIIIIIIIIIIIIIIIIIIOIIOIIIIIIIIIIIIIOIIIIIIIIIIIIIIIIIIIIIIIIOIIIIIIIIIIIIIIIIIIIIIIIIIIIOIIIOIIIOIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJIIIIIIIIIIIOIIJIIIIIIIIIOIIIIIIIIIIIIIOIIIIIIIIIIIIOIIIIIIJI...
output:
255
result:
ok single line: '255'
Test #38:
score: 70
Accepted
time: 4ms
memory: 10564kb
input:
7 OOJOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO...
output:
33
result:
ok single line: '33'
Test #39:
score: 70
Accepted
time: 0ms
memory: 12148kb
input:
7 JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJOJJJJJJJOOOOOOOOOOOOOOOOOOOOOOOOIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIOOOOOOOOOOOIOOOOOOOOIOOOOOOOOOOOOOOOOOOOOOOOOJOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOJOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOJOOOOOOJOOOOOOOOOOJOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO...
output:
718
result:
ok single line: '718'
Test #40:
score: 70
Accepted
time: 10ms
memory: 19864kb
input:
8 JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOJOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO...
output:
1253
result:
ok single line: '1253'
Test #41:
score: 70
Accepted
time: 8ms
memory: 20440kb
input:
8 JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ...
output:
262
result:
ok single line: '262'
Test #42:
score: 70
Accepted
time: 56ms
memory: 52752kb
input:
9 JJJJJIJJJJJJJJJJJJJJJJJJJJOJJJJJOJJJJOJJJJJJJJJJJJJJJJJJJJJJJJJJJOJJIJJIJJIJIJJJJJJJJJIJJJJJJJJJJJJJJJJJOJJJJJJJJIJJJJJJJJJJJJJJJJJJIJJJJJJJJJOJJJJJJJJJJOJJJJJJJJIJJJJJJJJJJJJJJJJJOJJOJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIJOJ...
output:
18481
result:
ok single line: '18481'
Test #43:
score: 70
Accepted
time: 59ms
memory: 57076kb
input:
9 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII...
output:
9
result:
ok single line: '9'
Test #44:
score: 70
Accepted
time: 281ms
memory: 187980kb
input:
10 JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ...
output:
0
result:
ok single line: '0'
Test #45:
score: 70
Accepted
time: 294ms
memory: 187900kb
input:
10 OOOOOOIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOJOOOOOOOOOOOOIOOOIOOOOOIOOOOOOOOOOOOOOIOOIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIOOIOOOOIOOOOOOOOOJOOOOOOOOJOOOOOOOOOOJOOOOOOIOOOOOOOOOOOOOOOOOJOOOOOOOOOOOOOOOOOOIOOOOOIOOOOOOOOOJOOOOOJOOOOOOOOOOOOOOOOOOOOOOOOJOOOOOOOOOOOOOOOOOOOOOOIOOOOOOOOIOJOOOOOOOOOOO...
output:
91671
result:
ok single line: '91671'
Extra Test:
score: 0
Extra Test Passed