QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#790930 | #5254. Differences | jhinezeal123 | WA | 111ms | 17880kb | C++20 | 1.4kb | 2024-11-28 16:04:39 | 2024-11-28 16:04:44 |
Judging History
answer
#include <bits/stdc++.h>
// #define int long long
#define ii pair<int, int>
#define iii pair<int,ii>
#define vii vector<ii>
#define fi first
#define se second
#define endl '\n'
#define show(T) {for (auto x:T) cout<<x<<' ';cout<<endl;}
#define all(T) T.begin(),T.end()
using namespace std;
const double eps = 0.0001;
const int mod =/*998244353*/ 1e9+7;
const int N = 1005;
const int MATRIX_SIZE = 64;
const int BLOCK=500;
const long long oo=1e18;
int n,m,k,num[100005][6];
vector <vector<char>> T;
char c;
bool check(int pos){
for (int i=1,res;i<=n;++i){
if (i==pos) continue;
res=0;
for (int j=1;j<=m;++j)
res+=(T[pos][j]!=T[i][j]);
if (res!=k) return false;
}
return true;
}
void solve(){
cin>>n>>m>>k;
T.resize(n+5,vector<char>(m+5));
for (int i=1;i<=n;++i){
for (int j=1;j<=m;++j){
// cout<<i<<' '<<j<<endl;
cin>>c;
++num[j][c-'A'];
T[i][j]=c;
}
}
for (int i=1;i<=n;++i){
int sum=0;
for (int j=1;j<=m;++j)
sum+=num[j][T[i][j]-'A']-1;
// cout<<i<<' '<<sum<<endl;
if (sum!=(m-k)*(n-1)) continue;
return void(cout<<i);
}
}
main() {
//freopen("ok.inp","r",stdin);
// freopen("kiemtra.out","w",stdout);
ios_base::sync_with_stdio(0);
cin.tie(0);
solve();
// cout<<endl<<clock()/1000.0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 111ms
memory: 17880kb
input:
3585 4096 2048 ABBBBBBAABAAAAAAAAAAAAABAABABBBABABAAAAABABAAAABAABAABBABBAABAABABBABAABBABBABABABBAAAABBABAABBBBABBBAABBBBBABAABAAABAAABBBBAAAABAABAABABABABBBBBABAAABAAABBAABABBABAABBAABBAABABBBBAABAAAABAABBABAAABBAAAAAABAABBABBABAABABBBAABABBABABBBAAAAABBBABABABBAABAAAABBBBABABAABBBABABABBAABBBABAB...
output:
2
result:
wrong answer 1st lines differ - expected: '1397', found: '2'