Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- ifstream fin("cuburi2.in");
- ofstream fout("cuburi2.out");
- int n, i, j, k, l, m, c ,d, maxx;
- int x, y, z;
- int mat[55][55];
- int h[55][55];
- int v[3025][25];
- int main() {
- fin >> n >> c >> d;
- if (d == 1) {
- for (i = 1; i <= c; ++i) {
- fin >> x >> y >> z;
- mat[x][y] = z;
- }
- fout << n << ' ' << n << '\n';
- for (i = 1; i <= n; ++i) {
- for (j = 1; j <= n; ++j) {
- fout << mat[i][j] << ' ';
- }
- fout << '\n';
- }
- }
- else if (d == 2) {
- for (i = 1; i <= c; ++i) {
- fin >> x >> y >> z;
- h[x][y]++;
- if (h[x][y] > maxx) {
- maxx = h[x][y];
- }
- v[(x - 1) * n + y][h[x][y]] = z;
- }
- for (i = 1; i <= n; ++i) {
- maxx = 0;
- for (j = n; j >= 1; ++j) {
- }
- fout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement