Submission
Status:
PPPPPPPPPP
Score: 100
User: gay69
Problemset: D.Think Sol!
Language: cpp
Time: 0.062 second
Submitted On: 2024-10-15 19:09:35
#include<bits/stdc++.h>
using namespace std;
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("%.12lf\n",ans);
}
}