QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#772080 | #9548. The Fool | rdcamelot | WA | 0ms | 3852kb | C++20 | 914b | 2024-11-22 16:54:04 | 2024-11-22 16:54:04 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using i64=long long;
using u64=unsigned long long;
#define ll long long
const int inf=1e9;
const ll inff=1e18;
using i128=__int128;
void solve(){
int n,m,k;
cin>>n>>m>>k;
vector<string> s(n);
for(int i=0;i<n;i++){
cin>>s[i];
}
for(int i=0;i<n-1;i++){
if(s[i]!=s[i+1]){
int ans=i+1;
if(i==0){
if(s[1]==s[2]){
ans=0;
}
}
for(int j=0;j<m*k;j+=k){
if(s[ans==0?1:ans-1].substr(j,k)!=s[ans].substr(j,k)){
cout<<ans+1<<' '<<j/k+1<<'\n';
return;
}
}
}
}
}
int main(){
ios::sync_with_stdio(0);cin.tie(0);
int t=1;
// cin>>t;
while(t--){
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3780kb
input:
3 5 3 QWQQWQQWQQWQQWQ QWQQWQQWQQWQQWQ QWQQWQQWQQWQQwQ
output:
3 5
result:
ok single line: '3 5'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
2 2 1 LL }L
output:
2 1
result:
ok single line: '2 1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
2 2 10 u+gl<d'a9Bu+gl<d'a9B )M0wM2_Z8!u+gl<d'a9B
output:
2 1
result:
ok single line: '2 1'
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3552kb
input:
2 2 10 ayspaufftvuaaavaaaaa uaaavaaaaauaaavaaaaa
output:
2 1
result:
wrong answer 1st lines differ - expected: '1 1', found: '2 1'