Submission #1084181

# Submission time Handle Problem Language Result Execution time Memory
1084181 2024-09-05T14:37:43 Z nickolasarapidis Connecting Supertrees (IOI20_supertrees) C++17
0 / 100
1 ms 348 KB
#include "supertrees.h"
#include <bits/stdc++.h>
using namespace std;

int construct(vector<vector<int>> p){
	int N = p.size();

	vector<vector<int>> b(N, vector<int>(N, 0));

	for(int i = 0; i < N; i++){
		if(p[i][i + 1] == 1){
			b[i][i + 1] = 1;
			b[i + 1][i] = 1;
		}
		else{
			for(int j = 0; j < N; j++){
				if(p[i + 1][j] == 1 and p[i][j] == 1) return 0;
			}
		}
	}

	build(b);

	return 1;
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -