# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
967893 |
2024-04-23T04:46:02 Z |
duckindog |
Boat (APIO16_boat) |
C++17 |
|
2000 ms |
344 KB |
#include <bits/stdc++.h>
using namespace std;
const int N = 500 + 10;
int n;
int a[N], b[N];
int answer;
int d[N];
void recursion(int it, int x) {
if (it > n) {
answer += 1;
return;
}
recursion(it + 1, x);
for (int i = max(a[it], x + 1); i <= b[it]; ++i) recursion(it + 1, i);
}
int32_t main() {
cin.tie(0)->sync_with_stdio(0);
cin >> n;
for (int i = 1; i <= n; ++i) cin >> a[i] >> b[i];
recursion(1, 0);
cout << answer - 1 << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2035 ms |
344 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2035 ms |
344 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2019 ms |
344 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2035 ms |
344 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |