foo.cc: In function 'void Unique()':
foo.cc:30:8: error: 'head1' was not declared in this scope
   30 |     p1=head1;
      |        ^~~~~
foo.cc:31:8: error: 'head2' was not declared in this scope
   31 |     p2=head2;
      |        ^~~~~
foo.cc: In function 'int main()':
foo.cc:69:11: error: too many arguments to function 'void Unique()'
   69 |     Unique(head1);
      |     ~~~~~~^~~~~~~
foo.cc:25:6: note: declared here
   25 | void Unique()
      |      ^~~~~~
foo.cc:70:11: error: too many arguments to function 'void Unique()'
   70 |     Unique(head2);
      |     ~~~~~~^~~~~~~
foo.cc:25:6: note: declared here
   25 | void Unique()
      |      ^~~~~~
   
  
    [Hydro](https://hydro.ac)提供评测服务