CPU: 1s
Memory: 1024MB
ক্রিকেট খেলায় মাঠের প্রত্তেক প্রান্তের খেলোয়াড়দের অনেক ঝামেলা। বামহাতি আর ডানহাতি ব্যাটসম্যান থাকলে তো আর কথাই নেই। শিধুই প্রান্ত বদল। ক্যাপ্টেন হাত নেড়েও মাঝে মাঝে বোঝাতে পারে না কোথায় যেতে হবে। তাইতো মজার এ আয়োজন। ধরে নাও তুমি একটি বৃত্তের পরিধির যে কোন একটা জায়গায় আছো। মাঠের কেন্দ্র ক্যাপ্টেন দাঁড়িয়ে আছে। তোমাকে ক্যাপ্টেন বলবে কত ডিগ্রি ঘুরতে হবে। যদি তুমি দলে খেলতে চাও তবে ক্যাপ্টেনের কথা অনুজায়ী নতুন যায়গায় যেতে হবে। বি.দ্র. ক্যাপ্টেন সব সময় ঘড়ির কাটার বিপরীত দিকের কোনে তোমাকে ঘুরতে বলবে। আর ক্যাপ্টেন দাঁড়িয়ে আছে মুলবিন্দুতে(০,০)। ধরে নাও মাঠটি গোলাকার।
In cricket, it’s been a great problem for the fielder to field where there is a right hand and a left hand batsman in field. Sometimes it’s impossible to tell the rope fielder where to go. So Captain think a way to guide the rope fielder. Suppose you are rope fielder. You are on any position on the rope. Captain tell you in which angle you need to move. If you can move to the new position you can play in the team. After all calculating this might be hard.
PS. You will have to change your new position considering the angle (provided by the captain ) in terms of anti-clockwise. Consider that the captain is in coordinate (0,0). And finally consider the field is circular.
ইনপুটের বর্ণনা (Input Specification)
প্রথমেই একটা নাম্বার থাকবে T যেটা বলবে তোমাকে কতগুলো টেস্ট কেস আছে। একপর পরের লাইন এ তিনটি মান থাকবে। প্রথমটি দুটি নাম্বার তোমার কোর্ডিনেট(x,y)। পরের নাম্বারটি ক্যাপ্টেনের দেয়া কোন(theta)।
- ত্রিশ পয়েন্ট এর জন্য , 0 <= T <=100000 , -10000 <= x , y <= 10000 , theta (multiple of 90) <= 360
- সত্তর পয়েন্ট এর জন্য , 0 <= T <= 100000 , -10000 <= x , y <=10000 , 0 <= theta <= 360
Input will start with an integer denoting the number of test case T. In next each line there will be three number. First two number (x,y) will denote the current coordinate of you. And third number will be the angle (theta) provided by the captain.
For 30 Point , 0 <= T <=100000 , -10000 <= x,y <= 10000 , theta (multiple of 90) <= 360
For 70 point , 0 <= T <=100000 , -10000 <= x,y <= 10000 , 0 <= theta <=360
আউটপুটের বর্ণনা (Output Specification)
কেস নাম্বার সহ তোমার নতুন কোর্ডিনেট (x,y) টি বর্ননা কর। দশমিকের পরে ৩ ঘর পর্যন্ত প্রিন্ট করতে হবে।
Print your new coordinates correct to 3 decimal place with case number.
Sample
Input | Output |
---|---|
3 1 1 90 0 1 90 1 0 90 | Case 1: -1.000 1.000 Case 2: -1.000 0.000 Case 3: 0.000 1.000 |
Problemsetter: M. Saiful Bari Maruf