QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#617904 | #6602. Journey to Un'Goro | gates_orz | WA | 1ms | 4664kb | C++20 | 28.3kb | 2024-10-06 17:36:02 | 2024-10-06 17:36:02 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using LL=long long;
const int N=1e5+10;
const int M=N*2;
int sa[N];
int n,m;
LL f[N];
string ans[25];
void init() {
f[1]=1;
LL num=1;
for(int i=2;i<=100000;i++) {
if(i&1)num++;
f[i]=f[i-1]+num;
}
ans[1]="1";
ans[2]="011011";
ans[3]="010101111";
ans[4]="0010010001010111100110101011110111101111";
ans[5]="00100010010101101110100101010110111110101110111111";
ans[6]="000100001000001001001011001110010001010010010011010101010110010111011010011100011101011111100010100100100101100111101001101010101011101101101110101111110010110100110101110111111001111010111011111101111110111111";
ans[7]="00010000010001001001100101100011100010001001001010100111010101001011010101111011010001110010111011011111010001001001001100101110011101010010101010110101111011010101110110111111100100110100111010111101110111001011101011110111111101011111011111111";
ans[8]="00001000000100000001000100010011000101100001110000100001001000100010001100100101001001100010011100101010001011000010110100101111001101000011100000111001001110110011111001000010010001000100010101000111010010010100101001001011010011010100111001001111010100100101010001010101010101110101100101011010010110110101110101011110010111110110010001101000011010010110101101101110011100010111001001110011011101010111011001110111011110100111110001111101011111111000010010001000100010011000101110001110100100011001001010010011100101011001011010010111100110101001110010011101100111111010001010100100101001011010011110101001101010101010101110101101101011101010111110110010101101001011010110110111101110011011101010111011101111011011111010111111110001001100100011001001110010111100111011010001110100101101001111010101";
ans[9]="000010000000100001000100011000100110000101100000111000001000010001000101001000111001001010001001101001001111001010100001011001001011011001011110001101000001110001001110011001110110001111100010000100010001001010001011010001110010010010010010101010010111010011010010011101010011111010100100010101001010101011010101110010110010010110101010110111010111010010111101010111111011001000011010001011010011011010110011011100011100010011100101011100111011101010011101101011101111011110100011111001011111011011111110100001000100010001100010011100010110100011100100100010100100101100100111100101010100101101100101111100110100100111001100111011100111110101000100101001001101001011101001110101010010101010101101010111101011010101011101101011111101100100101101001101101011101101110101110010101110101101110111101111010101111101101111111110001000110010001110010011110010110110011100110100010110100101110100111110101010";
ans[10]="0000010000000010000000001000010000100011000010011000001011000000111000000100000100010000100001000011000100010100010001100001000111000100101000010011000001001101000100111100010101000001011000000101100100010110110001011110000110100000011100000001110001000111001100011101100001111100001000001000100001000010000101001000011100100010010010001010001000101100100011010010001110001000111100100100100010010100001001010100100101110010011001001001101000100110110010011101001001111000100111110010100100001010100000101010010010101011001010111000101100010010110010001011001100101101010010110110001011011100101110100010111100001011110100101111110011001000001101000000110100010011010011001101011000110111000011100001001110001000111000110011100101001110011000111001110011101010001110110000111011010011101111001111010000111110000011111001001111101100111111100100000100010000100001000010010100001011010000111001000100010100010010010001001101000101010100010110010001011101000110100100011100010001110101000111110100100010";
ans[11]="00000100000000010000010000100001100001000110000010011000000101100000001110000000100000100001000010100010000111000100010100001000110100010001111000100101000001001100100010011011000100111100001010100000010110001000101100110001011011000010111100000110100000001110000100011100011000111001100001110110000011111000001000001000010000100100100001011001000011100010001001000100010101001000101110010001101000100011101001000111110010010010000100101001001001010110010010111000100110010001001101010010011011100100111010001001111010010011111100101001000001010100010010101001100101010110001010111000010110001000101100101001011001110010110101000101101101001011011110010111010000101111001001011110110010111111000110010000001101000010011010001100110100110001101011000011011100000111000010001110001010011100011100111001010001110011010011100111100111010100001110110010011101101100111011110001111010000011111000100111110011001111101100011111110001000001000010000100010100001001101000010110010000111000100010001001000100101010001001110100010101001000101101010001011110100011010001000111001010001110110100011111001001000100";
ans[12]="000000100000000001000000000001000001000001000011000001000110000001001100000001011000000001110000000010000001000010000010000010000011000010000101000010000110000010000111000010001010000010001100000010001101000010001111000010010100000010011000000010011001000010011011000010011110000010101000000010110000000010110001000010110011000010110110000010111100000011010000000011100000000011100001000011100011000011100110000011101100000011111000000100000010000100000100000100000101000100000111000100001001000100001010000100001011000100001101000100001110000100001111000100010010000100010100000100010101000100010111000100011001000100011010000100011011000100011101000100011110000100011111000100100100000100101000000100101001000100101011000100101110000100110001000100110010000100110011000100110101000100110110000100110111000100111010000100111100000100111101000100111111000101001000000101010000000101010001000101010011000101010110000101011100000101100001000101100010000101100011000101100101000101100110000101100111000101101010000101101100000101101101000101101111000101110100000101111000000101111001000101111011000101111110000110010000000110100000000110100001000110100011000110100110000110101100000110111000000111000001";
ans[13]="0000001000000000001000000100000100000110000010000110000001000110000000100110000000010110000000001110000000001000000100000100000101000010000011100001000010100000100001101000010000111100001000101000000100011001000010001101100001000111100000100101000000010011000100001001100110000100110110000010011110000001010100000000101100001000010110001100001011001100000101101100000010111100000001101000000000111000001000011100001100001110001100000111001100000011101100000001111100000001000000100000100000100100010000010110001000001110000100001001000010000101010001000010111000100001101000010000111010001000011111000100010010000010001010010001000101011000100010111000010001100100001000110101000100011011100010001110100001000111101000100011111100010010010000001001010001000100101001100010010101100001001011100000100110001000010011001010001001100111000100110101000010011011010001001101111000100111010000010011110010001001111011000100111111000010100100000001010100001000101010001100010101001100001010101100000101011100000010110000100001011000101000101100011100010110010100001011001101000101100111100010110101000001011011001000101101101100010110111100001011101000000101111000100010111100110001011110110000101111110000011001000000001101000001000110100001100011010001100001101001100000110101100000011011100000001110000010";
ans[14]="00000001000000000000100000000000001000000100000010000011000000100001100000001000110000000010011000000000101100000000001110000000000100000001000001000000100000010000001100000100000101000001000001100000010000011100000100001010000001000011000000010000110100000100001111000001000101000000010001100000000100011001000001000110110000010001111000000100101000000001001100000000010011000100000100110011000001001101100000010011110000000101010000000001011000000000010110000100000101100011000001011001100000010110110000000101111000000001101000000000011100000000000111000001000001110000110000011100011000000111001100000001110110000000011111000000001000000010000010000001000000100000010100001000000111000010000010010000100000101000001000001011000010000011010000100000111000001000001111000010000100100000100001010000001000010101000010000101110000100001100100001000011010000010000110110000100001110100001000011110000010000111110000100010010000001000101000000010001010010000100010101100001000101110000010001100010000100011001000001000110011000010001101010000100011011000001000110111000010001110100000100011110000001000111101000010001111110000100100100000001001010000000010010100010000100101001100001001010110000010010111000000100110000100001001100010000010011000110000100110010100001001100110000010011001110000100110101000001001101100000010011011010000100110111100001001110100000010011110000000100111100100001001111011";
ans[15]="000000010000000000000100000001000000100000011000000100000110000000100001100000000100011000000000100110000000000101100000000000111000000000001000000010000001000000101000001000000111000001000001010000001000001101000001000001111000001000010100000001000011001000001000011011000001000011110000001000101000000001000110001000001000110011000001000110110000001000111100000001001010000000001001100001000001001100011000001001100110000001001101100000001001111000000001010100000000001011000001000001011000011000001011000110000001011001100000001011011000000001011110000000001101000000000001110000001000001110000011000001110000110000001110001100000001110011000000001110110000000001111100000000010000000100000010000001001000010000001011000010000001110000010000010010000010000010101000010000010111000010000011010000010000011101000010000011111000010000100100000010000101001000010000101011000010000101110000010000110010000010000110101000010000110111000010000111010000010000111101000010000111111000010001001000000010001010001000010001010011000010001010110000010001011100000010001100010000010001100101000010001100111000010001101010000010001101101000010001101111000010001110100000010001111001000010001111011000010001111110000010010010000000010010100001000010010100011000010010100110000010010101100000010010111000000010011000010000010011000101000010011000111000010011001010000010011001101000010011001111000010011010100000010011011001000010011011011000010011011110000010011101000000010011110001000010011110011000010011110110";
ans[16]="0000000010000000000000010000000000000001000000010000000100000011000000010000011000000001000011000000000100011000000000010011000000000001011000000000000111000000000000100000000100000010000000100000001000000011000000100000010100000010000001100000001000000111000000100000101000000010000011000000001000001101000000100000111100000010000101000000001000011000000000100001100100000010000110110000001000011110000000100010100000000010001100000000001000110001000000100011001100000010001101100000001000111100000000100101000000000010011000000000001001100001000000100110001100000010011001100000001001101100000000100111100000000010101000000000001011000000000000101100000100000010110000110000001011000110000000101100110000000010110110000000001011110000000000110100000000000011100000000000001110000001000000111000001100000011100001100000001110001100000000111001100000000011101100000000001111100000000001000000001000000100000001000000010000000101000001000000011100000100000010010000010000001010000001000000101100000100000011010000010000001110000001000000111100000100000100100000010000010100000001000001010100000100000101110000010000011001000001000001101000000100000110110000010000011101000001000001111000000100000111110000010000100100000001000010100000000100001010010000010000101011000001000010111000000100001100010000010000110010000001000011001100000100001101010000010000110110000001000011011100000100001110100000010000111100000001000011110100000100001111110000010001001000000001000101000000000100010100010000010001010011000001000101011000000100010111000000010001100001000001000110001000000100011000110000010001100101";
ans[17]="00000000100000000000000010000000010000000100000001100000001000000110000000010000011000000000100001100000000001000110000000000010011000000000000101100000000000001110000000000000100000000100000001000000010100000010000000111000000100000010100000001000000110100000010000001111000000100000101000000001000001100100000010000011011000000100000111100000001000010100000000010000110001000000100001100110000001000011011000000010000111100000000100010100000000001000110000100000010001100011000000100011001100000001000110110000000010001111000000000100101000000000001001100000100000010011000011000000100110001100000001001100110000000010011011000000000100111100000000001010100000000000010110000001000000101100000110000001011000011000000010110001100000000101100110000000001011011000000000010111100000000000110100000000000001110000000100000011100000011000000111000001100000001110000110000000011100011000000000111001100000000001110110000000000011111000000000001000000001000000010000000100100000100000001011000001000000011100000010000001001000000100000010101000001000000101110000010000001101000000100000011101000001000000111110000010000010010000000100000101001000001000001010110000010000010111000000100000110010000001000001101010000010000011011100000100000111010000001000001111010000010000011111100000100001001000000001000010100010000010000101001100000100001010110000001000010111000000010000110001000000100001100101000001000011001110000010000110101000000100001101101000001000011011110000010000111010000000100001111001000001000011110110000010000111111000000100010010000000001000101000010000010001010001100000100010100110000001000101011000000010001011100000000100011000010000001000110001010000010001100011100000100011001010";
ans[18]="000000000100000000000000001000000000000000001000000001000000001000000011000000001000000110000000001000001100000000001000011000000000001000110000000000001001100000000000001011000000000000001110000000000000010000000001000000010000000010000000010000000011000000010000000101000000010000000110000000010000000111000000010000001010000000010000001100000000010000001101000000010000001111000000010000010100000000010000011000000000010000011001000000010000011011000000010000011110000000010000101000000000010000110000000000010000110001000000010000110011000000010000110110000000010000111100000000010001010000000000010001100000000000010001100001000000010001100011000000010001100110000000010001101100000000010001111000000000010010100000000000010011000000000000010011000001000000010011000011000000010011000110000000010011001100000000010011011000000000010011110000000000010101000000000000010110000000000000010110000001000000010110000011000000010110000110000000010110001100000000010110011000000000010110110000000000010111100000000000011010000000000000011100000000000000011100000001000000011100000011000000011100000110000000011100001100000000011100011000000000011100110000000000011101100000000000011111000000000000100000000010000000100000000100000000100000000101000000100000000111000000100000001001000000100000001010000000100000001011000000100000001101000000100000001110000000100000001111000000100000010010000000100000010100000000100000010101000000100000010111000000100000011001000000100000011010000000100000011011000000100000011101000000100000011110000000100000011111000000100000100100000000100000101000000000100000101001000000100000101011000000100000101110000000100000110001000000100000110010000000100000110011000000100000110101000000100000110110000000100000110111000000100000111010000000100000111100000000100000111101";
ans[19]="0000000001000000000000000001000000000100000000100000000110000000010000000110000000001000000110000000000100000110000000000010000110000000000001000110000000000000100110000000000000010110000000000000001110000000000000001000000000100000000100000000101000000010000000011100000001000000010100000000100000001101000000010000000111100000001000000101000000000100000011001000000010000001101100000001000000111100000000100000101000000000010000011000100000001000001100110000000100000110110000000010000011110000000001000010100000000000100001100001000000010000110001100000001000011001100000000100001101100000000010000111100000000001000101000000000000100011000001000000010001100001100000001000110001100000000100011001100000000010001101100000000001000111100000000000100101000000000000010011000000100000001001100000110000000100110000110000000010011000110000000001001100110000000000100110110000000000010011110000000000001010100000000000000101100000001000000010110000001100000001011000001100000000101100001100000000010110001100000000001011001100000000000101101100000000000010111100000000000001101000000000000000111000000001000000011100000001100000001110000001100000000111000001100000000011100001100000000001110001100000000000111001100000000000011101100000000000001111100000000000001000000000100000000100000000100100000010000000010110000001000000001110000000100000001001000000010000000101010000001000000010111000000100000001101000000010000000111010000001000000011111000000100000010010000000010000001010010000001000000101011000000100000010111000000010000001100100000001000000110101000000100000011011100000010000001110100000001000000111101000000100000011111100000010000010010000000001000001010001000000100000101001100000010000010101100000001000001011100000000100000110001000000010000011001010000001000001100111000000100000110101000000010000011011010000001000001101111000000100000111010000000010000011110010000001000001111011";
ans[20]="00000000001000000000000000000100000000000000000001000000000100000000010000000011000000000100000001100000000001000000110000000000010000011000000000000100001100000000000001000110000000000000010011000000000000000101100000000000000001110000000000000000100000000001000000001000000000100000000010000000001100000000100000000101000000001000000001100000000010000000011100000000100000001010000000001000000011000000000010000000110100000000100000001111000000001000000101000000000010000001100000000000100000011001000000001000000110110000000010000001111000000000100000101000000000001000001100000000000010000011000100000000100000110011000000001000001101100000000010000011110000000000100001010000000000001000011000000000000010000110000100000000100001100011000000001000011001100000000010000110110000000000100001111000000000001000101000000000000010001100000000000000100011000001000000001000110000110000000010001100011000000000100011001100000000001000110110000000000010001111000000000000100101000000000000001001100000000000000010011000000100000000100110000011000000001001100001100000000010011000110000000000100110011000000000001001101100000000000010011110000000000000101010000000000000001011000000000000000010110000000100000000101100000011000000001011000001100000000010110000110000000000101100011000000000001011001100000000000010110110000000000000101111000000000000001101000000000000000011100000000000000000111000000001000000001110000000110000000011100000011000000000111000001100000000001110000110000000000011100011000000000000111001100000000000001110110000000000000011111000000000000001000000000010000000010000000001000000000100000000010100000001000000000111000000010000000010010000000100000000101000000001000000001011000000010000000011010000000100000000111000000001000000001111000000010000000100100000000100000001010000000001000000010101000000010000000101110000000100000001100100000001000000011010000000010000000110110000000100000001110100000001000000011110000000010000000111110000000100000010010000000001000000101000";
ans[21]="000000000010000000000000000000100000000001000000000100000000011000000000100000000110000000000100000001100000000000100000011000000000000100000110000000000000100001100000000000000100011000000000000000100110000000000000000101100000000000000000111000000000000000001000000000010000000001000000000101000000001000000000111000000001000000001010000000001000000001101000000001000000001111000000001000000010100000000001000000011001000000001000000011011000000001000000011110000000001000000101000000000001000000110001000000001000000110011000000001000000110110000000001000000111100000000001000001010000000000001000001100001000000001000001100011000000001000001100110000000001000001101100000000001000001111000000000001000010100000000000001000011000001000000001000011000011000000001000011000110000000001000011001100000000001000011011000000000001000011110000000000001000101000000000000001000110000001000000001000110000011000000001000110000110000000001000110001100000000001000110011000000000001000110110000000000001000111100000000000001001010000000000000001001100000001000000001001100000011000000001001100000110000000001001100001100000000001001100011000000000001001100110000000000001001101100000000000001001111000000000000001010100000000000000001011000000001000000001011000000011000000001011000000110000000001011000001100000000001011000011000000000001011000110000000000001011001100000000000001011011000000000000001011110000000000000001101000000000000000001110000000001000000001110000000011000000001110000000110000000001110000001100000000001110000011000000000001110000110000000000001110001100000000000001110011000000000000001110110000000000000001111100000000000000010000000000100000000010000000001001000000010000000001011000000010000000001110000000010000000010010000000010000000010101000000010000000010111000000010000000011010000000010000000011101000000010000000011111000000010000000100100000000010000000101001000000010000000101011000000010000000101110000000010000000110010000000010000000110101000000010000000110111000000010000000111010000000010000000111101000000010000000111111000000010000001001000000000010000001010001";
ans[22]="0000000000010000000000000000000010000000000000000000001000000000010000000000100000000011000000000010000000011000000000001000000011000000000000100000011000000000000010000011000000000000001000011000000000000000100011000000000000000010011000000000000000001011000000000000000000111000000000000000000100000000000100000000010000000000100000000001000000000011000000000100000000010100000000010000000001100000000001000000000111000000000100000000101000000000010000000011000000000001000000001101000000000100000000111100000000010000000101000000000001000000011000000000000100000001100100000000010000000110110000000001000000011110000000000100000010100000000000010000001100000000000001000000110001000000000100000011001100000000010000001101100000000001000000111100000000000100000101000000000000010000011000000000000001000001100001000000000100000110001100000000010000011001100000000001000001101100000000000100000111100000000000010000101000000000000001000011000000000000000100001100000100000000010000110000110000000001000011000110000000000100001100110000000000010000110110000000000001000011110000000000000100010100000000000000010001100000000000000001000110000001000000000100011000001100000000010001100001100000000001000110001100000000000100011001100000000000010001101100000000000001000111100000000000000100101000000000000000010011000000000000000001001100000001000000000100110000001100000000010011000001100000000001001100001100000000000100110001100000000000010011001100000000000001001101100000000000000100111100000000000000010101000000000000000001011000000000000000000101100000000100000000010110000000110000000001011000000110000000000101100000110000000000010110000110000000000001011000110000000000000101100110000000000000010110110000000000000001011110000000000000000110100000000000000000011100000000000000000001110000000001000000000111000000001100000000011100000001100000000001110000001100000000000111000001100000000000011100001100000000000001110001100000000000000111001100000000000000011101100000000000000001111100000000000000001000000000001000000000100000000001000000000010000000000101000000001000000000011100000000100000000010010000000010000000001010000000001000000000101100000000100000000011010000000010000000001110";
ans[23]="00000000000100000000000000000000010000000000010000000000100000000001100000000001000000000110000000000010000000011000000000000100000001100000000000001000000110000000000000010000011000000000000000100001100000000000000001000110000000000000000010011000000000000000000101100000000000000000001110000000000000000000100000000000100000000001000000000010100000000010000000000111000000000100000000010100000000001000000000110100000000010000000001111000000000100000000101000000000001000000001100100000000010000000011011000000000100000000111100000000001000000010100000000000010000000110001000000000100000001100110000000001000000011011000000000010000000111100000000000100000010100000000000001000000110000100000000010000001100011000000000100000011001100000000001000000110110000000000010000001111000000000000100000101000000000000001000001100000100000000010000011000011000000000100000110001100000000001000001100110000000000010000011011000000000000100000111100000000000001000010100000000000000010000110000001000000000100001100000110000000001000011000011000000000010000110001100000000000100001100110000000000001000011011000000000000010000111100000000000000100010100000000000000001000110000000100000000010001100000011000000000100011000001100000000001000110000110000000000010001100011000000000000100011001100000000000001000110110000000000000010001111000000000000000100101000000000000000001001100000000100000000010011000000011000000000100110000001100000000001001100000110000000000010011000011000000000000100110001100000000000001001100110000000000000010011011000000000000000100111100000000000000001010100000000000000000010110000000001000000000101100000000110000000001011000000011000000000010110000001100000000000101100000110000000000001011000011000000000000010110001100000000000000101100110000000000000001011011000000000000000010111100000000000000000110100000000000000000001110000000000100000000011100000000011000000000111000000001100000000001110000000110000000000011100000011000000000000111000001100000000000001110000110000000000000011100011000000000000000111001100000000000000001110110000000000000000011111000000000000000001000000000001000000000010000000000100100000000100000000001011000000001000000000011100000000010000000001001000000000100000000010101000000001000000000101110000000010000000001101000000000100000000011101";
}
void work(int x) {
cout<<f[x]<<"\n";
for(int i=1;i<=ans[x].size();i++) {
if(ans[x][i-1]=='0')cout<<'b';
else cout<<'r';
if(i%x==0)cout<<"\n";
}
}
void solve() {
cin>>n;
if(n<=23) {
work(n);
return;
}
cout<<f[n]<<"\n";
vector<string>res;
string s;
for(int i=0;i<n;i++)s+='0';
s[n/2]='1';
res.push_back(s);
s[n/2]='0';
if(n%2==0) {
s[n/2-1]='1';
res.push_back(s);
s[n/2-1]='0';
}
int sign=1;
string last=res.back();
if(n&1) {
for(int i=0;i<n;i++)last[i]='0';
last[n/2-1]='1';
}
while(res.size()<100) {
if(sign) {
sign^=1;
int pos=0;
for(int i=0;i<n;i++) {
if(last[i]=='1') {
pos=i;
}
}
for(int i=pos+1;i<n;i++) {
last[i]='1';
if(i+1<n)last[i+1]='1';
res.push_back(last);
last[i]='0';
if(i+1<n)last[i+1]='0';
}
for(int i=0;i<n;i++) {
if(last[i]=='1') {
pos=i;
break;
}
}
for(int i=0;i<n;i++) {
last[i]='0';
}
last[pos-1]='1';
}
//break;
else
{
int pos=0,tmp=0;
for(int i=0;i<n;i++) {
if(last[i]=='1')pos=i;
}
string t=last;
tmp=pos;
pos++;
while(pos<n-1) {
last=t;
if(pos<n)last[pos]='1';
if(pos+2<n)last[pos+2]='1';
res.push_back(last);
if(pos+2<n)last[pos+2]='0';
if(pos<n)last[pos]='1';
if(pos+1<n)last[pos+1]='1';
if(n%2==0) res.push_back(last);
for(int i=pos+2;i<n;i++) {
last[i]='1';
if(i+1<n)last[i+1]='1';
res.push_back(last);
last[i]='0';
if(i+1<n)last[i+1]='0';
}
pos++;
}
for(int i=0;i<n;i++)last[i]='0';
last[tmp-1]='1';
}
}
sort(res.begin(),res.end());
res.erase(unique(res.begin(),res.end()),res.end());
for(int i=0;i<min(100LL,(LL)res.size());i++) {
for(auto c:res[i]) {
if(c=='0')cout<<'b';
else cout<<'r';
}
cout<<"\n";
//cout<<res[i]<<"\n";
}
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int T=1;
init();
while(T--)solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 4328kb
input:
1
output:
1 r
result:
ok 2 tokens
Test #2:
score: 0
Accepted
time: 0ms
memory: 4440kb
input:
2
output:
2 br rb rr
result:
ok 4 tokens
Test #3:
score: 0
Accepted
time: 1ms
memory: 4444kb
input:
3
output:
4 brb rbr rrr
result:
ok 4 tokens
Test #4:
score: 0
Accepted
time: 1ms
memory: 4596kb
input:
4
output:
6 bbrb brbb brbr brrr rbbr rbrb rbrr rrbr rrrb rrrr
result:
ok 11 tokens
Test #5:
score: 0
Accepted
time: 1ms
memory: 4444kb
input:
5
output:
9 bbrbb brbbr brbrr brrrb rbbrb rbrbr rbrrr rrbrb rrrbr rrrrr
result:
ok 11 tokens
Test #6:
score: 0
Accepted
time: 1ms
memory: 4592kb
input:
6
output:
12 bbbrbb bbrbbb bbrbbr bbrbrr bbrrrb brbbbr brbbrb brbbrr brbrbr brbrrb brbrrr brrbrb brrrbb brrrbr brrrrr rbbbrb rbbrbb rbbrbr rbbrrr rbrbbr rbrbrb rbrbrr rbrrbr rbrrrb rbrrrr rrbbrb rrbrbb rrbrbr rrbrrr rrrbbr rrrbrb rrrbrr rrrrbr rrrrrb rrrrrr
result:
ok 36 tokens
Test #7:
score: 0
Accepted
time: 0ms
memory: 4436kb
input:
7
output:
16 bbbrbbb bbrbbbr bbrbbrr bbrbrrb bbrrrbb brbbbrb brbbrbr brbbrrr brbrbrb brbrrbr brbrrrr brrbrbb brrrbbr brrrbrr brrrrrb rbbbrbb rbbrbbr rbbrbrr rbbrrrb rbrbbrb rbrbrbr rbrbrrr rbrrbrb rbrrrbr rbrrrrr rrbbrbb rrbrbbr rrbrbrr rrbrrrb rrrbbrb rrrbrbr rrrbrrr rrrrbrb rrrrrbr rrrrrrr
result:
ok 36 tokens
Test #8:
score: 0
Accepted
time: 1ms
memory: 4328kb
input:
8
output:
20 bbbbrbbb bbbrbbbb bbbrbbbr bbbrbbrr bbbrbrrb bbbrrrbb bbrbbbbr bbrbbbrb bbrbbbrr bbrbbrbr bbrbbrrb bbrbbrrr bbrbrbrb bbrbrrbb bbrbrrbr bbrbrrrr bbrrbrbb bbrrrbbb bbrrrbbr bbrrrbrr bbrrrrrb brbbbbrb brbbbrbb brbbbrbr brbbbrrr brbbrbbr brbbrbrb brbbrbrr brbbrrbr brbbrrrb brbbrrrr brbrbbrb brbrbrbb ...
result:
ok 101 tokens
Test #9:
score: 0
Accepted
time: 1ms
memory: 4440kb
input:
9
output:
25 bbbbrbbbb bbbrbbbbr bbbrbbbrr bbbrbbrrb bbbrbrrbb bbbrrrbbb bbrbbbbrb bbrbbbrbr bbrbbbrrr bbrbbrbrb bbrbbrrbr bbrbbrrrr bbrbrbrbb bbrbrrbbr bbrbrrbrr bbrbrrrrb bbrrbrbbb bbrrrbbbr bbrrrbbrr bbrrrbrrb bbrrrrrbb brbbbbrbb brbbbrbbr brbbbrbrr brbbbrrrb brbbrbbrb brbbrbrbr brbbrbrrr brbbrrbrb brbbrrr...
result:
ok 101 tokens
Test #10:
score: 0
Accepted
time: 1ms
memory: 4464kb
input:
10
output:
30 bbbbbrbbbb bbbbrbbbbb bbbbrbbbbr bbbbrbbbrr bbbbrbbrrb bbbbrbrrbb bbbbrrrbbb bbbrbbbbbr bbbrbbbbrb bbbrbbbbrr bbbrbbbrbr bbbrbbbrrb bbbrbbbrrr bbbrbbrbrb bbbrbbrrbb bbbrbbrrbr bbbrbbrrrr bbbrbrbrbb bbbrbrrbbb bbbrbrrbbr bbbrbrrbrr bbbrbrrrrb bbbrrbrbbb bbbrrrbbbb bbbrrrbbbr bbbrrrbbrr bbbrrrbrrb ...
result:
ok 101 tokens
Test #11:
score: 0
Accepted
time: 1ms
memory: 4592kb
input:
11
output:
36 bbbbbrbbbbb bbbbrbbbbbr bbbbrbbbbrr bbbbrbbbrrb bbbbrbbrrbb bbbbrbrrbbb bbbbrrrbbbb bbbrbbbbbrb bbbrbbbbrbr bbbrbbbbrrr bbbrbbbrbrb bbbrbbbrrbr bbbrbbbrrrr bbbrbbrbrbb bbbrbbrrbbr bbbrbbrrbrr bbbrbbrrrrb bbbrbrbrbbb bbbrbrrbbbr bbbrbrrbbrr bbbrbrrbrrb bbbrbrrrrbb bbbrrbrbbbb bbbrrrbbbbr bbbrrrbbb...
result:
ok 101 tokens
Test #12:
score: 0
Accepted
time: 1ms
memory: 4656kb
input:
12
output:
42 bbbbbbrbbbbb bbbbbrbbbbbb bbbbbrbbbbbr bbbbbrbbbbrr bbbbbrbbbrrb bbbbbrbbrrbb bbbbbrbrrbbb bbbbbrrrbbbb bbbbrbbbbbbr bbbbrbbbbbrb bbbbrbbbbbrr bbbbrbbbbrbr bbbbrbbbbrrb bbbbrbbbbrrr bbbbrbbbrbrb bbbbrbbbrrbb bbbbrbbbrrbr bbbbrbbbrrrr bbbbrbbrbrbb bbbbrbbrrbbb bbbbrbbrrbbr bbbbrbbrrbrr bbbbrbbrrrr...
result:
ok 101 tokens
Test #13:
score: 0
Accepted
time: 1ms
memory: 4328kb
input:
13
output:
49 bbbbbbrbbbbbb bbbbbrbbbbbbr bbbbbrbbbbbrr bbbbbrbbbbrrb bbbbbrbbbrrbb bbbbbrbbrrbbb bbbbbrbrrbbbb bbbbbrrrbbbbb bbbbrbbbbbbrb bbbbrbbbbbrbr bbbbrbbbbbrrr bbbbrbbbbrbrb bbbbrbbbbrrbr bbbbrbbbbrrrr bbbbrbbbrbrbb bbbbrbbbrrbbr bbbbrbbbrrbrr bbbbrbbbrrrrb bbbbrbbrbrbbb bbbbrbbrrbbbr bbbbrbbrrbbrr bbb...
result:
ok 101 tokens
Test #14:
score: 0
Accepted
time: 1ms
memory: 4660kb
input:
14
output:
56 bbbbbbbrbbbbbb bbbbbbrbbbbbbb bbbbbbrbbbbbbr bbbbbbrbbbbbrr bbbbbbrbbbbrrb bbbbbbrbbbrrbb bbbbbbrbbrrbbb bbbbbbrbrrbbbb bbbbbbrrrbbbbb bbbbbrbbbbbbbr bbbbbrbbbbbbrb bbbbbrbbbbbbrr bbbbbrbbbbbrbr bbbbbrbbbbbrrb bbbbbrbbbbbrrr bbbbbrbbbbrbrb bbbbbrbbbbrrbb bbbbbrbbbbrrbr bbbbbrbbbbrrrr bbbbbrbbbrbr...
result:
ok 101 tokens
Test #15:
score: 0
Accepted
time: 0ms
memory: 4324kb
input:
15
output:
64 bbbbbbbrbbbbbbb bbbbbbrbbbbbbbr bbbbbbrbbbbbbrr bbbbbbrbbbbbrrb bbbbbbrbbbbrrbb bbbbbbrbbbrrbbb bbbbbbrbbrrbbbb bbbbbbrbrrbbbbb bbbbbbrrrbbbbbb bbbbbrbbbbbbbrb bbbbbrbbbbbbrbr bbbbbrbbbbbbrrr bbbbbrbbbbbrbrb bbbbbrbbbbbrrbr bbbbbrbbbbbrrrr bbbbbrbbbbrbrbb bbbbbrbbbbrrbbr bbbbbrbbbbrrbrr bbbbbrbbb...
result:
ok 101 tokens
Test #16:
score: 0
Accepted
time: 0ms
memory: 4664kb
input:
16
output:
72 bbbbbbbbrbbbbbbb bbbbbbbrbbbbbbbb bbbbbbbrbbbbbbbr bbbbbbbrbbbbbbrr bbbbbbbrbbbbbrrb bbbbbbbrbbbbrrbb bbbbbbbrbbbrrbbb bbbbbbbrbbrrbbbb bbbbbbbrbrrbbbbb bbbbbbbrrrbbbbbb bbbbbbrbbbbbbbbr bbbbbbrbbbbbbbrb bbbbbbrbbbbbbbrr bbbbbbrbbbbbbrbr bbbbbbrbbbbbbrrb bbbbbbrbbbbbbrrr bbbbbbrbbbbbrbrb bbbbbbrb...
result:
ok 101 tokens
Test #17:
score: 0
Accepted
time: 1ms
memory: 4376kb
input:
17
output:
81 bbbbbbbbrbbbbbbbb bbbbbbbrbbbbbbbbr bbbbbbbrbbbbbbbrr bbbbbbbrbbbbbbrrb bbbbbbbrbbbbbrrbb bbbbbbbrbbbbrrbbb bbbbbbbrbbbrrbbbb bbbbbbbrbbrrbbbbb bbbbbbbrbrrbbbbbb bbbbbbbrrrbbbbbbb bbbbbbrbbbbbbbbrb bbbbbbrbbbbbbbrbr bbbbbbrbbbbbbbrrr bbbbbbrbbbbbbrbrb bbbbbbrbbbbbbrrbr bbbbbbrbbbbbbrrrr bbbbbbrbb...
result:
ok 101 tokens
Test #18:
score: 0
Accepted
time: 1ms
memory: 4460kb
input:
18
output:
90 bbbbbbbbbrbbbbbbbb bbbbbbbbrbbbbbbbbb bbbbbbbbrbbbbbbbbr bbbbbbbbrbbbbbbbrr bbbbbbbbrbbbbbbrrb bbbbbbbbrbbbbbrrbb bbbbbbbbrbbbbrrbbb bbbbbbbbrbbbrrbbbb bbbbbbbbrbbrrbbbbb bbbbbbbbrbrrbbbbbb bbbbbbbbrrrbbbbbbb bbbbbbbrbbbbbbbbbr bbbbbbbrbbbbbbbbrb bbbbbbbrbbbbbbbbrr bbbbbbbrbbbbbbbrbr bbbbbbbrbbbb...
result:
ok 101 tokens
Test #19:
score: 0
Accepted
time: 1ms
memory: 4600kb
input:
19
output:
100 bbbbbbbbbrbbbbbbbbb bbbbbbbbrbbbbbbbbbr bbbbbbbbrbbbbbbbbrr bbbbbbbbrbbbbbbbrrb bbbbbbbbrbbbbbbrrbb bbbbbbbbrbbbbbrrbbb bbbbbbbbrbbbbrrbbbb bbbbbbbbrbbbrrbbbbb bbbbbbbbrbbrrbbbbbb bbbbbbbbrbrrbbbbbbb bbbbbbbbrrrbbbbbbbb bbbbbbbrbbbbbbbbbrb bbbbbbbrbbbbbbbbrbr bbbbbbbrbbbbbbbbrrr bbbbbbbrbbbbbbbr...
result:
ok 101 tokens
Test #20:
score: 0
Accepted
time: 1ms
memory: 4456kb
input:
20
output:
110 bbbbbbbbbbrbbbbbbbbb bbbbbbbbbrbbbbbbbbbb bbbbbbbbbrbbbbbbbbbr bbbbbbbbbrbbbbbbbbrr bbbbbbbbbrbbbbbbbrrb bbbbbbbbbrbbbbbbrrbb bbbbbbbbbrbbbbbrrbbb bbbbbbbbbrbbbbrrbbbb bbbbbbbbbrbbbrrbbbbb bbbbbbbbbrbbrrbbbbbb bbbbbbbbbrbrrbbbbbbb bbbbbbbbbrrrbbbbbbbb bbbbbbbbrbbbbbbbbbbr bbbbbbbbrbbbbbbbbbrb bb...
result:
ok 101 tokens
Test #21:
score: -100
Wrong Answer
time: 0ms
memory: 4376kb
input:
50
output:
650 bbbbbbbbbbbbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbbbbr bbbbbbbbbbbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbbbrr bbbbbbbbbbbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbbrrb bbbbbbbbbbbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbb...
result:
wrong answer 29th words differ - expected: 'bbbbbbbbbbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbbbbbr', found: 'bbbbbbbbbbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbbbbrb'