# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
301853 | infinite_iq | Connecting Supertrees (IOI20_supertrees) | C++14 | 275 ms | 26360 KiB |
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 <bits/stdc++.h>
using namespace std ;
#define pb push_back
#define C continue
typedef vector < int > vi ;
typedef vector < vi > vivi ;
#include "supertrees.h"
int N ;
vi v [1009] , xxx [1009] , comp ;
int col [1009] , P [1009] , who [1009] , timer ;
void dfs ( int node ) {
if ( col [node] ) return ;
col [node] = timer ;
comp .pb ( node ) ;
for ( auto u : v [node] ) dfs ( u ) ;
}
int construct(std::vector<std::vector<int>> p) {
int n = p.size();
N = n ;
vivi ans ;
for ( int i = 0 ; i < n ; i ++ ) {
vi ret ( n , 0 ) ;
ans .pb ( ret ) ;
}
for ( int i = 0 ; i < n ; i ++ ) {
for ( int j = 0 ; j < n ; j ++ ) {
if ( p [i][j] == 3 ) return 0 ;
if ( p [i][j] == 1 ) {
v [i] .pb ( j ) ;
}
# | 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... |