QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#621856#8650. Island Hoppinghhoppitree#0 1ms3928kbC++17304b2024-10-08 17:37:382024-10-08 17:37:39

Judging History

你现在查看的是最新测评结果

  • [2024-10-08 17:37:39]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3928kb
  • [2024-10-08 17:37:38]
  • 提交

answer

#include "island.h"
#include <bits/stdc++.h>

using namespace std;

const int N = 505;

int vis[N];

void dfs(int x, int fa) {
    for (int i = 1, v; ; ++i) {
        if ((v = query(x, i)) == fa) break;
        answer(x, v), dfs(v, x);
    }
}

void solve(int n, int) {
    dfs(n, 0);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3924kb

input:

3 9
1
0
3
2
0
3

output:

3 1
-1 3
1 1
3 2
-2 3
2 1
2 -1

result:

wrong answer Wrong Answer [2]

Subtask #2:

score: 0
Wrong Answer

Test #4:

score: 0
Wrong Answer
time: 0ms
memory: 3912kb

input:

299 89401
234
0
106
0
82
0
106
234
299
297
0
251
0
243
0
223
0
158
0
223
243
251
297
299
106
-1

output:

299 1
-234 299
234 1
-106 234
106 1
-82 106
82 1
106 2
234 2
299 2
-297 299
297 1
-251 297
251 1
-243 251
243 1
-223 243
223 1
-158 223
158 1
223 2
243 2
251 2
297 2
299 3
-106 299

result:

wrong answer Wrong Answer [5]

Subtask #3:

score: 0
Wrong Answer

Test #9:

score: 0
Wrong Answer
time: 1ms
memory: 3836kb

input:

299 598
52
0
72
0
52
299
298
0
23
0
274
0
23
298
299
23
-1

output:

299 1
-52 299
52 1
-52 72
72 1
52 2
299 2
-298 299
298 1
-23 298
23 1
-23 274
274 1
23 2
298 2
299 3
-23 299

result:

wrong answer Wrong Answer [5]

Subtask #4:

score: 0
Wrong Answer

Test #15:

score: 0
Wrong Answer
time: 1ms
memory: 3912kb

input:

299 89401
276
0
98
0
207
0
98
276
299
290
0
55
0
93
0
55
290
299
55
-1

output:

299 1
-276 299
276 1
-98 276
98 1
-98 207
207 1
98 2
276 2
299 2
-290 299
290 1
-55 290
55 1
-55 93
93 1
55 2
290 2
299 3
-55 299

result:

wrong answer Wrong Answer [5]

Subtask #5:

score: 0
Wrong Answer

Test #23:

score: 0
Wrong Answer
time: 1ms
memory: 3924kb

input:

299 897
24
0
271
0
24
299
294
0
30
0
36
0
30
294
299
30
-1

output:

299 1
-24 299
24 1
-24 271
271 1
24 2
299 2
-294 299
294 1
-30 294
30 1
-30 36
36 1
30 2
294 2
299 3
-30 299

result:

wrong answer Wrong Answer [5]

Subtask #6:

score: 0
Wrong Answer

Test #32:

score: 0
Wrong Answer
time: 1ms
memory: 3916kb

input:

300 90000
75
0
106
0
75
127
0
75
300
167
0
142
0
52
0
142
167
244
0
167
300
106
-1

output:

300 1
-75 300
75 1
-75 106
106 1
75 2
-75 127
127 1
75 3
300 2
-167 300
167 1
-142 167
142 1
-52 142
52 1
142 2
167 2
-167 244
244 1
167 3
300 3
-106 300

result:

wrong answer Wrong Answer [5]

Subtask #7:

score: 0
Wrong Answer

Test #58:

score: 0
Wrong Answer
time: 1ms
memory: 3916kb

input:

300 900
153
0
300
261
0
21
0
235
0
21
261
265
0
203
0
12
0
69
0
12
203
251
0
203
265
236
0
4
0
35
0
4
183
0
4
236
65
0
236
265
261
300
21
-1

output:

300 1
-153 300
153 1
300 2
-261 300
261 1
-21 261
21 1
-21 235
235 1
21 2
261 2
-261 265
265 1
-203 265
203 1
-12 203
12 1
-12 69
69 1
12 2
203 2
-203 251
251 1
203 3
265 2
-236 265
236 1
-4 236
4 1
-4 35
35 1
4 2
-4 183
183 1
4 3
236 2
-65 236
65 1
236 3
265 3
261 3
300 3
-21 300

result:

wrong answer Wrong Answer [5]

Subtask #8:

score: 0
Wrong Answer

Test #84:

score: 0
Wrong Answer
time: 1ms
memory: 3928kb

input:

299 598
174
0
299
292
0
78
0
106
0
78
292
265
0
292
299
78
-1

output:

299 1
-174 299
174 1
299 2
-292 299
292 1
-78 292
78 1
-78 106
106 1
78 2
292 2
-265 292
265 1
292 3
299 3
-78 299

result:

wrong answer Wrong Answer [5]