QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#139673 | #5436. DRX vs. T1 | xcyle# | AC ✓ | 1ms | 3752kb | C++20 | 1.6kb | 2023-08-14 10:05:08 | 2023-08-14 10:05:11 |
Judging History
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'