QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#356456#4676. Amalgamated ArtichokesSa3tElSefr#WA 327ms4344kbC++141.5kb2024-03-17 20:02:022024-03-17 20:02:02

Judging History

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

  • [2024-03-17 20:02:02]
  • 评测
  • 测评结果:WA
  • 用时:327ms
  • 内存:4344kb
  • [2024-03-17 20:02:02]
  • 提交

answer

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
#include <array>
#include <climits>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
#include <array>
#include <climits>

#pragma GCC optimize("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")

#define ll long long
#define ld  long double
using namespace std;

const int N = 1e4 + 5, lg = 19, mod = 998244353;
const int M = 5e2 + 5;

int main() {
    int p, a, b, c, d, n;
    cin >> p >> a >> b >> c >> d >> n;
    ld ans = 0, max_num = - 1.0l / 0.0;
    for (int i = 0; i < n; ++i) {
        ld cur = p * (sinl(a * i + b) + cosl(c * i + d) + 2);
        ans = max(ans, max_num - cur);
        max_num = max(max_num, cur);
    }
    cout << fixed << setprecision(6) << ans << '\n';
}

詳細信息

Test #1:

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

input:

42 1 23 4 8 10

output:

104.855110

result:

ok found '104.8551100', expected '104.8551105', error '0.0000000'

Test #2:

score: 0
Accepted
time: 0ms
memory: 4072kb

input:

100 7 615 998 801 3

output:

0.000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #3:

score: 0
Accepted
time: 1ms
memory: 4276kb

input:

100 432 406 867 60 1000

output:

399.303813

result:

ok found '399.3038130', expected '399.3038130', error '0.0000000'

Test #4:

score: 0
Accepted
time: 0ms
memory: 4044kb

input:

350 120 957 785 310 1

output:

0.000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #5:

score: 0
Accepted
time: 327ms
memory: 4344kb

input:

350 0 957 0 310 1000000

output:

0.000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #6:

score: -100
Wrong Answer
time: 0ms
memory: 4112kb

input:

200 411 433 922 805 2

output:

0.000000

result:

wrong answer 1st numbers differ - expected: '665.5224300', found: '0.0000000', error = '1.0000000'