# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
221514 | 2020-04-10T11:37:08 Z | kshitij_sodani | 사육제 (CEOI14_carnival) | C++17 | 97 ms | 432 KB |
#include <algorithm> #include <cassert> #include <cstring> #include <iostream> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <ctime> #include <functional> #include <iomanip> #include <iterator> #include <limits> #include <list> #include <numeric> #include <random> #include <ratio> #include <sstream> #include <utility> #include <bitset> #include <deque> #include <queue> #include <map> #include <vector> #include <unordered_map> #include <unordered_set> #include <stack> #include <string> #include <set> using namespace std; #define a first #define b second #define pb push_back typedef long long llo; llo n,m; llo it[2001][2001]; llo mi=1000000001; llo ma=0; llo check(){ llo low=0; llo high=ma-1; while(low<high){ llo mid=(low+high)/2; llo st=1; llo ll=0; for(llo i=0;i<n;i++){ for(llo j=0;j<m;j++){ if(it[i][j]<ma-mid){ ll=max(ll,j+1); } } for(llo j=0;j<ll;j++){ if(it[i][j]>mi+mid){ st=0; } } } if(st){ high=mid; } else{ low=mid+1; } } return low; } int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin>>n; int co=0; int le=n; int ind=0; int vis[n]; for(int i=0;i<n;i++){ vis[i]=0; } int ans[n]; while(ind<n){ if(vis[ind]==1){ ind+=1; continue; } /* if(ind==n-1){ ans[ind]=co; break; }*/ vis[ind]=1; ans[ind]=co; for(int i=ind+1;i<n;i++){ if(vis[i]==0){ cout<<2<<" "<<i+1<<" "<<ind+1<<endl; int x; cin>>x; if(x==1){ vis[i]=1; ans[i]=co; } } } ind+=1; co+=1; } cout<<0<<" "; for(int i=0;i<n;i++){ cout<<ans[i]+1<<" "; } cout<<endl; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 10 ms | 384 KB | Output is correct |
2 | Correct | 23 ms | 384 KB | Output is correct |
3 | Partially correct | 59 ms | 384 KB | Partially correct |
4 | Partially correct | 63 ms | 384 KB | Partially correct |
5 | Correct | 6 ms | 384 KB | Output is correct |
6 | Correct | 6 ms | 384 KB | Output is correct |
7 | Correct | 22 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 9 ms | 384 KB | Output is correct |
2 | Correct | 22 ms | 384 KB | Output is correct |
3 | Partially correct | 38 ms | 384 KB | Partially correct |
4 | Partially correct | 76 ms | 384 KB | Partially correct |
5 | Correct | 7 ms | 384 KB | Output is correct |
6 | Correct | 7 ms | 384 KB | Output is correct |
7 | Correct | 11 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 384 KB | Output is correct |
2 | Correct | 10 ms | 384 KB | Output is correct |
3 | Partially correct | 40 ms | 384 KB | Partially correct |
4 | Partially correct | 90 ms | 384 KB | Partially correct |
5 | Correct | 10 ms | 384 KB | Output is correct |
6 | Correct | 12 ms | 384 KB | Output is correct |
7 | Correct | 20 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 8 ms | 384 KB | Output is correct |
2 | Correct | 9 ms | 384 KB | Output is correct |
3 | Partially correct | 71 ms | 384 KB | Partially correct |
4 | Partially correct | 97 ms | 432 KB | Partially correct |
5 | Correct | 16 ms | 384 KB | Output is correct |
6 | Correct | 32 ms | 256 KB | Output is correct |
7 | Correct | 26 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 384 KB | Output is correct |
2 | Correct | 16 ms | 384 KB | Output is correct |
3 | Partially correct | 49 ms | 384 KB | Partially correct |
4 | Partially correct | 63 ms | 384 KB | Partially correct |
5 | Correct | 30 ms | 384 KB | Output is correct |
6 | Partially correct | 60 ms | 384 KB | Partially correct |
7 | Partially correct | 78 ms | 384 KB | Partially correct |