fork download
  1. #include<stdio.h>
  2. #define N_SIZE 1024
  3. int main(void){
  4. int column,row;
  5. scanf("%d%d\n",&column,&row);
  6. char symbol[2];
  7. scanf("%c %c",&symbol[1],&symbol[0]);
  8.  
  9. unsigned int n[ N_SIZE ];
  10. for(int i=0 ; scanf("%u",&n[i]) != EOF ; i++){
  11. }
  12. unsigned int check=(1<<31);
  13. int inum=0;
  14. for(int irow=0 ; irow<row ; irow++){
  15. for(int icol=0 ; icol<column ; icol++){
  16. if(n[inum] & check)
  17. printf("%c",symbol[1]);
  18. else
  19. printf("%c",symbol[0]);
  20. check = check>>1;
  21. if(check==0){
  22. check=(1<<31);
  23. inum++;
  24.  
  25. }
  26. }
  27. printf("\n");
  28. }
  29.  
  30. }
  31.  
Success #stdin #stdout 0s 4568KB
stdin
12 3
* -
 2879762942  1879048192
stdout
*-*-*-***-*-
-*-**-**---*
*******--***