QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#621876 | #8650. Island Hopping | hhoppitree# | 0 | 1ms | 3940kb | C++17 | 364b | 2024-10-08 17:52:27 | 2024-10-08 17:52:27 |
answer
#include "island.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int vis[N];
void solve(int n, int) {
for (int i = vis[1] = 1, x; i < n; ++i) {
if (vis[x = query(1, i)]++) continue;
for (int j = 1, y; ; ++j) {
if (vis[y = query(x, j)]++) continue;
answer(x, y);
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3756kb
input:
3 9 3 1 2 0
output:
1 1 3 1 3 2 -2 3 2 -1
result:
wrong answer Wrong Answer [2]
Subtask #2:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 1ms
memory: 3940kb
input:
299 89401 79 1 253 0 77 -1
output:
1 1 79 1 79 2 -79 253 79 3 -77 79
result:
wrong answer Wrong Answer [5]
Subtask #3:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 1ms
memory: 3896kb
input:
299 598 43 1 66 0 128 -1
output:
1 1 43 1 43 2 -43 66 43 3 -43 128
result:
wrong answer Wrong Answer [5]
Subtask #4:
score: 0
Wrong Answer
Test #15:
score: 0
Wrong Answer
time: 0ms
memory: 3836kb
input:
299 89401 29 1 122 0 35 -1
output:
1 1 29 1 29 2 -29 122 29 3 -29 35
result:
wrong answer Wrong Answer [5]
Subtask #5:
score: 0
Wrong Answer
Test #23:
score: 0
Wrong Answer
time: 1ms
memory: 3880kb
input:
299 897 140 1 288 0 56 -1
output:
1 1 140 1 140 2 -140 288 140 3 -56 140
result:
wrong answer Wrong Answer [5]
Subtask #6:
score: 0
Wrong Answer
Test #32:
score: 0
Wrong Answer
time: 0ms
memory: 3940kb
input:
300 90000 133 1 89 0 290 0 139 -1
output:
1 1 133 1 133 2 -89 133 133 3 -133 290 133 4 -133 139
result:
wrong answer Wrong Answer [5]
Subtask #7:
score: 0
Wrong Answer
Test #58:
score: 0
Wrong Answer
time: 0ms
memory: 3892kb
input:
300 900 201 1 228 -1
output:
1 1 201 1 201 2 -201 228
result:
wrong answer Wrong Answer [5]
Subtask #8:
score: 0
Wrong Answer
Test #84:
score: 0
Wrong Answer
time: 1ms
memory: 3836kb
input:
299 598 86 1 94 -1
output:
1 1 86 1 86 2 -86 94
result:
wrong answer Wrong Answer [5]