제출 #644503

#제출 시각아이디문제언어결과실행 시간메모리
644503a_aguiloRectangles (IOI19_rect)C++14
37 / 100
5080 ms39556 KiB
#include "rect.h" #include<bits/stdc++.h> using namespace std; vector<vector<int>> Map; bool possible(int r1, int r2, int c1, int c2){ for(int x = r1; x <= r2; ++x){ for(int y = c1; y <= c2; ++y){ if(Map[x][y]>= Map[x][c1-1] or Map[x][y]>= Map[x][c2+1] or Map[x][y]>= Map[r1-1][y] or Map[x][y]>= Map[r2+1][y]) return false; } } return true; } long long count_rectangles(std::vector<std::vector<int> > a) { Map = a; long long ans = 0; for(int r1 = 1; r1 < a.size()-1; ++r1){ for(int r2 = r1; r2 < a.size()-1; ++r2){ for(int c1 = 1; c1 < a[0].size()-1; ++c1){ for(int c2 = c1; c2 < a[0].size()-1; ++c2){ if(possible(r1, r2, c1, c2)) ans++; } } } } return ans; }

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

rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:20:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |  for(int r1 = 1; r1 < a.size()-1; ++r1){
      |                  ~~~^~~~~~~~~~~~
rect.cpp:21:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |         for(int r2 = r1; r2 < a.size()-1; ++r2){
      |                          ~~~^~~~~~~~~~~~
rect.cpp:22:32: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   22 |             for(int c1 = 1; c1 < a[0].size()-1; ++c1){
      |                             ~~~^~~~~~~~~~~~~~~
rect.cpp:23:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |                 for(int c2 = c1; c2 < a[0].size()-1; ++c2){
      |                                  ~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...