Submission #60727206
Source Code Expand
// #undef LOCAL
#ifdef LOCAL
// #define _GLIBCXX_DEBUG
#else
#define NDEBUG
#endif
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cstring>
#include <string>
#include <cstdio>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <array>
#include <random>
#include <cassert>
#include <chrono>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/priority_queue.hpp>
using namespace std;
#ifdef LOCAL
#include "D:\c++\Algo\Debug.h"
#define print(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
#else
#define debug(...) (void)0
#define dbg(a, l, r) (void)0
#define print(fmt, ...) (void)0
#endif
bool Mbg;
namespace Anonyme {
mt19937_64 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define QwQ01AwA return 0
#define mset(a, x) memset(begin(a), x, sizeof(a))
#define mcpy(a, b) memcpy(begin(a), begin(b), sizeof(a))
#define range(a, l, r) begin(a) + l, begin(a) + r + 1
#define all(x) begin(x), end(x)
#define sz(x) (int)x.size()
#define file(x) freopen(x ".in", "r", stdin), freopen(x ".out", "w", stdout)
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define ep emplace
using i32 = int;
using u32 = unsigned int;
using i64 = long long;
using u64 = unsigned long long;
using i128 = __int128;
using u128 = unsigned __int128;
using d32 = double;
using d64 = long double;
using pii = pair<int, int>;
template <class T> using vc = vector<T>;
template <class T> using pq = priority_queue<T>;
template <class T> using rpq = priority_queue<T, vector<T>, greater<T>>;
template <class T, int siz> using ar = array<T, siz>;
template <class T, class U> inline bool ckmax(T &x, U &&y) {return x < y ? (x = y, 1) : 0;}
template <class T, class U> inline bool ckmin(T &x, U &&y) {return x > y ? (x = y, 1) : 0;}
const int inf32 = 0x3f3f3f3f;
const i64 inf64 = 0x3f3f3f3f3f3f3f3f;
void main01() {
#ifdef LOCAL
file("");
#endif
cin.tie(nullptr) -> sync_with_stdio(false);
int w[5];
for (int i = 0; i < 5; i++) cin >> w[i];
vc<pair<int, string>> ans;
for (int s = 0; s < 32; s++) {
int sum = 0;
string name = "";
for (int i = 0; i < 5; i++) if (s >> i & 1) {
sum += w[i];
name += char('A' + i);
}
ans.eb(-sum, name);
}
sort(all(ans));
for (auto [x, y] : ans) cout << y << '\n';
}}
bool Med;
signed main() {
Anonyme::main01();
#ifdef LOCAL
cerr << endl;
cerr << "\033[0m\033[0;32m" "Time: " << 1.0 * clock() / CLOCKS_PER_SEC << "s\n" "\033[0m";
cerr << "\033[0m\033[0;33m" "Memory: " << abs(&Mbg - &Med) / 1048576.0 << "mb\n" "\033[0m";
#endif
QwQ01AwA;
}
Submission Info
| Submission Time |
|
| Task |
C - Perfect Standings |
| User |
Anonyme |
| Language |
C++ 20 (gcc 12.2) |
| Score |
300 |
| Code Size |
2778 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
3616 KiB |
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 |
3332 KiB |
| 00_sample_01.txt |
AC |
1 ms |
3480 KiB |
| 00_sample_02.txt |
AC |
1 ms |
3480 KiB |
| 01_random_03.txt |
AC |
1 ms |
3392 KiB |
| 01_random_04.txt |
AC |
1 ms |
3480 KiB |
| 01_random_05.txt |
AC |
1 ms |
3332 KiB |
| 01_random_06.txt |
AC |
1 ms |
3388 KiB |
| 01_random_07.txt |
AC |
1 ms |
3392 KiB |
| 01_random_08.txt |
AC |
1 ms |
3484 KiB |
| 01_random_09.txt |
AC |
1 ms |
3448 KiB |
| 01_random_10.txt |
AC |
1 ms |
3612 KiB |
| 01_random_11.txt |
AC |
1 ms |
3468 KiB |
| 01_random_12.txt |
AC |
1 ms |
3388 KiB |
| 01_random_13.txt |
AC |
1 ms |
3468 KiB |
| 01_random_14.txt |
AC |
1 ms |
3332 KiB |
| 01_random_15.txt |
AC |
1 ms |
3416 KiB |
| 01_random_16.txt |
AC |
1 ms |
3472 KiB |
| 01_random_17.txt |
AC |
1 ms |
3468 KiB |
| 01_random_18.txt |
AC |
1 ms |
3552 KiB |
| 01_random_19.txt |
AC |
1 ms |
3464 KiB |
| 01_random_20.txt |
AC |
1 ms |
3608 KiB |
| 01_random_21.txt |
AC |
1 ms |
3468 KiB |
| 01_random_22.txt |
AC |
1 ms |
3616 KiB |
| 01_random_23.txt |
AC |
1 ms |
3536 KiB |
| 01_random_24.txt |
AC |
1 ms |
3448 KiB |
| 01_random_25.txt |
AC |
1 ms |
3444 KiB |
| 01_random_26.txt |
AC |
1 ms |
3464 KiB |
| 01_random_27.txt |
AC |
1 ms |
3444 KiB |
| 01_random_28.txt |
AC |
1 ms |
3488 KiB |
| 01_random_29.txt |
AC |
1 ms |
3452 KiB |
| 01_random_30.txt |
AC |
1 ms |
3492 KiB |
| 01_random_31.txt |
AC |
1 ms |
3480 KiB |
| 01_random_32.txt |
AC |
1 ms |
3468 KiB |
| 01_random_33.txt |
AC |
1 ms |
3488 KiB |