Submission #663402

#TimeUsernameProblemLanguageResultExecution timeMemory
663402YENGOYANComparing Plants (IOI20_plants)C++14
Compilation error
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(r[x] > r[y]) return 0;
	return 1;
}

Compilation message (stderr)

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