codeforce 611B New Year and Old Property
暴力搞
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; long long a,b;
long long tmpa,tmpb;
long long num1[],num2[];
int tot1,tot2; int main()
{
// freopen("F:\\info.txt","w",stdout);
scanf("%lld%lld",&a,&b);
tmpa=a;
tmpb=b;
tot1=;tot2=;
while(tmpa) num1[tot1++]=tmpa%,tmpa=tmpa/;
while(tmpb) num2[tot2++]=tmpb%,tmpb=tmpb/; long long c=; long long ans=; for(int len=tot1;len<=tot2;len++)
{
for(int i=;i<len-;i++)
{
c=;
for(int j=;j<len;j++)
{
if(i==j) continue;
else c=c+(long long)pow(2.0,j);
}
// printf("%lf\n",c); if(c-a>=&&b-c>=) ans++;
}
}
printf("%lld\n",ans);
return ;
}
codeforce 611B New Year and Old Property的更多相关文章
- 探究@property申明对象属性时copy与strong的区别
一.问题来源 一直没有搞清楚NSString.NSArray.NSDictionary--属性描述关键字copy和strong的区别,看别人的项目中属性定义有的用copy,有的用strong.自己在开 ...
- JavaScript特性(attribute)、属性(property)和样式(style)
最近在研读一本巨著<JavaScript忍者秘籍>,里面有一篇文章提到了这3个概念. 书中的源码可以在此下载.我将源码放到了线上,如果不想下载,可以直接访问在线网址,修改页面名就能访问到相 ...
- -Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HO 解决办法
最近在使用maven,项目测试的时候出现了这么一个错.-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2 ...
- python property理解
一般情况下我这样使用property: @property def foo(self): return self._foo # 下面的两个decrator由@property创建 @foo.sette ...
- Android动画效果之Property Animation进阶(属性动画)
前言: 前面初步认识了Android的Property Animation(属性动画)Android动画效果之初识Property Animation(属性动画)(三),并且利用属性动画简单了补间动画 ...
- Android动画效果之初识Property Animation(属性动画)
前言: 前面两篇介绍了Android的Tween Animation(补间动画) Android动画效果之Tween Animation(补间动画).Frame Animation(逐帧动画)Andr ...
- # ios开发 @property 和 Ivar 的区别
ios开发 @property 和 Ivar 的区别 @property 属性其实是对成员变量的一种封装.我们先大概这样理解: @property = Ivar + setter + getter I ...
- Cesium原理篇:Property
之前主要是Entity的一个大概流程,本文主要介绍Cesium的属性,比如defineProperties,Property(ConstantProperty,CallbackProperty,Con ...
- 为Guid数据类型的属性(property)赋值
先来看看数据库表中的字段设计: 在数据库的数据类型为uniqueidentifier. 而在程序中对应的数据类型为GUID. property有get和set,也就是说能获取值也可以赋值.
随机推荐
- css float 布局
.clearfix:after { content: ''; display: table; clear: both; } .clearfix {; }
- 取distinct数据同时还取其他字段
的 SELECT id,group_concat(distinct model) FROM tsdr_case group by model order by id
- 关于C++ const
1.Const用途 No. 用途 使用范围 参考代码 1 类型检查 参数传递 void func(const int i){ ... } 2 节省空间,避免不必要的内存分配 代替#define #de ...
- “strcmp()” Anyone?
“strcmp()” Anyone? strcmp() is a library function in C/C++ which compares two strings. It takes two ...
- 默认系统为UEFI启动的GPT分区的WIN7(8),如何安装VHD的UEFI WIN8(7)
默认系统为UEFI启动的GPT分区的WIN7(8),如何安装VHD的UEFI WIN8(7) 情况A:如果默认系统为UEFI启动.GPT分区的WIN7,想安装个VHD的UEFI WIN8.1 1:系统 ...
- javascript 总结学习一
1 , javascript字符集:javascript采用的是Unicode字符集编码.为什么要采用这个编码呢?原因很简单,16位的Unicode编码可以表示地球人的任何书面语言.这是语言 国际化的 ...
- CodeForces 500 A. New Year Transportation
Description New Year is coming in Line World! In this world, there are n cells numbered by integers ...
- POJ - 3061 Subsequence(连续子序列和>=s的最短子序列长度)
Description A sequence of N positive integers (10 < N < 100 000), each of them less than or eq ...
- linux下安装rabbitmq
1.安装erlang虚拟机 Rabbitmq基于erlang语言开发,所有需要安装erlang虚拟机.安装erlang有两种方式: 第一种:使用yum安装: wget -O /etc/yum.repo ...
- linux 用户管理维护 清缓存
#echo 1 > /proc/sys/ vm/drop_caches 2013.10.10 其实一直user group一直都没去弄清楚 只是没去归类,@@一种是对用户/组直接修改(同时也更改 ...