Submission #503597

#TimeUsernameProblemLanguageResultExecution timeMemory
503597LouayFarahQuality Of Living (IOI10_quality)C++14
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" using namespace std; #define endl "\n" #define ll long long int #define pb push_back #define mp make_pair #define fi first #define se second const long long MOD = 1e9+7; const long long INF = 1e18; int nx[4] = {0, 0, -1, 1}; int ny[4] = {1, -1, 0, 0}; int rectangle(int r, int c, int h, int w, int *q[3001]) { int res = 1e8; for(int i = 0; i<=r-h; i++) { for(int j = 0; j<=c-w; j++) { vector<int> arr; for(int k = i; k<h+i; k++) { for(int t = j; t<w+j; t++) { arr.pb(q[k][t]); } } sort(arr.begin(), arr.end()); int len = int(arr.size()); int curr = arr[len/2]; res = min(res, curr); } } return res; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc2MqNRv.o: in function `main':
grader.cpp:(.text.startup+0xe9): undefined reference to `rectangle(int, int, int, int, int (*) [3001])'
collect2: error: ld returned 1 exit status