QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#185830#5501. Ctrl+C Ctrl+VmartaRE 0ms3572kbC++14449b2023-09-22 17:20:412023-09-22 17:20:41

Judging History

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

  • [2023-09-22 17:20:41]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:3572kb
  • [2023-09-22 17:20:41]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int t, ile;
string s;

void solve()
{
    ile=0;
    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++;
            i+=3;
        }
    }
    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: 3572kb

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: