http://codeforces.com/problemset/problem/299/B

题意 :这个题挺简单的,就是说这个姑娘不喜欢走有石头的扇形,所以给你一个k的值,代表她一次可以跳多少扇形。

思路 :由于细节问题,那些循环的边界没弄好WA了几次,不过后来终于改对了。。。。

#include<stdio.h>
#include<string.h>
#include<iostream>
using namespace std;
const int maxn = ;
char ch[maxn] ;
int main()
{
int n,k ;
scanf("%d %d",&n,&k);
int flag = ,j;
for(int i = ; i < n ; i++)
scanf("%c",&ch[i]) ;
for(int i = ; i < n ; i++)
{
if(ch[i] == '.'&&ch[i+] == '#')
{
for(j = i+ ; j <= k+i ; j++)
{
if(ch[j] != '#')
break ;
}
if(j == k+i+)
{
flag = ;
break ;
} }
}
if(flag)
printf("NO\n") ;
else
printf("YES\n") ;
return ;
}

CodeForces 299B Ksusha the Squirrel的更多相关文章

  1. CodeForces 299A Ksusha and Array

    http://codeforces.com/problemset/problem/299/A 题意 :输入n个数,要求找出一个数能让其他所有的数整除,如果没有的话输出-1.有多个的话输出其中一个. 思 ...

  2. Codeforces Round #328 (Div. 2) B. The Monster and the Squirrel 打表数学

    B. The Monster and the Squirrel Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/c ...

  3. codeforces 592B The Monster and the Squirrel

    题目链接:http://codeforces.com/contest/592/problem/B 题目分类:数学,找规律 题目分析:重要的是画图找规律   代码: #include<bits/s ...

  4. Codeforces Round #328 (Div. 2)_B. The Monster and the Squirrel

    B. The Monster and the Squirrel time limit per test 1 second memory limit per test 256 megabytes inp ...

  5. codeforces 592B/C

    题目链接:http://codeforces.com/contest/592/problem/B B. The Monster and the Squirrel time limit per test ...

  6. Squirrel: 通用SQL、NoSQL客户端

    安装 配置数据库 配置驱动 配置连接 如果你的工作中,需要使用到多个数据库,又不想在多种客户端之间切换来切换去.那么就需要找一款支持多数据库的客户端工具了.如果你要连接多个关系型数据库,你就可以使用N ...

  7. python爬虫学习(5) —— 扒一下codeforces题面

    上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...

  8. 【Codeforces 738D】Sea Battle(贪心)

    http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...

  9. 【Codeforces 738C】Road to Cinema

    http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...

随机推荐

  1. jquery 事件委托绑定click的使用方法

    直接绑定ul的click事件  代码如下 复制代码 $("ul").click(function(e) 例子  代码如下 复制代码 $(function(){ //$(" ...

  2. Microsoft.Practices.EnterpriseLibrary.Logging的使用

    翻译 原文地址:http://www.devx.com/dotnet/Article/36184/0/page/1  原文作者:Thiru Thangarathinam (好强大的名字) 翻译: fl ...

  3. CodeSmith Template Model Output

    背景:上学那会儿就接触CodeSmith,是一款非常优秀的代码自动生成工具.以前写过好些基本模版,可惜早不知道扔到哪儿去了,如今只能重新开始,把它捡回来,加油. 效果:将数据库 DataBase 应用 ...

  4. Using LINQ Group By and String.Join() / Aggregate() in Entity Framework 3.5

    linq to sql 的时候,有时候需要用到 先group  然后来个 aggregate 串连一下值, 但会总会出错,说不识别 aggregate 或者 string.join 方法 搜遍网络 一 ...

  5. 项目中的那些事---PHP函数

    总结工作中遇到的php函数: 1.查找:strpos("str", "substr"): 查找substr字符串在str字符串中出现的位置 第一个参数是:被查找 ...

  6. Windows 右键添加「cmd 打开」

    1. 2. 3. 参考: 1.Windows右键添加"使用CMD打开" 2.WIN7.WIN8 右键在目录当前打开命令行Cmd窗口(图文)

  7. 使用ckplayer搭建rtmp视频直播应用

    视频直播才有的是RTMP协议进行视频实时流传输,在这里我们用到的软件都是 adobe 公司的一个是:Flash Media Server4 另一个是flash media live encoder 这 ...

  8. C#调用IOS推送

    C#调用IOS推送 使用的是 PushSharp 开源库 源码代码如下 点我

  9. linux 学习笔记3

    ①find -name *.txt //查看当前目录所有文件 .txt 结尾文件 ②whereis *.txt   //查看.txt结尾文件   但不显示 .txt 打包:tar -cf a.tar ...

  10. Python Generators vs Iterators

    http://stackoverflow.com/questions/2776829/difference-between-python-generators-vs-iterators iterato ...