Submission #1042882

# Submission time Handle Problem Language Result Execution time Memory
1042882 2024-08-03T13:59:28 Z idas Rectangles (IOI19_rect) C++17
10 / 100
3 ms 424 KB
#include "rect.h"
#include "bits/stdc++.h"
#define FOR(i, begin, end) for(int i=(begin); i<(end); i++)

using namespace std;

int n, m;

long long count_rectangles(std::vector<std::vector<int> > a) {
	n=a.size(); m=a[0].size();

	if(n<=2) return 0;

	int ans=0;
	FOR(i, 1, m-1) {
		int mx=-1;
		FOR(j, i, m-1) {
			mx=max(mx, a[1][j]);
			if(a[0][j]<=a[1][j] || a[1][j]>=a[2][j]) break;
			if(a[1][i-1]>mx && mx<a[1][j+1]) ans++;
		}
	}

	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 348 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 352 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 424 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -