Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define FOR(i,a,b) for(int i=(a);i<(b);++i)
- #define FORD(i, a, b) for(int i = (a); i >= (b); --i)
- #define VAR(v, i) __typeof(i) v=(i)
- #define FORE(i, c) for(VAR(i, (c).begin()); i != (c).end(); ++i)
- #define all(v) (v).begin(),(v).end()
- #define PII pair<int,int>
- #define mp make_pair
- #define st first
- #define nd second
- #define pb push_back
- #define lint long long int
- #define VI vector<int>
- #define debug(x) {cerr <<#x <<" = " <<x <<endl; }
- #define debug2(x,y) {cerr <<#x <<" = " <<x << ", "<<#y<<" = "<< y <<endl; }
- #define debug3(x,y,z) {cerr <<#x <<" = " <<x << ", "<<#y<<" = "<< y << ", " << #z << " = " << z <<endl; }
- #define debugv(x) {{cerr <<#x <<" = "; FORE(itt, (x)) cerr <<*itt <<", "; cerr <<endl; }}
- #define debugt(t,n) {{cerr <<#t <<" = "; FOR(it,0,(n)) cerr <<t[it] <<", "; cerr <<endl; }}
- #define make( x) int (x); scanf("%d",&(x));
- #define make2( x, y) int (x), (y); scanf("%d%d",&(x),&(y));
- #define make3(x, y, z) int (x), (y), (z); scanf("%d%d%d",&(x),&(y),&(z));
- #define make4(x, y, z, t) int (x), (y), (z), (t); scanf("%d%d%d%d",&(x),&(y),&(z),&(t));
- #define makev(v,n) VI (v); FOR(i,0,(n)) { make(a); (v).pb(a);}
- #define IOS ios_base::sync_with_stdio(0)
- #define HEAP priority_queue
- #define read( x) scanf("%d",&(x));
- #define read2( x, y) scanf("%d%d",&(x),&(y));
- #define read3(x, y, z) scanf("%d%d%d",&(x),&(y),&(z));
- #define read4(x, y, z, t) scanf("%d%d%d%d",&(x),&(y),&(z),&(t));
- #define readv(v,n) FOR(i,0,(n)) { make(a); (v).pb(a);}
- using namespace std;
- const int max_n = 1e3 + 5;
- void solve() {
- double s;
- scanf("%lf", &s);
- printf("0 0 0.5\n");
- double x = sqrt(2);
- double alpha = M_PI/4 - acos(s/x);
- complex<double> p1(0.5, 0), p2(0,0.5);
- complex<double> rotate(cos(alpha), sin(alpha));
- p1 *= rotate; p2 *= rotate;
- printf("%.17lf %.17lf 0\n", p1.real(), p1.imag() );
- printf("%.17lf %.17lf 0\n", p2.real(), p2.imag() );
- }
- int main() {
- make(t);
- FOR(tt,1,t+1) {
- printf("Case #%d: ", tt);
- solve();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement