QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#75980 | #5461. Paddle Star | chenshi | Compile Error | / | / | C++ | 1.2kb | 2023-02-06 21:55:10 | 2023-02-06 21:55:11 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-02-06 21:55:11]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-02-06 21:55:10]
- 提交
answer
//https://cdn.luogu.com.cn/upload/image_hosting/bce60lzi.png
//https://cdn.luogu.com.cn/upload/image_hosting/30e80xrq.png
//https://cdn.luogu.com.cn/upload/image_hosting/kejvnuf4.png
#include<cstdio>
#include<cmath>
using namespace std;
const long double PI=acosl(-1);
int T;long double l1,l2,l3,Alpha,Beta,gamma,t,ans;
inline long double calc(long double x,long double Alpha,long double Beta){
return x*x*sinl(Alpha)*sinl(Beta)/sinl(PI-Alpha-Beta);
}
int main(){
for(scanf("%d",&T);T--;printf("%.9Lf\n",ans)){
scanf("%Lf%Lf%Lf%Lf",&l1,&l2,&Alpha,&Beta);Alpha=Alpha/180*PI;t=Beta=Beta/180*PI;
if(l1<l2){
gamma=Alpha-asinl(l1*sinl(Alpha)/l2);
if(PI-Beta<gamma) Beta=PI-gamma;
}
ans=(l1+l2)*(l1+l2)*Alpha+l2*l2*Beta;
if(l1<l2&&PI-t<gamma) Beta=t,t=l1*sinl(Alpha)/sinl(Alpha-(PI-Beta)),ans+=l2*t*sinl(gamma-(PI-Beta));
if(Beta>PI/2){
if(l2>l1*cosl(PI-Beta)) l2=l1*cosl(PI-Beta),l3=l1*sinl(Beta);
else l3=sqrtl(l1*l1+l2*l2-2*l1*l2*cosl(PI-Beta));
gamma=asinl(l2*sinl(Beta)/l3);
if(gamma<2*Alpha) ans+=l1*l2*sinl(Beta)-l3*l3*asinl(l2*sinl(Beta)/l3);
else ans+=l1*l2*sinl(Beta)-l1*l3*sinl(gamma-2*Alpha)-l3*l3*2*Alpha+
l1*l3*sinl(gamma-2*Alpha)-calc(l3,gamma-2*Alpha,asinl(l1*sinl(Beta)/l3));
}
}
return 0;
}
Details
answer.code:8:39: error: ‘long double gamma’ redeclared as different kind of entity 8 | int T;long double l1,l2,l3,Alpha,Beta,gamma,t,ans; | ^~~~~ In file included from /usr/include/features.h:461, from /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:571, from /usr/include/c++/11/cstdio:41, from answer.code:4: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:241:1: note: previous declaration ‘double gamma(double)’ 241 | __MATHCALL (gamma,, (_Mdouble_)); | ^~~~~~~~~~ answer.code: In function ‘int main()’: answer.code:16:30: error: assignment of function ‘double gamma(double)’ 16 | gamma=Alpha-asinl(l1*sinl(Alpha)/l2); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ answer.code:17:35: error: invalid operands of types ‘long double’ and ‘double(double) noexcept’ to binary ‘operator<’ 17 | if(PI-Beta<gamma) Beta=PI-gamma; | ~~~~~~~^~~~~~ | | | | | double(double) noexcept | long double answer.code:17:50: error: invalid operands of types ‘const long double’ and ‘double(double) noexcept’ to binary ‘operator-’ 17 | if(PI-Beta<gamma) Beta=PI-gamma; | ~~^~~~~~ | | | | | double(double) noexcept | const long double answer.code:20:31: error: invalid operands of types ‘long double’ and ‘double(double) noexcept’ to binary ‘operator<’ 20 | if(l1<l2&&PI-t<gamma) Beta=t,t=l1*sinl(Alpha)/sinl(Alpha-(PI-Beta)),ans+=l2*t*sinl(gamma-(PI-Beta)); | ~~~~^~~~~~ | | | | | double(double) noexcept | long double answer.code:20:105: error: invalid operands of types ‘double(double) noexcept’ and ‘long double’ to binary ‘operator-’ 20 | if(l1<l2&&PI-t<gamma) Beta=t,t=l1*sinl(Alpha)/sinl(Alpha-(PI-Beta)),ans+=l2*t*sinl(gamma-(PI-Beta)); | ~~~~~^~~~~~~~~~ | | | | | long double | double(double) noexcept answer.code:24:30: error: assignment of function ‘double gamma(double)’ 24 | gamma=asinl(l2*sinl(Beta)/l3); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ answer.code:25:33: error: invalid operands of types ‘double(double) noexcept’ and ‘long double’ to binary ‘operator<’ 25 | if(gamma<2*Alpha) ans+=l1*l2*sinl(Beta)-l3*l3*asinl(l2*sinl(Beta)/l3); | ~~~~~^~~~~~~~ | | | | | long double | double(double) noexcept answer.code:26:68: error: invalid operands of types ‘double(double) noexcept’ and ‘long double’ to binary ‘operator-’ 26 | else ans+=l1*l2*sinl(Beta)-l1*l3*sinl(gamma-2*Alpha)-l3*l3*2*Alpha+ | ~~~~~^~~~~~~~ | | | | | long double | double(double) noexcept answer.code:27:41: error: invalid operands of types ‘double(double) noexcept’ and ‘long double’ to binary ‘operator-’ 27 | l1*l3*sinl(gamma-2*Alpha)-calc(l3,gamma-2*Alpha,asinl(l1*sinl(Beta)/l3)); | ~~~~~^~~~~~~~ | | | | | long double | double(double) noexcept answer.code:27:64: error: invalid operands of types ‘double(double) noexcept’ and ‘long double’ to binary ‘operator-’ 27 | l1*l3*sinl(gamma-2*Alpha)-calc(l3,gamma-2*Alpha,asinl(l1*sinl(Beta)/l3)); | ~~~~~^~~~~~~~ | | | | ...