QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#858366#9736. Kind of BingoMiaoYu404WA 0ms4096kbC++20901b2025-01-16 16:41:102025-01-16 16:41:11

Judging History

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

  • [2025-01-16 16:41:11]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:4096kb
  • [2025-01-16 16:41:10]
  • 提交

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;
            }
        }
    }
}

Details

Tip: Click on the bar to expand more detailed information

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