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. 三层还是DDD,ORM还是Ado.Net,何去何从?

    我本想把这个问题放到博问去,前几次有去博问问过之类的问题,无奈大神们可能都不屑回答别人的低级问题.所以放到随笔里,一方面把自己对ORM.架构的一些看法写下来抛砖引玉,另一方面最主要的是想寻求大神们指指 ...

  2. 【Support Vector Regression】林轩田机器学习技法

    上节课讲了Kernel的技巧如何应用到Logistic Regression中.核心是L2 regularized的error形式的linear model是可以应用Kernel技巧的. 这一节,继续 ...

  3. 2 27re.py

    """ 匹配目标 """ # import re # content = 'Hello 123 4567 World_This is a R ...

  4. Android事件分发机制详解(1)----探究View的事件分发

    探究View的事件分发 在Activity中,只有一个按钮,注册一个点击事件 [java] view plaincopy button.setOnClickListener(new OnClickLi ...

  5. typescript语言

    百度百科:2013年6月19日,在经历了一个预览版之后微软正式发布了正式版TypeScript 0.9

  6. PHP字符串基本操作函数

    常用函数: trim():去除字符串的空格及传入的参数 strlen():获取字符串长度 substr():按照两个参数截取字符串 str_replace():字符串替换 str_split():将字 ...

  7. kvm搭建完成了,那么问题来了,到底是什么原理

    kvm中到底是怎么模拟的CPU和内存? 收到了大量的 这里有一个裸的调用kvm接口的实例,超赞: http://www.cnblogs.com/Bozh/p/5753379.html 使用kvm的AP ...

  8. Charts & canvas & RGBA

    Charts & canvas RGBA color let stopFlag = 0; // show Charts const showCharts = (name = "&qu ...

  9. java中unmodifiableList方法的应用场景

    java对象中primitive类型变量可以通过不提供set方法保证不被修改,但对象的List成员在提供get方法后,就可以随意add.remove改变其结构,这不是希望的结果.网上看了下,发现Col ...

  10. Spark on Yarn——spark1.5.1集群配置

    写在前面: spark只是一种计算框架,如果要搭建集群要依托与一定的组织模式. 目前来说,Spark集群的组织形式有三种: 1.      Standalone:使用akka作为网络IO组件,mast ...