QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#78009#5436. DRX vs. T1magicduck#AC ✓2ms3500kbC++14835b2023-02-16 13:23:492023-02-16 13:23:50

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-16 13:23:50]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3500kb
  • [2023-02-16 13:23:49]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
template <typename T> inline void read(T &F) {
    int R = 1; F = 0; char CH = getchar();
    for(; !isdigit(CH); CH = getchar()) if(CH == '-') R = -1;
    for(; isdigit(CH); CH = getchar()) F = F * 10 + CH - 48;
    F *= R;
}
inline void file(string str) {
    freopen((str + ".in").c_str(), "r", stdin);
    freopen((str + ".out").c_str(), "w", stdout);
}
int main() {
    //file("");
    string s; cin >> s;
    int a = 0, b = 0;
    for(int i = 0; i < s.size(); i++) {
        if(s[i] == 'D') b++;
        else a++;
        if(a >= 3 || b >= 3) break;
    }
    if(a >= 3) puts("T1"); else puts("DRX");

    
    #ifdef _MagicDuck
        fprintf(stderr, "# Time: %.3lf s", (double)clock() / CLOCKS_PER_SEC);
    #endif
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3500kb

input:

TDTT?

output:

T1

result:

ok single line: 'T1'

Test #2:

score: 0
Accepted
time: 2ms
memory: 3480kb

input:

DTDD?

output:

DRX

result:

ok single line: 'DRX'

Test #3:

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

input:

DDD??

output:

DRX

result:

ok single line: 'DRX'

Test #4:

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

input:

DDTD?

output:

DRX

result:

ok single line: 'DRX'

Test #5:

score: 0
Accepted
time: 2ms
memory: 3480kb

input:

DDTTD

output:

DRX

result:

ok single line: 'DRX'

Test #6:

score: 0
Accepted
time: 2ms
memory: 3308kb

input:

DDTTT

output:

T1

result:

ok single line: 'T1'

Test #7:

score: 0
Accepted
time: 2ms
memory: 3372kb

input:

DTDTD

output:

DRX

result:

ok single line: 'DRX'

Test #8:

score: 0
Accepted
time: 2ms
memory: 3500kb

input:

DTDTT

output:

T1

result:

ok single line: 'T1'

Test #9:

score: 0
Accepted
time: 2ms
memory: 3368kb

input:

DTTDD

output:

DRX

result:

ok single line: 'DRX'

Test #10:

score: 0
Accepted
time: 1ms
memory: 3312kb

input:

DTTDT

output:

T1

result:

ok single line: 'T1'

Test #11:

score: 0
Accepted
time: 2ms
memory: 3356kb

input:

DTTT?

output:

T1

result:

ok single line: 'T1'

Test #12:

score: 0
Accepted
time: 2ms
memory: 3312kb

input:

TDDD?

output:

DRX

result:

ok single line: 'DRX'

Test #13:

score: 0
Accepted
time: 2ms
memory: 3360kb

input:

TDDTD

output:

DRX

result:

ok single line: 'DRX'

Test #14:

score: 0
Accepted
time: 2ms
memory: 3500kb

input:

TDDTT

output:

T1

result:

ok single line: 'T1'

Test #15:

score: 0
Accepted
time: 2ms
memory: 3356kb

input:

TDTDD

output:

DRX

result:

ok single line: 'DRX'

Test #16:

score: 0
Accepted
time: 2ms
memory: 3372kb

input:

TDTDT

output:

T1

result:

ok single line: 'T1'

Test #17:

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

input:

TTDDD

output:

DRX

result:

ok single line: 'DRX'

Test #18:

score: 0
Accepted
time: 2ms
memory: 3376kb

input:

TTDDT

output:

T1

result:

ok single line: 'T1'

Test #19:

score: 0
Accepted
time: 2ms
memory: 3364kb

input:

TTDT?

output:

T1

result:

ok single line: 'T1'

Test #20:

score: 0
Accepted
time: 1ms
memory: 3480kb

input:

TTT??

output:

T1

result:

ok single line: 'T1'