Submission #832810

#TimeUsernameProblemLanguageResultExecution timeMemory
832810Marco_EscandonRectangles (IOI19_rect)C++17
Compilation error
0 ms0 KiB
#include <cstdio>
#include <unistd.h>
#include <cassert>
#include <string>

using namespace std;
typedef long long ll;
long long count_rectangles(std::vector<std::vector<int> > a) {
    ll n=a[0].size();
    ll cont=0;
	for(int i=1; i<n; i++)
    {
        ll ma=0;
        for(int j=i; j<n-1; j++)
        {
            ma=max(ma,(ll)a[1][j]);
            if(a[1][j]>=a[0][j]||a[1][j]>=a[2][j])
                break;
            if(ma<a[1][i-1]&&ma<a[1][j+1])
                cont++;
        }
    }
    return cont;
}


class InputReader {

Compilation message (stderr)

rect.cpp:8:33: error: 'vector' is not a member of 'std'
    8 | long long count_rectangles(std::vector<std::vector<int> > a) {
      |                                 ^~~~~~
rect.cpp:5:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
    4 | #include <string>
  +++ |+#include <vector>
    5 | 
rect.cpp:8:45: error: 'vector' is not a member of 'std'
    8 | long long count_rectangles(std::vector<std::vector<int> > a) {
      |                                             ^~~~~~
rect.cpp:8:45: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
rect.cpp:8:52: error: expected primary-expression before 'int'
    8 | long long count_rectangles(std::vector<std::vector<int> > a) {
      |                                                    ^~~
rect.cpp:27:19: error: expected '}' at end of input
   27 | class InputReader {
      |                   ^
rect.cpp:27:19: error: expected unqualified-id at end of input