QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#596754#1835. Fancy Formulasucup-team3950TL 379ms3848kbC++141.1kb2024-09-28 16:23:552024-09-28 16:23:56

详细

Test #1:

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

input:

5 10
2 1 3 0
2 1 4 4
1 3 4 0
0 2 0 4
3 3 1 2
0 1 0 1
0 3 0 3
0 1 0 1
1 2 4 4
1 0 1 1

output:

2
1
2
-1
-1
0
0
0
1
-1

result:

ok 10 numbers

Test #2:

score: 0
Accepted
time: 379ms
memory: 3520kb

input:

97 100000
30 56 74 12
95 39 8 29
11 42 76 74
48 63 58 53
74 22 85 11
80 23 84 4
30 90 30 90
92 91 41 45
21 82 11 92
65 30 28 67
74 57 95 36
16 31 78 66
2 77 6 73
83 20 41 62
45 44 92 94
96 28 77 47
76 12 87 1
47 80 42 85
46 91 65 72
23 39 4 58
21 96 37 80
83 33 66 50
84 21 61 44
4 78 47 35
39 50 39 ...

output:

6
6
5
6
6
-1
0
4
6
7
7
6
6
2
7
7
6
7
6
4
6
5
5
3
0
4
5
6
6
5
5
5
6
5
5
6
7
-1
5
4
-1
6
4
-1
4
6
5
5
-1
6
6
7
0
-1
2
-1
5
-1
5
7
2
4
6
4
6
6
-1
6
7
6
6
7
6
-1
4
2
7
0
6
-1
6
2
-1
4
6
5
-1
7
3
5
0
-1
7
3
4
6
4
6
0
1
5
7
6
-1
-1
-1
6
5
5
5
3
3
3
-1
-1
2
3
5
6
-1
-1
7
-1
5
7
6
5
6
-1
3
5
5
-1
4
5
6
-1
6...

result:

ok 100000 numbers

Test #3:

score: -100
Time Limit Exceeded

input:

1217 100000
1084 896 1095 885
1106 523 400 12
1200 37 911 326
992 1098 706 167
917 274 409 782
1154 689 530 96
738 563 879 422
389 1077 1034 432
415 735 61 1089
101 114 388 1044
512 255 818 1166
1149 620 663 1106
655 636 1036 255
86 922 154 854
848 990 740 1098
347 693 534 1192
521 126 866 68
235 36...

output:

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

result: