QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#545718#9136. Exponent Calculatorpengpeng_fudan#WA 0ms3888kbC++23919b2024-09-03 16:35:332024-09-03 16:35:33

Judging History

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

  • [2024-09-03 16:35:33]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3888kb
  • [2024-09-03 16:35:33]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define endl '\n'

#define maxn 200005

int a[maxn];

void solve(void) {
    int n = 5, k = 256;
    cout << 3 * n + (int)log2(k) + 2 << endl;
    cout << "$0 = $0 * " << fixed << 1. / k << endl;
    for (int i = 1; i <= n; i++) cout << "$" << i << " = $0 * $" << i - 1 << endl;
    for (int i = 1; i <= n; i++) {
        long double frac = 1;
        for (int j = 1; j <= i + 1; j++) frac /= j;
        cout << "$" << i << " = $" << i << " * " << fixed << frac << endl;
    }
    cout << "$0 = $0 + 1" << endl; 
    for (int i = 1; i <= n; i++) cout << "$0 = $0 + $" << i << endl;
    for (int i = 2; i <= k; i *= 2) cout << "$0 = $0 * $0" << endl;
    return;
}

int main() {
    ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

    cout << setprecision(20);

    int _ = 1;
    while (_--) solve();

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3888kb

input:

input

output:

25
$0 = $0 * 0.00390625000000000000
$1 = $0 * $0
$2 = $0 * $1
$3 = $0 * $2
$4 = $0 * $3
$5 = $0 * $4
$1 = $1 * 0.50000000000000000000
$2 = $2 * 0.16666666666666666667
$3 = $3 * 0.04166666666666666667
$4 = $4 * 0.00833333333333333333
$5 = $5 * 0.00138888888888888889
$0 = $0 + 1
$0 = $0 + $1
$0 = $0 +...

result:

wrong answer x=-20,jury=2.06115e-09,participant=1,error=4.85165e+08