1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
#include <iostream> #include <cstdio> #include <cstdio> #include <cstring> #include <vector> #include <cmath> #include <cstdlib> #define INF 1000000 #define ll long long using namespace std; int main() { int t,kase=1; double r,len,width; double up_left_x,up_left_y,up_right_x,up_right_y,lo_right_x,lo_right_y,lo_left_x,lo_left_y; scanf("%d",&t); while(t--) { scanf("%lf",&r); len = r/.2; width = len*.6; up_left_x = (-len)*.45; up_left_y = width/2; up_right_x = (len)*.55; up_right_y = width/2; lo_right_x = (len)*.55; lo_right_y = (-width)/2; lo_left_x = (-len)*.45; lo_left_y = (-width)/2; printf("Case %d:\n",kase++); printf("%.0lf %.0lf\n",up_left_x,up_left_y); printf("%.0lf %.0lf\n",up_right_x,up_right_y); printf("%.0lf %.0lf\n",lo_right_x,lo_right_y); printf("%.0lf %.0lf\n",lo_left_x,lo_left_y); } return 0; } |