uva 11556 - Best Compression Ever(水题)
2014-09-26 21:22
225 查看
题目链接:uva 11556 - Best Compression Ever
题目大意:有n个文件,问说用b+1位是否可以表示,全0不能表示。
解题思路:水题,不过话说英语实在看不懂啊,题意是半猜的。
题目大意:有n个文件,问说用b+1位是否可以表示,全0不能表示。
解题思路:水题,不过话说英语实在看不懂啊,题意是半猜的。
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long ll; int main () { ll n, b; while (scanf("%lld%lld", &n, &b) == 2) { ll m = (1LL<<(b+1)) - 1; printf("%s\n", n <= m ? "yes" : "no"); } return 0; }
相关文章推荐
- UVa 11556 - Best Compression Ever
- UVA 10970 Big Chocolate——水题
- UVALive5429 UVA382 POJ1528 HDU1323 ZOJ1284 Perfection【整除+水题】
- HDU ACM 1048 The Hardest Problem Ever (水题)
- uva270 级角排序水题
- UVALive5389 UVA414 POJ1493 ZOJ1339 Machined Surfaces【输入输出+水题】
- uva 110 Meta-Loopless Sorts 用程序写程序 有点复杂的回溯水题
- uva524(dfs水题)
- UVALive5910 UVA1641 POJ4022 ASCII Area【水题+输入输出】
- UVa10305 Ordering Tasks(拓扑排序水题)
- CodeForcess--609B--The Best Gift(模拟水题)
- UVa 280 Vertex ( dfs搜索 水题 )
- UVaLive/LA 6802 Turtle Graphics(水题)
- UVA - 488 Triangle Wave(水题)
- UVA - 11636 Hello World! 贪心水题
- 【数论,水题】UVa 11728 - Alternate Task
- poj1298 The Hardest Problem Ever ——水题
- UVA - 299 Train Swapping(水题)
- uva 10285 最长的滑雪路径(动态规划水题)