QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#766871#5436. DRX vs. T1JasonLee#AC ✓0ms3768kbC++14462b2024-11-20 19:02:402024-11-20 19:02:40

Judging History

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

  • [2024-11-20 19:02:40]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3768kb
  • [2024-11-20 19:02:40]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

int main()
{
    string s;
    cin >> s;
    int a = 0, b = 0;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == 'T') {
            a++;
        }
        else {
            b++;
        }
        if (a == 3) {
            cout << "T1\n";
            return 0;
        }
        else if (b == 3) {
            cout << "DRX\n";
            return 0;
        }
    }
    return 0;
}

詳細信息

Test #1:

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

input:

TDTT?

output:

T1

result:

ok single line: 'T1'

Test #2:

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

input:

DTDD?

output:

DRX

result:

ok single line: 'DRX'

Test #3:

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

input:

DDD??

output:

DRX

result:

ok single line: 'DRX'

Test #4:

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

input:

DDTD?

output:

DRX

result:

ok single line: 'DRX'

Test #5:

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

input:

DDTTD

output:

DRX

result:

ok single line: 'DRX'

Test #6:

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

input:

DDTTT

output:

T1

result:

ok single line: 'T1'

Test #7:

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

input:

DTDTD

output:

DRX

result:

ok single line: 'DRX'

Test #8:

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

input:

DTDTT

output:

T1

result:

ok single line: 'T1'

Test #9:

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

input:

DTTDD

output:

DRX

result:

ok single line: 'DRX'

Test #10:

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

input:

DTTDT

output:

T1

result:

ok single line: 'T1'

Test #11:

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

input:

DTTT?

output:

T1

result:

ok single line: 'T1'

Test #12:

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

input:

TDDD?

output:

DRX

result:

ok single line: 'DRX'

Test #13:

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

input:

TDDTD

output:

DRX

result:

ok single line: 'DRX'

Test #14:

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

input:

TDDTT

output:

T1

result:

ok single line: 'T1'

Test #15:

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

input:

TDTDD

output:

DRX

result:

ok single line: 'DRX'

Test #16:

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

input:

TDTDT

output:

T1

result:

ok single line: 'T1'

Test #17:

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

input:

TTDDD

output:

DRX

result:

ok single line: 'DRX'

Test #18:

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

input:

TTDDT

output:

T1

result:

ok single line: 'T1'

Test #19:

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

input:

TTDT?

output:

T1

result:

ok single line: 'T1'

Test #20:

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

input:

TTT??

output:

T1

result:

ok single line: 'T1'