답안 #362477

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
362477 2021-02-03T10:42:32 Z MoldovanAndrei1 Vision Program (IOI19_vision) C++14
컴파일 오류
0 ms 0 KB
        for(int j = 0; j < W - K;j++)
        {
            NS.clear();
            NS.push_back(OP(l1,j));
            NS.push_back(OP(l1,j+K));
            int a=add_and(NS);
            poz++;
            r.push_back(poz);
        }
        int b=add_or(r);
    }
    if(c1 == c2)
    {
        std::vector<int>r;
        for(int i = 0 ;i < H-K;i++)
        {
            NS.clear();
            NS.push_back(OP(i,c1));
            NS.push_back(OP(i+K,c1));
            int a=add_and(NS);
            poz++;
            r.push_back(poz);
        }
        int b=add_or(r);
    }

}

Compilation message

vision.cpp:2:9: error: expected unqualified-id before 'for'
    2 |         for(int j = 0; j < W - K;j++)
      |         ^~~
vision.cpp:2:24: error: 'j' does not name a type
    2 |         for(int j = 0; j < W - K;j++)
      |                        ^
vision.cpp:2:34: error: 'j' does not name a type
    2 |         for(int j = 0; j < W - K;j++)
      |                                  ^
vision.cpp:11:22: error: 'r' was not declared in this scope
   11 |         int b=add_or(r);
      |                      ^
vision.cpp:11:15: error: 'add_or' was not declared in this scope
   11 |         int b=add_or(r);
      |               ^~~~~~
vision.cpp:12:5: error: expected declaration before '}' token
   12 |     }
      |     ^
vision.cpp:13:5: error: expected unqualified-id before 'if'
   13 |     if(c1 == c2)
      |     ^~
vision.cpp:28:1: error: expected declaration before '}' token
   28 | }
      | ^