Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <bits/stdc++.h>
- using namespace std;
- #define all(x) x.begin(), x.end()
- #define endl '\n'
- #define mp make_pair
- #define pb push_back
- #define pii pair<long long, long long>
- #define pdd pair<double, double>
- #define pss pair<string, string>
- #define vi vector<long long>
- #define rep(i, f, t) for (long long i = (f); i < (t); ++i)
- #define per(i, f, t) for (long long i = (f); i >= (t); --i)
- #define print(x) cout << x << endl
- #define printt(a, b) cout << a << ' ' << b << endl
- #define ll long long
- #define ld long double
- #define int long long
- #define TASK "park"
- const int inf = (int)(1e9);
- const int INF = (int)(1e18);
- const int mod = (int)(1e9 + 7);
- const double eps = (double)(1e-9);
- const double pi = acos(-1);
- void solve();
- int power(int a, int b)
- {
- if (b == 0) return 1;
- if (b & 1) return power(a, b - 1) * a;
- return power(a, b / 2) * power(a, b / 2);
- }
- signed main()
- {
- std::ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
- //freopen("in.txt", "r", stdin);
- //freopen("out.txt", "w", stdout);
- //srand(time(0));
- cout << fixed << setprecision(20);
- solve();
- return 0;
- }
- const int maxn = (int)(1 * 1e5 + 10);
- const int maxm = (int)(1 * 1e5 + 10);
- // == Solution == //
- int **fill(int n)
- {
- int **res = new int*[n];
- rep(i, 0, n) {
- res[i] = new int[n];
- }
- int x = 1;
- rep(i, 0, n) {
- rep(j, 0, n) {
- res[i][j] = x++;
- }
- }
- return res;
- }
- void solve()
- {
- int **arr = fill(4);
- rep(i, 0, 4) {
- rep(j, 0, 4) {
- cout << arr[i][j] << ' ';
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement