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
45 0
UVa11565 - Simple Equations
UVa11565 - Simple Equations
46 0
UVa389 - Basically Speaking
UVa389 - Basically Speaking
34 0
|
开发者
牛客第六场-Combination of Physics and Maths
题意:选出一个子矩阵,使得所求的压强最大,压强是指这个子矩阵中每个元素之和 / 这个子矩阵最下面一行的元素之和
53 0
牛客第六场-Combination of Physics and Maths
|
人工智能 Java 安全
HDU 1039 Easier Done Than Said?
Easier Done Than Said? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12751    Accepted Subm...
798 0
【HDU 5572 An Easy Physics Problem】计算几何基础
2015上海区域赛现场赛第5题。 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5572 题意:在平面上,已知圆(O, R),点B、A(均在圆外),向量V。
1028 0
|
机器学习/深度学习 C++