QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#400241#8592. Toxic Gene 2lifan100 ✓2ms4080kbC++144.6kb2024-04-27 07:23:242024-06-06 15:18:27

Judging History

你现在查看的是最新测评结果

  • [2024-06-06 15:18:27]
  • 管理员手动重测本题所有提交记录
  • 测评结果:100
  • 用时:2ms
  • 内存:4080kb
  • [2024-06-06 15:15:16]
  • 管理员手动重测本题所有提交记录
  • 测评结果:100
  • 用时:2ms
  • 内存:4092kb
  • [2024-04-27 07:23:24]
  • 评测
  • 测评结果:100
  • 用时:2ms
  • 内存:4096kb
  • [2024-04-27 07:23:24]
  • 提交

answer

// 
#include<bits/stdc++.h>
#include "toxic.h"
using namespace std;
#define max_n 2000
vector<int>query_machine(vector<int>samples);
void answer_type(std::vector<char>V);
vector<int>ask(vector<int>op){
//	printf("ask ");
//	for(auto u:op)printf("%d ",u);printf("\n");
	vector<int>res=query_machine(op);
	if(res.empty()||res[0]!=(int)op.size()){
		vector<int>cur; cur.push_back(op.size());
		for(auto u:res)cur.push_back(u);
		res=cur;
	}
	return res;
}
namespace DZY{
	const int B=36;
	vector<int>all;
	const int bl[20]={0,1,6,10,14,18,21,24,27,30,32,34,36,38,40,42,44,46,48};//bi=18
	const int br[20]={0,5,9,13,17,20,23,26,29,31,33,35,37,39,41,43,45,47,48};
	int p[max_n+2];
	int st=0;
	int d[max_n+2];
	bool ans[max_n+2];//是否为病毒 
	vector<char>ansc;
	void baoli(int n){
		for(int i=1;i<n;++i){
			vector<int>op; op.push_back(i-1); op.push_back(i);
			vector<int>res=ask(op);
			if((int)res.size()<=1)ans[i]=ans[i-1];
			else ans[i]=ans[i-1]^1;
		}
		vector<int>g[2];
		for(int i=0;i<n;++i)g[ans[i]].push_back(i);
		vector<int>op; op.push_back(g[0][0]); op.push_back(g[0][0]); op.push_back(g[1][0]);
		vector<int>res=ask(op);
		if(res.back()>1){
			for(int i=0;i<n;++i)ans[i]^=1;
		}
		for(int i=0;i<n;++i)ansc.push_back("RT"[ans[i]]);
		answer_type(ansc);
	}
	void work(int L,int R){
//		printf("work %d %d\n",L,R);
		vector<int>op;
		for(auto u:all){
			if(u)op.push_back(p[L-1+u]);
			else op.push_back(p[0]);
		}
		vector<int>res=ask(op);
		int m=(int)res.size()-1;
		for(int i=0;i<=m;++i)d[i]=res[i];
		if(m<20)ans[p[R]]=true;
		if(ans[p[R]]){
			if(m<19)ans[p[R-1]]=true;
		}
		else{
			if(d[18]-d[19]==1)ans[p[R-1]]=true;
		}
		for(;m<18;){++m; d[m]=d[m-1];}
//		printf("d=");
//		for(int i=0;i<=m;++i)printf("%d ",d[i]);printf("\n"); 
		if(!ans[p[R-1]]){for(int i=0;i<=18;++i)d[i]-=19-i;}
		else{for(int i=0;i<=m;++i)d[i]-=19;}
		if(!ans[p[R]]){for(int i=0;i<=19;++i)d[i]-=20-i;}
		else{for(int i=0;i<=m;++i)d[i]-=20;}
		if((d[0]-d[1])%2==0)ans[p[L]]=true;
//		printf("op ");
//		for(int i=L;i<=R;++i)printf("%d ",p[i]);printf("\n");
//		printf("d=");
//		for(int i=0;i<=m;++i)printf("%d ",d[i]);printf("\n"); 
		for(int i=1;i<=18;++i){
			if(i>=2){
				if(((d[i-2]-d[i-1])-(d[i-1]-d[i]))%2==0)ans[p[L-1+bl[i]]]=true;
			}
			if(!ans[p[L-1+bl[i]]]){for(int j=0;j<=i-1;++j)d[j]-=i*2-1-j*2;}
			else{for(int j=0;j<=m;++j)d[j]-=i*2-1;}
		}
		for(int i=1;i<=18;++i){
			int dis=(d[i-1]-d[i])-(d[i]-d[i+1]);
			for(int x=bl[i]+1;x<=br[i];++x){
				if((dis>>(x-bl[i]))%2==0)ans[p[L-1+x]]=true;
			}
		}
	}
	void askans(int n){
		for(int i=0;i<=n*2;++i)p[i]=min(i,n-1);
		for(int ca=1;ca<=19;++ca)all.push_back(49);
		all.push_back(0);
		for(int ca=1,l=1,r=1;l<=48&&r<=48;++ca,l=r+1){
			for(int i=1;i<=ca*2-1;++i)all.push_back(l);
			r=l;
			all.push_back(0);
			while(r<48){
				int rr=r+1;
				if(((ca*2+1)<<(rr-l-1))>B)break;
				++r;
				for(int cas=1;cas<=(1<<(r-l-1));++cas){
					for(int caa=1;caa<=ca*2;++caa)all.push_back(r);
					all.push_back(0);
				}
			}
		}
		for(int ca=1;ca<=20;++ca)all.push_back(50);
		memset(ans,0,sizeof(ans));
		vector<int>stop;//start op
		for(int i=0;i<=500;++i)stop.push_back(0);
		for(int i=1;i<=499;++i)stop.push_back(i);
		vector<int>stres=ask(stop);
		int stlen=(int)stres.size()-1;
		if(stlen){
			if(stlen<=500)st=0;
			else st=stlen-500;
//			printf("st=%d\n",st);
			swap(p[0],p[st]); ans[p[0]]=true;
			for(int l=1;l<=999;l+=50)work(l,l+50-1);
//			for(int i=0;i<=999;++i)printf("%c","RT"[ans[i]]);
		}
		else{
			vector<int>seop;//second op
			for(int i=0;i<=499;++i)seop.push_back(500);
			for(int i=0;i<=499;++i)seop.push_back(i+500);
			vector<int>seres=ask(seop);
			int selen=(int)seres.size()-1;
			if(selen){
				if(selen>500)st=selen;
				else st=500; 
				swap(p[0],p[st]); ans[p[0]]=true;
				for(int l=500;l<=999;l+=50)work(l,l+50-1);
				vector<int>thop; thop.push_back(st); thop.push_back(p[1]);
				vector<int>thres=ask(thop);
				int thlen=(int)thres.size()-1;
				if(!thlen){
					for(int i=1;i<=499;++i)ans[p[i]]=true;
				}
			}
			else{
				vector<int>thop; thop.push_back(0); thop.push_back(500); thop.push_back(0);
				vector<int>thres=ask(thop);
				if(thres.back()==2){
					for(int i=0;i<=499;++i)ans[i]=true;
				}
				else{
					for(int i=500;i<=999;++i)ans[i]=true;
				}
			}
		}
		for(int i=0;i<n;++i)ansc.push_back("RT"[ans[i]]);
		answer_type(ansc);
	}
};
void determine_type(int n){
	if(n<=21){DZY::baoli(n); return;}
	DZY::askans(n);
}
/*int main(){
	freopen("toxic.out","w",stdout);
	DZY::askans(1000);
}*/
#ifdef dzy
	#include "stub.cpp"
