数组开销了吧 @[木森林](/space/show?uid=68082)
by YWHS__LH @ 2018-10-12 18:31:40
@[木森林](/space/show?uid=68082) 而且不是n<M而是倒过来
by YWHS__LH @ 2018-10-12 18:33:40
@[木森林](/space/show?uid=68082)
```
#include<bits/stdc++.h>
using namespace std;
int main()
{
char a[1100];
int i=1,n=0,m=0;
while(cin>>a[i])
{
if(a[i]=='C')
n=i;
if(a[i]=='F')
m=i;
i++;
}
if(n<=m&&n!=0&&m!=0)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
return 0;
}
```
应该是这样
by YWHS__LH @ 2018-10-12 18:34:31
@[木森林](/space/show?uid=68082)
还需要判断一下“C”和“F”是否出现过
by YWHS__LH @ 2018-10-12 18:35:06
@[YWHS__LH](/space/show?uid=45299)
如果没有出现的话n和m的初值就是0啊
by 木森林 @ 2018-10-12 18:38:30
@[木森林](/space/show?uid=68082) 对啊所以这个判断是这样的
```
if(n<=m&&n!=0&&m!=0)
```
by YWHS__LH @ 2018-10-12 18:40:15
@[YWHS__LH](/space/show?uid=45299)
评测状态
系统将会持续为您从源 OJ 获取评测结果,将持续追踪最长 30 分钟。
如超过此时间仍未获得结果,您可手动刷新。
Judging
用时: -ms / 内存: -KB
测试点信息
#1
by 木森林 @ 2018-10-12 18:41:03
@[木森林](/space/show?uid=68082) %%%dalao
~~根据luogu的传统,你应该问:萌新刚学OI,求救 or 救救孩子吧!~~
by 土田共戈 @ 2018-10-12 18:41:09
@[YWHS__LH](/space/show?uid=45299)
。。。。。
by 木森林 @ 2018-10-12 18:41:19
@[木森林](/space/show?uid=68082) ???
by YWHS__LH @ 2018-10-12 18:41:46