QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#772080#9548. The FoolrdcamelotWA 0ms3852kbC++20914b2024-11-22 16:54:042024-11-22 16:54:04

Judging History

你现在查看的是最新测评结果

  • [2024-11-22 16:54:04]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3852kb
  • [2024-11-22 16:54:04]
  • 提交

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'