A. Div. 64
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Top-model Izabella participates in the competition. She wants to impress judges and show her mathematical skills.

Her problem is following: for given string, consisting of only 0 and 1, tell if it's possible to remove some digits in such a way, that remaining number is a representation of some positive integer, divisible by 64, in the binary numerical system.

Input

In the only line given a non-empty binary string s with length up to 100.

Output

Print «yes» (without quotes) if it's possible to remove digits required way and «no» otherwise.

Examples
input
100010001
output
yes
input
100
output
no
Note

In the first test case, you can get string 1 000 000 after removing two ones which is a representation of number 64 in the binary numerical system.

You can read more about binary numeral system representation here: https://en.wikipedia.org/wiki/Binary_system

【题意】: 给你一个只包含0和1的字符串 , 判断这个 字符串 能不能通过删除一些1或者0 使得剩下的数字是一个整数的二进制表示,并且能够被二进制的 64 整除。

【分析】:64 的二进制表示是:1000000(2) , 从给出的数字的最高位向后找到第一个 1 然后向后统计 0 的个数 num, num大于等于 6 则输出 yes 否则输出 no

【代码】:

#include <bits/stdc++.h>

using namespace std;
char s[];
int main()
{
scanf("%s",s);
int flag=,cnt=;
for(int i=;i<strlen(s);i++)
{
if(flag== && s[i]=='')
{
flag=;
}
if(flag)
{
if(s[i]=='')
{
cnt++;
}
}
}
if(cnt>=)
printf("yes\n");
else
printf("no\n");
return ;
}

Codeforces Round #444 (Div. 2)A. Div. 64【进制思维】的更多相关文章

  1. Codeforces Round #539&#542&#543&#545 (Div. 1) 简要题解

    Codeforces Round #539 (Div. 1) A. Sasha and a Bit of Relax description 给一个序列\(a_i\),求有多少长度为偶数的区间\([l ...

  2. Codeforces Round #542 [Alex Lopashev Thanks-Round] (Div. 2) 题解

    Codeforces Round #542 [Alex Lopashev Thanks-Round] (Div. 2) 题目链接:https://codeforces.com/contest/1130 ...

  3. javascript 10进制和64进制的转换

    原文:javascript 10进制和64进制的转换 function string10to64(number) { var chars = '0123456789abcdefghigklmnopqr ...

  4. PHP进制转换[实现2、8、16、36、64进制至10进制相互转换]

    自己写了一个PHP进制转换程序,一个类吧,第一次写这个东东,写这个东东,在处理文本文件时能用得到.   可以实现: 10进制转换2.8.16.36.62进制2.8.16.36.62进制转换10进制 有 ...

  5. 实验吧-杂项-64格(64进制--base64索引)

    下载gif,Winhex打开发现文件头缺失,加上文件头GIF89得到正常图片,用帧分解工具把每一帧分解. 图片主要是一个8×8的方格,好像没什么线索,把每一帧图片上小黄人的占格的位置数出: 17 54 ...

  6. Codeforces Round #542 [Alex Lopashev Thanks-Round] (Div. 1) C(二分+KMP)

    http://codeforces.com/contest/1129/problem/C #include<bits/stdc++.h> #define fi first #define ...

  7. Codeforces Round #542 [Alex Lopashev Thanks-Round] (Div. 2) A - D2

    A. Be Positive 链接:http://codeforces.com/contest/1130/problem/A 题意: 给一段序列,这段序列每个数都除一个d(−1e3≤d≤1e3)除完后 ...

  8. codeforces水题100道 第二十五题 Codeforces Round #197 A. Helpful Maths (Div. 2) (strings)

    题目链接:http://www.codeforces.com/problemset/problem/339/A题意:重新组合加法字符串,使得按照1,2,3的顺序进行排列.C++代码: #include ...

  9. Codeforces Round #542 [Alex Lopashev Thanks-Round] (Div. 1) 题解

    A. Toy Train 时间限制:2 seconds 内存限制:256 megabytes 题意 有编号111~n(n≤5000)n(n\le 5000)n(n≤5000)的车站顺时针呈环排列,有m ...

随机推荐

  1. USACO Section2.1 Hamming Codes 解题报告 【icedream61】

    hamming解题报告----------------------------------------------------------------------------------------- ...

  2. 使用原生node写一个聊天室

    在学习node的时候都会练习做一个聊天室的项目,主要使用socket.io模块和http模块.这里我们使用更加原始的方式去写一个在命令行聊天的聊天室. http模块,socket.io都是高度封装之后 ...

  3. Git上手:四种常见的Git协同工作方式

    1.集中式工作流 适用人群:开发小团队(4-5人),习惯使用SVN工具的小团队. 工作方式:团队组长创建远程仓库,创建一个master分支,组员可读可写. 每个开发人员都git clone远程仓库到本 ...

  4. MySQL增强半同步几个重要参数搭配的测试

      Preface       Semi-synchronous replication is supported since MySQL 5.5 and then enhanced graduall ...

  5. Python urllib模块详解

    在Python 2中,有urllib和urllib2两个库来实现请求的发送.而在Python 3中,已经不存在urllib2这个库了,统一为urllib,其官方文档链接为:https://docs.p ...

  6. 项目中使用ECharts插件实现统计功能

    一.前端界面 // 界面中定义一个div,放图表 <div id="box" style="width: 600px;height:400px;padding: 1 ...

  7. winform-windowsmediaplayer设置可视化效果之条形

    winform导入windowsmediaplayer这个COM组件,他的默认可视化效果为: 而我们需要的可视化效果为: 则我们可以通过代码更改可视化效果:(参数value设为4即可!) //设置可视 ...

  8. Leetcode 668.乘法表中第k小的数

    乘法表中第k小的数 几乎每一个人都用 乘法表.但是你能在乘法表中快速找到第k小的数字吗? 给定高度m .宽度n 的一张 m * n的乘法表,以及正整数k,你需要返回表中第k 小的数字. 例 1: 输入 ...

  9. Beta

    目录 过去存在的问题 任务分工 规范 后端总结 卉卉 家灿 前端总结 绪佩 青元 恺琳 宇恒 丹丹 算法&API接口 家伟 鸿杰 一好 文档&博客撰写 政演 产品功能 我们已经坐了哪些 ...

  10. htmlagilitypack解析html

    这是个很好的的东西,以前做Html解析都是在用htmlparser,用的虽然顺手,但解析速度较慢,碰巧今天找到了这个,就拿过来试,一切出乎意料,非常爽,推荐给各位使用. 下面是一些简单的使用技巧,希望 ...