QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#806540 | #968. Extreme Wealth | bilibilitdasc | Compile Error | / | / | C++23 | 245b | 2024-12-09 11:29:55 | 2024-12-09 11:29:56 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<bits/stdc++.h> | ^~~~~~ answer.code:2:39: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 2 | using namespace std;long double r,b,v;main(){cin>>r>>b;v=r+b;v=r*b>1e14?log(pi*r*b*2/v)/2-r*log(v/r/2)-b*log(v/b/2):ln2*v-lgamma(v+1)+lgamma(r+1)+lgamma(b+1);if(v>20.72)cout<<"Extreme Wealth";else printf("%.9Lf",exp(v));} | ^~~~ answer.code: In function ‘int main()’: answer.code:2:77: error: ‘pi’ was not declared in this scope; did you mean ‘std::numbers::pi’? 2 | using namespace std;long double r,b,v;main(){cin>>r>>b;v=r+b;v=r*b>1e14?log(pi*r*b*2/v)/2-r*log(v/r/2)-b*log(v/b/2):ln2*v-lgamma(v+1)+lgamma(r+1)+lgamma(b+1);if(v>20.72)cout<<"Extreme Wealth";else printf("%.9Lf",exp(v));} | ^~ | std::numbers::pi In file included from /usr/include/c++/13/bits/max_size_type.h:37, from /usr/include/c++/13/bits/ranges_base.h:39, from /usr/include/c++/13/bits/ranges_algobase.h:38, from /usr/include/c++/13/bits/ranges_algo.h:38, from /usr/include/c++/13/algorithm:63, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from answer.code:1: /usr/include/c++/13/numbers:125:27: note: ‘std::numbers::pi’ declared here 125 | inline constexpr double pi = pi_v<double>; | ^~ answer.code:2:117: error: ‘ln2’ was not declared in this scope; did you mean ‘std::numbers::ln2’? 2 | using namespace std;long double r,b,v;main(){cin>>r>>b;v=r+b;v=r*b>1e14?log(pi*r*b*2/v)/2-r*log(v/r/2)-b*log(v/b/2):ln2*v-lgamma(v+1)+lgamma(r+1)+lgamma(b+1);if(v>20.72)cout<<"Extreme Wealth";else printf("%.9Lf",exp(v));} | ^~~ | std::numbers::ln2 /usr/include/c++/13/numbers:128:27: note: ‘std::numbers::ln2’ declared here 128 | inline constexpr double ln2 = ln2_v<double>; | ^~~