QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#858366 | #9736. Kind of Bingo | MiaoYu404 | WA | 0ms | 4096kb | C++20 | 901b | 2025-01-16 16:41:10 | 2025-01-16 16:41:11 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5 + 10;
int cntN[N];
int main () {
ios:: sync_with_stdio(false);
cin.tie(nullptr), cout.tie(nullptr);
int tt; cin >> tt; while (tt--) {
int n, m, k;
cin >> n >> m >> k;
vector<int> order;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
int p; cin >> p;
order.push_back(p);
}
}
//if (k >= m) {cout << m << endl; continue;}
memset(cntN, 0, sizeof(cntN));
for (int i = 0; i <= n * m - 1; i++) {
int val = order[i];
int x = (val - 1) / m, y = val % m;
cntN[x] ++;
if (cntN[x] == m - k) {
cout << max(i + 1, m) << endl;
break;
}
}
}
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 4096kb
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
result:
wrong answer Answer contains longer sequence [length = 3], but output contains 2 elements