#include <bits/stdc++.h>
using namespace std;
int main() {
int t;std::cin >> t;
while(t–){
float k,a,b;std::cin >> k>>a>>b;
float minangle=360.0/k;
int dif=abs(a-b);
minangle*=dif;
float outside=minangle/2;
float inside= 180-outside;
int other=k-2-dif-1;
int bet=dif-1;
int answer=0;
if(inside>90 && inside<180){
answer+=bet;
}
if(outside>90&&outside<180){
answer+=other;
}
std::cout << answer << std::endl;
}
return 0;
}
PLZ TELL why is this wrong …
i just used some logic i.e.
angle to circumference is half to that to the centre
and other side can be calculated using the property of cyclic quadrilateral