제출 #663401

#제출 시각아이디문제언어결과실행 시간메모리
663401YENGOYAN식물 비교 (IOI20_plants)C++14
컴파일 에러
0 ms0 KiB
#include "plants.h"

using namespace std;

void init(int k, std::vector<int> r) {
    // x, y
    //
    int n = r.size();

	return;
}

int compare_plants(int x, int y) {
	if(v[x] > v[y]) return 0;
	return 1;
}

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

plants.cpp: In function 'void init(int, std::vector<int>)':
plants.cpp:8:9: warning: unused variable 'n' [-Wunused-variable]
    8 |     int n = r.size();
      |         ^
plants.cpp: In function 'int compare_plants(int, int)':
plants.cpp:14:5: error: 'v' was not declared in this scope
   14 |  if(v[x] > v[y]) return 0;
      |     ^