Language: C++

#include <iostream>
#include <string>
using namesqueryace std;
int main()
{
    int tangoNum;
    cin >> tangoNum;
    string tango[n];
    int temp[tangoNum][];
    int tempFlag[tangoNum];//とったかとってないか
    int kotae = 0;
    for (int i = 0; i < tangoNum; ++i)
    {
        cin >> tango[i];
        tempFlag[i] = 0;
    }
    int qNum;
    string query[qNum];
    int tangoFocus[qNum];
    for (int i = 0; i < tangoNum; ++i)
    {
        cin >> k[i];
        cin >> query[i];
    }
    for (int i = 0; i < qNum; ++i)
    {
        for (int j = 0; j < tangoNum; ++j)
        {
            for (int l = 0; l < tango[j].size(); ++l)//単語中の文字の位置
            {
                temp[j][l] = find(query[i].begin(),query[i].end(), tango[j][l]);
            }
        }
        for (int j = 0; j < tango[tangoFocus[i]].size(); ++j)//focus単語の文字数，上から何文字目か
        {
            for (int l = 0; l < tangoNum; ++l)//l番目の文字列と，前からj番目の文字と比較
            {
                if(temp[tangoFocus[i]][j]<temp[l][j] && tempFlag[l]==0){
                    kotae++;
                    tempFlag[l] = 1;
                }
            }
        }
        cout << kotae << endl;
        for (int j = 0; j < tangoNum; ++j)
        {
            tempFlag[j] = 0;
        }
        kotae = 0;
    }
    return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namesqueryace'
    3 | using namesqueryace std;
      |       ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     cin >> tangoNum;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:5: error: 'string' was not declared in this scope
    8 |     string tango[n];
      |     ^~~~~~
a.cc:8:5: 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:
/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:9:9: error: declaration of 'temp' as multidimensional array must have bounds for all dimensions except the first
    9 |     int temp[tangoNum][];
      |         ^~~~
a.cc:14:16: error: 'tango' was not declared in this scope; did you mean 'tangoNum'?
   14 |         cin >> tango[i];
      |                ^~~~~
      |                tangoNum
a.cc:18:11: error: expected ';' before 'query'
   18 |     string query[qNum];
      |           ^~~~~~
      |           ;
a.cc:22:16: error: 'k' was not declared in this scope
   22 |         cin >> k[i];
      |                ^
a.cc:23:16: error: 'query' was not declared in this scope
   23 |         cin >> query[i];
      |                ^~~~~
a.cc:29:33: error: 'tango' was not declared in this scope; did you mean 'tangoNum'?
   29 |             for (int l = 0; l < tango[j].size(); ++l)//単語中の文字の位置
      |                                 ^~~~~
      |                                 tangoNum
a.cc:31:17: error: 'temp' was not declared in this scope; did you mean 'tm'?
   31 |                 temp[j][l] = find(query[i].begin(),query[i].end(), tango[j][l]);
      |                 ^~~~
      |                 tm
a.cc:31:35: error: 'query' was not declared in this scope
   31 |                 temp[j][l] = find(query[i].begin(),query[i].end(), tango[j][l]);
      |                                   ^~~~~
a.cc:31:30: error: 'find' was not declared in this scope; did you mean 'std::find'?
   31 |                 temp[j][l] = find(query[i].begin(),query[i].end(), tango[j][l]);
      |                              ^~~~
      |                              std::find
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: 'std::find' declared here
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
a.cc:34:29: error: 'tango' was not declared in this scope; did you mean 'tangoNum'?
   34 |         for (int j = 0; j < tango[tangoFocus[i]].size(); ++j)//focus単語の文字数，上から何文字目か
      |                             ^~~~~
      |                             tangoNum
a.cc:38:20: error: 'temp' was not declared in this scope; did you mean 'tm'?
   38 |                 if(temp[tangoFocus[i]][j]<temp[l][j] && tempFlag[l]==0){
      |                    ^~~~
      |                    tm
a.cc:44:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   44 |         cout << kotae << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:44:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   44 |         cout << kotae << endl;
      |                          ^~~~
      |                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~