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_38918499_26384.cpp: In function 'int main()':
0_0_38918499_26384.cpp:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> T;
      |         ^~~
0_0_38918499_26384.cpp:9:51: error: 'a' was not declared in this scope
    9 |                 for(int i = 1; i < n; i++) cin >> a[i];
      |                                                   ^
0_0_38918499_26384.cpp:10:24: error: 'o' was not declared in this scope
   10 |                 memset(o, 0, sizeof(o));
      |                        ^
0_0_38918499_26384.cpp:10:17: error: 'memset' was not declared in this scope
   10 |                 memset(o, 0, sizeof(o));
      |                 ^~~~~~
0_0_38918499_26384.cpp:1:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
  +++ |+#include <cstring>
    1 | int main()
0_0_38918499_26384.cpp:13:44: error: 'fa' was not declared in this scope
   13 |                 for(int i = 0; i < n; i++) fa[i] = i;
      |                                            ^~
0_0_38918499_26384.cpp:16:36: error: 'a' was not declared in this scope
   16 |                                 if(a[i][j] == '0'){
      |                                    ^
0_0_38918499_26384.cpp:17:44: error: 'Find' was not declared in this scope
   17 |                                         if(Find(i) != Find(j)) fa[Find(i)] = Find(j);
      |                                            ^~~~
0_0_38918499_26384.cpp:17:64: error: 'fa' was not declared in this scope
   17 |                                         if(Find(i) != Find(j)) fa[Find(i)] = Find(j);
      |                                                                ^~
0_0_38918499_26384.cpp:27:25: error: 'cout' was not declared in this scope
   27 |                         cout << -1 << endl;
      |                         ^~~~
0_0_38918499_26384.cpp:27:39: error: 'endl' was not declared in this scope
   27 |                         cout << -1 << endl;
      |                                       ^~~~
0_0_38918499_26384.cpp:31:25: error: 'cout' was not declared in this scope
   31 |                         cout << -1 << endl;
      |                         ^~~~
0_0_38918499_26384.cpp:31:39: error: 'endl' was not declared in this scope
   31 |                         cout << -1 << endl;
      |                                       ^~~~
0_0_38918499_26384.cpp:39:30: error: 'Find' was not declared in this scope
   39 |                         if(o[Find(i)] != 0){
      |                              ^~~~
0_0_38918499_26384.cpp:45:17: error: 'cout' was not declared in this scope
   45 |                 cout << res << endl;
      |                 ^~~~
0_0_38918499_26384.cpp:45:32: error: 'endl' was not declared in this scope
   45 |                 cout << res << endl;
      |                                ^~~~


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-23 06:31:31, Gzip enabled