QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#783000#9640. 格雷码qiuzx100 ✓229ms226772kbC++201.9kb2024-11-25 22:34:122024-11-25 22:34:18

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 4
Accepted
time: 1ms
memory: 5744kb

input:

1

output:

1 1

result:

ok Correct

Test #2:

score: 4
Accepted
time: 1ms
memory: 9996kb

input:

2

output:

1 2 1 2 

result:

ok Correct

Test #3:

score: 4
Accepted
time: 1ms
memory: 9776kb

input:

3

output:

1 2 1 3 1 2 1 3 

result:

ok Correct

Test #4:

score: 4
Accepted
time: 1ms
memory: 9900kb

input:

4

output:

1 3 4 2 4 3 1 4 1 2 1 3 2 4 2 3 

result:

ok Correct

Test #5:

score: 4
Accepted
time: 0ms
memory: 9972kb

input:

5

output:

1 4 5 2 5 4 1 3 4 3 5 3 1 2 5 2 4 2 1 5 1 2 1 3 1 2 1 4 3 5 3 4 

result:

ok Correct

Test #6:

score: 4
Accepted
time: 0ms
memory: 9824kb

input:

6

output:

1 5 6 3 6 5 4 5 6 2 6 5 4 5 6 3 6 5 1 5 6 4 1 2 1 3 2 4 6 4 2 3 1 2 1 5 1 2 1 3 2 4 2 6 2 4 2 3 1 2 1 4 1 3 4 2 4 3 1 5 3 6 3 5 

result:

ok Correct

Test #7:

score: 4
Accepted
time: 0ms
memory: 9924kb

input:

7

output:

1 6 7 4 7 6 5 6 7 2 7 6 5 6 7 4 7 6 1 6 7 3 4 7 4 6 4 3 6 7 5 3 7 3 6 3 1 6 7 2 5 7 5 6 5 2 4 2 6 2 4 7 4 2 1 5 7 5 6 5 1 2 6 2 7 2 1 3 1 2 1 4 3 5 7 5 3 4 1 2 1 3 6 3 1 2 1 4 3 5 3 7 3 5 3 4 1 2 1 3 1 2 1 5 1 2 4 2 5 2 1 3 5 3 4 3 1 4 5 2 5 4 1 6 4 7 4 6 

result:

ok Correct

Test #8:

score: 4
Accepted
time: 1ms
memory: 9976kb

input:

8

output:

1 7 8 5 8 7 6 7 8 3 8 7 6 7 8 5 8 7 4 7 8 5 8 7 6 7 8 2 8 7 6 5 7 5 8 5 4 5 6 8 6 5 7 5 6 3 6 5 7 5 6 8 6 5 1 5 6 8 6 5 7 5 6 4 7 8 1 8 7 2 7 8 1 8 7 3 7 8 2 8 7 4 6 4 7 4 6 8 6 4 2 3 8 3 7 3 1 7 8 2 8 7 1 5 7 5 8 5 1 8 7 2 7 8 1 3 8 3 7 3 2 4 7 4 8 4 2 6 2 4 2 3 1 2 1 4 1 3 4 2 4 3 1 5 3 6 8 6 3 5 ...

result:

ok Correct

Test #9:

score: 4
Accepted
time: 1ms
memory: 9968kb

input:

9

output:

1 8 9 6 9 8 7 8 9 4 9 8 7 8 9 6 9 8 5 8 9 6 9 8 7 8 9 2 9 8 7 8 9 6 9 8 5 8 9 6 9 8 7 8 9 4 9 8 7 8 9 6 9 8 1 8 9 6 9 8 7 8 9 3 9 8 4 8 9 7 9 8 4 6 8 6 9 6 4 9 8 3 6 7 8 7 6 9 6 7 5 9 8 3 7 8 7 9 7 3 6 9 6 8 6 3 8 9 1 6 7 9 7 6 8 6 7 2 8 9 5 7 9 7 8 7 5 6 8 6 9 6 5 9 8 2 8 9 4 9 8 2 6 8 6 9 6 2 4 7 ...

result:

ok Correct

Test #10:

score: 4
Accepted
time: 1ms
memory: 9776kb

input:

10

output:

1 9 10 7 10 9 8 9 10 5 10 9 8 9 10 7 10 9 6 9 10 7 10 9 8 9 10 3 10 9 8 9 10 7 10 9 6 9 10 7 10 9 8 9 10 5 10 9 8 9 10 7 10 9 4 9 10 7 10 9 8 9 10 5 10 9 8 9 10 7 10 9 6 9 10 7 10 9 8 9 10 2 10 9 8 9 10 7 10 9 6 9 10 5 10 9 7 9 10 5 10 9 8 9 10 5 10 9 4 9 10 5 10 9 6 9 10 8 10 9 6 9 10 5 10 9 7 9 10...

result:

