Submission #918507

# Submission time Handle Problem Language Result Execution time Memory
918507 2024-01-30T02:24:44 Z Aiperiii Carnival (CEOI14_carnival) C++14
20 / 100
46 ms 596 KB
#include <bits/stdc++.h>
#define int long long
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(),x.end()
using namespace std;
signed main(){
   ios_base::sync_with_stdio();
   cin.tie(0);cout.tie(0);
   int n;cin>>n;
   vector <int> vis(n+1);
   int cnt=1;
   for(int i=1;i<=n;i++){
      if(vis[i])continue;
      vis[i]=cnt;
      for(int j=i+1;j<=n;j++){
         if(vis[j])continue;
         cout<<2<<" ";
         cout<<i<<" "<<j<<endl;
         int dt;cin>>dt;
         if(dt==1)vis[j]=cnt;
      }
      cnt++;
   }
   for(int i=0;i<=n;i++)cout<<vis[i]<<" ";
}
/*
8 10
7 3 5 12 2 7 3 4
 */
# Verdict Execution time Memory Grader output
1 Correct 4 ms 344 KB Output is correct
2 Correct 10 ms 344 KB Output is correct
3 Partially correct 25 ms 344 KB Partially correct
4 Partially correct 42 ms 344 KB Partially correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 7 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 344 KB Output is correct
2 Correct 8 ms 344 KB Output is correct
3 Partially correct 15 ms 344 KB Partially correct
4 Partially correct 34 ms 344 KB Partially correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 3 ms 596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 3 ms 344 KB Output is correct
3 Partially correct 18 ms 344 KB Partially correct
4 Partially correct 44 ms 344 KB Partially correct
5 Correct 2 ms 344 KB Output is correct
6 Correct 4 ms 344 KB Output is correct
7 Correct 9 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 344 KB Output is correct
2 Correct 2 ms 344 KB Output is correct
3 Partially correct 36 ms 344 KB Partially correct
4 Partially correct 46 ms 344 KB Partially correct
5 Correct 5 ms 344 KB Output is correct
6 Correct 10 ms 344 KB Output is correct
7 Correct 13 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 6 ms 344 KB Output is correct
3 Partially correct 25 ms 344 KB Partially correct
4 Partially correct 25 ms 344 KB Partially correct
5 Correct 16 ms 344 KB Output is correct
6 Partially correct 23 ms 344 KB Partially correct
7 Partially correct 45 ms 344 KB Partially correct