Submission #60733404
Source Code Expand
Copy
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;#define all(x) (x).begin(), (x).end()#define rep(i, n) for (int i = 0; i < (int)(n); i++)#define rrep(i, n) for(int i = (int)(n - 1); i >= 0; i--)template <typename T> bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}template <typename T> bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}using ll = long long;#define int llusing vi = vector<int>;using vvi = vector<vector<int>>;using vb = vector<bool>;using vvb = vector<vector<bool>>;using vs = vector<string>;using pii = pair<int, int>;/*using mint = modint;using vm = vector<mint>;using vvm = vector<vector<mint>>;
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; #define all(x) (x).begin(), (x).end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for(int i = (int)(n - 1); i >= 0; i--) template <typename T> bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;} template <typename T> bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;} using ll = long long; #define int ll using vi = vector<int>; using vvi = vector<vector<int>>; using vb = vector<bool>; using vvb = vector<vector<bool>>; using vs = vector<string>; using pii = pair<int, int>; /* using mint = modint; using vm = vector<mint>; using vvm = vector<vector<mint>>; */ signed main(){ vi p(5); rep(i, 5) cin >> p.at(i); vector<pair<int, string>> ans; rep(i, 1 << 5){ if(i == 0) continue; string s; int a = 0; rep(j, 5) if(i >> j & 1){ s.push_back(char('A' + j)); a += p.at(j); } ans.emplace_back(-a, s); } sort(all(ans)); for(auto &[score, name] : ans) cout << name << endl; }
Submission Info
Submission Time | |
---|---|
Task | C - Perfect Standings |
User | yoniha |
Language | C++ 23 (gcc 12.2) |
Score | 300 |
Code Size | 1073 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3696 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt, 01_random_24.txt, 01_random_25.txt, 01_random_26.txt, 01_random_27.txt, 01_random_28.txt, 01_random_29.txt, 01_random_30.txt, 01_random_31.txt, 01_random_32.txt, 01_random_33.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3536 KB |
00_sample_01.txt | AC | 1 ms | 3488 KB |
00_sample_02.txt | AC | 1 ms | 3540 KB |
01_random_03.txt | AC | 1 ms | 3476 KB |
01_random_04.txt | AC | 1 ms | 3488 KB |
01_random_05.txt | AC | 1 ms | 3508 KB |
01_random_06.txt | AC | 1 ms | 3536 KB |
01_random_07.txt | AC | 1 ms | 3532 KB |
01_random_08.txt | AC | 1 ms | 3540 KB |
01_random_09.txt | AC | 1 ms | 3604 KB |
01_random_10.txt | AC | 1 ms | 3504 KB |
01_random_11.txt | AC | 1 ms | 3416 KB |
01_random_12.txt | AC | 1 ms | 3532 KB |
01_random_13.txt | AC | 1 ms | 3412 KB |
01_random_14.txt | AC | 1 ms | 3688 KB |
01_random_15.txt | AC | 1 ms | 3504 KB |
01_random_16.txt | AC | 1 ms | 3488 KB |
01_random_17.txt | AC | 1 ms | 3508 KB |
01_random_18.txt | AC | 1 ms | 3612 KB |
01_random_19.txt | AC | 1 ms | 3536 KB |
01_random_20.txt | AC | 1 ms | 3692 KB |
01_random_21.txt | AC | 1 ms | 3500 KB |
01_random_22.txt | AC | 1 ms | 3604 KB |
01_random_23.txt | AC | 1 ms | 3408 KB |
01_random_24.txt | AC | 1 ms | 3488 KB |
01_random_25.txt | AC | 1 ms | 3512 KB |
01_random_26.txt | AC | 1 ms | 3496 KB |
01_random_27.txt | AC | 1 ms | 3408 KB |
01_random_28.txt | AC | 1 ms | 3508 KB |
01_random_29.txt | AC | 1 ms | 3604 KB |
01_random_30.txt | AC | 1 ms | 3584 KB |
01_random_31.txt | AC | 1 ms | 3696 KB |
01_random_32.txt | AC | 1 ms | 3504 KB |
01_random_33.txt | AC | 1 ms | 3608 KB |