QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#604621#5436. DRX vs. T1wsxcb#AC ✓1ms3848kbC++17663b2024-10-02 12:33:552024-10-02 12:33:58

Judging History

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

  • [2024-10-02 12:33:58]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3848kb
  • [2024-10-02 12:33:55]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb push_back
#define se second
#define fi first
const int mod = 1e9 + 7;

//#define int long long
ll ksm(ll a, ll b) {
	ll ans = 1;
	while (b) {
		if (b & 1)
			ans = ans * a % mod;
		a = a * a % mod;
		b /= 2;
	}
	return ans;
}

void solve() {
	string s;
	cin >> s;
	int c1 = 0, c2 = 0;
	for (auto x : s) {
		if (x == 'T')
			c2++;
		else
			c1++;
	}
	if (c1 >= c2)
		cout << "DRX\n";
	else
		cout << "T1\n";
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t = 1;
	//cin>>t;
	while (t--)
		solve();
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3788kb

input:

TDTT?

output:

T1

result:

ok single line: 'T1'

Test #2:

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

input:

DTDD?

output:

DRX

result:

ok single line: 'DRX'

Test #3:

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

input:

DDD??

output:

DRX

result:

ok single line: 'DRX'

Test #4:

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

input:

DDTD?

output:

DRX

result:

ok single line: 'DRX'

Test #5:

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

input:

DDTTD

output:

DRX

result:

ok single line: 'DRX'

Test #6:

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

input:

DDTTT

output:

T1

result:

ok single line: 'T1'

Test #7:

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

input:

DTDTD

output:

DRX

result:

ok single line: 'DRX'

Test #8:

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

input:

DTDTT

output:

T1

result:

ok single line: 'T1'

Test #9:

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

input:

DTTDD

output:

DRX

result:

ok single line: 'DRX'

Test #10:

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

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

input:

TDDD?

output:

DRX

result:

ok single line: 'DRX'

Test #13:

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

input:

TDDTD

output:

DRX

result:

ok single line: 'DRX'

Test #14:

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

input:

TDDTT

output:

T1

result:

ok single line: 'T1'

Test #15:

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

input:

TDTDD

output:

DRX

result:

ok single line: 'DRX'

Test #16:

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

input:

TDTDT

output:

T1

result:

ok single line: 'T1'

Test #17:

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

input:

TTDDD

output:

DRX

result:

ok single line: 'DRX'

Test #18:

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

input:

TTDDT

output:

T1

result:

ok single line: 'T1'

Test #19:

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

input:

TTDT?

output:

T1

result:

ok single line: 'T1'

Test #20:

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

input:

TTT??

output:

T1

result:

ok single line: 'T1'