Submission #57465409
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pl = pair<ll, ll>;
constexpr ll INF = 1e9 + 7;
constexpr ll mod = 1e9 + 7;
constexpr ld eps = 1e-9;
const ld PI = acos(-1);
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
ll n;
cin >> n;
vector<string > a(n);
ll s= 0;
for(int i = 0;i<n;++i){
cin >> a[i];
ll x;
cin >> x;s+=x;
}
sort(a.begin(),a.end());cout << a[s%n];
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - AtCoder Janken 2 |
| User | ZergTricky |
| Language | C++ 20 (gcc 12.2) |
| Score | 200 |
| Code Size | 508 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3608 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| 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 | 3468 KiB |
| 00_sample_01.txt | AC | 1 ms | 3476 KiB |
| 01_hand_00.txt | AC | 1 ms | 3460 KiB |
| 01_hand_01.txt | AC | 1 ms | 3388 KiB |
| 02_random_00.txt | AC | 1 ms | 3600 KiB |
| 02_random_01.txt | AC | 1 ms | 3524 KiB |
| 02_random_02.txt | AC | 1 ms | 3460 KiB |
| 02_random_03.txt | AC | 1 ms | 3456 KiB |
| 02_random_04.txt | AC | 1 ms | 3412 KiB |
| 02_random_05.txt | AC | 1 ms | 3536 KiB |
| 02_random_06.txt | AC | 1 ms | 3608 KiB |
| 02_random_07.txt | AC | 1 ms | 3456 KiB |
| 02_random_08.txt | AC | 1 ms | 3384 KiB |
| 02_random_09.txt | AC | 1 ms | 3484 KiB |