QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#293988 | #5254. Differences | LaStataleBlue# | WA | 19ms | 20580kb | C++23 | 896b | 2023-12-30 01:37:49 | 2023-12-30 01:37:49 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
mt19937 rng((uint64_t) chrono::duration_cast<chrono::
nanoseconds>(chrono::high_resolution_clock::now()
.time_since_epoch()).count());
void solve(int t){
int n,m,k;
cin>>n>>m>>k;
vector<string> v(n);
for(int i=0;i<n;i++){
cin>>v[i];
}
vector num(m,vector(4,0));
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
num[j][v[i][j]-'A']++;
}
}
for(int i=0;i<n;i++){
int sum=0;
for(int j=0;j<m;j++){
sum+=n-num[j][v[i][j]-'A'];
}
if(sum==(n-1)*k){
cout<<i+1<<"\n";
return;
}
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int t=1;
//cin>>t;
for(int i=1;i<=t;i++)solve(i);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 19ms
memory: 20580kb
input:
3585 4096 2048 ABBBBBBAABAAAAAAAAAAAAABAABABBBABABAAAAABABAAAABAABAABBABBAABAABABBABAABBABBABABABBAAAABBABAABBBBABBBAABBBBBABAABAAABAAABBBBAAAABAABAABABABABBBBBABAAABAAABBAABABBABAABBAABBAABABBBBAABAAAABAABBABAAABBAAAAAABAABBABBABAABABBBAABABBABABBBAAAAABBBABABABBAABAAAABBBBABABAABBBABABABBAABBBABAB...
output:
2
result:
wrong answer 1st lines differ - expected: '1397', found: '2'