QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#77134 | #5501. Ctrl+C Ctrl+V | UCSC_Ravioli# | WA | 28ms | 3364kb | C++20 | 839b | 2023-02-13 04:36:59 | 2023-02-13 04:37:02 |
Judging History
answer
// qdd on Feb 12, 2023
#ifdef qdd
#include <ringo>
#else
#include <bits/stdc++.h>
#define dbg(...)
#define dbgr(x, y)
#endif
using namespace std;
using ll = long long;
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
for (T& x : v) is >> x;
return is;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
bool f = 0;
for (const T& x : v) (f ? os << ' ' : os) << x, f = 1;
return os;
}
void sol() {
string s;
cin >> s;
int n = s.size();
int ans = 0;
for (int i = 0; i < n - 4; i++) {
if (s.substr(i, 4) == "ania") {
s[i + 3] = 'z';
ans++;
}
}
cout << ans << '\n';
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin >> T;
while (T--) {
sol();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3328kb
input:
3 aniasieurodzilaapotemnicsieniedzialo nicciekawegouanianiagnieszkianialicji jeszczekrotszaautobiografiaani
output:
1 2 0
result:
ok 3 lines
Test #2:
score: -100
Wrong Answer
time: 28ms
memory: 3364kb
input:
10000 aniaanianianianiaviananibnianianianianianiapianianianianianianiaanianianianiananianianianiananifw ananiacnganiaaywbwrkaniahaniaganiaglljaniaouaqrdyaniaypvsgjltrbcvjssrtnehqfzpfvaniahwaniauzncovwfmiqejteiuaniacblxyfikauptesitsitvananianiajndy anianianianianianiaanianianianianiaanianianianianiaa...
output:
13 11 53 16 10 13 35 2 39 7 19 14 47 7 78 34 59 60 21 13 22 18 18 9 77 3 19 14 44 64 18 26 13 4 27 38 9 65 13 27 51 23 3 13 25 69 5 19 32 23 22 13 29 2 23 2 18 21 68 49 21 9 5 6 21 22 77 1 60 54 8 19 51 13 6 18 70 18 22 19 19 4 74 17 26 8 19 77 11 28 72 8 45 20 23 21 15 54 65 14 2 9 10 5 33 78 0 30 ...
result:
wrong answer 33rd lines differ - expected: '14', found: '13'