G2A Many GEOs
SHARE
TWEET

Untitled

a guest Mar 25th, 2018 144 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. const int Maxn = 100;
  5.  
  6. int A, B;
  7. char res[Maxn][Maxn];
  8.  
  9. int main()
  10. {
  11.     scanf("%d %d", &A, &B);
  12.     printf("%d %d\n", Maxn, Maxn);
  13.     for (int i = 0; i < Maxn / 2; i++)
  14.         for (int j = 0; j < Maxn; j++)
  15.             res[i][j] = '.';
  16.     for (int i = Maxn / 2; i < Maxn; i++)
  17.         for (int j = 0; j < Maxn; j++)
  18.             res[i][j] = '#';
  19.     for (int i = 0; i + 1 < Maxn / 2; i += 2)
  20.         for (int j = 0; j < Maxn; j += 2) {
  21.             if (B > 1) { res[i][j] = '#'; B--; }
  22.         }
  23.     for (int i = Maxn / 2 + 1; i < Maxn; i += 2)
  24.         for (int j = 0; j < Maxn; j += 2) {
  25.             if (A > 1) { res[i][j] = '.'; A--; }
  26.         }
  27.     for (int i = 0; i < Maxn; i++) {
  28.         for (int j = 0; j < Maxn; j++)
  29.             printf("%c", res[i][j]);
  30.         printf("\n");
  31.     }
  32.     return 0;
  33. }
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top