Submission #663401

# Submission time Handle Problem Language Result Execution time Memory
663401 2022-11-26T22:18:59 Z YENGOYAN Comparing Plants (IOI20_plants) C++14
Compilation error
0 ms 0 KB
#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;
}

Compilation message

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;
      |     ^