QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#766469#9548. The FoolWzyWA 0ms3872kbC++14950b2024-11-20 17:26:152024-11-20 17:26:17

Judging History

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

  • [2024-11-20 17:26:17]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3872kb
  • [2024-11-20 17:26:15]
  • 提交

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;

   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;
                if(mp.count(t)||(i==0&&j==k-1)) mp[t]=1;
                else{
                    cout<<i+1<<" "<<j/k+1<<endl;
                    return ;
                }
                t.clear();
            }
        }
    }
}

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

详细

Test #1:

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

input:

3 5 3
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQwQ

output:

3 5

result:

ok single line: '3 5'

Test #2:

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

input:

2 2 1
LL
}L

output:

2 1

result:

ok single line: '2 1'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3832kb

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: 3564kb

input:

2 2 10
ayspaufftvuaaavaaaaa
uaaavaaaaauaaavaaaaa

output:

1 2

result:

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