# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
15555 |
2015-07-12T12:35:03 Z |
comet |
님 무기가 좀 나쁘시네여 (kriii3_S) |
C++ |
|
0 ms |
1712 KB |
#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 time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1712 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |