QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#750273 | #9736. Kind of Bingo | 552Hz# | WA | 0ms | 3616kb | C++17 | 898b | 2024-11-15 13:47:08 | 2024-11-15 13:47:09 |
Judging History
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();
}
}
/*
贡献法
正难则反
数小状压
关系连边
拆位
广义单调性
最长转最短
*/
Details
Tip: Click on the bar to expand more detailed information
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'