Baiterr's blog

By Baiterr, history, 12 months ago, In English

~~~~~

include<bits/stdc++.h>

include

include

include

define int long long

define spc <<" "<<

define vi vector

define ff first

define ss second

define pb push_back

define usc unsigned char

define _ (int)

define all(x) x.begin(),x.end()

using namespace std; int gcd(int a,int b){ a=abs(a),b=abs(b); if(b==0)return a; if(a<b)return gcd(b,a); return gcd(a%b,b); } void denk(double x,double y){ double p=10;//precision double b=300;//boldness // |this — means =
x/=p,y/=p;// v if(abs(x*x — y)<b/1000){ cout<<"#"; return; } cout<<" "; } void solve() { int px=100000;//total chars int n= _ sqrt(px)/2; for(int y=n;y>=-n;y--){ if(y==0){ for(int i=-n;i<0;i++)cout<<"-"; cout<<"O"; for(int i=1;i<=n;i++)cout<<"-"; cout<<"\n"; } for(int x=-n;x<=n;x++){ if(x==0){ cout<<"|"; } denk((double)x,(double)y); }cout<<y<<"\n"; } for(int i=-n;i<=n;i++){ cout<<(i<0 ? "-" : " "); }cout<<"\n"; for(int d=0;d<=6;d++){ for(int i=-n;i<=n;i++){ string s=to_string(abs(i)); cout<<(s.length()>d ? s[d] : ' '); }cout<<endl; } } signed main(){ #ifdef local freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); #endif int t=1; //cin>>t; t--; while(t--){ solve(); cout<<"\n"; } solve(); }~~~~~

  • Vote: I like it
  • -3
  • Vote: I do not like it

| Write comment?