Submission #420610

#TimeUsernameProblemLanguageResultExecution timeMemory
420610egorlifarMonster Game (JOI21_monster)C++17
0 / 100
246 ms320 KiB
/* KAMUI! ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓███▓▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓███▓▒▒░▒▒▒▒▒░░░▒▒▒▓▓███▓▓▓▓▓▓▓ ▓▓▓▓▓▓█▓▒▒▒▓▓████████▓▒▒░▒▒▒▓██▓▓▓▓▓▓ ▓▓▓▓██▒▓████████████████▓░▒▒▒▒▓██▓▓▓▓ ▓▓▓██▓███████▓▒░░░░░░░▒███▒░░▒▒▒██▓▓▓ ▓▓█████████▓░░░░░░░░░░░░░██▓▓██████▓▓ ▓▓█▒▓███████████▓▓▒▒▒▓▓██████████▓█▓▓ ▓██▒▒▒███████████████████████████▓▓█▓ ▓█▓▒▒░░████████▒░░░░▓███████████▓░▒█▓ ▓█▒▒▒░██░▒████░░░░░░█████░░████▓░░▒█▓ ▓█▒▒▒▒██░░░██▓░░░░░░░███▒░░████▒▒▒▒█▓ ▓█▓▒▒▒██▒░░░▓█▓░░░░░▓█▓░░░▓███▓▒▒░▓█▓ ▓█▓▒▒▒███░░░░████████▓░░░░░████▒▒▒▓█▓ ▓▓█▒▒░▓███░░░▒███████▒░░░▒███▓▒▒▒▒█▓▓ ▓▓██▒▒░████▒░░███████░░░▓███▓░▒▒▒██▓▓ ▓▓▓██▒▒▒█████▓░░██████▒▓███▓▒░▒▒██▓▓▓ ▓▓▓▓██▓▒░▓██████████████▓▒░▒▒▒▓██▓▓▓▓ ▓▓▓▓▓▓██▓░▒▓█████████▒░░▒▒▒▒▓██▓▓▓▓▓▓ ▓▓▓▓▓▓▓███▓▒▒▓██████▓░▒▒▒▓▓███▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓███▓▓▓▓███▓▓▓████▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓███████████▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */ #include "monster.h" #include <iostream> #include <complex> #include <vector> #include <string> #include <algorithm> #include <cstdio> #include <numeric> #include <cstring> #include <ctime> #include <cstdlib> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <list> #include <cmath> #include <bitset> #include <cassert> #include <queue> #include <stack> #include <deque> #include <random> using namespace std; template<typename T1, typename T2> inline void chkmin(T1 &a, T2 b) {if (a > b) a = b;} template<typename T1, typename T2> inline void chkmax(T1 &a, T2 b) {if (a < b) a = b;} #define all(c) (c).begin(), (c).end() #define sz(c) (int)(c).size() #define left left228 #define right right228 #define y1 y1228 #define mp make_pair #define pb push_back #define y2 y2228 #define rank rank228 using ll = long long; using ld = long double; namespace { bool example_variable; } // namespace vector<int> Solve(int N) { vector<int> T(N); vector<int> sum(N); example_variable = Query(0, 1); vector<pair<int, int> > st; for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { int f = Query(i, j); sum[i] += f; sum[j] += 1 - f; } st.pb(mp(sum[i], i)); } sort(all(st)); if (!Query(st[N - 1].second, st[N - 3].second)) { swap(st[N - 1], st[N - 2]); } if (!Query(st[1].second, st[2].second)) { swap(st[0], st[1]); } for (int i = 0; i < N; i++) { T[st[i].second] = i; } return T; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...