# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
628166 | 2022-08-13T06:57:04 Z | sword060 | 드문 곤충 (IOI22_insects) | C++17 | 0 ms | 208 KB |
#include <bits/stdc++.h> #include "insects.h" using namespace std; void move_inside(int); void move_outside(int); int press_button(); int min_cardinality(int x) { map<int,int>mp; int ans=1e9,lst=1; for(int i=0;i<x;i++)move_inside(i); int z=press_button(); ans=z; while(mp.size()!=x){ for(int i=0;i<x;i++){ if(mp[i])continue; move_outside(i); int c=press_button(); if(c!=z){ mp[i]=1; for(int j=i-1;j>=0;j--){ move_inside(j); if(press_button()!=c){ mp[j]=1; }else{ move_inside(j); } } z=c;ans=min(ans,c); break; } } } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 208 KB | Wrong answer. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 208 KB | Wrong answer. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 208 KB | Output is correct |
2 | Incorrect | 0 ms | 208 KB | Wrong answer. |
3 | Halted | 0 ms | 0 KB | - |