# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
877242 | 2023-11-23T04:44:58 Z | Frosty_Jonson | Bootfall (IZhO17_bootfall) | C++14 | 0 ms | 344 KB |
#include "bits/stdc++.h" using namespace std; using ull = unsigned long long int; using ll = long long; #define full(x) x.begin(),x.end() const int mod = 1e9 + 7; void solve() { int n; cin >> n; vector<int> a(n); int sum = 0; int cnt = 0; for (int i = 0; i < n; ++i) { cin >> a[i]; sum += a[i]; } int nums = 0; vector<int> ans; bool check = true; for (int i = 0; i < a.size(); ++i) { cout << "nums repu - " << nums << endl; check = true; for (int j = 0; j < a.size(); ++j) { check = (sum - nums) % 2; check = (sum - a.at(i) + nums) % 2; cout << "every check - " << (sum - a.at(i) + nums) % 2 << endl; cout << "checkie - " << check << endl; } if (check) { ans.push_back(nums); cnt++; } nums++; } if (ans.size() == 0) cout << 0; else { cout << cnt << endl; for (int i = 0; i < ans.size(); ++i) { cout << a.at(i) << " "; } } } int main() { clock_t startTime = clock(); cin.tie(0)->sync_with_stdio(false); #ifdef Behruzbek freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int queries = 1; // cin >> queries for (int test_case = 1; test_case <= queries; test_case++) { solve(); cout << '\n'; } // cout << "Time: " << ((double) (clock() - startTime) / CLOCKS_PER_SEC * 1000) << " ms" << endl; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |