QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#657797 | #9484. Colored Complete Graph | ucup-team1004# | AC ✓ | 151ms | 4772kb | C++17 | 900b | 2024-10-19 15:28:47 | 2024-10-19 15:28:47 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include"debug.h"
#else
#define debug(...) void()
#endif
#define all(x) (x).begin(),(x).end()
template<class T>
auto ary(T *a,int l,int r){
return vector<T>{a+l,a+1+r};
}
using ll=long long;
using ull=unsigned long long;
const int N=5e4+10;
int n;
vector<pair<int,int>>e[2];
int query(int i,int j){
printf("? %d %d\n",i,j);
fflush(stdout);
static char res[6];
scanf("%s",res);
int op=*res=='R';
e[op].push_back({i,j});
return op;
}
int main(){
scanf("%d",&n);
vector<int>p[2];
for(int i=2;i<=n;i++){
p[query(1,i)].push_back(i);
}
int x=0,y=0;
for(;x<p[0].size()&&y<p[1].size();)(query(p[0][x],p[1][y])?x:y)++;
if(e[1].size()>e[0].size())swap(e[0],e[1]);
printf("!\n");
for(auto [u,v]:e[0])printf("%d %d\n",u,v);
fflush(stdout);
return 0;
}
#ifdef DEBUG
#include"debug.hpp"
#endif
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3816kb
input:
3 B R B
output:
? 1 2 ? 1 3 ? 2 3 ! 1 2 2 3
result:
ok AC
Test #2:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
983 B R R B B B B B R B R R R R R R R B B R R B R B R R B B R B R R R R B R B B B R R R B B R R B R B R B B B R B R R B R B B R R R B B B B R B R R B R B B R B R B R B R R R B B B R R B B B R R B R B B B R B B R R B B R R R R B R R B B B R B B B B R B R R B R R R B R R B R R B R R B R B R B B R B R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #3:
score: 0
Accepted
time: 1ms
memory: 3820kb
input:
75 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #4:
score: 0
Accepted
time: 3ms
memory: 3824kb
input:
430 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #5:
score: 0
Accepted
time: 3ms
memory: 4124kb
input:
238 B R R B B B B B R B R R R R R R R B B R R B R B R R B B R B R R R R B R B B B R R R B B R R B R B R B B B R B R R B R B B R R R B B B B R B R R B R B B R B R B R B R R R B B B R R B B B R R B R B B B R B B R R B B R R R R B R R B B B R B B B B R B R R B R R R B R R B R R B R R B R B R B B R B R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #6:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
42 R R R R R R R R R R R R R R R R R R R R R R R R R R R R B R R R R R R R R R R R R B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 30 2 ? 30 3 ? 30 4 ...
result:
ok AC
Test #7:
score: 0
Accepted
time: 0ms
memory: 4120kb
input:
759 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #8:
score: 0
Accepted
time: 0ms
memory: 3912kb
input:
389 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #9:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
47 R R R R R R R B R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #10:
score: 0
Accepted
time: 21ms
memory: 4240kb
input:
14657 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #11:
score: 0
Accepted
time: 19ms
memory: 4236kb
input:
15755 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #12:
score: 0
Accepted
time: 33ms
memory: 4240kb
input:
14236 B R R B B B B B R B R R R R R R R B B R R B R B R R B B R B R R R R B R B B B R R R B B R R B R B R B B B R B R R B R B B R R R B B B B R B R R B R B B R B R B R B R R R B B B R R B B B R R B R B B B R B B R R B B R R R R B R R B B B R B B B B R B R R B R R R B R R B R R B R R B R B R B B R B ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #13:
score: 0
Accepted
time: 54ms
memory: 3952kb
input:
19615 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #14:
score: 0
Accepted
time: 55ms
memory: 3948kb
input:
30668 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #15:
score: 0
Accepted
time: 112ms
memory: 4480kb
input:
39166 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #16:
score: 0
Accepted
time: 43ms
memory: 4092kb
input:
35168 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #17:
score: 0
Accepted
time: 46ms
memory: 4232kb
input:
45420 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #18:
score: 0
Accepted
time: 47ms
memory: 4228kb
input:
45526 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #19:
score: 0
Accepted
time: 60ms
memory: 4180kb
input:
48225 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #20:
score: 0
Accepted
time: 57ms
memory: 4012kb
input:
40451 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #21:
score: 0
Accepted
time: 32ms
memory: 4408kb
input:
47265 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #22:
score: 0
Accepted
time: 29ms
memory: 4044kb
input:
40881 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #23:
score: 0
Accepted
time: 121ms
memory: 4608kb
input:
44327 B R R B B B B B R B R R R R R R R B B R R B R B R R B B R B R R R R B R B B B R R R B B R R B R B R B B B R B R R B R B B R R R B B B B R B R R B R B B R B R B R B R R R B B B R R B B B R R B R B B B R B B R R B B R R R R B R R B B B R B B B B R B R R B R R R B R R B R R B R R B R B R B B R B ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #24:
score: 0
Accepted
time: 59ms
memory: 4296kb
input:
48093 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #25:
score: 0
Accepted
time: 81ms
memory: 4484kb
input:
49999 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #26:
score: 0
Accepted
time: 121ms
memory: 4752kb
input:
50000 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #27:
score: 0
Accepted
time: 132ms
memory: 4724kb
input:
50000 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #28:
score: 0
Accepted
time: 110ms
memory: 4588kb
input:
49999 B R R B B B B B R B R R R R R R R B B R R B R B R R B B R B R R R R B R B B B R R R B B R R B R B R B B B R B R R B R B B R R R B B B B R B R R B R B B R B R B R B R R R B B B R R B B B R R B R B B B R B B R R B B R R R R B R R B B B R B B B B R B R R B R R R B R R B R R B R R B R B R B B R B ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #29:
score: 0
Accepted
time: 151ms
memory: 4772kb
input:
50000 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #30:
score: 0
Accepted
time: 1ms
memory: 3768kb
input:
4 B R R B B
output:
? 1 2 ? 1 3 ? 1 4 ? 2 3 ? 2 4 ! 1 2 2 3 2 4
result:
ok AC
Test #31:
score: 0
Accepted
time: 1ms
memory: 4116kb
input:
5 B R R B B B
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 2 3 ? 2 4 ! 1 2 1 5 2 3 2 4
result:
ok AC
Test #32:
score: 0
Accepted
time: 1ms
memory: 3828kb
input:
6 R R R R B B B B B
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 6 2 ? 6 3 ? 6 4 ? 6 5 ! 1 6 6 2 6 3 6 4 6 5
result:
ok AC
Test #33:
score: 0
Accepted
time: 81ms
memory: 4708kb
input:
50000 B R R B B B B B R B R R R R R R R B B R R B R B R R B B R B R R R R B R B B B R R R B B R R B R B R B B B R B R R B R B B R R R B B B B R B R R B R B B R B R B R B R R R B B B R R B B B R R B R B B B R B B R R B B R R R R B R R B B B R B B B B R B R R B R R R B R R B R R B R R B R B R B B R B ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #34:
score: 0
Accepted
time: 138ms
memory: 4744kb
input:
50000 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #35:
score: 0
Accepted
time: 60ms
memory: 4348kb
input:
50000 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Test #36:
score: 0
Accepted
time: 48ms
memory: 4228kb
input:
50000 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
output:
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ? 1 7 ? 1 8 ? 1 9 ? 1 10 ? 1 11 ? 1 12 ? 1 13 ? 1 14 ? 1 15 ? 1 16 ? 1 17 ? 1 18 ? 1 19 ? 1 20 ? 1 21 ? 1 22 ? 1 23 ? 1 24 ? 1 25 ? 1 26 ? 1 27 ? 1 28 ? 1 29 ? 1 30 ? 1 31 ? 1 32 ? 1 33 ? 1 34 ? 1 35 ? 1 36 ? 1 37 ? 1 38 ? 1 39 ? 1 40 ? 1 41 ? 1 42 ? 1 43 ? 1 44 ? 1 45 ...
result:
ok AC
Extra Test:
score: 0
Extra Test Passed