题解
2023-07-10 14:52:26
发布于:上海
44阅读
0回复
0点赞
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <cstdio>
using namespace std;
const int N=1,inf=2147483647;
double n,m,x,y,k,ans;
double ha,hb,ma,mb;
double ca,cb;
int main(){
scanf("%lf%lf%lf%lf%lf",&n,&m,&x,&y,&k);
ha=x/n+1/n*y/m;
ma=y/m;
y+=k;
hb=x/n+1/n*y/m;
mb=y/m;
if(ma<ha&&mb>hb||(ma>ha&&mb>1&&mb-1>hb))ans=0;
else{
ca=abs(ha-ma);
if(ca>0.5)ca=1-ca;
cb=abs(hb-mb);
if(cb>0.5)cb=1-cb;
ans=ca<cb?ca:cb;
}
printf("%d",int((ans+1e-4)*360));
return 0;
}
这里空空如也
有帮助,赞一个