QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#356456 | #4676. Amalgamated Artichokes | Sa3tElSefr# | WA | 327ms | 4344kb | C++14 | 1.5kb | 2024-03-17 20:02:02 | 2024-03-17 20:02:02 |
Judging History
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'