#endif 

详细

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 1ms
memory: 3816kb

input:

2 1000
TTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTRTTTTTTTTTTTTTTTTTTTTRTTRTTTTTTTTTTTTRTTTTRTTTTTTTTTTTTTTTTTRTTTTRTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #2:

score: 10
Accepted
time: 2ms
memory: 3724kb

input:

2 1000
TTTTRRRTTTTTTTTTTTTTTTTRRRRRTTTTTTTTTRTTRTRRTRRTTTTTTRTRRRTRTRTTRTTTTTRTTTRTTTTRRRTTRTRTRTTTTRRRTRTTTTTTTTTTRRRRTTTRRTTRTRTTTTTTRTTTTTRTTTRTRTTRRTRRRTTTRTRTTTTTRTTTTTRTTTTTTTRTTTTTTTTTTTTRTTTTTTTRTRTTTTTTRRRTTTTTTTTTTTRTRTRTRRTTRRTTRTTRTTTTTTTTRRTTTTRRTTTTTTTTTRTTRTTTTTRTRTTRRTRTTTRTTRRTTRTRT...

result:

ok Correct. #(queries) = 21

Test #3:

score: 10
Accepted
time: 1ms
memory: 3712kb

input:

2 1000
TTTTTTTTTTTTTTTTTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTRTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTTTTTTTTTTTTTTRTTTRTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #4:

score: 10
Accepted
time: 0ms
memory: 4012kb

input:

2 1000
TTRTRTTTTTTTTTTTTTTTTTTTTTTRRTTTTTRTTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTRTTRTTRTTRRTTTRTTTTTRTRTTTRTTTTTTTTTTTTTTRTTRRTTTTTTTTTTRTTTTRTTTRTTTTTTTTTTTTTTTTTRTTTTRRTTTTRRTTTRTTTTTRTTTTTTTTTTTTRTTRTRTTTTTTRTRTRTRRRRRTRRRTTRTTTRTTTTTTRTTTTRTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTRTTTTTRTTTTTTTTTTTTTTTTR...

result:

ok Correct. #(queries) = 21

Test #5:

score: 10
Accepted
time: 1ms
memory: 4080kb

input:

2 1000
TTRTRTTTRTTRTTTTRRRTTRRTTTTRTRRTRTTTTTTTTTRTTTTTTTTTTTRRTTRTTTTTTTTTTTTTRTTTRTTTTTTTTRTTTTTTRTTTTTRTTTTTTRTRRRTTTTTRTTTTTTRRTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTRTTTTTTRTTRTRRRRTTTTRTTRTTRTTTRTTTTTRTTTRTTTRTRTRTTTTTTTTTRTTTTTTRTTTTTRTTRTTTRTTTTTTTTRTTTTTTTRTRRTTTTTRTTTTTTTTRTTRTRTRTT...

result:

ok Correct. #(queries) = 21

Test #6:

score: 10
Accepted
time: 1ms
memory: 3704kb

input:

2 1000
TTTTRRTTTTTTTRTTTTTTTTTRTTTRTTTTTTTTTRTRRTTTRTTTTTTTTTTTTRTTTTTTTTRTTTTTTTTTTTRTTTTTTTRTTTTTTTTTTTTTTTTTTRTTTTTRTTTTTRTRTRTRTRRTTTRRTRTTTTTTRTRTTTTRTRRTTRTTTTTTRTTTRTTTTTTTTTTTRTTTTTTTTTTRRTTTRTRTRRRTTTTRTTRTTTTRTTTTTTTTRTRTTTTTRRTTTTTTTTTTTTRTTTTTTRTTTRTTTTTTTTRTTTTRTTTTTTTTTTTTRRRRRTRTTTTTT...

result:

ok Correct. #(queries) = 21

Test #7:

score: 10
Accepted
time: 1ms
memory: 3748kb

input:

2 1000
TRTTTRTRRTTTTTTTTRTTTTTTTRTTTTRTTRTRTTTTTRRTTTTRRTRTTRRTTTTTTRTTRTTTTTTTTTTTTRTTTRTTTTTRRTTRRTTTTTTTTRTTTTTRTTRTTTRRTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTRTTTRTTTTTTRTTRTTRTTRTTTTTTTRTTRTRTTTRTTRRTRRRTTTTRTTTTTRTTTTTTTTTTTTRTTTTTTRTRTTTTTTTRRTRRTTTTTRTTTTTTTTTRTRTTTTTRTRTTTTTRTTRTTTRTRTRTTTTTRRTTTTT...

result:

ok Correct. #(queries) = 21

Test #8:

score: 10
Accepted
time: 0ms
memory: 3704kb

input:

2 1000
TTTTTTTRTTTRTTRTRTTTTTTRTTTTTTTTTTTTTTTTRTTTTTTTRTTTTTTTTTTTTTTTTTTTRTTTTTRTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTTTTTRTTTTTTRTTTTTTTRTTTTRTTTTTTTTTTRTTRTTTTTTTTTTTRTTTTTTTTRTTTTTTTTRTTTTTTTTTTRRTTTTTTTTTTTTRTTTTTTRRTTTTRTRTTTTTTTTTTRTTTTRTTTRTTTTTTTTTTTTRTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #9:

score: 10
Accepted
time: 1ms
memory: 3740kb

input:

2 1000
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #10:

score: 10
Accepted
time: 1ms
memory: 4012kb

input:

2 1000
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #11:

score: 10
Accepted
time: 1ms
memory: 4016kb

input:

2 1000
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #12:

score: 10
Accepted
time: 1ms
memory: 3748kb

input:

2 1000
TRRRRRRRRTRRRRRRRRRTTRRRRRTTRRRRRRRRRRRRTRRTTTRRRRRRRRRRRRRRRRRRRRRRRRRRTRRTRRRRTRRRRRRRRRTRRRRRRRRTRRRRRRTTRRRRRRRRRRTRRRRRTRTRRRRTRTRRRTRRRRRTRRRRTRRRRTRRRRRTRRRRRTRRRRRTRTTRTRRRRRRRRRRTRRRRTRRRRTRTRTRRRRRRTTRRTRRRRRRRTTRRRRRRRTTRRRRTRRTRTRRRRRRRRRRRTTRTTRRTRRRRRRRRRRRRTTRRRRRRRTRRRRRRTTTRR...

result:

ok Correct. #(queries) = 21

Test #13:

score: 10
Accepted
time: 0ms
memory: 3800kb

input:

2 1000
TRRTRRRTTRTRTRTRRRRRRRRRRRTTRTTRTRRRRTRRRRRRRRRRRRRRRRRRTRRRRRRRRTRRRRRTTTRRRRRRRTRRRRRRTRTRTRRRRTRTRRTRRRTTRRRTRTRRRRRRRRTRTRRRTRRRTRRRRRRTRRRTRRRRTRRRRRRRRRRTRRRRRRTRRRTTRRRRTRRRRRRRRRRRRRRRTTRRRRRRRRRTRTRTRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRTRRRRRRTTRRRTRRRTRRRRRTRRRRRRRRRRRRRRRRRRRTRRRRTRR...

result:

ok Correct. #(queries) = 21

Test #14:

score: 10
Accepted
time: 1ms
memory: 3756kb

input:

1 1000
TRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok Correct. #(queries) = 21

Test #15:

score: 10
Accepted
time: 1ms
memory: 3996kb

input:

1 1000
TTTTRRTRTRRTTRRTRTTTTTTTTRTRTRTRTTTTTTTTRTTTTRTTTTTRTRTRTTRTTTTTTRTTTTTRTTTTTRTTTRTTTRTTTTRTTTTTTTRRTTTTTRTTRTTTTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTRTTTTTTTTTTTTTTTRTTTTTRTTRTTRTTTTRTTTTTTTTTRTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTRTTTTTTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTT...

result:

ok Correct. #(queries) = 21

Test #16:

score: 10
Accepted
time: 1ms
memory: 3708kb

input:

1 1000
TTRTTRRTTRTTTTTTTRTTRRRRRTRTTTTRTTTTTTTTRTTRTRRTRTRRRRTRTRRTRTTRRTRTRRRTRTTTTTTTTTRTRTTRRTTTTTRTTTTTRTTRTTTTTTRTTTRTRTTRRTRTRRTRRTRRTRRTTRTTTTTRTRTTTTTRRTRTTTRRTTTTRTTTTRTTRTTRTTRTRTTRRTTTTRRTTRTTTRTTRRTTRTTRRTTTTRRTRRTTTTTTTRRTTTTTRTTRTRTRRRTRTTTRTTTTRTTTTTTRTRTTTRRTRTTTTTTRRRTTTTTTTRTRTRTRT...

result:

ok Correct. #(queries) = 21

Test #17:

score: 10
Accepted
time: 0ms
memory: 3816kb

input:

1 1000
TRRTRRRRRRTRRRRTRRRTRRRRRTTTRRRTRRRTTTTRTRRRRRTRRRRTRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRTTRTRRTRRTRRTTRTRRRTTRTRRRRRTTRTRTTRRRRRTRTTRRRRRRRRRTRRRTRRRRRRTRRTTRRTRRRRRTRRRTTRRRRRRRRRRRRTRTRRRRTRTRRRRTRRRRRRRRRTRRTRTTRTRRTRRRRRRRTTRTTRRRTRRRRRRRTRRTRTTRRRRRTTTRTTRRRRTRRRRRRTRRRRTTRRTRRRRRRTRRTRRTR...

result:

ok Correct. #(queries) = 21

Test #18:

score: 10
Accepted
time: 1ms
memory: 3724kb

input:

1 1000
TTRRTTTRTTTTTTTTTTTTTTTTTTRTTRTTRTTTRTRTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTRTTTRTTTTTTTTTRRRTTTRTRRRRTTTTTTRRTRTTTRTRTTTRTTRTTTTTTTTTTTTTRTTRTTRTTTTTTRTTRTTTTTTTTTTTTTTTTTRRRTTTTTTRTRTTTTTRRTTTTTRTTRTTTTRTTTTTTRRTTTRTTRTTTTRTTTTTTTTTTTTTTRRRTRTTRTTTRTRRTTTTTRTTTTTTTTTTRTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #19:

score: 10
Accepted
time: 1ms
memory: 3808kb

input:

2 1000
TRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok Correct. #(queries) = 21

Test #20:

score: 10
Accepted
time: 1ms
memory: 3748kb

input:

2 1000
TTTTRRTRTRRTTRRTRTTTTTTTTRTRTRTRTTTTTTTTRTTTTRTTTTTRTRTRTTRTTTTTTRTTTTTRTTTTTRTTTRTTTRTTTTRTTTTTTTRRTTTTTRTTRTTTTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTRTTTTTTTTTTTTTTTRTTTTTRTTRTTRTTTTRTTTTTTTTTRTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTRTTTTTTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTT...

result:

ok Correct. #(queries) = 21

Test #21:

score: 10
Accepted
time: 1ms
memory: 3720kb

input:

2 1000
TTRTTRRTTRTTTTTTTRTTRRRRRTRTTTTRTTTTTTTTRTTRTRRTRTRRRRTRTRRTRTTRRTRTRRRTRTTTTTTTTTRTRTTRRTTTTTRTTTTTRTTRTTTTTTRTTTRTRTTRRTRTRRTRRTRRTRRTTRTTTTTRTRTTTTTRRTRTTTRRTTTTRTTTTRTTRTTRTTRTRTTRRTTTTRRTTRTTTRTTRRTTRTTRRTTTTRRTRRTTTTTTTRRTTTTTRTTRTRTRRRTRTTTRTTTTRTTTTTTRTRTTTRRTRTTTTTTRRRTTTTTTTRTRTRTRT...

result:

ok Correct. #(queries) = 21

Test #22:

score: 10
Accepted
time: 1ms
memory: 3752kb

input:

2 1000
TRRTRRRRRRTRRRRTRRRTRRRRRTTTRRRTRRRTTTTRTRRRRRTRRRRTRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRTTRTRRTRRTRRTTRTRRRTTRTRRRRRTTRTRTTRRRRRTRTTRRRRRRRRRTRRRTRRRRRRTRRTTRRTRRRRRTRRRTTRRRRRRRRRRRRTRTRRRRTRTRRRRTRRRRRRRRRTRRTRTTRTRRTRRRRRRRTTRTTRRRTRRRRRRRTRRTRTTRRRRRTTTRTTRRRRTRRRRRRTRRRRTTRRTRRRRRRTRRTRRTR...

result:

ok Correct. #(queries) = 21

Test #23:

score: 10
Accepted
time: 1ms
memory: 3804kb

input:

