【树状数组】POJ 2309 BST
来源:互联网 发布:苹果vip解析软件 编辑:程序博客网 时间:2024/05/16 10:26
#include <iostream>#include <cstdio>#include <cmath>#include <cstring>#include <algorithm>#include <stack>#include <queue>#include <vector>using namespace std;/** * @author johnsondu * @time 2015-8-19 16:37 * @type Binary Index tree * @key try to understand how to retrieve * the last bit of a number which is 1. * @url http://poj.org/problem?id=2309 */int main(){ int tcase; int q; scanf("%d", &tcase); while(tcase --) { scanf("%d", &q); int lowbit = q & (-q); printf("%d %d\n", q-lowbit+1, q+lowbit-1); } return 0;}
0 0
- 【树状数组】POJ 2309 BST
- POJ 2309 BST 树状数组基本操作
- POJ 2309 BST (树状数组)
- POJ 2309 BST(树状数组)
- poj 2309 BST 使用树状数组的lowbit
- POJ2309--BST--树状数组
- POJ2309 BST(树状数组)
- poj 2309 树状数组
- POJ 2309树状数组的简单变型
- poj 2309(树状数组lowbit)
- poj 2309 BST (^ ^)
- POJ 2309 BST
- poj 2309 BST
- POJ 2309 BST
- POJ 2309 BST
- BST - POJ 2309 水题
- POJ 2309 BST
- poj 2309 BST(lowbit)
- U_BOOT_CMD命令解析
- C++指针探秘
- 利用POI将数据库表导出到Excel
- 查看linux系统信息命令(kernel、os、cpu等)
- C语言格式化输出(整理1)
- 【树状数组】POJ 2309 BST
- CCF 201403-2 窗口
- vmware 11 安装MAC OS X 10.10.5 开机卡logo界面问题
- 自顶向下测试和自底向上测试
- 使用JDBC实现对数据的增删改查
- NMAP 端口扫描工具下载 + 安装
- asp.net中后台c#数组与前台js数组交互
- 选择排序
- java实现排序算法之堆排序