# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
967904 | 2024-04-23T04:57:02 Z | duckindog | Boat (APIO16_boat) | C++17 | 683 ms | 448 KB |
#include <bits/stdc++.h> using namespace std; const int N = 500 + 10; int n; int a[N], b[N]; int32_t main() { cin.tie(0)->sync_with_stdio(0); cin >> n; for (int i = 1; i <= n; ++i) cin >> a[i] >> b[i]; int answer = 0; for (int bit = 1; bit < (1 << n); ++bit) { int ma = 0; bool pass = true; for (int i = 1; i <= n; ++i) { if (bit >> i - 1 & 1) { pass &= (a[i] > ma); ma = max(ma, a[i]); } } answer += pass; } cout << answer << "\n"; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 683 ms | 448 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 683 ms | 448 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 | 683 ms | 448 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |