日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

Codeforces Round #300 A. Cutting Banner 水题

發布時間:2023/11/27 生活经验 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Codeforces Round #300 A. Cutting Banner 水题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

A. Cutting Banner

Time Limit: 1 Sec??Memory Limit: 256 MB

題目連接

http://codeforces.com/contest/538/problem/A

Description

A large banner with word CODEFORCES was ordered for the 1000-th onsite round of Codeforcesω that takes place on the Miami beach. Unfortunately, the company that made the banner mixed up two orders and delivered somebody else's banner that contains someone else's word. The word on the banner consists only of upper-case English letters.

There is very little time to correct the mistake. All that we can manage to do is to cut out some substring from the banner, i.e. several consecutive letters. After that all the resulting parts of the banner will be glued into a single piece (if the beginning or the end of the original banner was cut out, only one part remains); it is not allowed change the relative order of parts of the banner (i.e. after a substring is cut, several first and last letters are left, it is allowed only to glue the last letters to the right of the first letters). Thus, for example, for example, you can cut a substring out from string 'TEMPLATE' and get string 'TEMPLE' (if you cut out string AT), 'PLATE' (if you cut out TEM), 'T' (if you cut out EMPLATE), etc.

Help the organizers of the round determine whether it is possible to cut out of the banner some substring in such a way that the remaining parts formed word CODEFORCES.

Input

The single line of the input contains the word written on the banner. The word only consists of upper-case English letters. The word is non-empty and its length doesn't exceed 100 characters. It is guaranteed that the word isn't word CODEFORCES.

Output

Print 'YES', if there exists a way to cut out the substring, and 'NO' otherwise (without the quotes).

Sample Input

CODEWAITFORITFORCES

?

Sample Output

YES

?

HINT

?

題意

?給你一個字符串,然后讓你刪除一段字符,看是否能構成CODEFORCES

題解:

啊,枚舉區間就好了……

代碼:

?

//qscqesze
#include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <queue>
#include <typeinfo>
#include <fstream>
#include <map>
#include <stack>
typedef long long ll;
using namespace std;
//freopen("D.in","r",stdin);
//freopen("D.out","w",stdout);
#define sspeed ios_base::sync_with_stdio(0);cin.tie(0)
#define maxn 200001
#define mod 10007
#define eps 1e-9
int Num;
char CH[20];
//const int inf=0x7fffffff;   //нчоч╢С
const int inf=0x3f3f3f3f;
/*inline void P(int x)
{Num=0;if(!x){putchar('0');puts("");return;}while(x>0)CH[++Num]=x%10,x/=10;while(Num)putchar(CH[Num--]+48);puts("");
}
*/
inline ll read()
{int x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}return x*f;
}
inline void P(int x)
{Num=0;if(!x){putchar('0');puts("");return;}while(x>0)CH[++Num]=x%10,x/=10;while(Num)putchar(CH[Num--]+48);puts("");
}
//**************************************************************************************string s;
int a[maxn];
string kiss="CODEFORCES";
int main()
{cin>>s;for(int i=0;i<s.size();i++){for(int j=i+1;j<=s.size();j++){string p=s.substr(0,i)+s.substr(j);//cout<<p<<endl;if(p=="CODEFORCES"){cout<<"YES"<<endl;return 0;}}}cout<<"NO"<<endl;
}

?

轉載于:https://www.cnblogs.com/qscqesze/p/4458882.html

總結

以上是生活随笔為你收集整理的Codeforces Round #300 A. Cutting Banner 水题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 色屁屁www影院免费观看入口 | 日韩影院在线 | 99自拍| 日韩久久精品一区二区 | 国产精品一区二区三区久久久 | 网站免费在线观看 | 午夜视频久久 | 一本久道久久综合无码中文 | 国产黄色自拍 | 久久久久久久久久国产 | 用我的手指扰乱你 | 能看av的网站 | 深爱激情综合 | 素人一区 | 国产v综合v亚洲欧美久久 | 毛片亚洲av无码精品国产午夜 | 日本xxxx高潮少妇 | 欧亚成人av | 免费日批视频 | 国产麻豆一精品一男同 | 亚洲中文字幕无码av | 成人黄色激情 | 国产精品91在线观看 | 日本欧美久久久久免费播放网 | 高清日韩| av色先锋| melody在线高清免费观看 | 午夜福利啪啪片 | 91亚洲精品久久久蜜桃网站 | 日韩av不卡在线播放 | 免费观看一区二区三区 | 天堂av网手机版 | 午夜av在线免费观看 | 国产精品久久久久久久久免费看 | 影音先锋中文字幕人妻 | 亚洲天堂中文字幕在线观看 | 欧美一区视频 | 成人免费在线观看网站 | 国产欧美日韩在线播放 | 欧美a√| 精品美女在线观看 | 91视色 | 国产精品电影在线观看 | 一区二区三区四区国产精品 | 操皮视频 | www.中文字幕在线观看 | 欧美大色一区 | 怡红院一区二区 | 四虎一国产精品一区二区影院 | 雨宫琴音一区二区三区 | 欧美一区二区三区在线播放 | 成人久久精品人妻一区二区三区 | 久久免费黄色网址 | 少妇高潮迭起 | 91无限观看 | 亚洲午夜不卡 | 午夜在线国产 | 欧美一区二区三区久久精品 | 91中文| 欧美另类xxxx野战 | 青青免费在线视频 | 不卡的av在线播放 | www.777含羞草 | videos另类灌满极品另类 | 操一操视频 | 污片免费看 | 99在线精品视频 | 精品人妻一区二区三区三区四区 | 91精产国品一二三 | xx性欧美肥妇精品久久久久久 | 手机看片中文字幕 | 日韩黄色av网站 | 精品欧美一区二区三区久久久 | 中文字幕一区二区精品 | 麻豆精品国产传媒mv男同 | 一区二区免费在线观看视频 | 91丨九色丨蝌蚪丨对白 | 亚洲精品男女 | 极品尤物魔鬼身材啪啪仙踪林 | 一二三四视频社区在线 | 麻豆国产在线 | 超碰在线中文字幕 | 国产一区二区在 | 91黄色在线观看 | 亚洲熟妇无码爱v在线观看 九色福利 | 亚洲精品国产欧美在线观看 | 波多野结衣之潜藏淫欲 | 欧美一区二区三区在线 | 两性午夜视频 | 99久久婷婷国产一区二区三区 | 国产精品网友自拍 | 国产三级播放 | 亚洲美女操 | 春色伊人| 欧美激情一区二区三区 | 中文字幕永久 | 免费se99se | 老女人网站 | 亚洲永久免费精品 |