제출 #252624

#제출 시각아이디문제언어결과실행 시간메모리
252624Dilshod_ImomovRectangles (IOI19_rect)C++17
컴파일 에러
0 ms0 KiB
# include <bits/stdc++.h> # include "rect.h"a # define ll long long using namespace std; const int N = 707; // bool dp[N][N][N]; // dp[i][j][i1] = 0/1; 1-> can create a rect starting from i,j ending at i1, j long long count_rectangles(vector<vector<int> > a) { int n = a.size(), m = a[0].size(), ans = 0; for ( int i = 1; i < n - 1; i++ ) { for ( int j = 1; j < m - 1; j++ ) { for ( int i1 = i; i1 < n - 1; i1++ ) { for ( int j1 = j; j1 < m - 1; j1++ ) { int ok = 1; for ( int x = i; x <= i1; x++ ) { for ( int y = j; y <= j1; y++ ) { int A = a[i - 1][y], B = a[i1 + 1][y]; int C = a[x][j - 1], D = a[x][j1 + 1]; int z = a[x][y]; if ( z > A || z > B || z > C || z > D ) { ok = 0; break; } } if ( !ok ) { break; } } ans += ok; } } } } return ans; } /* int32_t main() { int n, m; cin >> n >> m; vector < vector < int > > a; for ( int i = 0; i < n; i++ ) { vector < int > vc; for ( int j = 0; j < m; j++ ) { int x; cin >> x; vc.push_back( x ); } a.push_back( vc ); } cout << count_rectangles(a); } /* 6 5 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 */

컴파일 시 표준 에러 (stderr) 메시지

rect.cpp:2:11: error: #include expects "FILENAME" or <FILENAME>
 # include "rect.h"a
           ^~~~~~~~~
rect.cpp:54:1: warning: "/*" within comment [-Wcomment]
 /*