Submission #1438738


Source Code Expand

Copy
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
#include <iomanip>
 
using namespace std;
 
#define int long long
 
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
 
#define fst first
#define scd second
#define PB push_back
#define MP make_pair
#define rep(i,x) for(int i=0;i<(x);++i)
#define rep1(i,x) for(int i=1;i<=(x);++i)
#define rrep(i,x) for(int i=(x)-1;i>=0;--i)
#define rrep1(i,x) for(int i=(x);i>=1;--i)
#define FOR(i,a,x) for(int i=(a);i<(x);++i)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
 
#define omajinai ios::sync_with_stdio(false);cin.tie(0)
 
template<typename T>bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<typename T>bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<typename T>T get(){T a;cin>>a;return a;}
template<typename T>T rev(T a){reverse(all(a));return a;}
template<typename T>istream&operator>>(istream&is,vector<T>&vec){rep(i,vec.size())is>>vec[i];return is;}
template<typename T>vector<T>&sort(vector<T>&a){sort(all(a));return a;}
 
const int inf = 1e9;
const ll linf = 3e18;
const double eps = 1e-9;
 
typedef long double ld;
 
signed main()
{
    ld P; cin >> P;
 
    ld mi = linf;
 
    //// xについて二分探索
    //ld lb = 0, ub = 100;
 
    for (ld x = 0; x <= 100; x += 0.001) {
        chmin(mi, (ld)x + P / pow(2, 1. * x / 1.5));
    }
    
    cout << fixed << setprecision(10) <<  mi << endl;
}

Submission Info

Submission Time
Task B - ムーアの法則
User Izryt
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1797 Byte
Status
Exec Time 28 ms
Memory 384 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
× 3
× 26
× 2
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
01.txt 28 ms 384 KB
02.txt 28 ms 256 KB
03.txt 28 ms 256 KB
04.txt 28 ms 256 KB
05.txt 28 ms 256 KB
06.txt 28 ms 256 KB
07.txt 28 ms 256 KB
08.txt 28 ms 256 KB
09.txt 28 ms 256 KB
10.txt 28 ms 256 KB
11.txt 28 ms 256 KB
12.txt 28 ms 256 KB
13.txt 28 ms 256 KB
14.txt 28 ms 256 KB
15.txt 28 ms 256 KB
16.txt 28 ms 256 KB
17.txt 28 ms 256 KB
18.txt 28 ms 256 KB
19.txt 28 ms 256 KB
20.txt 28 ms 256 KB
21.txt 28 ms 256 KB
22.txt 28 ms 256 KB
23.txt 28 ms 256 KB
24.txt 28 ms 256 KB
25.txt 28 ms 256 KB
sample_01.txt 28 ms 256 KB
sample_02.txt 28 ms 256 KB
sample_03.txt 28 ms 256 KB