QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#791514 | #8592. Toxic Gene 2 | zjy0001 | 100 ✓ | 2ms | 4148kb | C++17 | 2.1kb | 2024-11-28 19:16:31 | 2024-11-28 19:16:31 |
Judging History
answer
#include "toxic.h"
#include<bits/stdc++.h>
#define LL long long
#define LLL __int128
#define uint unsigned
#define ldb long double
#define uLL unsigned long long
using namespace std;
void determine_type(int){
vector<int>a;
for(int i=0;i<500;++i)a.emplace_back(0);
for(int i=1;i<500;++i)a.emplace_back(i);
vector<int>b=query_machine(a);
int p=-1;
vector<char>f(1000,'R');
if(b.size()==1&&b[0]==a.size()){
a.clear();
for(int i=0;i<500;++i)a.emplace_back(0);
for(int i=500;i<999;++i)a.emplace_back(i);
b=query_machine(a);
if(b.size()==1&&b[0]==a.size()){
a.clear();
a.emplace_back(0),a.emplace_back(0),a.emplace_back(999);
b=query_machine(a);
if(b.size()==1){
fill(f.begin(),f.begin()+999,'T');
}
else f[999]='T';
answer_type(f);
return;
}
else if(b.size()<500)p=499,fill(f.begin(),f.begin()+500,'T');
else p=b.size();
}
else if(b.size()<500)p=0;
else p=b.size()-499;
f[p]='T';
vector<int>cnt({20,18,9,3});
for(int i=p+1;i<1000;i=min(1000,i+50)){
vector<int>A(50);
for(int k=0;k<50;++k)A[k]=min(i+k,999);
a.clear();
vector<vector<int>>pos(4);
for(int k=0,j=0;k<4;++k){
pos[k].resize(cnt[k]+1);
for(int t=1;t<=cnt[k];++t,++j){
pos[k][t]=A[j];
if(k){
for(int r=0;r<(1<<(k-1));++r){
a.emplace_back(p);
for(int l=1;l<=t*2;++l)a.emplace_back(A[j]);
}
}
else if(t<19){
a.emplace_back(p);
for(int l=1;l<=t*2-1;++l)a.emplace_back(A[j]);
}
}
}
a.emplace_back(p);
for(int l=1;l<=19;++l)a.insert(a.begin(),pos[0][19]);
for(int l=1;l<=20;++l)a.emplace_back(pos[0][20]);
b=query_machine(a);
b.insert(b.begin(),a.size());
if(b.size()==2&&b[0]==b[1])b.pop_back();
for(int t=20;t>=1;--t){
int c=(t<b.size()?b[t-1]-b[t]:0);
for(int k=0;k<4;++k)if(t<=cnt[k]){
if(c>>k&1){
if(k){
for(int j=t-1,s=0;j>=0;--j)
b[j]-=s,s+=1<<k;
}
else if(t<19){
for(int j=t-1,s=0;j>=0;--j)
b[j]-=s,s+=2;
}
else{
for(int j=t-1,s=0;j>=0;--j)
b[j]-=s,s+=1;
}
}
else{
f[pos[k][t]]='T';
}
}
}
}
answer_type(f);
}
详细
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 1ms
memory: 3776kb
input:
2 1000 TTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTRTTTTTTTTTTTTTTTTTTTTRTTRTTTTTTTTTTTTRTTTTRTTTTTTTTTTTTTTTTTRTTTTRTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #2:
score: 10
Accepted
time: 0ms
memory: 3780kb
input:
2 1000 TTTTRRRTTTTTTTTTTTTTTTTRRRRRTTTTTTTTTRTTRTRRTRRTTTTTTRTRRRTRTRTTRTTTTTRTTTRTTTTRRRTTRTRTRTTTTRRRTRTTTTTTTTTTRRRRTTTRRTTRTRTTTTTTRTTTTTRTTTRTRTTRRTRRRTTTRTRTTTTTRTTTTTRTTTTTTTRTTTTTTTTTTTTRTTTTTTTRTRTTTTTTRRRTTTTTTTTTTTRTRTRTRRTTRRTTRTTRTTTTTTTTRRTTTTRRTTTTTTTTTRTTRTTTTTRTRTTRRTRTTTRTTRRTTRTRT...
result:
ok Correct. #(queries) = 21
Test #3:
score: 10
Accepted
time: 0ms
memory: 3812kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTRTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTTTTTTTTTTTTTTRTTTRTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #4:
score: 10
Accepted
time: 1ms
memory: 3848kb
input:
2 1000 TTRTRTTTTTTTTTTTTTTTTTTTTTTRRTTTTTRTTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTRTTRTTRTTRRTTTRTTTTTRTRTTTRTTTTTTTTTTTTTTRTTRRTTTTTTTTTTRTTTTRTTTRTTTTTTTTTTTTTTTTTRTTTTRRTTTTRRTTTRTTTTTRTTTTTTTTTTTTRTTRTRTTTTTTRTRTRTRRRRRTRRRTTRTTTRTTTTTTRTTTTRTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTRTTTTTRTTTTTTTTTTTTTTTTR...
result:
ok Correct. #(queries) = 21
Test #5:
score: 10
Accepted
time: 1ms
memory: 3840kb
input:
2 1000 TTRTRTTTRTTRTTTTRRRTTRRTTTTRTRRTRTTTTTTTTTRTTTTTTTTTTTRRTTRTTTTTTTTTTTTTRTTTRTTTTTTTTRTTTTTTRTTTTTRTTTTTTRTRRRTTTTTRTTTTTTRRTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTRTTTTTTRTTRTRRRRTTTTRTTRTTRTTTRTTTTTRTTTRTTTRTRTRTTTTTTTTTRTTTTTTRTTTTTRTTRTTTRTTTTTTTTRTTTTTTTRTRRTTTTTRTTTTTTTTRTTRTRTRTT...
result:
ok Correct. #(queries) = 21
Test #6:
score: 10
Accepted
time: 1ms
memory: 4076kb
input:
2 1000 TTTTRRTTTTTTTRTTTTTTTTTRTTTRTTTTTTTTTRTRRTTTRTTTTTTTTTTTTRTTTTTTTTRTTTTTTTTTTTRTTTTTTTRTTTTTTTTTTTTTTTTTTRTTTTTRTTTTTRTRTRTRTRRTTTRRTRTTTTTTRTRTTTTRTRRTTRTTTTTTRTTTRTTTTTTTTTTTRTTTTTTTTTTRRTTTRTRTRRRTTTTRTTRTTTTRTTTTTTTTRTRTTTTTRRTTTTTTTTTTTTRTTTTTTRTTTRTTTTTTTTRTTTTRTTTTTTTTTTTTRRRRRTRTTTTTT...
result:
ok Correct. #(queries) = 21
Test #7:
score: 10
Accepted
time: 1ms
memory: 4148kb
input:
2 1000 TRTTTRTRRTTTTTTTTRTTTTTTTRTTTTRTTRTRTTTTTRRTTTTRRTRTTRRTTTTTTRTTRTTTTTTTTTTTTRTTTRTTTTTRRTTRRTTTTTTTTRTTTTTRTTRTTTRRTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTRTTTRTTTTTTRTTRTTRTTRTTTTTTTRTTRTRTTTRTTRRTRRRTTTTRTTTTTRTTTTTTTTTTTTRTTTTTTRTRTTTTTTTRRTRRTTTTTRTTTTTTTTTRTRTTTTTRTRTTTTTRTTRTTTRTRTRTTTTTRRTTTTT...
result:
ok Correct. #(queries) = 21
Test #8:
score: 10
Accepted
time: 1ms
memory: 4072kb
input:
2 1000 TTTTTTTRTTTRTTRTRTTTTTTRTTTTTTTTTTTTTTTTRTTTTTTTRTTTTTTTTTTTTTTTTTTTRTTTTTRTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTTTTTRTTTTTTRTTTTTTTRTTTTRTTTTTTTTTTRTTRTTTTTTTTTTTRTTTTTTTTRTTTTTTTTRTTTTTTTTTTRRTTTTTTTTTTTTRTTTTTTRRTTTTRTRTTTTTTTTTTRTTTTRTTTRTTTTTTTTTTTTRTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #9:
score: 10
Accepted
time: 1ms
memory: 4144kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #10:
score: 10
Accepted
time: 1ms
memory: 3828kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #11:
score: 10
Accepted
time: 1ms
memory: 3784kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #12:
score: 10
Accepted
time: 1ms
memory: 3844kb
input:
2 1000 TRRRRRRRRTRRRRRRRRRTTRRRRRTTRRRRRRRRRRRRTRRTTTRRRRRRRRRRRRRRRRRRRRRRRRRRTRRTRRRRTRRRRRRRRRTRRRRRRRRTRRRRRRTTRRRRRRRRRRTRRRRRTRTRRRRTRTRRRTRRRRRTRRRRTRRRRTRRRRRTRRRRRTRRRRRTRTTRTRRRRRRRRRRTRRRRTRRRRTRTRTRRRRRRTTRRTRRRRRRRTTRRRRRRRTTRRRRTRRTRTRRRRRRRRRRRTTRTTRRTRRRRRRRRRRRRTTRRRRRRRTRRRRRRTTTRR...
result:
ok Correct. #(queries) = 21
Test #13:
score: 10
Accepted
time: 1ms
memory: 3876kb
input:
2 1000 TRRTRRRTTRTRTRTRRRRRRRRRRRTTRTTRTRRRRTRRRRRRRRRRRRRRRRRRTRRRRRRRRTRRRRRTTTRRRRRRRTRRRRRRTRTRTRRRRTRTRRTRRRTTRRRTRTRRRRRRRRTRTRRRTRRRTRRRRRRTRRRTRRRRTRRRRRRRRRRTRRRRRRTRRRTTRRRRTRRRRRRRRRRRRRRRTTRRRRRRRRRTRTRTRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRTRRRRRRTTRRRTRRRTRRRRRTRRRRRRRRRRRRRRRRRRRTRRRRTRR...
result:
ok Correct. #(queries) = 21
Test #14:
score: 10
Accepted
time: 0ms
memory: 4072kb
input:
1 1000 TRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
ok Correct. #(queries) = 21
Test #15:
score: 10
Accepted
time: 1ms
memory: 3836kb
input:
1 1000 TTTTRRTRTRRTTRRTRTTTTTTTTRTRTRTRTTTTTTTTRTTTTRTTTTTRTRTRTTRTTTTTTRTTTTTRTTTTTRTTTRTTTRTTTTRTTTTTTTRRTTTTTRTTRTTTTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTRTTTTTTTTTTTTTTTRTTTTTRTTRTTRTTTTRTTTTTTTTTRTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTRTTTTTTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTT...
result:
ok Correct. #(queries) = 21
Test #16:
score: 10
Accepted
time: 1ms
memory: 3724kb
input:
1 1000 TTRTTRRTTRTTTTTTTRTTRRRRRTRTTTTRTTTTTTTTRTTRTRRTRTRRRRTRTRRTRTTRRTRTRRRTRTTTTTTTTTRTRTTRRTTTTTRTTTTTRTTRTTTTTTRTTTRTRTTRRTRTRRTRRTRRTRRTTRTTTTTRTRTTTTTRRTRTTTRRTTTTRTTTTRTTRTTRTTRTRTTRRTTTTRRTTRTTTRTTRRTTRTTRRTTTTRRTRRTTTTTTTRRTTTTTRTTRTRTRRRTRTTTRTTTTRTTTTTTRTRTTTRRTRTTTTTTRRRTTTTTTTRTRTRTRT...
result:
ok Correct. #(queries) = 21
Test #17:
score: 10
Accepted
time: 0ms
memory: 3840kb
input:
1 1000 TRRTRRRRRRTRRRRTRRRTRRRRRTTTRRRTRRRTTTTRTRRRRRTRRRRTRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRTTRTRRTRRTRRTTRTRRRTTRTRRRRRTTRTRTTRRRRRTRTTRRRRRRRRRTRRRTRRRRRRTRRTTRRTRRRRRTRRRTTRRRRRRRRRRRRTRTRRRRTRTRRRRTRRRRRRRRRTRRTRTTRTRRTRRRRRRRTTRTTRRRTRRRRRRRTRRTRTTRRRRRTTTRTTRRRRTRRRRRRTRRRRTTRRTRRRRRRTRRTRRTR...
result:
ok Correct. #(queries) = 21
Test #18:
score: 10
Accepted
time: 1ms
memory: 4064kb
input:
1 1000 TTRRTTTRTTTTTTTTTTTTTTTTTTRTTRTTRTTTRTRTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTRTTTRTTTTTTTTTRRRTTTRTRRRRTTTTTTRRTRTTTRTRTTTRTTRTTTTTTTTTTTTTRTTRTTRTTTTTTRTTRTTTTTTTTTTTTTTTTTRRRTTTTTTRTRTTTTTRRTTTTTRTTRTTTTRTTTTTTRRTTTRTTRTTTTRTTTTTTTTTTTTTTRRRTRTTRTTTRTRRTTTTTRTTTTTTTTTTRTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #19:
score: 10
Accepted
time: 1ms
memory: 3796kb
input:
2 1000 TRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
ok Correct. #(queries) = 21
Test #20:
score: 10
Accepted
time: 0ms
memory: 3780kb
input:
2 1000 TTTTRRTRTRRTTRRTRTTTTTTTTRTRTRTRTTTTTTTTRTTTTRTTTTTRTRTRTTRTTTTTTRTTTTTRTTTTTRTTTRTTTRTTTTRTTTTTTTRRTTTTTRTTRTTTTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTRTTTTTTTTTTTTTTTRTTTTTRTTRTTRTTTTRTTTTTTTTTRTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTRTTTTTTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTT...
result:
ok Correct. #(queries) = 21
Test #21:
score: 10
Accepted
time: 1ms
memory: 3816kb
input:
2 1000 TTRTTRRTTRTTTTTTTRTTRRRRRTRTTTTRTTTTTTTTRTTRTRRTRTRRRRTRTRRTRTTRRTRTRRRTRTTTTTTTTTRTRTTRRTTTTTRTTTTTRTTRTTTTTTRTTTRTRTTRRTRTRRTRRTRRTRRTTRTTTTTRTRTTTTTRRTRTTTRRTTTTRTTTTRTTRTTRTTRTRTTRRTTTTRRTTRTTTRTTRRTTRTTRRTTTTRRTRRTTTTTTTRRTTTTTRTTRTRTRRRTRTTTRTTTTRTTTTTTRTRTTTRRTRTTTTTTRRRTTTTTTTRTRTRTRT...
result:
ok Correct. #(queries) = 21
Test #22:
score: 10
Accepted
time: 1ms
memory: 4068kb
input:
2 1000 TRRTRRRRRRTRRRRTRRRTRRRRRTTTRRRTRRRTTTTRTRRRRRTRRRRTRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRTTRTRRTRRTRRTTRTRRRTTRTRRRRRTTRTRTTRRRRRTRTTRRRRRRRRRTRRRTRRRRRRTRRTTRRTRRRRRTRRRTTRRRRRRRRRRRRTRTRRRRTRTRRRRTRRRRRRRRRTRRTRTTRTRRTRRRRRRRTTRTTRRRTRRRRRRRTRRTRTTRRRRRTTTRTTRRRRTRRRRRRTRRRRTTRRTRRRRRRTRRTRRTR...
result:
ok Correct. #(queries) = 21
Test #23:
score: 10
Accepted
time: 1ms
memory: 3700kb
input:
2 1000 TTRRTTTRTTTTTTTTTTTTTTTTTTRTTRTTRTTTRTRTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTRTTTRTTTTTTTTTRRRTTTRTRRRRTTTTTTRRTRTTTRTRTTTRTTRTTTTTTTTTTTTTRTTRTTRTTTTTTRTTRTTTTTTTTTTTTTTTTTRRRTTTTTTRTRTTTTTRRTTTTTRTTRTTTTRTTTTTTRRTTTRTTRTTTTRTTTTTTTTTTTTTTRRRTRTTRTTTRTRRTTTTTRTTTTTTTTTTRTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #24:
score: 10
Accepted
time: 1ms
memory: 3780kb
input:
2 1000 TRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRT...
result:
ok Correct. #(queries) = 21
Test #25:
score: 10
Accepted
time: 1ms
memory: 3812kb
input:
2 1000 TTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRT...
result:
ok Correct. #(queries) = 21
Test #26:
score: 10
Accepted
time: 1ms
memory: 3812kb
input:
2 1000 TTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTR...
result:
ok Correct. #(queries) = 21
Test #27:
score: 10
Accepted
time: 1ms
memory: 4144kb
input:
2 1000 TTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTT...
result:
ok Correct. #(queries) = 21
Test #28:
score: 10
Accepted
time: 1ms
memory: 3792kb
input:
2 1000 TTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTT...
result:
ok Correct. #(queries) = 21
Test #29:
score: 10
Accepted
time: 1ms
memory: 4072kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 12
Subtask #2:
score: 90
Accepted
Test #30:
score: 90
Accepted
time: 2ms
memory: 4068kb
input:
2 1000 RRTTRRRRRTTRTTRRTTTTTTTTTTTTTRTTRRRRTTRRTTRTRRTRTRTTTTTRTRTTTTTTRRTTTRTTRTTTTRTTRTTRTTRTTRTRRRTRTTTTTRRTTTTTTRRRTRRTRRRRRTTTTTTTTTRTTRTRRTTTRRRTRRRTRTRTTRTTTRTRTRTRTTTRRTTTTTTTRTRRTRTTRTTTTTRTTRTTTRRTRTRTTRTRTRTTTTRTTTTTRTTTTTRRRTRTRRTRRTTTTTRTTTRTRTTTRTRTRRTRTTTRRTRRTTTRTRTTRRTTRTTTRRTTTRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #31:
score: 90
Accepted
time: 1ms
memory: 3796kb
input:
2 1000 RTRTRRTTTRTRRRRRRTTTRTTTRRRRRRTTTRRRRRTRTRRRRRRTRTTRRRRTRRTRTTRRRRRTRRRRRRRRTRTTRRRTTTRRRRRRTTRTRTRRRRTRRRRRTRRRRRRRRRRRTRTRTTTRRTTTTRRRRTRRRTRRTRTRTRRTTRRTRRRRRRRRTRRRTRRTRRRTTRTTRRRRTRTRRRRRRRTRTTTRRTRTTTTRRRRTTRRRRRTRRRTRTTTRRRTRRRRRRRRTTTRRTTRRRRRRRRTTRRRTRRRTTRRRTTTRRRRRRRRTRRRRRTRRRRTTR...
result:
points 1.0 Correct. #(queries) = 21
Test #32:
score: 90
Accepted
time: 2ms
memory: 4072kb
input:
2 1000 RTTTRTRTRTTRRRTTRTRTRRTTTTRRRRTRRTTRRRRRTRRRTRRRTRTTRTTRTTTTRTTRRRRTRRTRRRTRTRTRTTTTRRTTRTTRRRTTRTTRRTTRTTRTRRTRTRRRRTTTTTRTRRTTTRRRRTRRTRTTRRRRTRRRRTTTRRTTRRTRTTRTRRTRTTRRRTRTTTTRTTRRTRTRTTRTTRTRRRTTTTTTTTTTTTRRRTRTTRRRTTTTTTTTTRRRTRTRTRTTTRTRRRRRTRTRRTTTTRRRRTRRRTRTTTRRRRTRTTTRTRTTRRRTRTRTT...
result:
points 1.0 Correct. #(queries) = 21
Test #33:
score: 90
Accepted
time: 1ms
memory: 3844kb
input:
2 1000 RRRRRRRRRRTRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRTRRRRRRRRRRRRRRRRRRRRRRRRTRTRRRTRRRRTRTRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #34:
score: 90
Accepted
time: 1ms
memory: 3780kb
input:
2 1000 RRTRRTRTRRRRRRTRRRRRRRRRTRRTTTRTRRRRRRTRRRRRRRTRRRTRTTRRTRRRRRRRRRTRTTRRRRTTTRRRRRRRRRRRRRRTRRRRRTRRRRRTRRRTRRRTTTRRTRRRRRTRRRTRRRRRRRRTRRTTRRRRRRTRRTRRRTTRRRRRRTRRTRRRRRTRRRRTRRRRRRRRTRRRRRRRTTRRRRTRTTRTRRRRRRRTTRRRRTRTRRTTRRRRRRRTRRRRTRRRRRRRRRRRRRRRRRRRRRRTTRRRTRRRTRRRRTRRRRRRTTTTRRRRTRRTR...
result:
points 1.0 Correct. #(queries) = 21
Test #35:
score: 90
Accepted
time: 1ms
memory: 3844kb
input:
2 1000 RTRRTRRTRRRRRTRTTRRRTRTTRRRRRRTTRRTRTTTRTTRRRRRRRRRRTRRTTTRRTTRRRRTRRTTTRRRRTRRTRRTRTTRRRRRTRRRRTRTTRRRRRTRRRRTTRRRRRRRRTTTTRTRTTRRRRTTRRTRTTTRRTRRTRRTRTTRTRTTRRRRTRTTTTRTRRTRRRRRRRTTRRRTRTTTRTTRTTRRRTRTTTTTTRRRRRTRTRRRTTRRRTRRTTRRRRRTTTRTTRRTTRRRTRTRRRRTTRRRTTTTRTTTRRTTTRRRTTRRRRRRRTTTRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #36:
score: 90
Accepted
time: 1ms
memory: 4064kb
input:
2 1000 RRRRRRTRRRRRRRRRRRRRRTRTRRRRRRRRRTTRRRRRTTRRRTRRRRRRRRRTRRTRRRRTRTRRRTTRRRRRRRRTRRTTRTRTRTRRTRRRTRRTRRRRRTRRRRTRRRTRTRRTRRTRRRRRRRRRRTRRRRTRTRRRTTRRRRRTRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRTRRRRRRRTRRTRRRTRRTTRRRRRRRRRRRTRRRRRRRRRTTRRRRTRRTTRRTRRRRTRRRRTRTRRRRRRTRRRRRRRRRRRRRRTRRRRRTRRRTRRRRTRTRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #37:
score: 90
Accepted
time: 0ms
memory: 3792kb
input:
2 1000 RRRTTTTTRTTTTTRTTTTTTRTTTTTTTRTTRTTTTTRTRTTTTRRTTTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTRTTTTRTTRTRTTTRTTTTTTTRTTTRTTTTTTTTTTTTTTTTRTTTTTRTTTTRTTTTTTRTRTRTTTTRTTTTTTTRRTRRTRTTRTTTTTTTTTRTTTTTTTTTTTRTRTTTTTTTTTTRRTTTTTTTTTTTTRTRTRTRTRTTTTRRRTTTTTTTTTRTTRTTTRTTTTRTTTTRTTTTTRTTTTTTTTTTTTRTRTTRTTTTTTRTTTR...
result:
points 1.0 Correct. #(queries) = 21
Test #38:
score: 90
Accepted
time: 1ms
memory: 3816kb
input:
2 1000 RTTTTRTTTTTTTTTTTTRTTTRTTRTRTTTRTTTTTTRTTTTTTTTTRTTTTTRRTTTTTTTTRRTRTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTRTTTRTTTTTTTTTTTTTTTTTRTTTTTTTRRTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTTTTTTTTTTTTTTRTTTTTTRTTTTTTTTTTRTTTRTTRTRTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTT...
result:
points 1.0 Correct. #(queries) = 21
Test #39:
score: 90
Accepted
time: 1ms
memory: 3796kb
input:
2 1000 RRRRRRRTTTTRRRRRTRRRTRRRRRRTRRRTRRRRRRRRRRRRRRRRRRTRRRRRRRTRTRRRRRRRRRRTRRRTRRRRRRTRRRRRRRRRTRRRRRRTRRRRTRRRTRRRRRTTRRRTRRRTTTRRRRRRRRRTRTRRRRRRRRRRRRRRRRRTRRRRRRTTRRRTRRRRRRRRTRTRTRRRRRRTRRRTRTRRRTRRRRRRTRRTRRRTRTRRRRRRRRTRRRTRTRRRRRTRRRRRRRRTRTRTRRRRTRRRTRRRRRTRRRRTTRRRRRRRRRRRRTRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #40:
score: 90
Accepted
time: 1ms
memory: 3776kb
input:
2 1000 RRRRTRTRRRRRTRRRRRRRRTRTRRRRTRTRRRRRTRTRRRRRRRRTRRRRRRRRTRRRTRRRRTRRRRRRRRRRRRRTRRRRTRTRRRTRRRRRRRRRRRTRRRRRRTTRTTRTTRTRRRTTRTRRRRRRTRRRRRTRRRRRRTTRRTRRRRRRRRRTRRRRTRRRRTTRRRTRRRRRTRRRRRTRTRRRRRRTRRRRTRRRRRRRTRRRRRTRRTRTRTRRRRTTTRTRRRRRRTRRRTTRRRRRRRTRRRTRTRRRRRRRTRRRRTRRRRRRRRTRRRRRTRRRRTRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #41:
score: 90
Accepted
time: 1ms
memory: 3788kb
input:
2 1000 RRRRRRRRRRRRRTRRRTRTRRRRRRTRRRRRRRTRRRRRRRRRRRTRRRRRTRRTRTRRRRRRTRRRTRRRRRRRRRRRRRRTRRRRRTRTRRRRTRRRRRTTRRRTRRRRRRRRRTRRRTRTRRRRRRTRRTRRRTRRRTRRRRRRTRRRRRRRTRRRTTRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRRRRRRRRRRTRRTRRRTTRTRRRRRRRRRRTRRRTTRRRRRTTTTRRRTRRRRTTRRTTRRRRRRTTTTRTRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #42:
score: 90
Accepted
time: 1ms
memory: 3776kb
input:
2 1000 RRTRRRRRRTRRTRRRTRRRRRTRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRTRTRRRRRRRRRTRRRRRRTRRRTRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRTTRRRRRRRTTRRRRRRRRTTRRRRTRTRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRTTRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRT...
result:
points 1.0 Correct. #(queries) = 21
Test #43:
score: 90
Accepted
time: 1ms
memory: 4148kb
input:
2 1000 RRRRRTRRRRRRRRRTRTRRRRRRRRRRRRRRRRRRRTRRRTRRTRRRRRRRRRRRTRRRTTRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRTTTRTTRTRRTTRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRTRRRTRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRTRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTRTR...
result:
points 1.0 Correct. #(queries) = 21
Test #44:
score: 90
Accepted
time: 1ms
memory: 3840kb
input:
2 1000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #45:
score: 90
Accepted
time: 1ms
memory: 3788kb
input:
2 1000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 20
Test #46:
score: 90
Accepted
time: 2ms
memory: 3820kb
input:
2 1000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 3
Test #47:
score: 90
Accepted
time: 1ms
memory: 4148kb
input:
2 1000 RTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTR...
result:
points 1.0 Correct. #(queries) = 21
Test #48:
score: 90
Accepted
time: 2ms
memory: 3840kb
input:
2 1000 RRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTR...
result:
points 1.0 Correct. #(queries) = 21
Test #49:
score: 90
Accepted
time: 1ms
memory: 3792kb
input:
2 1000 RRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRT...
result:
points 1.0 Correct. #(queries) = 21
Test #50:
score: 90
Accepted
time: 1ms
memory: 3784kb
input:
2 1000 RRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #51:
score: 90
Accepted
time: 2ms
memory: 3776kb
input:
2 1000 RRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #52:
score: 90
Accepted
time: 1ms
memory: 4036kb
input:
2 1000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 12