UVa11714 - Blind Sorting

简介: UVa11714 - Blind Sorting
#include <iostream>#include <cmath>#include <fstream>usingnamespacestd;
intmain()
{
intn;
#ifndef ONLINE_JUDGEifstreamfin("d:\\OJ\\uva_in.txt");
streambuf*old=cin.rdbuf(fin.rdbuf());
#endifwhile (cin>>n) {
cout<<n+ (int)ceil(log2(n)) -2<<endl;
    }
#ifndef ONLINE_JUDGEcin.rdbuf(old);
#endifreturn0;
}
目录
相关文章
UVa1531 - Problem Bee
UVa1531 - Problem Bee
46 0
UVa11565 - Simple Equations
UVa11565 - Simple Equations
48 0
UVa389 - Basically Speaking
UVa389 - Basically Speaking
35 0
AtCoder Beginner Contest 133 E - Virus Tree 2(组合数学)
AtCoder Beginner Contest 133 E - Virus Tree 2(组合数学)
96 0
|
开发者
牛客第六场-Combination of Physics and Maths
题意:选出一个子矩阵,使得所求的压强最大,压强是指这个子矩阵中每个元素之和 / 这个子矩阵最下面一行的元素之和
55 0
牛客第六场-Combination of Physics and Maths
【HDU 5572 An Easy Physics Problem】计算几何基础
2015上海区域赛现场赛第5题。 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5572 题意:在平面上,已知圆(O, R),点B、A(均在圆外),向量V。
1030 0