QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#139673#5436. DRX vs. T1xcyle#AC ✓1ms3752kbC++201.6kb2023-08-14 10:05:082023-08-14 10:05:11

Judging History

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

  • [2023-08-14 10:05:11]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3752kb
  • [2023-08-14 10:05:08]
  • 提交

answer

/*

_/      _/       _/_/_/      _/      _/    _/           _/_/_/_/_/
 _/    _/      _/      _/     _/    _/     _/           _/
  _/  _/      _/               _/  _/      _/           _/
   _/_/       _/                 _/        _/           _/_/_/_/
  _/  _/      _/                 _/        _/           _/
 _/    _/      _/      _/        _/        _/           _/
_/      _/       _/_/_/          _/        _/_/_/_/_/   _/_/_/_/_/

*/
#include <bits/stdc++.h>
#define ll long long
#define lc(x) ((x) << 1)
#define rc(x) ((x) << 1 | 1)
#define ru(i, l, r) for (int i = (l); i <= (r); i++)
#define rd(i, r, l) for (int i = (r); i >= (l); i--)
#define mid ((l + r) >> 1)
#define pii pair<int, int>
#define mp make_pair
#define fi first
#define se second
#define sz(s) (int)s.size()
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
using namespace std;
mt19937 Rand(chrono::steady_clock::now().time_since_epoch().count());
int read() {
    int x = 0, w = 0; char ch = getchar();
    while(!isdigit(ch)) w |= ch == '-', ch = getchar();
    while(isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
    return w ? -x : x;
}
char s[10];
int main() {
    //freopen(".in", "r", stdin);
    //freopen(".out", "w", stdout);
    scanf("%s", s + 1);
    int len = strlen(s + 1);
    int cnt1 = 0, cnt2 = 0;
    ru(i, 1, len) {
        if(s[i] == 'D') cnt1++;
        if(s[i] == 'T') cnt2++;
    }
    if(cnt1 > cnt2) puts("DRX");
    else puts("T1");
    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: 3600kb

input:

DTDD?

output:

DRX

result:

ok single line: 'DRX'

Test #3:

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

input:

DDD??

output:

DRX

result:

ok single line: 'DRX'

Test #4:

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

input:

DDTD?

output:

DRX

result:

ok single line: 'DRX'

Test #5:

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

input:

DDTTD

output:

DRX

result:

ok single line: 'DRX'

Test #6:

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

input:

DDTTT

output:

T1

result:

ok single line: 'T1'

Test #7:

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

input:

DTDTD

output:

DRX

result:

ok single line: 'DRX'

Test #8:

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

input:

DTDTT

output:

T1

result:

ok single line: 'T1'

Test #9:

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

input:

DTTDD

output:

DRX

result:

ok single line: 'DRX'

Test #10:

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

input:

DTTDT

output:

T1

result:

ok single line: 'T1'

Test #11:

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

input:

DTTT?

output:

T1

result:

ok single line: 'T1'

Test #12:

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

input:

TDDD?

output:

DRX

result:

ok single line: 'DRX'

Test #13:

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

input:

TDDTD

output:

DRX

result:

ok single line: 'DRX'

Test #14:

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

input:

TDDTT

output:

T1

result:

ok single line: 'T1'

Test #15:

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

input:

TDTDD

output:

DRX

result:

ok single line: 'DRX'

Test #16:

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

input:

TDTDT

output:

T1

result:

ok single line: 'T1'

Test #17:

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

input:

TTDDD

output:

DRX

result:

ok single line: 'DRX'

Test #18:

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

input:

TTDDT

output:

T1

result:

ok single line: 'T1'

Test #19:

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

input:

TTDT?

output:

T1

result:

ok single line: 'T1'

Test #20:

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

input:

TTT??

output:

T1

result:

ok single line: 'T1'