QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#758302 | #9548. The Fool | HalloWorld | AC ✓ | 2ms | 4144kb | C++20 | 1.1kb | 2024-11-17 17:35:42 | 2024-11-17 17:35:43 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define SZ(x) ((int)(x).size())
#define debug(a) cout<<#a<<":"<<a<<endl
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define per(i,b,a) for(int i=b;i>=a;i--)
constexpr int N=210;
constexpr int INF=2e9;
constexpr ll LLF=2e18;
constexpr ll mod=998244353;
constexpr int dir[4][2]={{-1,0},{1,0},{0,-1},{0,1}};
ll powmod(ll a,ll b,ll mod=mod) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll inv(ll a){return powmod(a,mod-2);}
string s[N];
int n,m,k;
void solve() {
cin>>n>>m>>k;
unordered_map<string,int> cnt;
unordered_map<string,array<int,3>> ans;
rep(i,1,n){
cin>>s[i];
string t="";
for(int j=0;j<m*k;j+=k){
cnt[s[i].substr(j,k)]++;
ans[s[i].substr(j,k)]={i,j/k+1};
}
}
for(auto [a,b]:cnt){
if(b==1){
cout<<ans[a][0]<<" "<<ans[a][1];
return;
}
}
}
int main() {
ios::sync_with_stdio(false);cin.tie(nullptr);
//cout<<fixed<<setprecision(10);
// int testcase;cin>>testcase;rep(_,1,testcase){
solve();
// }
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3596kb
input:
3 5 3 QWQQWQQWQQWQQWQ QWQQWQQWQQWQQWQ QWQQWQQWQQWQQwQ
output:
3 5
result:
ok single line: '3 5'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
2 2 1 LL }L
output:
2 1
result:
ok single line: '2 1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3536kb
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: 0
Accepted
time: 0ms
memory: 3552kb
input:
2 2 10 ayspaufftvuaaavaaaaa uaaavaaaaauaaavaaaaa
output:
1 1
result:
ok single line: '1 1'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
2 2 10 uaaavaaaaauaaavaaaaa ayspaufftvuaaavaaaaa
output:
2 1
result:
ok single line: '2 1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
2 2 10 uaaavaaaaaayspaufftv uaaavaaaaauaaavaaaaa
output:
1 2
result:
ok single line: '1 2'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
2 2 10 uaaavaaaaauaaavaaaaa uaaavaaaaaayspaufftv
output:
2 2
result:
ok single line: '2 2'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
2 2 10 aaarlaaaghaaaaanisaa aaaaanisaaaaaaanisaa
output:
1 1
result:
ok single line: '1 1'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
2 2 10 aaaaanisaaaaaaanisaa aaarlaaaghaaaaanisaa
output:
2 1
result:
ok single line: '2 1'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
2 2 10 aaaaanisaaaaarlaaagh aaaaanisaaaaaaanisaa
output:
1 2
result:
ok single line: '1 2'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
2 2 10 aaaaanisaaaaaaanisaa aaaaanisaaaaarlaaagh
output:
2 2
result:
ok single line: '2 2'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
200 199 1 ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooowooooooooooooooooooooooooooooooooooooooooooooooooooooo...
output:
2 37
result:
ok single line: '2 37'
Test #13:
score: 0
Accepted
time: 1ms
memory: 3720kb
input:
199 200 2 1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p...
output:
112 145
result:
ok single line: '112 145'
Test #14:
score: 0
Accepted
time: 2ms
memory: 3692kb
input:
199 199 3 "-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-R"-...
output:
46 95
result:
ok single line: '46 95'
Test #15:
score: 0
Accepted
time: 2ms
memory: 3660kb
input:
200 200 4 ^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^pm&^p...
output:
113 72
result:
ok single line: '113 72'
Test #16:
score: 0
Accepted
time: 2ms
memory: 3848kb
input:
200 200 5 kk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gAkk$gA...
output:
66 8
result:
ok single line: '66 8'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
200 200 6 5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q8w[R5Q...
output:
84 106
result:
ok single line: '84 106'
Test #18:
score: 0
Accepted
time: 2ms
memory: 3924kb
input:
200 200 7 N3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&e|5lN3&...
output:
80 103
result:
ok single line: '80 103'
Test #19:
score: 0
Accepted
time: 2ms
memory: 4144kb
input:
200 200 8 82`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482`|)e)482...
output:
5 68
result:
ok single line: '5 68'
Test #20:
score: 0
Accepted
time: 2ms
memory: 3932kb
input:
200 200 9 c[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[RzcCsKBc[...
output:
8 169
result:
ok single line: '8 169'
Test #21:
score: 0
Accepted
time: 2ms
memory: 3964kb
input:
200 200 10 ,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@^,O.JYB0m@...
output:
58 91
result:
ok single line: '58 91'
Extra Test:
score: 0
Extra Test Passed