Language: C++

#include <iostream>

int main(){
  int N;
  std::cin >> N;
  string s;
  std::vector<std::string> v;
  std::cin >> v;
  std::set<std::string> set;
  std::vector<std::string> result;
  for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
  {
      if (set.insert(*it).second)
          result.push_back(*it);
  }
  std::cout << result.length() << std::endl;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:8: error: 'vector' is not a member of 'std'
    7 |   std::vector<std::string> v;
      |        ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | 
a.cc:7:26: error: expected primary-expression before '>' token
    7 |   std::vector<std::string> v;
      |                          ^
a.cc:7:28: error: 'v' was not declared in this scope
    7 |   std::vector<std::string> v;
      |                            ^
a.cc:9:8: error: 'set' is not a member of 'std'
    9 |   std::set<std::string> set;
      |        ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    1 | #include <iostream>
  +++ |+#include <set>
    2 | 
a.cc:9:23: error: expected primary-expression before '>' token
    9 |   std::set<std::string> set;
      |                       ^
a.cc:9:25: error: 'set' was not declared in this scope; did you mean 'tzset'?
    9 |   std::set<std::string> set;
      |                         ^~~
      |                         tzset
a.cc:10:8: error: 'vector' is not a member of 'std'
   10 |   std::vector<std::string> result;
      |        ^~~~~~
a.cc:10:8: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:10:26: error: expected primary-expression before '>' token
   10 |   std::vector<std::string> result;
      |                          ^
a.cc:10:28: error: 'result' was not declared in this scope
   10 |   std::vector<std::string> result;
      |                            ^~~~~~
a.cc:11:13: error: 'vector' is not a member of 'std'
   11 |   for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
      |             ^~~~~~
a.cc:11:13: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:11:31: error: expected primary-expression before '>' token
   11 |   for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
      |                               ^
a.cc:11:34: error: '::iterator' has not been declared; did you mean 'std::iterator'?
   11 |   for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
      |                                  ^~~~~~~~
      |                                  std::iterator
In file included from /usr/include/c++/14/bits/stl_iterator_base_funcs.h:66,
                 from /usr/include/c++/14/string:47:
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: 'std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
a.cc:11:59: error: 'it' was not declared in this scope; did you mean 'int'?
   11 |   for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
      |                                                           ^~
      |                                                           int
a.cc:16:45: error: expected '}' at end of input
   16 |   std::cout << result.length() << std::endl;
      |                                             ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^