QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#757986 | #6617. Encoded Strings I | Loxilante# | WA | 0ms | 3480kb | C++20 | 881b | 2024-11-17 15:00:30 | 2024-11-17 15:00:31 |
Judging History
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'