#include "books.h"
#include <vector>
#include <algorithm>
using namespace std;
const int N = 100010;
int v[N];
int arj[N];
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();
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
344 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |