Submission #15555

#TimeUsernameProblemLanguageResultExecution timeMemory
15555comet님 무기가 좀 나쁘시네여 (kriii3_S)C++98
0 / 29
0 ms1712 KiB
#include<iostream> #include<algorithm> #include<cmath> using namespace std; double a[4][5]; int main(){ ios::sync_with_stdio(0); for(int i=0;i<4;i++) for(int j=0;j<5;j++)cin>>a[i][j]; double x=0.0,y=0.0,t[5]; for(int i=0;i<5;i++){ t[i]=a[0][i]; if(i>1)t[i]/=100.0; } x=t[0]*(1+t[1]/100.0)*((1-min(1.0,t[2]))+min(1.0,t[2])*t[3])*(1+t[4]); for(int i=0;i<5;i++)t[i]+=-a[2][i]+a[3][i]; y=t[0]*(1+t[1]/100.0)*((1-min(1.0,t[2]))+min(1.0,t[2])*t[3])*(1+t[4]); if(fabs(x-y)<1e-9)cout<<"0"<<endl; else if(x+1e-9<y)cout<<"+"<<endl; else if(x>y+1e-9)cout<<"-"<<endl; for(int i=0;i<5;i++){ t[i]=a[1][i]; if(i>1)t[i]/=100.0; } x=t[0]*(1+t[1]/100.0)*((1-min(1.0,t[2]))+min(1.0,t[2])*t[3])*(1+t[4]); for(int i=0;i<5;i++)t[i]+=a[2][i]-a[3][i]; y=t[0]*(1+t[1]/100.0)*((1-min(1.0,t[2]))+min(1.0,t[2])*t[3])*(1+t[4]); if(fabs(x-y)<1e-9)cout<<"0"<<endl; else if(x+1e-9<y)cout<<"+"<<endl; else if(x>y+1e-9)cout<<"-"<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...