QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#185820 | #5501. Ctrl+C Ctrl+V | marta | RE | 0ms | 3524kb | C++14 | 456b | 2023-09-22 17:17:10 | 2023-09-22 17:17:11 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int t;
void solve()
{
int ile=0;
string s;
cin>>s;
for(int i=0; i<s.size()-3; i++) {
if(s[i]=='a' and s[i+1]=='n' and s[i+2]=='i' and s[i+3]=='a')
{
ile++;
s[i+3]='k';
}
}
cout<<ile<<"\n";
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>t;
while(t--) solve();
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3524kb
input:
3 aniasieurodzilaapotemnicsieniedzialo nicciekawegouanianiagnieszkianialicji jeszczekrotszaautobiografiaani
output:
1 2 0
result:
ok 3 lines
Test #2:
score: -100
Runtime Error
input:
10000 aniaanianianianiaviananibnianianianianianiapianianianianianianiaanianianianiananianianianiananifw ananiacnganiaaywbwrkaniahaniaganiaglljaniaouaqrdyaniaypvsgjltrbcvjssrtnehqfzpfvaniahwaniauzncovwfmiqejteiuaniacblxyfikauptesitsitvananianiajndy anianianianianianiaanianianianianiaanianianianianiaa...