Submission #1211501

#TimeUsernameProblemLanguageResultExecution timeMemory
1211501fafnirConnecting Supertrees (IOI20_supertrees)C++20
11 / 100
108 ms21988 KiB
#include <bits/stdc++.h> using namespace std; // #define LOCAL #ifdef LOCAL void build(vector<vector<int>> p) { cout << 1 << '\n'; for (auto& row : p) { for (auto& el : row) cout << el << ' '; cout << '\n'; } } #else void build(vector<vector<int>> p); #endif // p: requirements // Return // 0 --> Impossible to construct // 1 --> Possible and make call to build int construct(vector<vector<int>> p) { const int n = p.size(); vector<vector<int>> answer(n, vector<int>(n, 0)); for (int i = 0; i < n-1; ++i) { answer[i][i+1] = 1; answer[i+1][i] = 1; } build(answer); return 1; } #ifdef LOCAL int32_t main(int argc, char** argv) { assert (argc == 3); freopen(argv[1], "r", stdin); freopen(argv[2], "w", stdout); vector<vector<int>> p; int n; cin >> n; p.resize(n); for (auto& e : p) { vector<int> row; for (auto& el : row) cin >> el; e = row; } construct(p); return 0; } #endif
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...