QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#748506 | #5304. Money Game | zaqmju# | Compile Error | / | / | C++14 | 2.8kb | 2024-11-14 20:35:42 | 2024-11-14 20:35:42 |
Judging History
answer
#pragma GCC optimize(3)
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC optimize(2)
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define LF(x) fixed << setprecision(x)
// const int N = 1e8 + 8e7 + 2e6;
const int N = 2e8;
void solve() {
int n; cin >> n;
vector<int>a(n);
int m = N / n;
for(auto &i:a)cin >> i;
vector<long double> b(n);
for(int i = 0; i < n; i++)b[i] = 1.0 * a[i];
auto cal = [&](vector<long double> &v) -> void{
for(int i = 0; i < n - 1; i++){
v[i + 1] += v[i] / 2.0;
v[i] /= 2.0;
}
v[0] += v[n - 1] / 2.0;
v[n - 1] /= 2.0;
};
int cnt = 1;
cal(b);
while(cnt < m){
cnt++;
cal(b);
// for(auto i:b)cout << i <<' ';
// cout <<endl;
}
// cout << cnt << endl;
for(int i = 0; i < n; i++) {
cout << LF(10) << b[i] << " ";
}
// cout << endl;
}
#undef int
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int t = 1;
// cin >> t;
while(t--) {
solve();
}
return 0;
}
详细
answer.code:22:39: warning: bad option ‘-fwhole-program’ to pragma ‘optimize’ [-Wpragmas] 22 | #pragma GCC optimize("-fwhole-program") | ^ answer.code:29:41: warning: bad option ‘-fstrict-overflow’ to pragma ‘optimize’ [-Wpragmas] 29 | #pragma GCC optimize("-fstrict-overflow") | ^ answer.code:31:41: warning: bad option ‘-fcse-skip-blocks’ to pragma ‘optimize’ [-Wpragmas] 31 | #pragma GCC optimize("-fcse-skip-blocks") | ^ answer.code:45:51: warning: bad option ‘-funsafe-loop-optimizations’ to pragma ‘optimize’ [-Wpragmas] 45 | #pragma GCC optimize("-funsafe-loop-optimizations") | ^ answer.code:55:12: warning: bad option ‘-fwhole-program’ to attribute ‘optimize’ [-Wattributes] 55 | void solve() { | ^ answer.code:55:12: warning: bad option ‘-fstrict-overflow’ to attribute ‘optimize’ [-Wattributes] answer.code:55:12: warning: bad option ‘-fcse-skip-blocks’ to attribute ‘optimize’ [-Wattributes] answer.code:55:12: warning: bad option ‘-funsafe-loop-optimizations’ to attribute ‘optimize’ [-Wattributes] answer.code: In function ‘void solve()’: answer.code:62:51: warning: bad option ‘-fwhole-program’ to attribute ‘optimize’ [-Wattributes] 62 | auto cal = [&](vector<long double> &v) -> void{ | ^~~~ answer.code:62:51: warning: bad option ‘-fstrict-overflow’ to attribute ‘optimize’ [-Wattributes] answer.code:62:51: warning: bad option ‘-fcse-skip-blocks’ to attribute ‘optimize’ [-Wattributes] answer.code:62:51: warning: bad option ‘-funsafe-loop-optimizations’ to attribute ‘optimize’ [-Wattributes] answer.code: At global scope: answer.code:86:10: warning: bad option ‘-fwhole-program’ to attribute ‘optimize’ [-Wattributes] 86 | int main() { | ^ answer.code:86:10: warning: bad option ‘-fstrict-overflow’ to attribute ‘optimize’ [-Wattributes] answer.code:86:10: warning: bad option ‘-fcse-skip-blocks’ to attribute ‘optimize’ [-Wattributes] answer.code:86:10: warning: bad option ‘-funsafe-loop-optimizations’ to attribute ‘optimize’ [-Wattributes] In file included from /usr/include/c++/13/string:43, from /usr/include/c++/13/bitset:52, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52, from answer.code:49: /usr/include/c++/13/bits/allocator.h: In destructor ‘std::_Vector_base<long long int, std::allocator<long long int> >::_Vector_impl::~_Vector_impl()’: /usr/include/c++/13/bits/allocator.h:184:7: error: inlining failed in call to ‘always_inline’ ‘std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = long long int]’: target specific option mismatch 184 | ~allocator() _GLIBCXX_NOTHROW { } | ^ In file included from /usr/include/c++/13/vector:66, from /usr/include/c++/13/queue:63, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:157: /usr/include/c++/13/bits/stl_vector.h:133:14: note: called from here 133 | struct _Vector_impl | ^~~~~~~~~~~~