Advertisement
Guest User

Untitled

a guest
Nov 4th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int N=0,K=0,dim;
  8. char mat[11][11];
  9. char res[17001][17001];
  10.  
  11. int main(){
  12.   char read;
  13.   read=getchar_unlocked();
  14.   do{
  15.     N=(N<<3)+(N<<1)+(read-'0');
  16.     read=getchar_unlocked();
  17.   }while(read>='0'&&read<='9');
  18.   read=getchar_unlocked();
  19.   do{
  20.     K=(K<<3)+(K<<1)+(read-'0');
  21.     read=getchar_unlocked();
  22.   }while(read>='0'&&read<='9');
  23.   dim=pow(N,K);
  24.   //cout<<K<<endl;
  25.   for(int i=0;i<N;i++){
  26.     for(int j=0;j<N;j++)
  27.       mat[i][j]=getchar_unlocked();
  28.     getchar_unlocked();
  29.   }
  30.  
  31.  
  32.   for(int i=0;i<dim;i++){
  33.     for(int j=0;j<dim;j++)
  34.       putchar_unlocked('.');
  35.     if(i!=dim-1)
  36.       putchar_unlocked('\n');
  37.   }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement