Submission #161800

# Submission time Handle Problem Language Result Execution time Memory
161800 2019-11-04T12:40:08 Z andrew Rectangles (IOI19_rect) C++17
0 / 100
20 ms 376 KB
#include <bits/stdc++.h>
#include "rect.h"

#define fi first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>


using namespace std;
typedef long long ll;
typedef long double ld;
const ll MAXN = 1123456;
const ll N = 2e5;
long long count_rectangles(vector<vector<int> > a) {
    ll n = a.size(), m = a[0].size();
    if(n < 3)return 0;
    if(n == 3){
        int ans = 0, mx = 0;
        for(int i = 1; i < m - 1; i++){
            mx = 0;
            for(int j = i; j < m - 1; j++){
                mx = max(mx, a[1][j]);
                if(a[0][j] <= a[1][j] || a[2][j] <= a[1][j])continue;;
                if(a[1][i - 1] > mx && mx < a[1][j + 1])ans = max(ans, j - i + 1);
            }
        }
        return ans;
    }
	return 1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 376 KB Output is correct
2 Correct 6 ms 296 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Incorrect 20 ms 376 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -