#include <bits/stdc++.h>
#include "books.h"
#ifdef CYBER
#include "grader.cpp"
#endif
#define lg long long
using namespace std;
void solve(int N, int K, long long A, int S)
{
vector<lg> v(N);
for(int i = 1; i <= N; i++)
{
v[i] = skim(i);
}
vector<int> ans;
for(int i = 1; i <= N && ans.empty(); i++)
{
for(int j = i+1; j <= N && ans.empty(); j++)
{
for(int k = j+1; k <= N && ans.empty(); k++)
{
if(v[i]+v[j]+v[k] >= A && v[i]+v[j]+v[k] <= 2*A)
{
ans.push_back(i);
ans.push_back(j);
ans.push_back(k);
break;
}
}
}
}
if(ans.empty()) impossible();
answer(ans);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
3 ms |
344 KB |
Output is correct |
3 |
Correct |
4 ms |
344 KB |
Output is correct |
4 |
Correct |
111 ms |
344 KB |
Output is correct |
5 |
Correct |
4 ms |
344 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Output is correct |
7 |
Correct |
6 ms |
344 KB |
Output is correct |
8 |
Correct |
124 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
4 ms |
344 KB |
Output is correct |
3 |
Correct |
6 ms |
344 KB |
Output is correct |
4 |
Correct |
119 ms |
344 KB |
Output is correct |
5 |
Correct |
4 ms |
344 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Output is correct |
7 |
Correct |
4 ms |
344 KB |
Output is correct |
8 |
Correct |
114 ms |
344 KB |
Output is correct |
9 |
Incorrect |
112 ms |
600 KB |
Incorrect |
10 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
1368 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
1368 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
1368 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
1368 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
1368 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |