# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1008935 | 2024-06-27T05:57:36 Z | PenguinsAreCute | 카멜레온의 사랑 (JOI20_chameleon) | C++17 | 9 ms | 476 KB |
#include "chameleon.h" #include <bits/stdc++.h> using namespace std; namespace { int variable_example = 1; } // namespace void Solve(int N) { int pear[2*N]; fill(pear,pear+2*N,-1); for(int i=0;i<2*N;i++) if(pear[i]==-1) { int l = i+1, h = 2*N+1; while(h-l>1) { int m=(l+h)/2; vector<int> v(m-l); iota(v.begin(),v.end(),l+1); int orig = Query(v); v.push_back(i+1); if(Query(v)==orig) h=m; else l=m; } pear[i]=l; pear[l]=i; } for(int i=0;i<2*N;i++) if(pear[i]>i) Answer(i+1,1+pear[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 | 9 ms | 344 KB | Output is correct |
4 | Correct | 9 ms | 344 KB | Output is correct |
5 | Correct | 8 ms | 460 KB | Output is correct |
6 | Correct | 9 ms | 344 KB | Output is correct |
7 | Correct | 9 ms | 344 KB | Output is correct |
8 | Correct | 8 ms | 476 KB | Output is correct |
9 | Correct | 8 ms | 344 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 344 KB | Wrong Answer [5] |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 344 KB | Wrong Answer [5] |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 344 KB | Wrong Answer [6] |
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 | 9 ms | 344 KB | Output is correct |
4 | Correct | 9 ms | 344 KB | Output is correct |
5 | Correct | 8 ms | 460 KB | Output is correct |
6 | Correct | 9 ms | 344 KB | Output is correct |
7 | Correct | 9 ms | 344 KB | Output is correct |
8 | Correct | 8 ms | 476 KB | Output is correct |
9 | Correct | 8 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Incorrect | 0 ms | 344 KB | Wrong Answer [5] |
12 | Halted | 0 ms | 0 KB | - |