Submission #1186075

#TimeUsernameProblemLanguageResultExecution timeMemory
1186075HappyCapybaraRectangles (IOI19_rect)C++17
Compilation error
0 ms0 KiB
include<bits/stdc++.h> //#include "rectangles.h" using namespace std; #define ll long long ll count_rectangles(vector<vector<int>> a){ int n = a.size(), m = a[0].size(); ll res = 0; for (int i=1; i<n-1; i++){ for (int j=1; j<m-1; j++){ for (int k=i; k<n-1; k++){ for (int l=j; l<m-1; l++){ res++; for (int x=i; x<=k; x++){ bool stop = false; for (int y=j; y<=l; y++){ if (min(min(a[x][j-1], a[x][l+1]), min(a[i-1][y], a[k+1][y])) <= a[x][y]){ res--; stop = true; break; } } if (stop) break; } } } } } return res; }

Compilation message (stderr)

rect.cpp:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
rect.cpp:7:21: error: 'vector' was not declared in this scope
    7 | ll count_rectangles(vector<vector<int>> a){
      |                     ^~~~~~
rect.cpp:7:28: error: 'vector' was not declared in this scope
    7 | ll count_rectangles(vector<vector<int>> a){
      |                            ^~~~~~
rect.cpp:7:35: error: expected primary-expression before 'int'
    7 | ll count_rectangles(vector<vector<int>> a){
      |                                   ^~~