Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long double ld;
- const int MX=3e5+6;
- const ld pi =acos(-1);
- int p,x,y;
- int main()
- {
- freopen("progress_pie.txt","r",stdin);
- freopen("out.txt","w",stdout);
- int t;
- cin>>t;
- int g=0;
- while(t--){
- g++;
- cin>>p>>x>>y;
- printf("Case #%d: ",g);
- if((x-50)*(x-50)+(y-50)*(y-50)>50*50)
- {
- cout<<"white\n";
- continue;
- }
- ld th=atan2(x-50,y-50);
- if(th<0)th=pi-th;
- //cout<<th*180.0/pi<<endl;
- th/=2.0*pi;
- if(p>100.0*th)cout<<"black\n";
- else cout<<"white\n";
- // cout<<th;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment