toj3095 Best Compression Ever 不懂 求解释?
来源:互联网 发布:qq三国蜀国粮草数据 编辑:程序博客网 时间:2024/05/16 06:35
题目链接:http://acm.tju.edu.cn/toj/showp.php?pid=3095
题目大意:压缩文件到n个字节
思路:不懂 求解释?
代码:
//toj3095--是否能把n个文件压缩到b 字节中
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
long long n,sum;
int b;
cin>>n>>b;
sum=(long long)pow(2,(b+1)*1.0); //2的(b+1)次方 b压缩后的为字节数 (表示压缩前的文件数+1)?
if(n>sum-1)cout<<"no"<<endl;
else cout<<"yes"<<endl;
return 0;
}
- toj3095 Best Compression Ever 不懂 求解释?
- UVa 11556 - Best Compression Ever
- uva 11556 - Best Compression Ever(水题)
- Best Training Ever
- LightOj 1111 - Best Picnic Ever
- LightOJ - 1111 Best Picnic Ever
- 题目2 : Best Compression Algorithms
- [网易笔试]Best Compression Algorithms
- The 46 Best-ever Freeware Utilities
- The 46 Best-ever Freeware Utilities-some
- Oracle Buys Sun: The Best Deal Ever
- Top 20 Best Agile Development Books, Ever
- Light OJ 1111 Best Picnic Ever
- The 10 Best MVC Tips Ever
- LightOJ - 1111 Best Picnic Ever (搜索)
- LightOJ 1111 Best Picnic Ever 简单bfs
- The 18 best image file compression tools
- 杭电2048神----(不懂为什么代码中p[i]一直等于0求解释)
- How to Replace a Device in a ZFS Storage Pool
- ashx文件是什么,用途,详细介绍
- gdal库的三个使用心得
- c++基础(枚举)
- BOM对象
- toj3095 Best Compression Ever 不懂 求解释?
- Solaris 使用ndd指令设置网卡速率
- 习题2-7 近似计算
- C/C++/JAVA/语法大PK——访问控制
- 从solaris explorer鉴别DISK 硬件故障识别方法
- ios 中生成随机数
- What is a "sosreport" and how do I create it in Red Hat Enterprise Linux 4.6 and later
- 基于移动终端(平板电脑、手机)的网络调查
- struct sizeof