제출 #619514

#제출 시각아이디문제언어결과실행 시간메모리
619514TimDeeRectangles (IOI19_rect)C++17
컴파일 에러
0 ms0 KiB
#include "rect.h" #include <bits/stdc++.h> using ll=long long; long long count_rectangles(std::vector<vector<int>>) { ll ans=0; for (ll i=0; i<1ll*200*200*200*200; ++i) { ans++; } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

rect.cpp:5:40: error: 'vector' was not declared in this scope
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                                        ^~~~~~
rect.cpp:5:40: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
                 from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/10/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
rect.cpp:5:50: error: template argument 1 is invalid
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                                                  ^~
rect.cpp:5:50: error: template argument 2 is invalid
rect.cpp:5:40: error: 'vector' was not declared in this scope
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                                        ^~~~~~
rect.cpp:5:40: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
                 from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/10/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
rect.cpp:5:50: error: template argument 1 is invalid
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                                                  ^~
rect.cpp:5:50: error: template argument 2 is invalid
rect.cpp:5:40: error: 'vector' was not declared in this scope
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                                        ^~~~~~
rect.cpp:5:40: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
                 from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/10/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
rect.cpp:5:50: error: template argument 1 is invalid
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                                                  ^~
rect.cpp:5:50: error: template argument 2 is invalid
rect.cpp:5:28: error: invalid template-id
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                            ^~~
rect.cpp:5:40: error: 'vector' was not declared in this scope
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                                        ^~~~~~
rect.cpp:5:40: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
                 from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/10/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
rect.cpp:5:52: error: 'long long int count_rectangles' redeclared as different kind of entity
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                                                    ^
In file included from rect.cpp:1:
rect.h:7:11: note: previous declaration 'long long int count_rectangles(std::vector<std::vector<int> >)'
    7 | long long count_rectangles(std::vector<std::vector<int> > a);
      |           ^~~~~~~~~~~~~~~~
rect.cpp:5:52: error: missing template arguments before ')' token
    5 | long long count_rectangles(std::vector<vector<int>>) {
      |                                                    ^