QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#129289 | #5254. Differences | Sommohito# | WA | 27ms | 23744kb | C++20 | 1000b | 2023-07-22 14:05:46 | 2023-07-22 14:05:50 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#ifdef APURBA
#include "DEBUG_TEMPLATE.h"
#else
#define HERE
#define debug(args...)
#endif
#define ALL(x) x.begin(),x.end()
const int N = 1e5 + 1;
int n,m,k;
int cnt[N][4];
string s[N];
int32_t main()
{
#ifndef APURBA
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
#endif
cin>>n>>m>>k;
for(int i=0;i<n;i++)
cin>>s[i];
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
cnt[j][s[i][j]-'A']++;
}
}
for(int i=0;i<n;i++)
{
int tot = 0;
for(int j=0;j<m;j++)
{
for(int k=0;k<4;k++)
{
if(s[i][j]-'A' == k)
continue;
tot += cnt[j][k];
}
}
if(tot == k*(n-1))
{
cout<<i+1<<"\n";
return 0;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 27ms
memory: 23744kb
input:
3585 4096 2048 ABBBBBBAABAAAAAAAAAAAAABAABABBBABABAAAAABABAAAABAABAABBABBAABAABABBABAABBABBABABABBAAAABBABAABBBBABBBAABBBBBABAABAAABAAABBBBAAAABAABAABABABABBBBBABAAABAAABBAABABBABAABBAABBAABABBBBAABAAAABAABBABAAABBAAAAAABAABBABBABAABABBBAABABBABABBBAAAAABBBABABABBAABAAAABBBBABABAABBBABABABBAABBBABAB...
output:
2
result:
wrong answer 1st lines differ - expected: '1397', found: '2'