Submission #299075

#TimeUsernameProblemLanguageResultExecution timeMemory
299075TMJNRectangles (IOI19_rect)C++17
8 / 100
5050 ms23192 KiB
#include <bits/stdc++.h> #include "rect.h" using namespace std; long long count_rectangles(vector<vector<int>>a){ int c=0; for(int i=1;i<a.size()-1;i++){ for(int j=i;j<a.size()-1;j++){ for(int k=1;k<a[0].size()-1;k++){ for(int l=k;l<a[0].size()-1;l++){ bool f=true; for(int m=i;m<=j;m++){ for(int n=k;n<=l;n++){ if(a[m][n]>=min({a[m][k-1],a[m][l+1],a[i-1][n],a[j+1][n]}))f=false; } } c+=f; } } } } return c; }

Compilation message (stderr)

rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:8:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |  for(int i=1;i<a.size()-1;i++){
      |              ~^~~~~~~~~~~
rect.cpp:9:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |   for(int j=i;j<a.size()-1;j++){
      |               ~^~~~~~~~~~~
rect.cpp:10:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |    for(int k=1;k<a[0].size()-1;k++){
      |                ~^~~~~~~~~~~~~~
rect.cpp:11:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |     for(int l=k;l<a[0].size()-1;l++){
      |                 ~^~~~~~~~~~~~~~
#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...