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>
using namespace std;
void markall(int i ,int j ,vector<int>&f,vector<int>&b,vector<vector<int>>&p,vector<vector<int>>&answer){
int k = b[i];
while(k!=-1){
int u = j;
while(u!=-1){
if (!answer[k][u]){
p[k][u]--;
p[u][k]--;
answer[k][u]++;
answer[u][k]++;}
u=f[u];}
k=b[k];
}
}
bool check(vector<int>f,vector<int>b,int i ,int j,vector<vector<int>>p){
int k = b[i];
while(k!=-1){
int u = j;
while(u!=-1){
if (p[k][u]<=0)return false;
u=f[u];}
k=b[k];
}
return true;
}
int construct(vector<std::vector<int>> p) {
int n = p.size();
vector<vector<int>>answer(n,vector<int>(n,0));
vector<vector<int>>vanswer(n,vector<int>(n,0));
for (int i =0;i<n-1;++i){
for (int j=0;j<n-1;++j){
answer[i][j]=1;
answer[i+1][j]=1;
answer[i][j+1]=1;
}
}
build(answer);
return 1;
}
# | 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... |