# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
945013 | 2024-03-13T09:54:20 Z | siewjh | 카멜레온의 사랑 (JOI20_chameleon) | C++17 | 7 ms | 596 KB |
#include "chameleon.h" #include <bits/stdc++.h> using namespace std; namespace { } // namespace void Solve(int N) { set<int> unp; unp.insert(1); for (int i = 2; i <= 2 * N; i++){ vector<int> vec; for (int x : unp) vec.push_back(x); vec.push_back(i); int amt = Query(vec); vec.pop_back(); if (amt == unp.size()){ int sz = vec.size(), l = 0, r = sz - 1; while (l < r){ int m = (l + r) >> 1; vector<int> qvec; for (int j = l; j <= m; j++) qvec.push_back(vec[j]); qvec.push_back(i); if (Query(qvec) == qvec.size()) l = m + 1; else r = m; } Answer(i, vec[r]); unp.erase(vec[r]); } else unp.insert(i); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 7 ms | 344 KB | Output is correct |
4 | Correct | 6 ms | 344 KB | Output is correct |
5 | Correct | 6 ms | 344 KB | Output is correct |
6 | Correct | 6 ms | 456 KB | Output is correct |
7 | Correct | 6 ms | 344 KB | Output is correct |
8 | Correct | 6 ms | 344 KB | Output is correct |
9 | Correct | 7 ms | 344 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 596 KB | Wrong Answer [6] |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 596 KB | Wrong Answer [6] |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Incorrect | 1 ms | 344 KB | Wrong Answer [7] |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 7 ms | 344 KB | Output is correct |
4 | Correct | 6 ms | 344 KB | Output is correct |
5 | Correct | 6 ms | 344 KB | Output is correct |
6 | Correct | 6 ms | 456 KB | Output is correct |
7 | Correct | 6 ms | 344 KB | Output is correct |
8 | Correct | 6 ms | 344 KB | Output is correct |
9 | Correct | 7 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Incorrect | 0 ms | 596 KB | Wrong Answer [6] |
12 | Halted | 0 ms | 0 KB | - |