ok Correct

Test #11:

score: 4
Accepted
time: 1ms
memory: 9780kb

input:

11

output:

1 10 11 8 11 10 9 10 11 6 11 10 9 10 11 8 11 10 7 10 11 8 11 10 9 10 11 4 11 10 9 10 11 8 11 10 7 10 11 8 11 10 9 10 11 6 11 10 9 10 11 8 11 10 5 10 11 8 11 10 9 10 11 6 11 10 9 10 11 8 11 10 7 10 11 8 11 10 9 10 11 2 11 10 9 10 11 8 11 10 7 10 11 8 11 10 9 10 11 6 11 10 9 10 11 8 11 10 5 10 11 8 11...

result:

ok Correct

Test #12:

score: 4
Accepted
time: 1ms
memory: 9852kb

input:

12

output:

1 11 12 9 12 11 10 11 12 7 12 11 10 11 12 9 12 11 8 11 12 9 12 11 10 11 12 5 12 11 10 11 12 9 12 11 8 11 12 9 12 11 10 11 12 7 12 11 10 11 12 9 12 11 6 11 12 9 12 11 10 11 12 7 12 11 10 11 12 9 12 11 8 11 12 9 12 11 10 11 12 3 12 11 10 11 12 9 12 11 8 11 12 9 12 11 10 11 12 7 12 11 10 11 12 9 12 11 ...

result:

ok Correct

Test #13:

score: 4
Accepted
time: 1ms
memory: 9884kb

input:

13

output:

1 12 13 10 13 12 11 12 13 8 13 12 11 12 13 10 13 12 9 12 13 10 13 12 11 12 13 6 13 12 11 12 13 10 13 12 9 12 13 10 13 12 11 12 13 8 13 12 11 12 13 10 13 12 7 12 13 10 13 12 11 12 13 8 13 12 11 12 13 10 13 12 9 12 13 10 13 12 11 12 13 4 13 12 11 12 13 10 13 12 9 12 13 10 13 12 11 12 13 8 13 12 11 12 ...

result:

ok Correct

Test #14:

score: 4
Accepted
time: 0ms
memory: 10000kb

input:

14

output:

1 13 14 11 14 13 12 13 14 9 14 13 12 13 14 11 14 13 10 13 14 11 14 13 12 13 14 7 14 13 12 13 14 11 14 13 10 13 14 11 14 13 12 13 14 9 14 13 12 13 14 11 14 13 8 13 14 11 14 13 12 13 14 9 14 13 12 13 14 11 14 13 10 13 14 11 14 13 12 13 14 5 14 13 12 13 14 11 14 13 10 13 14 11 14 13 12 13 14 9 14 13 12...

result:

ok Correct

Test #15:

score: 4
Accepted
time: 1ms
memory: 9936kb

input:

15

output:

1 14 15 12 15 14 13 14 15 10 15 14 13 14 15 12 15 14 11 14 15 12 15 14 13 14 15 8 15 14 13 14 15 12 15 14 11 14 15 12 15 14 13 14 15 10 15 14 13 14 15 12 15 14 9 14 15 12 15 14 13 14 15 10 15 14 13 14 15 12 15 14 11 14 15 12 15 14 13 14 15 6 15 14 13 14 15 12 15 14 11 14 15 12 15 14 13 14 15 10 15 1...

result:

ok Correct

Test #16:

score: 4
Accepted
time: 1ms
memory: 10112kb

input:

16

output:

1 15 16 13 16 15 14 15 16 11 16 15 14 15 16 13 16 15 12 15 16 13 16 15 14 15 16 9 16 15 14 15 16 13 16 15 12 15 16 13 16 15 14 15 16 11 16 15 14 15 16 13 16 15 10 15 16 13 16 15 14 15 16 11 16 15 14 15 16 13 16 15 12 15 16 13 16 15 14 15 16 7 16 15 14 15 16 13 16 15 12 15 16 13 16 15 14 15 16 11 16 ...

result:

ok Correct

Test #17:

score: 4
Accepted
time: 2ms
memory: 10220kb

input:

17

output:

1 16 17 14 17 16 15 16 17 12 17 16 15 16 17 14 17 16 13 16 17 14 17 16 15 16 17 10 17 16 15 16 17 14 17 16 13 16 17 14 17 16 15 16 17 12 17 16 15 16 17 14 17 16 11 16 17 14 17 16 15 16 17 12 17 16 15 16 17 14 17 16 13 16 17 14 17 16 15 16 17 8 17 16 15 16 17 14 17 16 13 16 17 14 17 16 15 16 17 12 17...

result:

ok Correct

Test #18:

score: 4
Accepted
time: 4ms
memory: 16264kb

input:

18

output:

