Codeforces801A Vicious Keyboard
来源:互联网 发布:淘宝首页全屏海报尺寸 编辑:程序博客网 时间:2024/06/08 12:30
链接
http://codeforces.com/problemset/problem/801/A
题解
一开始
代码
//手速题#include <cstdio>#include <algorithm>#include <cstring>#define maxn 105using namespace std;int N;char s[maxn];int main(){ int i, ans=0; scanf("%s",s+1);N=strlen(s+1); for(i=1;i<N;i++)if(s[i]=='V' and s[i+1]=='K')ans++, s[i]=s[i+1]='.'; for(i=1;i<N;i++)if(s[i]^'.' and s[i+1]^'.' and s[i]==s[i+1]){ans++;break;} printf("%d",ans); return 0;}
0 0
- Codeforces801A Vicious Keyboard
- Codeforces801A Vicious Keyboard
- A. Vicious Keyboard
- A. Vicious Keyboard codeforce
- A. Vicious Keyboard
- A. Vicious Keyboard
- A. Vicious Keyboard Codeforce
- Codeforces 801A Vicious Keyboard
- CodeForces 801A Vicious Keyboard
- codeforces 801A Vicious Keyboard
- CodeForces 801A Vicious Keyboard 模拟
- 0519 G2n#W2B-B Vicious Keyboard
- CF Vicious Keyboard 构造水题
- Codeforces Round #409 (Div. 2) A. Vicious Keyboard
- CF#801 A. Vicious Keyboard(字符串,水题)
- Codeforces Round #409 (rated, Div. 2, based on VK Cup 2017 Round 2) A. Vicious Keyboard
- CF-Codeforces Round #409 (rated, Div. 2, based on VK Cup 2017 Round 2)-A-Vicious Keyboard
- Keyboard
- Python信号处理
- luogu P1049 装箱问题
- Openresty (nginx + lua)
- DOM详解
- SAPUI5拓展标准应用的Controller原理分析及应用实践
- Codeforces801A Vicious Keyboard
- SWAP_JOIN_INPUTS Oracle Hint(处理hash join强制大表(segment_size大)作为被驱动表)
- Linux学习笔记(三)-设备管理与驱动
- 数据结构—链表—单链表应用-增序排列节点
- BIEE-2、RPD
- intellij idea macos 创建servlet 始终页面打不开 404
- POJ 2400 Supervisor, Supervisee (二分图最大权匹配)
- 中山大学软件工程操作系统实验二报告
- D(1909)Perfect Chocolate