#include <bits/stdc++.h>
#include "books.h"
// start my defines
#define fr first
#define sc second
#define pii pair<int, int>
#define pb push_back
#define szof(s) (int)s.size()
#define all(s) s.begin(), s.end()
#define I64 long long
template<class T>void umax(T &a,T b){if(a < b)a = b;}
template<class T>void umin(T &a,T b){if(b < a)a = b;}
// finish my defines
#ifndef EVAL
#include "grader.cpp"
#endif
using namespace std;
// answer(vector <int> v)
// skim(int i)
const int MAXN = (int)1e5 + 5;
I64 arr[MAXN];
void solve(int N, int K, I64 A, int S) {
for (int i = 1; i <= N; i++) {
arr[i] = skim(i);
}
I64 cur = 0;
for (int i = 1; i <= N; i++) {
for (int j = i + 1; j <= N; j++) {
for (int k = j + 1; k <= N; k++) {
cur = arr[i] + arr[j] + arr[k];
if (A <= cur && cur <= A + A) {
answer({i, j, k});
return;
}
}
}
}
impossible();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
200 KB |
Output is correct |
2 |
Correct |
13 ms |
200 KB |
Output is correct |
3 |
Correct |
9 ms |
300 KB |
Output is correct |
4 |
Correct |
181 ms |
200 KB |
Output is correct |
5 |
Correct |
12 ms |
288 KB |
Output is correct |
6 |
Correct |
12 ms |
304 KB |
Output is correct |
7 |
Correct |
13 ms |
296 KB |
Output is correct |
8 |
Correct |
189 ms |
300 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
200 KB |
Output is correct |
2 |
Correct |
13 ms |
200 KB |
Output is correct |
3 |
Correct |
11 ms |
328 KB |
Output is correct |
4 |
Correct |
175 ms |
200 KB |
Output is correct |
5 |
Correct |
9 ms |
200 KB |
Output is correct |
6 |
Correct |
10 ms |
200 KB |
Output is correct |
7 |
Correct |
8 ms |
200 KB |
Output is correct |
8 |
Correct |
193 ms |
200 KB |
Output is correct |
9 |
Incorrect |
278 ms |
476 KB |
Incorrect |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |