「CF475A」Bayan Bus
无脑模拟
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 |
#include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> using namespace std; int read() { int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } int n; int a[105]; char c[2]={'#','O'}; int main() { n=read(); for(int i=1;i<=n;i++)a[i]=1; printf("+------------------------+\n"); printf("|%c.",c[a[1]]); for(int i=1;i<=10;i++) printf("%c.",c[a[(i-1)*3+5]]); puts("|D|)"); printf("|%c.",c[a[2]]); for(int i=1;i<=10;i++) printf("%c.",c[a[(i-1)*3+6]]); puts("|.|"); printf("|%c.......................|\n",c[a[3]]); printf("|%c.",c[a[4]]); for(int i=1;i<=10;i++) printf("%c.",c[a[(i-1)*3+7]]); puts("|.|)"); printf("+------------------------+\n"); return 0; } |
Subscribe