Submission
Status:
-----P----
Score: 10
User: amongus
Problemset: D.Think Sol!
Language: cpp
Time: 0.049 second
Submitted On: 2024-10-15 16:07:27
#include<bits/stdc++.h>
using namespace std;
#include<math.h>
int main(){
double h,m;
int q;
scanf("%lf %lf %d",&h,&m,&q);
h=h/2;
while(q--){
double x,y,ax,ay;
scanf("%lf %lf",&x,&y);
if(x>=h){
x=x-h;
}
ay=y/m*360;
ax=x/h*360+(y/m*(360/h));
double ans=abs(ax-ay);
ans=min(ans,360-ans);
printf("==%.2lf\n",ans);
}
}