Submission #663402

# Submission time Handle Problem Language Result Execution time Memory
663402 2022-11-26T22:19:35 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(r[x] > r[y]) return 0;
	return 1;
}

Compilation message

plants.cpp: In function 'int compare_plants(int, int)':
plants.cpp:14:5: error: 'r' was not declared in this scope
   14 |  if(r[x] > r[y]) return 0;
      |     ^