# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
832236 | 2023-08-21T07:19:37 Z | QwertyPi | Newspapers (CEOI21_newspapers) | C++14 | 1 ms | 216 KB |
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define int long long using namespace std; const int MAXN = 1e3 + 11; vector<int> ans; void yes(){ cout << "YES" << endl; cout << ans.size() << endl; for(auto i : ans) cout << i << ' '; cout << endl; exit(0); } void no(){ cout << "NO" << endl; exit(0); } int32_t main(){ int n, m; cin >> n >> m; if(n == 1){ ans = {1}; yes(); } if(n % 2){ for(int i = 2; i <= n - 1; i++){ ans.push_back(i); } for(int i = 2; i <= n - 1; i++){ ans.push_back(i); } }else{ for(int i = 2; i <= n - 1; i++){ ans.push_back(i); } for(int i = n - 1; i >= 2; i--){ ans.push_back(i); } } yes(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 216 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Integer parameter [name=k] equals to 0, violates the range [1, 10] |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 KB | Integer parameter [name=k] equals to 0, violates the range [1, 10] |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 216 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Integer parameter [name=k] equals to 0, violates the range [1, 10] |
3 | Halted | 0 ms | 0 KB | - |