# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
639690 | 2022-09-11T05:29:39 Z | LittleCube | Super Dango Maker (JOI22_dango3) | C++17 | 2265 ms | 716 KB |
#include "dango3.h" #include <bits/stdc++.h> #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> #define F first #define S second using namespace std; int Query(vector<int> v, vector<int> u) { for(int i : u) v.emplace_back(i); return Query(v); } void Solve(int N, int M) { mt19937 rd(chrono::steady_clock::now().time_since_epoch().count()); vector<int> v; for(int i = 1; i <= N * M; i++) v.emplace_back(i); shuffle(v.begin(), v.end(), rd); for(int i = M - 1; i > 0; i--) { vector<int> ign, ans; ans.emplace_back(v.back()); v.pop_back(); while(ans.size() < N) { int k = v.back(); v.pop_back(); if(Query(v, ign) == i) ans.emplace_back(k); else ign.emplace_back(k); } for(int i : ign) v.emplace_back(i); Answer(ans); } Answer(v); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 304 KB | Output is correct |
2 | Correct | 0 ms | 340 KB | Output is correct |
3 | Correct | 0 ms | 340 KB | Output is correct |
4 | Correct | 0 ms | 340 KB | Output is correct |
5 | Correct | 1 ms | 304 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 12 ms | 340 KB | Output is correct |
2 | Correct | 13 ms | 416 KB | Output is correct |
3 | Correct | 13 ms | 424 KB | Output is correct |
4 | Correct | 12 ms | 340 KB | Output is correct |
5 | Correct | 12 ms | 388 KB | Output is correct |
6 | Correct | 12 ms | 416 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 463 ms | 496 KB | Output is correct |
2 | Correct | 437 ms | 492 KB | Output is correct |
3 | Correct | 483 ms | 588 KB | Output is correct |
4 | Correct | 459 ms | 500 KB | Output is correct |
5 | Correct | 481 ms | 492 KB | Output is correct |
6 | Correct | 414 ms | 500 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2265 ms | 716 KB | Wrong Answer [3] |
2 | Halted | 0 ms | 0 KB | - |