Submission #1083960

# Submission time Handle Problem Language Result Execution time Memory
1083960 2024-09-04T16:09:46 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++){
		for(int j = 0; j < N; j++){
			for(int k = 0; k < N; k++){
				if(j == k) continue;
				if(b[j][k] == 1) continue;
				if(p[j][k] == p[i][k]){
					b[i][k] = 1;
				}
			}
		}
	}

	build(b);

	return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB b[0][0] is not 0
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB b[0][0] is not 0
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Too many ways to get from 0 to 1, should be 0 found no less than 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Too many ways to get from 0 to 1, should be 0 found no less than 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB b[0][0] is not 0
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB b[0][0] is not 0
3 Halted 0 ms 0 KB -