#include "books.h"
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
const int N = 100010;
long long v[N];
map<long long, int> arj;
void solve(int n, int k, long long a, int s) {
for (int i = 1; i <= n; i++)
{
v[i] = skim(i);
arj[v[i]] = i;
}
int st = 1;
for (int i = 1; i <= n; i++)
{
for (int j = i + 1; j <= n; j++)
{
if (!st && v[i] + v[j] <= a && a - v[i] - v[j] != v[i] && a - v[i] - v[j] != v[j])
{
if (arj[a - v[i] - v[j]])
{
st = 1;
vector<int> ans;
ans.push_back(i);
ans.push_back(j);
ans.push_back(arj[a - v[i] - v[j]]);
sort(ans.begin(), ans.end());
answer({ ans });
}
}
}
}
if (st == 0)
{
impossible();
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
604 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
440 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
444 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
444 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
444 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
444 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
444 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |