QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#495738 | #9136. Exponent Calculator | ucup-team4504# | AC ✓ | 0ms | 3896kb | C++14 | 1.3kb | 2024-07-27 23:23:39 | 2024-07-27 23:23:40 |
Judging History
answer
//#pragma GCC optimize("Ofast","inline","-ffast-math")
//#pragma GCC target("avx,sse2,sse3,sse4,mmx")
#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/hash_policy.hpp>
//#define int long long
using namespace __gnu_pbds;
using namespace std;
struct custom_hash {
static uint64_t splitmix64(uint64_t x) {
x += 0x9e3779b97f4a7c15;
x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
return x ^ (x >> 31);
}
size_t operator()(uint64_t x) const {
static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
return splitmix64(x + FIXED_RANDOM);
}
};
signed main()
{
ios::sync_with_stdio(false);cin.tie(0);
cout<<25<<'\n';
cout<<fixed<<setprecision(15)<<"$1 = $1 * "<<1.0/2048.0<<'\n';
cout<<fixed<<setprecision(15)<<"$0 = $1 + "<<1.0<<'\n';
cout<<fixed<<setprecision(15)<<"$2 = $1 * $1"<<'\n';
for(int i=2;i<=5;i++){
long double a=1.0/i;
cout<<fixed<<setprecision(15)<<"$2 = $2 * "<<a<<'\n';
cout<<fixed<<setprecision(15)<<"$0 = $0 + $2"<<'\n';
if(i<5) cout<<fixed<<setprecision(15)<<"$2 = $2 * $1"<<'\n';
}
for(int i=1;i<=11;i++){
cout<<fixed<<setprecision(15)<<"$0 = $0 * $0"<<'\n';
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3896kb
input:
input
output:
25 $1 = $1 * 0.000488281250000 $0 = $1 + 1.000000000000000 $2 = $1 * $1 $2 = $2 * 0.500000000000000 $0 = $0 + $2 $2 = $2 * $1 $2 = $2 * 0.333333333333333 $0 = $0 + $2 $2 = $2 * $1 $2 = $2 * 0.250000000000000 $0 = $0 + $2 $2 = $2 * $1 $2 = $2 * 0.200000000000000 $0 = $0 + $2 $0 = $0 * $0 $0 = $0 * $0...
result:
ok max relative diff is 3.42876e-12. Checker runtime is 197 ms
Extra Test:
score: 0
Extra Test Passed