# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1029619 | 2024-07-21T06:10:27 Z | Otalp | Super Dango Maker (JOI22_dango3) | C++17 | 7029 ms | 1512 KB |
#include "dango3.h" #include<bits/stdc++.h> using namespace std; #define pb push_back namespace { int variable_example = 1; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int gen(int i){return rng()%i;} } // namespace void Solve(int N, int M) { int n = N, m = M; map<int, int> us, ddus; vector<int> rs; for(int i=1; i<=n*m; i++){ rs.pb(i); } //random_shuffle(rs.begin(), rs.end(), gen); for(int i=1; i<=m; i++){ vector<int> d; for(int j: rs){ if(us[j]) continue; d.pb(j); if(ddus[j]) continue; if(d.size() >= n){ int g = Query(d); if(g) break; } } map<int, int> dus; for(int x: d){ vector<int> f; for(int y: d){ if(x == y) continue; if(dus[y]) continue; f.pb(y); } int g = Query(f); if(g == 1){ dus[x] = 1; } else{ us[x] = 1; } } vector<int> f; for(int x: d){ if(us[x]) f.pb(x); else ddus[x] = 1; } Answer(f); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 452 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 20 ms | 604 KB | Output is correct |
2 | Correct | 18 ms | 604 KB | Output is correct |
3 | Correct | 49 ms | 600 KB | Output is correct |
4 | Correct | 52 ms | 604 KB | Output is correct |
5 | Correct | 3 ms | 604 KB | Output is correct |
6 | Correct | 4 ms | 596 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 512 ms | 1044 KB | Output is correct |
2 | Correct | 661 ms | 820 KB | Output is correct |
3 | Incorrect | 7029 ms | 1116 KB | Wrong Answer [3] |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 3486 ms | 1512 KB | Wrong Answer [3] |
2 | Halted | 0 ms | 0 KB | - |