Submission #1030897

# Submission time Handle Problem Language Result Execution time Memory
1030897 2024-07-22T11:36:57 Z fv3 Rectangles (IOI19_rect) C++14
0 / 100
4 ms 484 KB
#include "rect.h"
#include <bits/stdc++.h>

using namespace std;
using namespace std;
typedef long long ll;

ll count_rectangles(vector<vector<int>> a) 
{
	const int N = a.size();
	const int M = a[0].size();

	ll res = 0;
	for (int i = 1; i < M - 1; i++)
	{
		int mx = 0;
		for (int j = i; j < M - 1; j++)
		{
			if (a[1][j] >= a[0][j] || a[1][j] >= a[2][j]) 
				break;
			mx = max(mx, a[1][j]);
			if (mx < a[1][i-1] && mx < a[1][j+1])
				res++;
		}
	}

	return res;
}

Compilation message

rect.cpp: In function 'll count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:10:12: warning: unused variable 'N' [-Wunused-variable]
   10 |  const int N = a.size();
      |            ^
# 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 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 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 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 348 KB Output is correct
2 Correct 3 ms 484 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 428 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Runtime error 0 ms 348 KB Execution killed with signal 11
11 Halted 0 ms 0 KB -
# 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 348 KB Output isn't correct
2 Halted 0 ms 0 KB -