2 1000
TTRRTTTRTTTTTTTTTTTTTTTTTTRTTRTTRTTTRTRTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTRTTTRTTTTTTTTTRRRTTTRTRRRRTTTTTTRRTRTTTRTRTTTRTTRTTTTTTTTTTTTTRTTRTTRTTTTTTRTTRTTTTTTTTTTTTTTTTTRRRTTTTTTRTRTTTTTRRTTTTTRTTRTTTTRTTTTTTRRTTTRTTRTTTTRTTTTTTTTTTTTTTRRRTRTTRTTTRTRRTTTTTRTTTTTTTTTTRTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #24:

score: 10
Accepted
time: 1ms
memory: 3772kb

input:

2 1000
TRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRT...

result:

ok Correct. #(queries) = 21

Test #25:

score: 10
Accepted
time: 1ms
memory: 3772kb

input:

2 1000
TTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRT...

result:

ok Correct. #(queries) = 21

Test #26:

score: 10
Accepted
time: 0ms
memory: 3800kb

input:

2 1000
TTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTR...

result:

ok Correct. #(queries) = 21

Test #27:

score: 10
Accepted
time: 1ms
memory: 3772kb

input:

2 1000
TTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTT...

result:

ok Correct. #(queries) = 21

Test #28:

score: 10
Accepted
time: 1ms
memory: 4080kb

input:

2 1000
TTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTT...

result:

ok Correct. #(queries) = 21

Test #29:

score: 10
Accepted
time: 0ms
memory: 4008kb

input:

2 1000
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 3

Subtask #2:

score: 90
Accepted

Test #30:

score: 90
Accepted
time: 0ms
memory: 4004kb

input:

2 1000
RRTTRRRRRTTRTTRRTTTTTTTTTTTTTRTTRRRRTTRRTTRTRRTRTRTTTTTRTRTTTTTTRRTTTRTTRTTTTRTTRTTRTTRTTRTRRRTRTTTTTRRTTTTTTRRRTRRTRRRRRTTTTTTTTTRTTRTRRTTTRRRTRRRTRTRTTRTTTRTRTRTRTTTRRTTTTTTTRTRRTRTTRTTTTTRTTRTTTRRTRTRTTRTRTRTTTTRTTTTTRTTTTTRRRTRTRRTRRTTTTTRTTTRTRTTTRTRTRRTRTTTRRTRRTTTRTRTTRRTTRTTTRRTTTRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #31:

score: 90
Accepted
time: 0ms
memory: 3732kb

input:

2 1000
RTRTRRTTTRTRRRRRRTTTRTTTRRRRRRTTTRRRRRTRTRRRRRRTRTTRRRRTRRTRTTRRRRRTRRRRRRRRTRTTRRRTTTRRRRRRTTRTRTRRRRTRRRRRTRRRRRRRRRRRTRTRTTTRRTTTTRRRRTRRRTRRTRTRTRRTTRRTRRRRRRRRTRRRTRRTRRRTTRTTRRRRTRTRRRRRRRTRTTTRRTRTTTTRRRRTTRRRRRTRRRTRTTTRRRTRRRRRRRRTTTRRTTRRRRRRRRTTRRRTRRRTTRRRTTTRRRRRRRRTRRRRRTRRRRTTR...

result:

points 1.0 Correct. #(queries) = 21

Test #32:

score: 90
Accepted
time: 0ms
memory: 3824kb

input:

2 1000
RTTTRTRTRTTRRRTTRTRTRRTTTTRRRRTRRTTRRRRRTRRRTRRRTRTTRTTRTTTTRTTRRRRTRRTRRRTRTRTRTTTTRRTTRTTRRRTTRTTRRTTRTTRTRRTRTRRRRTTTTTRTRRTTTRRRRTRRTRTTRRRRTRRRRTTTRRTTRRTRTTRTRRTRTTRRRTRTTTTRTTRRTRTRTTRTTRTRRRTTTTTTTTTTTTRRRTRTTRRRTTTTTTTTTRRRTRTRTRTTTRTRRRRRTRTRRTTTTRRRRTRRRTRTTTRRRRTRTTTRTRTTRRRTRTRTT...

result:

points 1.0 Correct. #(queries) = 21

Test #33:

score: 90
Accepted
time: 1ms
memory: 4000kb

input:

2 1000
RRRRRRRRRRTRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRTRRRRRRRRRRRRRRRRRRRRRRRRTRTRRRTRRRRTRTRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #34:

score: 90
Accepted
time: 1ms
memory: 4020kb

input:

2 1000
RRTRRTRTRRRRRRTRRRRRRRRRTRRTTTRTRRRRRRTRRRRRRRTRRRTRTTRRTRRRRRRRRRTRTTRRRRTTTRRRRRRRRRRRRRRTRRRRRTRRRRRTRRRTRRRTTTRRTRRRRRTRRRTRRRRRRRRTRRTTRRRRRRTRRTRRRTTRRRRRRTRRTRRRRRTRRRRTRRRRRRRRTRRRRRRRTTRRRRTRTTRTRRRRRRRTTRRRRTRTRRTTRRRRRRRTRRRRTRRRRRRRRRRRRRRRRRRRRRRTTRRRTRRRTRRRRTRRRRRRTTTTRRRRTRRTR...

result:

points 1.0 Correct. #(queries) = 21

Test #35:

score: 90
Accepted
time: 2ms
memory: 3716kb

input:

2 1000
RTRRTRRTRRRRRTRTTRRRTRTTRRRRRRTTRRTRTTTRTTRRRRRRRRRRTRRTTTRRTTRRRRTRRTTTRRRRTRRTRRTRTTRRRRRTRRRRTRTTRRRRRTRRRRTTRRRRRRRRTTTTRTRTTRRRRTTRRTRTTTRRTRRTRRTRTTRTRTTRRRRTRTTTTRTRRTRRRRRRRTTRRRTRTTTRTTRTTRRRTRTTTTTTRRRRRTRTRRRTTRRRTRRTTRRRRRTTTRTTRRTTRRRTRTRRRRTTRRRTTTTRTTTRRTTTRRRTTRRRRRRRTTTRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #36:

score: 90
Accepted
time: 0ms
memory: 3780kb

input:

2 1000
RRRRRRTRRRRRRRRRRRRRRTRTRRRRRRRRRTTRRRRRTTRRRTRRRRRRRRRTRRTRRRRTRTRRRTTRRRRRRRRTRRTTRTRTRTRRTRRRTRRTRRRRRTRRRRTRRRTRTRRTRRTRRRRRRRRRRTRRRRTRTRRRTTRRRRRTRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRTRRRRRRRTRRTRRRTRRTTRRRRRRRRRRRTRRRRRRRRRTTRRRRTRRTTRRTRRRRTRRRRTRTRRRRRRTRRRRRRRRRRRRRRTRRRRRTRRRTRRRRTRTRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #37:

score: 90
Accepted
time: 2ms
memory: 4004kb

input:

2 1000
RRRTTTTTRTTTTTRTTTTTTRTTTTTTTRTTRTTTTTRTRTTTTRRTTTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTRTTTTRTTRTRTTTRTTTTTTTRTTTRTTTTTTTTTTTTTTTTRTTTTTRTTTTRTTTTTTRTRTRTTTTRTTTTTTTRRTRRTRTTRTTTTTTTTTRTTTTTTTTTTTRTRTTTTTTTTTTRRTTTTTTTTTTTTRTRTRTRTRTTTTRRRTTTTTTTTTRTTRTTTRTTTTRTTTTRTTTTTRTTTTTTTTTTTTRTRTTRTTTTTTRTTTR...

result:

points 1.0 Correct. #(queries) = 21

Test #38:

score: 90
Accepted
time: 1ms
memory: 3756kb

input:

2 1000
RTTTTRTTTTTTTTTTTTRTTTRTTRTRTTTRTTTTTTRTTTTTTTTTRTTTTTRRTTTTTTTTRRTRTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTRTTTRTTTTTTTTTTTTTTTTTRTTTTTTTRRTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTTTTTTTTTTTTTTRTTTTTTRTTTTTTTTTTRTTTRTTRTRTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTT...

result:

points 1.0 Correct. #(queries) = 21

Test #39:

score: 90
Accepted
time: 1ms
memory: 4008kb

input:

2 1000
RRRRRRRTTTTRRRRRTRRRTRRRRRRTRRRTRRRRRRRRRRRRRRRRRRTRRRRRRRTRTRRRRRRRRRRTRRRTRRRRRRTRRRRRRRRRTRRRRRRTRRRRTRRRTRRRRRTTRRRTRRRTTTRRRRRRRRRTRTRRRRRRRRRRRRRRRRRTRRRRRRTTRRRTRRRRRRRRTRTRTRRRRRRTRRRTRTRRRTRRRRRRTRRTRRRTRTRRRRRRRRTRRRTRTRRRRRTRRRRRRRRTRTRTRRRRTRRRTRRRRRTRRRRTTRRRRRRRRRRRRTRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #40:

score: 90
Accepted
time: 2ms
memory: 4000kb

input:

2 1000
RRRRTRTRRRRRTRRRRRRRRTRTRRRRTRTRRRRRTRTRRRRRRRRTRRRRRRRRTRRRTRRRRTRRRRRRRRRRRRRTRRRRTRTRRRTRRRRRRRRRRRTRRRRRRTTRTTRTTRTRRRTTRTRRRRRRTRRRRRTRRRRRRTTRRTRRRRRRRRRTRRRRTRRRRTTRRRTRRRRRTRRRRRTRTRRRRRRTRRRRTRRRRRRRTRRRRRTRRTRTRTRRRRTTTRTRRRRRRTRRRTTRRRRRRRTRRRTRTRRRRRRRTRRRRTRRRRRRRRTRRRRRTRRRRTRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #41:

score: 90
Accepted
time: 1ms
memory: 3756kb

input:

2 1000
RRRRRRRRRRRRRTRRRTRTRRRRRRTRRRRRRRTRRRRRRRRRRRTRRRRRTRRTRTRRRRRRTRRRTRRRRRRRRRRRRRRTRRRRRTRTRRRRTRRRRRTTRRRTRRRRRRRRRTRRRTRTRRRRRRTRRTRRRTRRRTRRRRRRTRRRRRRRTRRRTTRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRRRRRRRRRRTRRTRRRTTRTRRRRRRRRRRTRRRTTRRRRRTTTTRRRTRRRRTTRRTTRRRRRRTTTTRTRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #42:

score: 90
Accepted
time: 0ms
memory: 3748kb

input:

2 1000
RRTRRRRRRTRRTRRRTRRRRRTRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRTRTRRRRRRRRRTRRRRRRTRRRTRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRTTRRRRRRRTTRRRRRRRRTTRRRRTRTRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRTTRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRT...

result:

points 1.0 Correct. #(queries) = 21

Test #43:

score: 90
Accepted
time: 1ms
memory: 3776kb

input:

2 1000
RRRRRTRRRRRRRRRTRTRRRRRRRRRRRRRRRRRRRTRRRTRRTRRRRRRRRRRRTRRRTTRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRTTTRTTRTRRTTRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRTRRRTRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRTRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTRTR...

result:

points 1.0 Correct. #(queries) = 21

Test #44:

score: 90
Accepted
time: 1ms
memory: 3728kb

input:

2 1000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #45:

score: 90
Accepted
time: 1ms
memory: 4000kb

input:

2 1000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #46:

score: 90
Accepted
time: 2ms
memory: 3736kb

input:

2 1000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 13

Test #47:

score: 90
Accepted
time: 1ms
memory: 3728kb

input:

2 1000
RTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTR...

result:

points 1.0 Correct. #(queries) = 21

Test #48:

score: 90
Accepted
time: 0ms
memory: 3732kb

input:

2 1000
RRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTR...

result:

points 1.0 Correct. #(queries) = 21

Test #49:

score: 90
Accepted
time: 1ms
memory: 3812kb

input:

2 1000
RRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRT...

result:

points 1.0 Correct. #(queries) = 21

Test #50:

score: 90
Accepted
time: 1ms
memory: 4000kb

input:

2 1000
RRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #51:

score: 90
Accepted
time: 2ms
memory: 4004kb

input:

2 1000
RRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #52:

score: 90
Accepted
time: 1ms
memory: 4012kb

input:

2 1000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 3