QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#111617#5147. Stack SortHuangHanShengTL 0ms3400kbC++367b2023-06-07 18:33:232023-06-07 18:33:25

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3400kb

input:

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

output:

3
1
4

result:

ok 3 number(s): "3 1 4"

Test #2:

score: -100
Time Limit Exceeded

input:

100000
4
3 4 2 1
5
5 4 1 3 2
4
3 1 4 2
4
4 2 1 3
4
1 3 2 4
4
4 2 3 1
4
3 2 1 4
5
1 2 3 4 5
5
5 2 3 1 4
5
1 3 5 4 2
5
4 3 2 1 5
5
3 4 2 1 5
5
5 4 3 2 1
4
3 4 2 1
5
4 2 5 1 3
5
4 1 5 2 3
4
3 4 1 2
4
2 1 3 4
5
4 3 2 5 1
4
4 2 1 3
5
3 1 5 2 4
4
4 1 2 3
5
1 5 2 4 3
5
4 1 3 5 2
5
4 2 3 5 1
5
1 2 3 4 5
5
4...

output:

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

result: