제출 #723104

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

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

rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:6:6: warning: unused variable 'n' [-Wunused-variable]
    6 |  int n = g.size(), m = g[0].size();
      |      ^
#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...