QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#771237 | #9548. The Fool | Magiciannn | WA | 1ms | 3816kb | C++20 | 870b | 2024-11-22 11:01:47 | 2024-11-22 11:01:48 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(false); cin.tie(0);
int n, m, k; cin >> n >> m >> k;
map<string, int> id;
vector<array<int, 2>> pos(2);
int cnt[2], cur = 0;
for (int i = 0;i < n;i++) {
string s; cin >> s;
for (int j = 0;j < m * k;j += k) {
string t = s.substr(j, k);
if (id.find(t) == id.end()) {
id[t] = cur;
cnt[cur]++;
pos[cur++] = {i, j / k};
}
else {
cnt[id[t]]++;
pos[id[t]] = {i, j / k};
}
}
}
if (cnt[0] == 1) {
cout << pos[0][0] + 1 << " " << pos[0][1] + 1 << '\n';
}
else {
cout << pos[1][0] + 1 << " " << pos[1][1] + 1 << '\n';
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3556kb
input:
3 5 3 QWQQWQQWQQWQQWQ QWQQWQQWQQWQQWQ QWQQWQQWQQWQQwQ
output:
3 5
result:
ok single line: '3 5'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
2 2 1 LL }L
output:
2 1
result:
ok single line: '2 1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3816kb
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: 3776kb
input:
2 2 10 ayspaufftvuaaavaaaaa uaaavaaaaauaaavaaaaa
output:
2 2
result:
wrong answer 1st lines differ - expected: '1 1', found: '2 2'