QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#749254#9136. Exponent Calculatorucup-team134AC ✓0ms4012kbC++14879b2024-11-14 23:12:552024-11-14 23:12:55

Judging History

你现在查看的是最新测评结果

  • [2024-11-14 23:12:55]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:4012kb
  • [2024-11-14 23:12:55]
  • 提交

answer

#include <bits/stdc++.h>

#define ll long long
#define pb push_back
#define f first
#define s second
#define sz(x) (int)(x).size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define ios ios_base::sync_with_stdio(false);cin.tie(NULL)
#define ld long double
#define li __int128

using namespace std;

mt19937 rng(time(NULL));

int main()
{
	cout << 25 << endl;
	int b=17;
	printf("$1 = $1 * %.20Lf\n",(ld)1/(1<<b));
	
	ld f=0.5;
	
	printf("$2 = $1 + 1\n");
	printf("$3 = $1 * $1\n");
	printf("$4 = $3 * %.20Lf\n",f);
	printf("$2 = $2 + $4\n");
	
	int K=3;
	for(int k=3;k<=K;k++){
		f/=k;
		printf("$3 = $3 * $1\n");
		printf("$4 = $3 * %.20Lf\n",f);
		if(k==K){
			printf("$0 = $2 + $4\n");
		}
		else{
			printf("$2 = $2 + $4\n");
		}
	}
	for(int i=0;i<b;i++){
		printf("$0 = $0 * $0\n");
	}
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 4012kb

input:

input

output:

25
$1 = $1 * 0.00000762939453125000
$2 = $1 + 1
$3 = $1 * $1
$4 = $3 * 0.50000000000000000000
$2 = $2 + $4
$3 = $3 * $1
$4 = $3 * 0.16666666666666666667
$0 = $2 + $4
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 =...

result:

ok max relative diff is 5.27578e-11. Checker runtime is 200 ms

Extra Test:

score: 0
Extra Test Passed