QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#757986#6617. Encoded Strings ILoxilante#WA 0ms3480kbC++20881b2024-11-17 15:00:302024-11-17 15:00:31

Judging History

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

  • [2024-11-17 15:00:31]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3480kb
  • [2024-11-17 15:00:30]
  • 提交

answer

#define F_C
#include <bits/stdc++.h>
#define rep(i, l, r) for(int i = l; i < r; i++)
#define hrp(i, l, r) for(int i = l; i <= r; i++)
#define rev(i, r, l) for(int i = r; i >= l; i--)
#define int ll
using namespace std;
typedef long long ll;
template<typename tn = int> tn next(void) { tn k; cin>>k; return k; }
#ifndef LOCAL
#define D(...) 0
#endif
signed main(void)
{
    #ifdef LOCAL
//	freopen("C:\\Users\\Loxil\\Desktop\\IN.txt", "r", stdin);
//	freopen("C:\\Users\\Loxil\\Desktop\\OUT.txt", "w", stdout);
    #endif
    
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    string str; cin>>str;

    int cnt = 0;
    if (str.size() >= 5) rep(i, 0, str.size()-4)
    {
        if (str[i] == 'e' && str[i+1] == 'd' && str[i+2] == 'g' && str[i+3] == 'n' && str[i+4] == 'b') cnt++;
    }

    cout<<cnt<<endl;
    
    return 0;
}
/*

 */

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3480kb

input:

4
aacc

output:

0

result:

wrong answer 1st lines differ - expected: 'bbaa', found: '0'