Submission #755655

# Submission time Handle Problem Language Result Execution time Memory
755655 2023-06-10T13:19:52 Z Trumling Connecting Supertrees (IOI20_supertrees) C++14
0 / 100
1 ms 232 KB
#include "supertrees.h"
#include <bits/stdc++.h>
using namespace std; 

typedef long long ll;
#define pb push_back
#define F first
#define S second
#define enter cout<<'\n';
#define INF 99999999999999999
#define MOD 1000000007
#define all(x) x.begin(),x.end()

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

	vector<vector<int>>ans(n,vector<int>(n,0));
if(n==1 || !p[0][1])
	for(int i=0;i<n;i++)
		for(int j=0;j<n;j++)
			if(abs(i-j)==1)
				ans[i][j]=1;

	build(ans);
	return 1;
}

Compilation message

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:19:1: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   19 | if(n==1 || !p[0][1])
      | ^~
supertrees.cpp:25:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   25 |  build(ans);
      |  ^~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 232 KB Too few ways to get from 0 to 1, should be 1 found 0
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 232 KB Too few ways to get from 0 to 1, should be 1 found 0
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 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 212 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 212 KB Output is correct
2 Incorrect 1 ms 232 KB Too few ways to get from 0 to 1, should be 1 found 0
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 232 KB Too few ways to get from 0 to 1, should be 1 found 0
3 Halted 0 ms 0 KB -