Language: C++



#include <iostream>
using namespace std;

int main()

{
a
    int N, AC_count = 0, WA_count = 0, TLE_count = 0, RE_count = 0;

    char array[100];

    cin >> N;
    if (N>=1 && N<=10^5){

    for (int i = 0; i < arraysize; i++)

    {

        cin >> array[i];

        if (array[i] == "AC")

            AC_count++;

        else if (array[i] == "WA")

            WA_count++;

        else if (array[i] == "TLE")

            TLE_count++;

        else if (array[i] == "RE")

            RE_count++;

    }}

    cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'a' was not declared in this scope
    9 | a
      | ^
a.cc:14:12: error: 'N' was not declared in this scope
   14 |     cin >> N;
      |            ^
a.cc:17:25: error: 'arraysize' was not declared in this scope
   17 |     for (int i = 0; i < arraysize; i++)
      |                         ^~~~~~~~~
a.cc:23:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |         if (array[i] == "AC")
      |             ~~~~~~~~~^~~~~~~
a.cc:25:13: error: 'AC_count' was not declared in this scope
   25 |             AC_count++;
      |             ^~~~~~~~
a.cc:27:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |         else if (array[i] == "WA")
      |                  ~~~~~~~~~^~~~~~~
a.cc:29:13: error: 'WA_count' was not declared in this scope
   29 |             WA_count++;
      |             ^~~~~~~~
a.cc:31:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |         else if (array[i] == "TLE")
      |                  ~~~~~~~~~^~~~~~~~
a.cc:33:13: error: 'TLE_count' was not declared in this scope
   33 |             TLE_count++;
      |             ^~~~~~~~~
a.cc:35:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   35 |         else if (array[i] == "RE")
      |                  ~~~~~~~~~^~~~~~~
a.cc:37:13: error: 'RE_count' was not declared in this scope
   37 |             RE_count++;
      |             ^~~~~~~~
a.cc:41:24: error: 'AC_count' was not declared in this scope
   41 |     cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;
      |                        ^~~~~~~~
a.cc:41:55: error: 'WA_count' was not declared in this scope
   41 |     cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;
      |                                                       ^~~~~~~~
a.cc:41:87: error: 'TLE_count' was not declared in this scope
   41 |     cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;
      |                                                                                       ^~~~~~~~~
a.cc:41:119: error: 'RE_count' was not declared in this scope
   41 |     cout << "AC X " << AC_count << endl << "WA X " << WA_count << endl << "TLE X " << TLE_count << endl << "RE X " << RE_count << endl;
      |                                                                                                                       ^~~~~~~~