cf_332A - Down the Hatch!(水题)
来源:互联网 发布:小学课程同步软件免费 编辑:程序博客网 时间:2024/05/17 04:48
水题一道,就是题目描述太坑了。。。
题意:对于每个序号为k*n+1的位置,若此位置前面三个字母是相同的,则答案加1.
代码如下:
#include <cstdio>char str[4000005];int main (){ int n; scanf("%d",&n); getchar(); gets(str); int ans = 0; for(int i = n; str[i]; i+=n) { if(str[i-1]==str[i-2]&&str[i-2]==str[i-3]) ans++; } printf("%d\n",ans); return 0;}
- cf_332A - Down the Hatch!(水题)
- A. Down the Hatch!
- cf 193 div2 A. Down the Hatch!
- cf——A. Down the Hatch!
- CF 332 A.Down the Hatch【模拟】
- CodeForces 332A Down the Hatch!
- Codeforces Round #193 (Div. 2) A Down the Hatch!
- CF 332A Down the Hatch! 超级水题。。不过题目太长了
- Codeforces Round #193 (Div. 2) / 332A Down the Hatch! (模拟)
- Down the Rabbit-Hole
- Down the Mine
- the cluster is down
- Down by the Salley Gardens
- Down the Excel template from SAP server
- The chips are down 糟糕的状况
- The connection to adb is down解决方法
- uva 11380 Down Went The Titanic
- The connection to adb is down…
- linux内存管理
- CSS3中display:box模式box-flex不均分的情况
- android webservice soap 解析 超时问题
- uva 1160 X-Plosives
- 生产者消费者模式浅析
- cf_332A - Down the Hatch!(水题)
- objectarx 把当前图形输出
- 一位老电子工程师十年的职场感悟
- objectarx 读取外部DWG图到当前图形
- CRM上线之路 走上了CRM实施顾问-第二天上班
- 十年考研高频单词
- Linux C编程(1) HelloWorld
- NYOJ 28-大数阶乘
- 哈夫曼树