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;
}
目录
相关文章
UVa11565 - Simple Equations
UVa11565 - Simple Equations
52 0
UVa11296 - Counting Solutions to an Integral Equation(枚举技巧)
UVa11296 - Counting Solutions to an Integral Equation(枚举技巧)
49 0
UVa389 - Basically Speaking
UVa389 - Basically Speaking
36 0
|
开发者
牛客第六场-Combination of Physics and Maths
题意:选出一个子矩阵,使得所求的压强最大,压强是指这个子矩阵中每个元素之和 / 这个子矩阵最下面一行的元素之和
59 0
牛客第六场-Combination of Physics and Maths
|
机器学习/深度学习 自然语言处理
|
机器学习/深度学习 人工智能 网络架构
Codeforces 706B Interesting drink
B. Interesting drink time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard outp...
1167 0