poj 2309
来源:互联网 发布:最好用的java开发工具 编辑:程序博客网 时间:2024/05/04 21:35
类似于树状数组的原理
lowbit(x) 函数表示区间的长度
#include<iostream>using namespace std;int lowbit(int x){return x&(-x);}int main(){int t;scanf("%d",&t);while(t--){int n;scanf("%d",&n);printf("%d %d\n",n-lowbit(n)+1,n+lowbit(n)-1);}return 0;}
- poj 2309
- poj 2309
- poj 2309
- poj 2309
- poj 2309,poj 2453 ,3748
- poj 2309 BST (^ ^)
- POJ 2309 BST
- poj 2309 BST
- poj 2309 ligtblueme
- POJ 2309 BST
- POJ 2309 BST
- poj 2309 树状数组
- BST - POJ 2309 水题
- POJ 2309 BST
- poj 2309 BST(lowbit)
- POJ 2309 BST
- poj 2309 BST
- POJ 2309:BST lowbit
- 有关java中的Date,String,Timestamp之间的转化问题
- jquery和dwr的util.js冲突
- HQL简单属性和实体对象查询
- 不同语言的变量类型及字节长度 (C & Java)
- 做程序员要积德 Java代码规范之我见
- poj 2309
- 摘录:Linux打Patch的方法
- Graphics View Framework Key Features(简译)未完
- Android Resource Framework (http://blog.csdn.net/linweig/article/details/5624984)
- javascript改变鼠标形状
- sql server 递归查询
- hdu2059龟兔赛跑
- Extjs之Renderer方法中的参数详解
- Frame buffer分析 - fbmem.c