大佬帮忙看看为什么#7 过不了, 谢谢

P1321 单词覆盖还原

希望更丰富的展现?使用Markdown
by vocaloid @ 2019-01-19 10:12:43


希望更丰富的展现?使用[Markdown](https://www.luogu.org/wiki/show?name=%E5%B8%AE%E5%8A%A9%EF%BC%9Amarkdown)
by Kuriyama_Mirai @ 2019-01-19 10:12:51


```cpp #include <iostream> #include<algorithm> #include<fstream> #include<cstring> using namespace std; int main() { char a[260]; cin >> a; int boy = 0; int girl = 0; int l = strlen(a); // cout << l; for (int i = 0; i < l+1; i++) { // if (a[i] == '.')continue; if (a[i]=='b'||a[i+1]=='o'||a[i+2]=='y') { boy++; continue; } if (a[i] == 'g' || a[i+1] == 'i' || a[i+2] == 'r' || a[i+3] == 'l') { girl++; continue; } } cout << boy << endl << girl; return 0; } ```
by D447H @ 2019-07-30 12:08:38


_我这个很~~即怪~~奇怪_\ 开O2 80;\ 不开O2 90;
by D447H @ 2019-07-30 12:14:01


``for (int i = 0; i < l+1; i++) `` 改成 ``for (int i = 0; i < l; i++)`` `` char a[260];``要memeset一下
by JRzyh @ 2020-01-26 18:48:45


@[阿斯顿ASD](/user/114046) 您为什么这么强调头文件的重要性???
by littlefrog @ 2020-02-20 12:10:36


|