Submission #207654

#TimeUsernameProblemLanguageResultExecution timeMemory
207654Sho10Rectangles (IOI19_rect)C++14
Compilation error
0 ms0 KiB
/* ID: Sho10 LANG: C++ */ #include <bits/stdc++.h> //Andrei Alexandru a.k.a Sho10 #define ll long long int #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #define all(a) (a).begin(), (a).end() #define sz size #define f first #define s second #define pb push_back #define er erase #define in insert #define mp make_pair #define pi pair #define rc(s) return cout<<s,0 #define endl '\n' #define mod 1000000007 #define PI 3.14159265359 #define CODE_START ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); using namespace std; ll a[2505][2505]; ll count_rectangles(vector<vector<ll> >A){ ll n=A.size(); ll m=A[0].size(); ll ans=0; for(ll i=0;i<n;i++) for(ll j=0;j<m;j++) a[i][j]=A[i][j]; for(ll i=1;i<n-1;i++) for(ll j=1;j<n-1;j++) { for(ll c=i;c<n-1;c++) for(ll k=i;k<n-1;k++){ if(a[c][k]<a[i-1][j]&&a[c][k]<a[i][j-1]&&a[c][k]<a[c+1][k]&&a[c][k]<a[c][k+1]){ ans++; }else break; } } return ans; } /* int32_t main(){ CODE_START; cout<<count_rectangles({{4, 8, 7, 5, 6},{7, 4, 10, 3, 5},{9, 7, 20, 14, 2},{9, 14, 7, 3, 6},{5, 7, 5, 2, 7},{4, 5, 13, 5, 6}}); } */

Compilation message (stderr)

/tmp/ccYPRUS1.o: In function `main':
grader.cpp:(.text.startup+0x89e): undefined reference to `count_rectangles(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)'
collect2: error: ld returned 1 exit status