QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#260551#5436. DRX vs. T1suibian_xiaozhao#AC ✓0ms3860kbC++23901b2023-11-22 12:52:472023-11-22 12:52:49

Judging History

This is the latest submission verdict.

  • [2023-11-22 12:52:49]
  • Judged
  • Verdict: AC
  • Time: 0ms
  • Memory: 3860kb
  • [2023-11-22 12:52:47]
  • Submitted

answer

#include "bits/stdc++.h"
#include "bits/extc++.h"

using namespace std;
using namespace __gnu_pbds;

using ll = long long;
using ull = unsigned long long;

#define IOS ios::sync_with_stdio(0);cin.tie(0);
#define endl "\n"
#define hash gp_hash_table
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define lowbit(x) x&(-x)
#define int ll
#define trees tree<int, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update>
const int mod = 998244353;

void solve() {
    string s;
    cin >> s;
    int d=0, t=0;
    for (auto i: s) {
        if(i=='D'){
            d++;
        }else if(i=='T'){
            t++;
        }
    }
    if(d>t){
        cout<<"DRX"<<endl;
    }else if(t>d){
        cout<<"T1"<<endl;
    }else{
        assert(0);
    }

}


signed main() {

    IOS
    int t = 1;
//    cin >> t;
    while (t--)solve();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

TDTT?

output:

T1

result:

ok single line: 'T1'

Test #2:

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

input:

DTDD?

output:

DRX

result:

ok single line: 'DRX'

Test #3:

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

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: 3820kb

input:

DDTTD

output:

DRX

result:

ok single line: 'DRX'

Test #6:

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

input:

DDTTT

output:

T1

result:

ok single line: 'T1'

Test #7:

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

input:

DTDTD

output:

DRX

result:

ok single line: 'DRX'

Test #8:

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

input:

DTDTT

output:

T1

result:

ok single line: 'T1'

Test #9:

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

input:

DTTDD

output:

DRX

result:

ok single line: 'DRX'

Test #10:

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

input:

DTTDT

output:

T1

result:

ok single line: 'T1'

Test #11:

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

input:

DTTT?

output:

T1

result:

ok single line: 'T1'

Test #12:

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

input:

TDDD?

output:

DRX

result:

ok single line: 'DRX'

Test #13:

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

input:

TDDTD

output:

DRX

result:

ok single line: 'DRX'

Test #14:

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

input:

TDDTT

output:

T1

result:

ok single line: 'T1'

Test #15:

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

input:

TDTDD

output:

DRX

result:

ok single line: 'DRX'

Test #16:

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

input:

TDTDT

output:

T1

result:

ok single line: 'T1'

Test #17:

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

input:

TTDDD

output:

DRX

result:

ok single line: 'DRX'

Test #18:

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

input:

TTDDT

output:

T1

result:

ok single line: 'T1'

Test #19:

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

input:

TTDT?

output:

T1

result:

ok single line: 'T1'

Test #20:

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

input:

TTT??

output:

T1

result:

ok single line: 'T1'