This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "supertrees.h"
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i = (a); i <= (b); i++)
#define rng(a) a.begin(), a.end()
#define ina(n,a) cin >> n; for(int i = 1; i <= n; i++) cin >> a[i]
#define sz(x) (int)(x).size()
#define se second
#define fi first
#define prev coyhhhhhhyoc
#define next sdNNNmNNNNNNNmds
#define y0 hNNNNy_yNNNNNN_sNh
#define y1 mNNNNNdtdNNNNNNtsNNm
#define yn mNNNNNNNNy___smNNNms
#define tm oooooosyysooooot
#define read tyhyt
#define rank ytmNmo
#define index yyy
#define pb push_back
#define pcnt __builtin_popcountll
#define rrep(i,a,b) for(int i = (b); i >= (a); i--)
#define rall(x,a) for(auto x : a)
#define MOD 1000000007
#define endl "\n"
typedef long long ll;
using namespace std;
const int N = 1111;
int p[N][N], b[N][N];
int n;
int solve1() {
rep(i, 1, n - 1) {
int ii = i % n + 1;
b[i][ii] = 1;
b[ii][i] = 1;
}
return 1;
}
int construct(vector<vector<int>> in) {
n = sz(in);
bool task1 = true;
rep(i, 0, n - 1) {
rep(j, 0, n - 1) {
p[i][j] = in[i][j];
if(p[i][j] != 1) {
task1 = false;
}
}
}
bool ret;
if(task1) {
ret = solve1();
}
if(ret) {
vector<vector<int> > ans(n, vector<int>(n));
rep(i, 1, n) {
rep(j, 1, n) {
ans[i - 1][j - 1] = b[i][j];
}
}
build(ans);
return 1;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |