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_39837695_3849.cpp:2:7: error: expected nested-name-specifier before 'timespace'
    2 | using timespace std;
      |       ^~~~~~~~~
0_0_39837695_3849.cpp:4:1: error: expected initializer before 'int'
    4 | int find_set(int x){
      | ^~~
0_0_39837695_3849.cpp: In function 'void merge_set(int, int)':
0_0_39837695_3849.cpp:8:15: error: 'min' was not declared in this scope
    8 |         int i=min(x,y);
      |               ^~~
0_0_39837695_3849.cpp:8:15: note: suggested alternatives:
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:51,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/locale_classes.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:44,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
                 from 0_0_39837695_3849.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:281:5: note:   'std::min'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/tuple:44,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/uses_allocator_args.h:38,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/memory_resource.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:58:
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{};
      |                             ^~~
0_0_39837695_3849.cpp:9:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
    9 |         int j=max(x,y);
      |               ^~~
      |               std::max
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
0_0_39837695_3849.cpp:10:11: error: 'find_set' was not declared in this scope
   10 |         i=find_set(i);
      |           ^~~~~~~~
0_0_39837695_3849.cpp:12:18: error: 'root' was not declared in this scope
   12 |         if(i!=j) root(j)=i;
      |                  ^~~~
0_0_39837695_3849.cpp: In function 'int main()':
0_0_39837695_3849.cpp:16:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   16 |     cin>>T;
      |     ^~~
      |     std::cin
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_39837695_3849.cpp:21:13: error: 'root' was not declared in this scope
   21 |             root[i] = i;
      |             ^~~~
0_0_39837695_3849.cpp:30:19: error: 'root' was not declared in this scope
   30 |             if(i==root[i])
      |                   ^~~~
0_0_39837695_3849.cpp:33:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   33 |         cout<<result<<endl;
      |         ^~~~
      |         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_39837695_3849.cpp:33:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   33 |         cout<<result<<endl;
      |                       ^~~~
      |                       std::endl
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-01-10 21:29:43, Gzip enabled