Submission #766892

#TimeUsernameProblemLanguageResultExecution timeMemory
766892irmuunQuality Of Living (IOI10_quality)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "quality.h" using namespace std; #define pb push_back #define ll long long #define ff first #define ss second #define all(s) s.begin(),s.end() int rectangle(int R,int C,int H,int W,int Q[3000][3000]){ int sum[R+1][C+1],m=H*W/2+1; int l=1,r=R*C; while(l<r){ int mid=(l+r)/2; bool ok=false; sum[0][0]=0; for(int i=0;i<=R;i++){ for(int j=0;j<=C;j++){ if(i==0||j==0){ sum[i][j]=0; continue; } sum[i][j]=sum[i-1][j]+sum[i][j-1]-sum[i-1][j-1]+(Q[i-1][j-1]<=mid); if(i>=H&&j>=W){ if(sum[i][j]-sum[i-H][j]-sum[i][j-W]+sum[i-H][j-W]>=m){ ok=true; } } } } if(ok==true){ r=mid; } else{ l=mid+1; } } return l; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccgcLP09.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