/*
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);
example_variable = Query(0, 1);
vector<pair<int, int> > st;
for (int i = 0; i < N; i++) {
int sum = 0;
for (int j = 0; j < N; j++) {
if (i != j) {
int f = Query(i, j);
sum += f;
}
}
st.pb(mp(sum, i));
}
sort(all(st));
if (!Query(st[N - 1].second, st[N - 3].second)) {
swap(st[N - 1], st[N - 2]);
}
for (int i = 0; i < N; i++) {
T[i] = st[i].second;
}
return T;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
244 ms |
276 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |