QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#766485#9548. The FoolWzyWA 0ms3856kbC++14942b2024-11-20 17:29:052024-11-20 17:29:06

Judging History

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

  • [2024-11-20 17:29:06]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3856kb
  • [2024-11-20 17:29:05]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef  long long LL;
typedef pair<int,int> PII;
const int N=1000010,M=2000010;
const int mod=998244353;
int INF = 1e9;
int h[N],e[M],ne[M],idx;
int T=1;
int st[N],primes[N],cnt;





void solve(){
   int n,m,k;
   cin>>n>>m>>k;
   string s[n];
   map<string,int> mp;
   map<string,PII> id;

   for(int i=0;i<n;i++) cin>>s[i];

    for(int i=0;i<n;i++){
        string t;

        for(int j=0;j<m*k;j++){
            t+=s[i][j];
            if(j%k==k-1){
                //cout<<t<<endl;
                mp[t]++;
                id[t]={i+1,j/k+1};
            }
        }
    }

    for(auto [s,x]:mp){
        if(x>1) continue;
        cout<<id[s].first<<" "<<id[s].second<<endl;
    }
}

    
 
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    //int T=1;
    //cin>>T;
    while(T--) solve();
 
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3856kb

input:

3 5 3
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQwQ

output:

3 5

result:

ok single line: '3 5'

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3816kb

input:

2 2 1
LL
}L

output:

1 1
1 2
2 1
2 2

result:

wrong answer 1st lines differ - expected: '2 1', found: '1 1'