QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#852620#9736. Kind of Bingoucup-team112#WA 52ms10832kbPython3501b2025-01-11 13:14:292025-01-11 13:14:32

Judging History

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

  • [2025-01-11 13:14:32]
  • 评测
  • 测评结果:WA
  • 用时:52ms
  • 内存:10832kb
  • [2025-01-11 13:14:29]
  • 提交

answer


from sys import stdin

TT = int(stdin.readline())

for loop in range(TT):

    n,m,k = map(int,stdin.readline().split())

    p = list(map(int,stdin.readline().split()))


    lis = [ [] for i in range(n) ]

    for i in range(len(p)):
        p[i] -= 1
        lis[p[i]//m].append(i)

    ans = float("inf")

    #print (lis)

    if k >= m:
        ans = m-1
    else:

        for i in range(n):
            ans = min(ans , max(lis[i][m-1-k] , m))

    print (ans+1)

詳細信息

Test #1:

score: 100
Accepted
time: 13ms
memory: 10580kb

input:

3
3 5 2
1 4 13 6 8 11 14 2 7 10 3 15 9 5 12
2 3 0
1 6 4 3 5 2
2 3 1000000000
1 2 3 4 5 6

output:

7
5
3

result:

ok 3 number(s): "7 5 3"

Test #2:

score: -100
Wrong Answer
time: 52ms
memory: 10832kb

input:

10000
1 9 7
8 9 1 5 3 7 4 6 2
1 8 2
7 5 1 6 4 2 3 8
1 1 0
1
1 8 3
5 7 8 3 2 1 4 6
1 10 948645336
3 10 1 6 2 8 9 5 7 4
1 1 0
1
1 10 7
5 3 10 8 1 7 4 9 6 2
1 9 6
4 8 5 7 2 6 3 1 9
1 7 1
3 5 1 6 2 7 4
1 6 6
5 3 1 2 4 6
1 1 1
1
1 2 0
1 2
1 1 1
1
1 6 3
5 6 2 4 3 1
1 5 673454194
2 3 1 4 5
1 4 1
1 4 2 3
1 ...

output:

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

result:

wrong answer 1st numbers differ - expected: '9', found: '10'