제출 #415300

#제출 시각아이디문제언어결과실행 시간메모리
415300peuchRectangles (IOI19_rect)C++17
0 / 100
6 ms460 KiB
#include "rect.h" #include<bits/stdc++.h> using namespace std; long long count_rectangles(std::vector<std::vector<int> > a) { int n = a.size(); int m = a[0].size(); if(n == 3){ long long ans = 0; for(int i = 0; i < m - 1; i++){ int maxi = a[1][i]; for(int j = i; j < m - 1; j++){ if(a[1][j] >= a[0][j] || a[1][j] >= a[2][j]) break; maxi = max(a[1][j], maxi); if(maxi < a[1][i - 1] && maxi < a[1][j + 1]) ans++; } } return ans; } }

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

rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
   20 | }
      | ^
#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...