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_39660824_9357.cpp: In function 'int main()':
0_0_39660824_9357.cpp:22:23: error: 'max' was not declared in this scope
   22 |             for(int j=max(0,i-6);j<=i-1;j++)
      |                       ^~~
0_0_39660824_9357.cpp:22:23: 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_39660824_9357.cpp:41:30: error: 'min' was not declared in this scope
   41 |                     int temp=min(n,j);
      |                              ^~~
0_0_39660824_9357.cpp:41:30: note: suggested alternatives:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:5785:5: note:   'std::min'
 5785 |     min(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++/bits/ranges_algo.h:39:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_util.h:733:29: note:   'std::ranges::min'
  733 |   inline constexpr __min_fn min{};
      |                             ^~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-16 17:59:29, Gzip enabled