QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#88312 | #5436. DRX vs. T1 | fzj2007 | AC ✓ | 2ms | 3548kb | C++14 | 1.3kb | 2023-03-15 20:57:53 | 2023-03-15 20:57:57 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
namespace IO{
template<typename T>inline bool read(T &x){
x=0;
char ch=getchar();
bool flag=0,ret=0;
while(ch<'0'||ch>'9') flag=flag||(ch=='-'),ch=getchar();
while(ch>='0'&&ch<='9') x=x*10+ch-'0',ch=getchar(),ret=1;
x=flag?-x:x;
return ret;
}
template<typename T,typename ...Args>inline bool read(T& a,Args& ...args){
return read(a)&&read(args...);
}
template<typename T>void prt(T x){
if(x>9) prt(x/10);
putchar(x%10+'0');
}
template<typename T>inline void put(T x){
if(x<0) putchar('-'),x=-x;
prt(x);
}
template<typename T>inline void put(char ch,T x){
if(x<0) putchar('-'),x=-x;
prt(x);
putchar(ch);
}
template<typename T,typename ...Args>inline void put(T a,Args ...args){
put(a);
put(args...);
}
template<typename T,typename ...Args>inline void put(const char ch,T a,Args ...args){
put(ch,a);
put(ch,args...);
}
inline void put(string s){
for(int i=0,sz=s.length();i<sz;i++) putchar(s[i]);
}
inline void put(const char* s){
for(int i=0,sz=strlen(s);i<sz;i++) putchar(s[i]);
}
}
using namespace IO;
char s[7];
int main(){
scanf("%s",s+1);
int num1=0,num2=0;
for(int i=1;i<=5;i++)
if(s[i]=='T') num1++;
else if(s[i]=='D') num2++;
if(num1>=3) puts("T1");
else puts("DRX");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3336kb
input:
TDTT?
output:
T1
result:
ok single line: 'T1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3336kb
input:
DTDD?
output:
DRX
result:
ok single line: 'DRX'
Test #3:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
DDD??
output:
DRX
result:
ok single line: 'DRX'
Test #4:
score: 0
Accepted
time: 2ms
memory: 3380kb
input:
DDTD?
output:
DRX
result:
ok single line: 'DRX'
Test #5:
score: 0
Accepted
time: 2ms
memory: 3384kb
input:
DDTTD
output:
DRX
result:
ok single line: 'DRX'
Test #6:
score: 0
Accepted
time: 2ms
memory: 3352kb
input:
DDTTT
output:
T1
result:
ok single line: 'T1'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3332kb
input:
DTDTD
output:
DRX
result:
ok single line: 'DRX'
Test #8:
score: 0
Accepted
time: 2ms
memory: 3488kb
input:
DTDTT
output:
T1
result:
ok single line: 'T1'
Test #9:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
DTTDD
output:
DRX
result:
ok single line: 'DRX'
Test #10:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
DTTDT
output:
T1
result:
ok single line: 'T1'
Test #11:
score: 0
Accepted
time: 2ms
memory: 3256kb
input:
DTTT?
output:
T1
result:
ok single line: 'T1'
Test #12:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
TDDD?
output:
DRX
result:
ok single line: 'DRX'
Test #13:
score: 0
Accepted
time: 2ms
memory: 3340kb
input:
TDDTD
output:
DRX
result:
ok single line: 'DRX'
Test #14:
score: 0
Accepted
time: 2ms
memory: 3488kb
input:
TDDTT
output:
T1
result:
ok single line: 'T1'
Test #15:
score: 0
Accepted
time: 1ms
memory: 3376kb
input:
TDTDD
output:
DRX
result:
ok single line: 'DRX'
Test #16:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
TDTDT
output:
T1
result:
ok single line: 'T1'
Test #17:
score: 0
Accepted
time: 1ms
memory: 3404kb
input:
TTDDD
output:
DRX
result:
ok single line: 'DRX'
Test #18:
score: 0
Accepted
time: 1ms
memory: 3408kb
input:
TTDDT
output:
T1
result:
ok single line: 'T1'
Test #19:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
TTDT?
output:
T1
result:
ok single line: 'T1'
Test #20:
score: 0
Accepted
time: 2ms
memory: 3352kb
input:
TTT??
output:
T1
result:
ok single line: 'T1'