- BC20260050's blog
!!!
- 2025-3-11 9:30:52 @
#include<bits/stdc++.h> #include<windows.h> using namespace std; #define int long long int p[20][20],t,N=2,M=3,k; signed main(){ srand(time(0)); cin>>N>>M>>k; while(1){ system("cls"); for(int i=0;i<=19;i++){ for(int j=0;j<N;j++){ if(p[i][j]==0){ printf("....|"); }else{ printf("####|"); } } putchar('\n'); } for(int i=19;i>=1;i--){ for(int j=0;j<N;j++){ p[i][j]=p[i-1][j]; } } for(int i=0;i<N;i++)p[0][i]=0; if(!t)p[0][(rand()+rand())%N]=1; t=(t+1)%M; Sleep(k); } return 0; }