# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
904911 | 2024-01-12T10:59:36 Z | dsyz | 사육제 (CEOI14_carnival) | C++17 | 2 ms | 456 KB |
#include <bits/stdc++.h> using namespace std; using ll = long long; #define MAXN (1000005) int main() { ios_base::sync_with_stdio(false);cin.tie(0); ll N; cin>>N; vector<ll> unique; //exactly 1 representative from all different type of costumes for(ll i = 1;i <= N;i++){ //1-indexed cout<<unique.size() + 1<<" "; for(auto u : unique){ cout<<u<<" "; } cout<<i<<endl; cout.flush(); ll diff; cin>>diff; if(diff == unique.size() + 1){ unique.push_back(i); } } vector<ll> ans; for(ll i = 1;i <= N;i++){ ll L = 0; ll R = unique.size() - 1; while(L != R){ ll mid = (L + R) / 2; cout<<(mid + 1) + 1<<" "; for(ll j = 0;j <= mid;j++){ cout<<unique[j]<<" "; } cout<<i<<endl; cout.flush(); ll diff; cin>>diff; if(diff == mid + 1){ R = mid; }else{ L = mid + 1; } cout.flush(); } ans.push_back(L); } cout<<0<<" "; for(auto u : ans){ cout<<u + 1<<" "; } cout<<endl; cout.flush(); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 448 KB | Execution killed with signal 13 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 448 KB | Execution killed with signal 13 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 452 KB | Output is correct |
2 | Runtime error | 2 ms | 456 KB | Execution killed with signal 13 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 448 KB | Execution killed with signal 13 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 452 KB | Execution killed with signal 13 |
2 | Halted | 0 ms | 0 KB | - |