QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#768726#5436. DRX vs. T1False0099#AC ✓0ms3852kbC++20751b2024-11-21 14:01:062024-11-21 14:01:06

Judging History

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

  • [2024-11-21 14:01:06]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3852kb
  • [2024-11-21 14:01:06]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
#define endl '\n'
int INF=0x3f3f3f3f3f3f3f3f;
using namespace std;
typedef pair<int,int> PII;
void init(){
    
}
void solve(){
    string s;
    cin>>s;
    int cntd=0;
    int cntt=0;
    for(int i=0;s[i];i++){
        if(s[i]=='D'){
            cntd++;
            if(cntd==3){
                cout<<"DRX"<<endl;
                return;
            }
        }else if(s[i]=='T'){
            cntt++;
            if(cntt==3){
                cout<<"T1"<<endl;
                return;
            }
        }
    }  
}
signed main(){
    ios::sync_with_stdio(false),cin.tie(0);
    int t;
    t=1;
//    cin>>t;
    init();
    while(t--){
        solve();
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3512kb

input:

TDTT?

output:

T1

result:

ok single line: 'T1'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

DTDD?

output:

DRX

result:

ok single line: 'DRX'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

DDD??

output:

DRX

result:

ok single line: 'DRX'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

DDTD?

output:

DRX

result:

ok single line: 'DRX'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

DDTTD

output:

DRX

result:

ok single line: 'DRX'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

DDTTT

output:

T1

result:

ok single line: 'T1'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

DTDTD

output:

DRX

result:

ok single line: 'DRX'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

DTDTT

output:

T1

result:

ok single line: 'T1'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

DTTDD

output:

DRX

result:

ok single line: 'DRX'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

DTTDT

output:

T1

result:

ok single line: 'T1'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

DTTT?

output:

T1

result:

ok single line: 'T1'

Test #12:

score: 0
Accepted
time: 0ms
memory: 3848kb

input:

TDDD?

output:

DRX

result:

ok single line: 'DRX'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

TDDTD

output:

DRX

result:

ok single line: 'DRX'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

TDDTT

output:

T1

result:

ok single line: 'T1'

Test #15:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

TDTDD

output:

DRX

result:

ok single line: 'DRX'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

TDTDT

output:

T1

result:

ok single line: 'T1'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

TTDDD

output:

DRX

result:

ok single line: 'DRX'

Test #18:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

TTDDT

output:

T1

result:

ok single line: 'T1'

Test #19:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

TTDT?

output:

T1

result:

ok single line: 'T1'

Test #20:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

TTT??

output:

T1

result:

ok single line: 'T1'