제출 #1151814

#제출 시각아이디문제언어결과실행 시간메모리
1151814Ghulam_JunaidMake them Meet (EGOI24_makethemmeet)C++20
0 / 100
0 ms328 KiB
#include <bits/stdc++.h> using namespace std; const int N = 105; int n, m; vector<int> g[N], c; vector<vector<int>> output; int main(){ cin >> n >> m; for (int i = 0; i < m; i ++){ int u, v; cin >> u >> v; g[u].push_back(v); g[v].push_back(u); } for (int i = 0; i < n; i ++){ c.resize(n, 0); for (int j = n - 1; j >= 0; j -= 4){ c[j] = 1; if (j - 1 >= 0) c[j - 1] = 1; } output.push_back(c); c.resize(n, 0); for (int j = n - 2; j >= 0; j -= 4){ c[j] = 1; if (j - 1 >= 0) c[j - 1] = 1; } output.push_back(c); } for (int i = 0; i < n; i ++){ c.resize(n, 0); for (int j = n - 2; j >= 0; j -= 4){ c[j] = 1; if (j - 1 >= 0) c[j - 1] = 1; } output.push_back(c); c.resize(n, 0); for (int j = n - 1; j >= 0; j -= 4){ c[j] = 1; if (j - 1 >= 0) c[j - 1] = 1; } output.push_back(c); } for (int i = 0; i < n; i ++){ c.resize(n, 0); for (int j = n - 1; j >= 0; j -= 4){ c[j] = 1; if (j - 1 >= 0) c[j - 1] = 1; } output.push_back(c); c.resize(n, 0); for (int j = n - 2; j >= 0; j -= 4){ c[j] = 1; if (j - 1 >= 0) c[j - 1] = 1; } output.push_back(c); } cout << output.size() << endl; for (int i = 0; i < output.size(); i ++){ for (int j = 0; j < n; j ++) cout << output[i][j] << " "; cout << endl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...