Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "testlib.h"
- #include <bits/stdc++.h>
- using namespace std;
- #define forn(i, n) for (int i = 0; i < int(n); i++)
- #define x first
- #define y second
- #define pb(a) push_back(a)
- #define all(a) (a).begin(), (a).end()
- #define sz(a) int((a).size())
- #define mp(x, y) make_pair((x), (y))
- typedef long long li;
- inline li toLong(char* s) {
- li ans = 0;
- while (*s) ans = ans * 10 + int(*s - '0'), s++;
- return ans;
- }
- typedef pair<int, int> pt;
- int main(int argc, char* argv[]) {
- registerGen(argc, argv, 1);
- int n = atoi(argv[1]);
- int m = atoi(argv[2]);
- int per = atoi(argv[3]);
- cout << n << ' ' << m << endl;
- forn(i, n) {
- forn(j, m) {
- int v = rnd.next(0, 100);
- if (v <= per) putchar('.');
- else putchar('*');
- }
- puts("");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement