QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#750273#9736. Kind of Bingo552Hz#WA 0ms3616kbC++17898b2024-11-15 13:47:082024-11-15 13:47:09

Judging History

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

  • [2024-11-15 13:47:09]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3616kb
  • [2024-11-15 13:47:08]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define debug(x) cout<<#x<<": "<<x<<endl
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
using ll=long long;
using ull=unsigned long long;
void solve(){
    int n,m,k;
    cin>>n>>m>>k;
    vector<int>e[n+1];
    for(int i = 1;i <= n;i++)
        e[i].push_back(0);
    for(int i = 1;i <= n * m;i++)
    {
        int x;
        cin>>x;
        e[(x-1)/m].push_back(i);
    }
    k = min(m,k);
    int ans = n*m;
    for(int i = 1;i <= n;i++)
        ans = min(ans,max(m,e[i][m - k]));
    ans = max(ans,m);
    cout<<ans<<endl;
}
signed main(){
    ios::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    int t;
    cin>>t;
    while(t--){
        solve();
    }
}
/*
贡献法
正难则反
数小状压
关系连边
拆位
广义单调性
最长转最短
*/

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3616kb

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:

5
3
3

result:

wrong answer 1st numbers differ - expected: '7', found: '5'