QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#185820#5501. Ctrl+C Ctrl+VmartaRE 0ms3524kbC++14456b2023-09-22 17:17:102023-09-22 17:17:11

Judging History

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

  • [2023-09-22 17:17:11]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:3524kb
  • [2023-09-22 17:17:10]
  • 提交

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...

output:


result: