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. 第四篇、CocoaPods 镜像的更新 原来的淘宝镜像已经不再更新

    在开发应用,我们常常使用cocoaPods来管理第三方框架,但是原来的淘宝的镜像不更新了 新的镜像地址:https://gems.ruby-china.org/

  2. KSImageNamed-Xcode插件在xcode 6.4/6.3或其他版本中不能使用解决方案

    大家都知道这个插件很强大,但是现在这个插件最新版貌似只支持xcode7 ,需要修改KSImageNamed-xcode中的一个配置文件,添加uuid才能使他支持xcode6.3或6.4 进入下载的插件 ...

  3. OC10_文件练习

    // // TextHander.h // OC10_文件练习 // // Created by zhangxueming on 15/6/19. // Copyright (c) 2015年 zha ...

  4. inline-block元素的一些坑

    当年刚知道CSS display有 inline-block 这个神奇的属性的时候,感觉碉堡了,以为从此不用float了,什么div.p,只要 display: inline-block 就在一行上了 ...

  5. 一种简单的权限管理ER图设计

    权限管理支持动态地管理用户的角色和权限.权限代表用户可以在什么对象上进行什么操作:角色是一组权限的集合. PS:当增加或删除某个用户的角色时,系统自动将该角色对应的权限(角色 -权限关联表)增加或删除 ...

  6. c# Aes加解密和对象序列化

    aes加解密 public class AesCryptto { private string key = "hjyf57468jhmuist"; private string i ...

  7. 译文:Javascript-Functions

    个人理解+google翻译+有道翻译.如有错误,请指正.原文来自MDN:Functions Functions是javascript基本构建模块之一.每一个function是一个javascript程 ...

  8. IAR:Error [Li005]:no definition for"***" 问题之连接

    对于 IAR 出现的 Error[Li005] 链接错误,网上已经给出了比较详尽的解决方法,而对于这次记录,主要是记录解决问题的思路. 网上给出的方法:http://blog.csdn.net/yue ...

  9. JS判断设备终端(PC,iPad,iPhone,android,winPhone)和浏览器

    JS判断设备终端(PC,iPad,iPhone,android,winPhone)和浏览器 var ua = navigator.userAgent; var browser = {}, weixin ...

  10. 为云饰数据库添加Index

    Asset Collection: 1. _id_ 2. CategoryId_1_Date_-1 3. CategoryId_1_Id_1 4. CategoryId_1_Name_1 5. Cat ...