# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1002802 | 2024-06-19T19:48:49 Z | PagodePaiva | MalnaRISC (COI21_malnarisc) | C++17 | 1 ms | 600 KB |
#include<bits/stdc++.h> #define endl '\n' using namespace std; int main(){ int n; cin >> n; int l = 1, r = n; int cnt = 0; vector <vector <pair <int, int>>> res; for(int i = n;i > 1;i--){ vector <int> big; for(int j = 1;j <= i;j++) big.push_back(j); while(big.size() > 1){ vector <int> aux; vector <pair <int, int>> resp; for(int t = 0;t+1 < big.size();t += 2){ resp.push_back({big[t], big[t+1]}); aux.push_back(big[t+1]); } res.push_back(resp); cnt++; if(big.size() % 2 == 1) aux.push_back(big.back()); big = aux; } } cout << cnt << endl; for(auto y : res){ for(auto x : y){ cout << "CMPSWR " << x.first << ' ' << x.second << ' '; } cout << endl; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 600 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Token "CMPSWR" doesn't correspond to pattern "CMPSWP" |
2 | Halted | 0 ms | 0 KB | - |