1 17 18 15 18 17 16 17 18 13 18 17 16 17 18 15 18 17 14 17 18 15 18 17 16 17 18 11 18 17 16 17 18 15 18 17 14 17 18 15 18 17 16 17 18 13 18 17 16 17 18 15 18 17 12 17 18 15 18 17 16 17 18 13 18 17 16 17 18 15 18 17 14 17 18 15 18 17 16 17 18 9 18 17 16 17 18 15 18 17 14 17 18 15 18 17 16 17 18 13 18...

result:

ok Correct

Test #19:

score: 4
Accepted
time: 5ms
memory: 10948kb

input:

19

output:

1 18 19 16 19 18 17 18 19 14 19 18 17 18 19 16 19 18 15 18 19 16 19 18 17 18 19 12 19 18 17 18 19 16 19 18 15 18 19 16 19 18 17 18 19 14 19 18 17 18 19 16 19 18 13 18 19 16 19 18 17 18 19 14 19 18 17 18 19 16 19 18 15 18 19 16 19 18 17 18 19 10 19 18 17 18 19 16 19 18 15 18 19 16 19 18 17 18 19 14 1...

result:

ok Correct

Test #20:

score: 4
Accepted
time: 10ms
memory: 16696kb

input:

20

output:

1 19 20 17 20 19 18 19 20 15 20 19 18 19 20 17 20 19 16 19 20 17 20 19 18 19 20 13 20 19 18 19 20 17 20 19 16 19 20 17 20 19 18 19 20 15 20 19 18 19 20 17 20 19 14 19 20 17 20 19 18 19 20 15 20 19 18 19 20 17 20 19 16 19 20 17 20 19 18 19 20 11 20 19 18 19 20 17 20 19 16 19 20 17 20 19 18 19 20 15 2...

result:

ok Correct

Test #21:

score: 4
Accepted
time: 8ms
memory: 23228kb

input:

21

output:

1 20 21 18 21 20 19 20 21 16 21 20 19 20 21 18 21 20 17 20 21 18 21 20 19 20 21 14 21 20 19 20 21 18 21 20 17 20 21 18 21 20 19 20 21 16 21 20 19 20 21 18 21 20 15 20 21 18 21 20 19 20 21 16 21 20 19 20 21 18 21 20 17 20 21 18 21 20 19 20 21 12 21 20 19 20 21 18 21 20 17 20 21 18 21 20 19 20 21 16 2...

result:

ok Correct

Test #22:

score: 4
Accepted
time: 25ms
memory: 38008kb

input:

22

output:

1 21 22 19 22 21 20 21 22 17 22 21 20 21 22 19 22 21 18 21 22 19 22 21 20 21 22 15 22 21 20 21 22 19 22 21 18 21 22 19 22 21 20 21 22 17 22 21 20 21 22 19 22 21 16 21 22 19 22 21 20 21 22 17 22 21 20 21 22 19 22 21 18 21 22 19 22 21 20 21 22 13 22 21 20 21 22 19 22 21 18 21 22 19 22 21 20 21 22 17 2...

result:

ok Correct

Test #23:

score: 4
Accepted
time: 61ms
memory: 59268kb

input:

23

output:

1 22 23 20 23 22 21 22 23 18 23 22 21 22 23 20 23 22 19 22 23 20 23 22 21 22 23 16 23 22 21 22 23 20 23 22 19 22 23 20 23 22 21 22 23 18 23 22 21 22 23 20 23 22 17 22 23 20 23 22 21 22 23 18 23 22 21 22 23 20 23 22 19 22 23 20 23 22 21 22 23 14 23 22 21 22 23 20 23 22 19 22 23 20 23 22 21 22 23 18 2...

result:

ok Correct

Test #24:

score: 4
Accepted
time: 104ms
memory: 122380kb

input:

24

output:

1 23 24 21 24 23 22 23 24 19 24 23 22 23 24 21 24 23 20 23 24 21 24 23 22 23 24 17 24 23 22 23 24 21 24 23 20 23 24 21 24 23 22 23 24 19 24 23 22 23 24 21 24 23 18 23 24 21 24 23 22 23 24 19 24 23 22 23 24 21 24 23 20 23 24 21 24 23 22 23 24 15 24 23 22 23 24 21 24 23 20 23 24 21 24 23 22 23 24 19 2...

result:

ok Correct

Test #25:

score: 4
Accepted
time: 229ms
memory: 226772kb

input:

25

output:

1 24 25 22 25 24 23 24 25 20 25 24 23 24 25 22 25 24 21 24 25 22 25 24 23 24 25 18 25 24 23 24 25 22 25 24 21 24 25 22 25 24 23 24 25 20 25 24 23 24 25 22 25 24 19 24 25 22 25 24 23 24 25 20 25 24 23 24 25 22 25 24 21 24 25 22 25 24 23 24 25 16 25 24 23 24 25 22 25 24 21 24 25 22 25 24 23 24 25 20 2...

result:

ok Correct