F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39117632_9651.cpp: In function 'void update(int, int, int)':
0_0_39117632_9651.cpp:39:25: error: 'max' was not declared in this scope
   39 |         tree[now].val = max(tree[now << 1].val, tree[now << 1 | 1].val);
      |                         ^~~
0_0_39117632_9651.cpp:39:25: note: suggested alternatives:
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:61,
                 from .\stdc++.h:51:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:5805:5: note:   'std::max'
 5805 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:63:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_algo.h:2928:29: note:   'std::ranges::max'
 2928 |   inline constexpr __max_fn max{};
      |                             ^~~
0_0_39117632_9651.cpp: In function 'int main()':
0_0_39117632_9651.cpp:44:39: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   44 |     std::ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
      |                                       ^~~
      |                                       std::cin
In file included from .\stdc++.h:146:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
0_0_39117632_9651.cpp:44:51: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   44 |     std::ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
      |                                                   ^~~~
      |                                                   std::cout
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
0_0_39117632_9651.cpp:55:9: error: 'sort' was not declared in this scope
   55 |         sort(c + 1, c + j);
      |         ^~~~
0_0_39117632_9651.cpp:55:9: note: suggested alternatives:
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:73:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/pstl/glue_algorithm_defs.h:296:1: note:   'std::sort'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_algo.h:1801:30: note:   'std::ranges::sort'
 1801 |   inline constexpr __sort_fn sort{};
      |                              ^~~~
0_0_39117632_9651.cpp:56:13: error: 'unique' was not declared in this scope
   56 |         M = unique(c + 1, c + j) - c - 1;
      |             ^~~~~~
0_0_39117632_9651.cpp:56:13: note: suggested alternatives:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/pstl/glue_algorithm_defs.h:234:1: note:   'std::unique'
  234 | unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
      | ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_algo.h:1153:32: note:   'std::ranges::unique'
 1153 |   inline constexpr __unique_fn unique{};
      |                                ^~~~~~
0_0_39117632_9651.cpp:60:17: error: 'lower_bound' was not declared in this scope
   60 |             d = lower_bound(c + 1, c + 1 + M, a[i]) - c;
      |                 ^~~~~~~~~~~
0_0_39117632_9651.cpp:60:17: note: suggested alternatives:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:2005:5: note:   'std::lower_bound'
 2005 |     lower_bound(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_algo.h:2091:37: note:   'std::ranges::lower_bound'
 2091 |   inline constexpr __lower_bound_fn lower_bound{};
      |                                     ^~~~~~~~~~~
0_0_39117632_9651.cpp:64:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   64 |         cout << tree[1].val << endl;
      |                                ^~~~
      |                                std::endl
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/unique_ptr.h:42,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/memory:78,
                 from .\stdc++.h:56:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:735:5: note: 'std::endl' declared here
  735 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-02-16 19:28:15, Gzip enabled