Submission #1116205

# Submission time Handle Problem Language Result Execution time Memory
1116205 2024-11-21T10:47:20 Z SalihSahin MalnaRISC (COI21_malnarisc) C++14
0 / 100
3 ms 592 KB
#include <bits/stdc++.h>
#define pb push_back
#define int long long
using namespace std;

const int inf = 1e16;
const int N = 10;

vector< vector<array<int, 2> > > ans[N];

void f(int l, int r, int depth){
   if(l == r) return;
   int m = (l + r)/2;

   for(int i = l; i <= m; i++){
      vector<array<int, 2> > op;
      int st = i;
      for(int j = m+1; j <= r; j++){
         op.pb({st, j});
         st++;
         if(st > m) st = l;
      }

      ans[depth].pb(op);
   }

   f(l, m, depth + 1);
   f(m+1, r, depth + 1);
}

int32_t main(){
   ios_base::sync_with_stdio(false);
   cin.tie(0); cout.tie(0);
   int n;
   cin>>n;
   f(0, n-1, 0);

   for(int i = 0; i < N; i++){
      //cout<<"depth = "<<i<<endl;
      //int cnt = 1;
      for(auto itr: ans[i]){
         //cout<<cnt<<" nolu vector"<<endl;
         //cnt++;

         for(auto itr2: itr){
            cout<<"CMPSWP R"<<itr2[0]+1<<" R"<<itr2[1]+1<<" ";
         }
         cout<<endl;
      }
   }
   return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 336 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 336 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 336 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 592 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 592 KB Expected integer, but "CMPSWP" found
2 Halted 0 ms 0 KB -