Submission #53599971


Source Code Expand

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin>>n;
	vector<pair<string, int>> m(n);

	for(auto &&i: m) cin>>i.first>>i.second;
	sort(m.begin(), m.end());
	int t=0;
	for(const auto& i : m) t += i.second;
	cout<< m[t%n].first << '\n';
	
	return 0;
}

Submission Info

Submission Time
Task B - AtCoder Janken 2
User akatsuki7c8
Language C++ 17 (gcc 12.2)
Score 200
Code Size 389 Byte
Status AC
Exec Time 1 ms
Memory 3640 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 14
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt
All 00_sample_00.txt, 00_sample_01.txt, 01_hand_00.txt, 01_hand_01.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3624 KiB
00_sample_01.txt AC 1 ms 3428 KiB
01_hand_00.txt AC 1 ms 3436 KiB
01_hand_01.txt AC 1 ms 3376 KiB
02_random_00.txt AC 1 ms 3448 KiB
02_random_01.txt AC 1 ms 3636 KiB
02_random_02.txt AC 1 ms 3364 KiB
02_random_03.txt AC 1 ms 3436 KiB
02_random_04.txt AC 1 ms 3400 KiB
02_random_05.txt AC 1 ms 3376 KiB
02_random_06.txt AC 1 ms 3516 KiB
02_random_07.txt AC 1 ms 3640 KiB
02_random_08.txt AC 1 ms 3440 KiB
02_random_09.txt AC 1 ms 3572 KiB