Codeforces Round #487 (Div. 2)
PS:没有FST的cf打的好舒服。。。
A题题意:给一个包含A,B,C,'.'的字符串,每个字符代表一个细胞,ABC分别代表三种颜色,每个细胞可以分裂使得两边的细胞染上自己的颜色,问是否存在一个细胞能变为三种颜色。
A题题解:直接判断连续三个字符满足任意顺序的ABC即可。hack点是连续的字符串如AABBCC输出no
AC代码:
/*
* @Author: 王文宇
* @Date: 2018-06-11 21:30:49
* @Last Modified by: 王文宇
* @Last Modified time: 2018-06-11 21:40:09
*/
#include <bits/stdc++.h>
using namespace std;
#define _for(i,a,b) for(int i=a;i<=b;i++)
const int maxn = 105;
char s[maxn];
int main(int argc, char const *argv[])
{
cin>>s;
int l = strlen(s);
_for(i,1,l-2)
{
if(s[i]=='A'||s[i]=='