QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#279036 | #5436. DRX vs. T1 | Jalppatel1428 | AC ✓ | 1ms | 3528kb | C++14 | 321b | 2023-12-08 03:25:50 | 2023-12-08 03:25:51 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
void solve(){
string str;
cin>>str;
int cnt=0;
for(int i=0;i<str.size();i++){
cnt+=(str[i]=='T');
cnt-=(str[i]=='D');
}
if(cnt>0)cout<<"T1"<<endl;
else cout<<"DRX"<<endl;
}
int main(){
int tc=1;
//cin>>tc;
while(tc--)solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3344kb
input:
TDTT?
output:
T1
result:
ok single line: 'T1'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3400kb
input:
DTDD?
output:
DRX
result:
ok single line: 'DRX'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3464kb
input:
DDD??
output:
DRX
result:
ok single line: 'DRX'
Test #4:
score: 0
Accepted
time: 1ms
memory: 3488kb
input:
DDTD?
output:
DRX
result:
ok single line: 'DRX'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3408kb
input:
DDTTD
output:
DRX
result:
ok single line: 'DRX'
Test #6:
score: 0
Accepted
time: 1ms
memory: 3352kb
input:
DDTTT
output:
T1
result:
ok single line: 'T1'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3452kb
input:
DTDTD
output:
DRX
result:
ok single line: 'DRX'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3488kb
input:
DTDTT
output:
T1
result:
ok single line: 'T1'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3408kb
input:
DTTDD
output:
DRX
result:
ok single line: 'DRX'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
DTTDT
output:
T1
result:
ok single line: 'T1'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3484kb
input:
DTTT?
output:
T1
result:
ok single line: 'T1'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3460kb
input:
TDDD?
output:
DRX
result:
ok single line: 'DRX'
Test #13:
score: 0
Accepted
time: 1ms
memory: 3408kb
input:
TDDTD
output:
DRX
result:
ok single line: 'DRX'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
TDDTT
output:
T1
result:
ok single line: 'T1'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3416kb
input:
TDTDD
output:
DRX
result:
ok single line: 'DRX'
Test #16:
score: 0
Accepted
time: 1ms
memory: 3424kb
input:
TDTDT
output:
T1
result:
ok single line: 'T1'
Test #17:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
TTDDD
output:
DRX
result:
ok single line: 'DRX'
Test #18:
score: 0
Accepted
time: 1ms
memory: 3484kb
input:
TTDDT
output:
T1
result:
ok single line: 'T1'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3480kb
input:
TTDT?
output:
T1
result:
ok single line: 'T1'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
TTT??
output:
T1
result:
ok single line: 'T1'