Submission #00098


ソースコード

ステータス

項目 データ
問題 0005 - 2つの仕切り
ユーザー名 tantanmen
投稿日時 2020-12-30 18:10:39
言語 C++
状態 Compile Error
得点 0
ソースコード長 4897 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp:6:7: error: expected nested-name-specifier before ‘ll’
 using ll = long long;
       ^~
./Main.cpp:24:1: error: ‘constexpr’ does not name a type; did you mean ‘ucontext’?
 constexpr int INF  = 0x3f3f3f3f;
 ^~~~~~~~~
 ucontext
./Main.cpp:24:1: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
./Main.cpp:58:27: warning: variadic templates only available with -std=c++11 or -std=gnu++11
 template<class Head, class... Tail> void IN(Head &head, Tail &... tail)
                           ^~~
./Main.cpp:58:67: warning: variadic templates only available with -std=c++11 or -std=gnu++11
 template<class Head, class... Tail> void IN(Head &head, Tail &... tail)
                                                                   ^~~~
./Main.cpp: In function ‘void view(const std::vector<_Tp>&)’:
./Main.cpp:65:73: error: ISO C++ forbids declaration of ‘e’ with no type [-fpermissive]
 template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
                                                                         ^
./Main.cpp:65:77: warning: range-based ‘for’ loops only available with -std=c++11 or -std=gnu++11
 template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
                                                                             ^
./Main.cpp: In function ‘void view(const std::vector<std::vector<_Tp> >&)’:
./Main.cpp:66:89: error: ISO C++ forbids declaration of ‘v’ with no type [-fpermissive]
 template<typename T> void view(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ view(v); } }
                                                                                         ^
./Main.cpp:66:93: warning: range-based ‘for’ loops only available with -std=c++11 or -std=gnu++11
 template<typename T> void view(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ view(v); } }
                                                                                             ^~
./Main.cpp: At global scope:
./Main.cpp:69:28: warning: variadic templates only available with -std=c++11 or -std=gnu++11
 template <class Head, class... Tail> void dump(Head head, Tail... tail) {
                            ^~~
./Main.cpp:69:67: warning: variadic templates only available with -std=c++11 or -std=gnu++11
 template <class Head, class... Tail> void dump(Head head, Tail... tail) {
                                                                   ^~~~
./Main.cpp: In function ‘int main()’:
./Main.cpp:45:5: error: ‘ll’ was not declared in this scope
     ll __VA_ARGS__;                                                                                                                                            \
     ^~
./Main.cpp:92:5: note: in expansion of macro ‘LL’
     LL(n, k);
     ^~
./Main.cpp:45:5: note: suggested alternative: ‘vll’
     ll __VA_ARGS__;                                                                                                                                            \
     ^~
./Main.cpp:92:5: note: in expansion of macro ‘LL’
     LL(n, k);
     ^~
./Main.cpp:92:8: error: ‘n’ was not declared in this scope
     LL(n, k);
        ^
./Main.cpp:46:8: note: in definition of macro ‘LL’
     IN(__VA_ARGS__)
        ^~~~~~~~~~~
./Main.cpp:92:8: note: suggested alternative: ‘yn’
     LL(n, k);
        ^
./Main.cpp:46:8: note: in definition of macro ‘LL’
     IN(__VA_ARGS__)
        ^~~~~~~~~~~
./Main.cpp:92:11: error: ‘k’ was not declared in this scope
     LL(n, k);
           ^
./Main.cpp:46:8: note: in definition of macro ‘LL’
     IN(__VA_ARGS__)
        ^~~~~~~~~~~
./Main.cpp:93:14: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
     vector<ll> a(n);
              ^
./Main.cpp:93:14: note:   expected a type, got ‘ll’
./Main.cpp:93:14: error: template argument 2 is invalid
./Main.cpp:94:14: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
     vector<ll> b(n);
              ^
./Main.cpp:94:14: note:   expected a type, got ‘ll’
./Main.cpp:94:14: error: template argument 2 is invalid
./Main.cpp:95:9: error: expected ‘;’ before ‘i’
     rep(i,n){
         ^
./Main.cpp:13:25: note: in definition of macro ‘rep’
 #define rep(i,n) for(ll i=0; i<(n); i++)
                         ^
./Main.cpp:95:9: error: ‘i’ was not declared in this scope
     rep(i,n){
         ^
./Main.cpp:13:30: note: in definition of macro ‘rep’
 #define rep(i,n) for(ll i=0; i<(n); i++)
                              ^
./Main.cpp:101:7: error: expected ‘;’ before ‘left’
     ll left = 0, right = n-1;
       ^~~~~
       ;
./Main.cpp:104:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
         if(a[left]+a[right]>=k){
                  ^
./Main.cpp:104:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
         if(a[left]+a[right]>=k){
                           ^
./Main.cpp:104:19: error: invalid operands of types ‘std::ios_base&(std::ios_base&)’ and ‘std::ios_base&(std::ios_base&)’ to binary ‘operator+’
         if(a[left]+a[right]>=k){
            ~~~~~~~^~~~~~~~~
./Main.cpp:105:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
             if(left==0) drop(b[right]);
                                     ^
./Main.cpp:17:25: note: in definition of macro ‘drop’
 #define drop(s) cout << s << endk, exit(0)
                         ^
./Main.cpp:106:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
             else drop(b[right]-b[left-1]);
                              ^
./Main.cpp:17:25: note: in definition of macro ‘drop’
 #define drop(s) cout << s << endk, exit(0)
                         ^
./Main.cpp:106:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
             else drop(b[right]-b[left-1]);
                                  ~~~~^~
./Main.cpp:17:25: note: in definition of macro ‘drop’
 #define drop(s) cout << s << endk, exit(0)
                         ^
./Main.cpp:106:40: warning: pointer to a function used in arithmetic [-Wpointer-arith]
             else drop(b[right]-b[left-1]);
                                        ^
./Main.cpp:17:25: note: in definition of macro ‘drop’
 #define drop(s) cout << s << endk, exit(0)
                         ^
./Main.cpp:106:31: error: ISO C++ forbids using pointer to a function in subtraction [-fpermissive]
             else drop(b[right]-b[left-1]);
                       ~~~~~~~~^~~~~~~~~~
./Main.cpp:17:25: note: in definition of macro ‘drop’
 #define drop(s) cout << s << endk, exit(0)
                         ^
./Main.cpp:108:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
         if(a[left]<a[right]) left++;
                  ^
./Main.cpp:108:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
         if(a[left]<a[right]) left++;
                           ^
./Main.cpp:108:34: warning: ISO C++ forbids incrementing a pointer of type ‘std::ios_base& (*)(std::ios_base&)’ [-Wpointer-arith]
         if(a[left]<a[right]) left++;
                                  ^~
./Main.cpp:108:34: error: lvalue required as increment operand
./Main.cpp:109:19: warning: ISO C++ forbids decrementing a pointer of type ‘std::ios_base& (*)(std::ios_base&)’ [-Wpointer-arith]
         else right--;
                   ^~
./Main.cpp:109:19: error: lvalue required as decrement operand

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #