제출 #431201

#제출 시각아이디문제언어결과실행 시간메모리
431201Pbezz슈퍼트리 잇기 (IOI20_supertrees)C++14
11 / 100
303 ms22028 KiB
#include "supertrees.h"
#include <vector>
#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define pb push_back
typedef pair<ll,ll> pii;

const ll MAXN = 2e5+5;

int construct(std::vector<std::vector<int>> p) {
	int n = p.size(),i,j;
	std::vector<std::vector<int>> answer;


	for (int i = 0; i < n; i++) {
		std::vector<int> row;
		row.resize(n);
	if(i!=n-1)row[i+1]=1;
	if(i!=0)row[i-1]=1;
		answer.push_back(row);
	}
	build(answer);
	return 1;
}

컴파일 시 표준 에러 (stderr) 메시지

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:22:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   22 |  if(i!=0)row[i-1]=1;
      |  ^~
supertrees.cpp:23:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   23 |   answer.push_back(row);
      |   ^~~~~~
supertrees.cpp:14:19: warning: unused variable 'i' [-Wunused-variable]
   14 |  int n = p.size(),i,j;
      |                   ^
supertrees.cpp:14:21: warning: unused variable 'j' [-Wunused-variable]
   14 |  int n = p.size(),i,j;
      |                     ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...