criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
using namespace std;

int main() {
    // input
    int N;
    cin >> N;
    int F[N][10];
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < 10; ++j) {
            cin >> F[i][j];
        }
    }
    int P[N][11];
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < 11; ++j) {
            cin >> P[i][j];
        }
    }

    // solve
    int ans = 0, max = -1000;

    for (int i = 0; i < N; ++i) {
        for (int j = 1; j < 11; ++j) {
            max = max(max, P[i][j]);
        }
        ans += max;
        max = -1000;
    }

    // output
    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: 'max' cannot be used as a function
   26 |             max = max(max, P[i][j]);
      |                   ~~~^~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    // input
    int N;
    cin >> N;
    int F[N][10];
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < 10; ++j) {
            cin >> F[i][j];
        }
    }
    int P[N][11];
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < 11; ++j) {
            cin >> P[i][j];
        }
    }

    // solve
    int ans = 0, max = -1000;

    for (int i = 0; i < N; ++i) {
        for (int j = 1; j < 11; ++j) {
            max = max(max, P[i][j]);
        }
        ans += max;
        tmp = -1000;
    }

    // output
    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: 'max' cannot be used as a function
   26 |             max = max(max, P[i][j]);
      |                   ~~~^~~~~~~~~~~~~~
a.cc:29:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   29 |         tmp = -1000;
      |         ^~~
      |         tm
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int vis[105][15];
int m[105][15];
int a[15];
int tmp[10];
int main() {
    int n;
    cin >> n;
    memset(tmp, 0, sizeof(0));
    for(int i=0; i<n; i++) {
        for(int j=0; j<10; j++) {
            cin >> vis[i][j];
            if(vis[i][j]) tmp[i]++;
        }
    }
    int ans = 0;
    for(int i=0; i<n; i++) {
        for(int j=0; j<11; j++) {
            cin >> m[i][j];
        }
    }
    for(int i=0; i<n; i++) {
        ans += m[i][tmp[i]];
    }
    for(int i=1; i<1024; i++) {
        int num = i;
        int k = 9;
        while(k >= 0) {
            a[k--] = num%2;
            num /= 2;
        }
        int tans = 0;
        for(int i=0; i<n; i++) {
            int t = 0;
            for(int j=0; j<10; j++) {
                if(a[j] == 1 && vis[i][j] == 1) {
                    t++;
                }
            }
            tans += m[i][t];
        }
        ans = max(ans, tans);
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'memset' was not declared in this scope
   13 |     memset(tmp, 0, sizeof(0));
      |     ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 |
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
        int N;
	int a[N-1][9];
	int b[N-1][10];
	int c[9];
	long long int x = -10000000000;
    cin >> N ;
	for (int i = 0;i < N; i++){
	cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
}	for (int n = 0;n < N; n++){
	cin >> b[n][0] >> b[n][1] >> b[n][2] >> b[n][3] >> b[n][4] >> b[n][5] >> b[n][6] >> b[n][7] >> b[n][8] >> b[n][9] >> b[n][10] ;
}
	for(int j = 0;j < 1024; j++){
	for(int k = 0;k < 10;k++){
	c[k]=j%2;
	j = j-c[k]/2;
}
int a = 0;
int sum = 0;
for(int l = 0;l < N;l++){
for(int m = 0;l < 10;l++){
a = a + (a[l][m])*(c[m]);
}
sum = sum + b[l][a];
}
x = max( x ,sum );
}
           cout << x << endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: invalid types 'int[int]' for array subscript
   27 | a = a + (a[l][m])*(c[m]);
      |           ^
a.cc:31:8: error: no matching function for call to 'max(long long int&, int&)'
   31 | x = max( x ,sum );
      |     ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_tree.h:63,
                 from /usr/include/c++/14/map:62,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:31:8: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   31 | x = max( x ,sum );
      |     ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
        int N;
	int a[N-1][9];
	int b[N-1][10];
	int c[9];
	int x = -10000000000;
    cin >> N ;
	for (int i = 0;i < N; i++){
	cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
}	for (int n = 0;n < N; n++){
	cin >> b[n][0] >> b[n][1] >> b[n][2] >> b[n][3] >> b[n][4] >> b[n][5] >> b[n][6] >> b[n][7] >> b[n][8] >> b[n][9] >> b[n][10] ;
}
	for(int j = 0;j < 1024; j++){
	for(int k = 0;k < 10;k++){
	c[k]=j%2;
	j = j-c[k]/2;
}
int a = 0;
int sum = 0;
for(int l = 0;l < N;l++){
for(int m = 0;l < 10;l++){
a = a + a[l][m]*c[m];
}
sum = sum + b[l][a];
}
x = max( x ,sum );
}
           cout << x << endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: warning: overflow in conversion from 'long int' to 'int' changes value from '-10000000000' to '-1410065408' [-Woverflow]
   11 |         int x = -10000000000;
      |                 ^~~~~~~~~~~~
a.cc:27:10: error: invalid types 'int[int]' for array subscript
   27 | a = a + a[l][m]*c[m];
      |          ^
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
        int N;
	int a[N-1][9];
	long long int b[N-1][10];
	int c[9];
	long long int x = -10000000000;
    cin >> N ;
	for (int i = 0;i < N; i++){
	cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
}	for (int n = 0;n < N; n++){
	cin >> b[n][0] >> b[n][1] >> b[n][2] >> b[n][3] >> b[n][4] >> b[n][5] >> b[n][6] >> b[n][7] >> b[n][8] >> b[n][9] >> b[n][10] ;
}
	for(int j = 0;j < 1024; j++){
	for(int k = 0;k < 10;k++){
	c[k]=j%2;
	j = j-c[k]/2;
}
int a = 0;
int sum = 0;
for(int l = 0;l < N;l++){
for(int m = 0;l < 10;l++){
a = a + a[l][m]*c[m];
}
sum = sum + b[l][a];
}
x = max( x ,sum );
}
           cout << x << endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:27:10: error: invalid types 'int[int]' for array subscript
   27 | a = a + a[l][m]*c[m];
      |          ^
a.cc:31:8: error: no matching function for call to 'max(long long int&, int&)'
   31 | x = max( x ,sum );
      |     ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_tree.h:63,
                 from /usr/include/c++/14/map:62,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:31:8: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   31 | x = max( x ,sum );
      |     ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <iostream>
#include <cstring>
using namespace std;

int F[100][10];
int P[100][11];
int N;

int main()
{
	cin >> N;
	
	memset(F, 0, sizeof(F));
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 10; j++) {
			cin >> F[i][j];
		}
	}
	
	memset(P, 0, sizeof(P));
	for (int i = 0; i < N; i++) {
		for (int j = 0; j <= 10; j++) {
			cin >> P[i][j];
		}
	}
	
	int num = 0;
	int ind = 0;

	int ans = 0;

	int max = 0;

	for (int i = 1; i <= 1024; i++) {
		ind = i;
		for (int j = 0; j < N; j++) {
			for (int k = 9; k >=0; k--) {
				num += (ind / pow(2, k)) * F[j][k];
				ind = ind % (int)pow(2, k);
			}
			ans += P[j][num];
			ind = i;
			num = 0;
		}
		if (i == 1) max = ans;
		else if (max < ans) {
			max = ans;
		}
		num = 0;
		ans = 0;
	}

	cout << max << endl;

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:38:47: error: 'pow' was not declared in this scope
   38 |                                 num += (ind / pow(2, k)) * F[j][k];
      |                                               ^~~
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
        int N;
	nums a[N-1][9];
	long long nums b[N-1][10];
	nums c[9];
	long long int max = -10000000000;
    cin >> N ;
	for (int i = 0;i < N; i++){
	cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
}	for (int n = 0;n < N; n++){
	cin >> b[n][0] >> b[n][1] >> b[n][2] >> b[n][3] >> b[n][4] >> b[n][5] >> b[n][6] >> b[n][7] >> b[n][8] >> b[n][9] >> b[n][10] ;
}
	for(int j = 0;j < 1024; j++){
	for(int k = 0;k < 10;k++){
	c[k]=j%2;
	j = j-c[k]/2;
}
int a = 0;
int sum = 0;
for(int l = 0;l < N;l++){
for(int m = 0;l < 10;l++){
a = a + a[l][m]*c[m];
}
sum = sum + b[l][a];
}
max = max( max ,sum );
}
           cout << max << endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'nums' was not declared in this scope
    8 |         nums a[N-1][9];
      |         ^~~~
a.cc:9:24: error: expected initializer before 'b'
    9 |         long long nums b[N-1][10];
      |                        ^
a.cc:10:13: error: expected ';' before 'c'
   10 |         nums c[9];
      |             ^~
      |             ;
a.cc:14:16: error: 'a' was not declared in this scope
   14 |         cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
      |                ^
a.cc:16:16: error: 'b' was not declared in this scope
   16 |         cin >> b[n][0] >> b[n][1] >> b[n][2] >> b[n][3] >> b[n][4] >> b[n][5] >> b[n][6] >> b[n][7] >> b[n][8] >> b[n][9] >> b[n][10] ;
      |                ^
a.cc:20:9: error: 'c' was not declared in this scope
   20 |         c[k]=j%2;
      |         ^
a.cc:27:10: error: invalid types 'int[int]' for array subscript
   27 | a = a + a[l][m]*c[m];
      |          ^
a.cc:27:17: error: 'c' was not declared in this scope
   27 | a = a + a[l][m]*c[m];
      |                 ^
a.cc:29:13: error: 'b' was not declared in this scope
   29 | sum = sum + b[l][a];
      |             ^
a.cc:31:10: error: 'max' cannot be used as a function
   31 | max = max( max ,sum );
      |       ~~~^~~~~~~~~~~~
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
        int N;
	vector a[N-1][9];
	long long vector b[N-1][10];
	vector c[9];
	long long int max = -10000000000;
    cin >> N ;
	for (int i = 0;i < N; i++){
	cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
}	for (int n = 0;n < N; n++){
	cin >> b[n][0] >> b[n][1] >> b[n][2] >> b[n][3] >> b[n][4] >> b[n][5] >> b[n][6] >> b[n][7] >> b[n][8] >> b[n][9] >> b[n][10] ;
}
	for(int j = 0;j < 1024; j++){
	for(int k = 0;k < 10;k++){
	c[k]=j%2;
	j = j-c[k]/2;
}
int a = 0;
int sum = 0;
for(int l = 0;l < N;l++){
for(int m = 0;l < 10;l++){
a = a + a[l][m]*c[m];
}
sum = sum + b[l][a];
}
max = max( max ,sum );
}
           cout << max << endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector a[N-1][9];
      |         ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <iostream>
  +++ |+#include <vector>
    3 | 
a.cc:9:26: error: expected initializer before 'b'
    9 |         long long vector b[N-1][10];
      |                          ^
a.cc:10:15: error: expected ';' before 'c'
   10 |         vector c[9];
      |               ^~
      |               ;
a.cc:14:16: error: 'a' was not declared in this scope
   14 |         cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
      |                ^
a.cc:16:16: error: 'b' was not declared in this scope
   16 |         cin >> b[n][0] >> b[n][1] >> b[n][2] >> b[n][3] >> b[n][4] >> b[n][5] >> b[n][6] >> b[n][7] >> b[n][8] >> b[n][9] >> b[n][10] ;
      |                ^
a.cc:20:9: error: 'c' was not declared in this scope
   20 |         c[k]=j%2;
      |         ^
a.cc:27:10: error: invalid types 'int[int]' for array subscript
   27 | a = a + a[l][m]*c[m];
      |          ^
a.cc:27:17: error: 'c' was not declared in this scope
   27 | a = a + a[l][m]*c[m];
      |                 ^
a.cc:29:13: error: 'b' was not declared in this scope
   29 | sum = sum + b[l][a];
      |             ^
a.cc:31:10: error: 'max' cannot be used as a function
   31 | max = max( max ,sum );
      |       ~~~^~~~~~~~~~~~
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
        int N;
	int a[N-1][9];
	long long int b[N-1][10];
	int c[9];
	long long int max = -10000000000;
    cin >> N ;
	for (int i = 0;i < N; i++){
	cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
}	for (int n = 0;n < N; n++){
	cin >> b[n][0] >> b[n][1] >> b[n][2] >> b[n][3] >> b[n][4] >> b[n][5] >> b[n][6] >> b[n][7] >> b[n][8] >> b[n][9] >> b[n][10] ;
}
	for(int j = 0;j < 1024; j++){
	for(int k = 0;k < 10;k++){
	c[k]=j%2;
	j = j-c[k]/2;
}
int a = 0;
int sum = 0;
for(int l = 0;l < N;l++){
for(int m = 0;l < 10;l++){
a = a + a[l][m]*c[m];
}
sum = sum + b[l][a];
}
max = max( max ,sum );
}
           cout << max << endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:27:10: error: invalid types 'int[int]' for array subscript
   27 | a = a + a[l][m]*c[m];
      |          ^
a.cc:31:10: error: 'max' cannot be used as a function
   31 | max = max( max ,sum );
      |       ~~~^~~~~~~~~~~~
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
        int N;
	int a[N-1][9];
	long long int b[N-1][10];
	int c[9];
	long long int max = -10000000000;
    cin >> N ;
	for (int i = 0;i < N; i++){
	cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
}	for (int n = 0;n < N; n++){
	cin >> b[n][0] >> b[n][1] >> b[n][2] >> b[n][3] >> b[n][4] >> b[n][5] >> b[n][6] >> b[n][7] >> b[n][8] >> b[n][9] >> b[n][10] ;
}
	for(int j = 0;j < 1024; j++){
	for(int k = 0;k < 10;k++){
	c[k]=j%2;
	j = j-c[k]/2
}
int a = 0
int sum = 0
for(int l = 0;l < N;l++){
for(int m = 0;l < 10;l++){
a = a + a[l][m]*c[m];
}
sum = sum + b[l][a];
}
max = max( max ,sum );
}
           cout << max << endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: expected ';' before '}' token
   21 |         j = j-c[k]/2
      |                     ^
      |                     ;
   22 | }
      | ~                    
a.cc:24:1: error: expected ',' or ';' before 'int'
   24 | int sum = 0
      | ^~~
a.cc:25:15: error: 'l' was not declared in this scope
   25 | for(int l = 0;l < N;l++){
      |               ^
a.cc:31:17: error: 'sum' was not declared in this scope
   31 | max = max( max ,sum );
      |                 ^~~
a.cc:31:21: error: 'max' cannot be used as a function
   31 | max = max( max ,sum );
      |                     ^
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
        int N;
	int a[N-1][9];
	long long int b[N-1][10];
	int c[9];
	long long int max = -10000000000;
    cin >> N ;
	for (int i = 0;i < N; i++){
	cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
}	for (int n = 0;n < N; n++){
	cin >> b[i][0] >> b[i][1] >> b[i][2] >> b[i][3] >> b[i][4] >> b[i][5] >> b[i][6] >> b[i][7] >> b[i][8] >> b[i][9] >> b[i][10] ;
}
	while(int j = 0;j < 1024; j++){
	while(int k = 0;k < 10;k++){
	c[k]=j%2;
	j = j-c[k]/2
}
int a = 0
int sum = 0
while(int l = 0;l < N;l++){
while(int m = 0;l < 10;l++){
a = a + a[l][m]*c[m];
}
sum = sum + b[l][a];
}
max = max( max ,sum );
}
           cout << max << endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: 'i' was not declared in this scope
   16 |         cin >> b[i][0] >> b[i][1] >> b[i][2] >> b[i][3] >> b[i][4] >> b[i][5] >> b[i][6] >> b[i][7] >> b[i][8] >> b[i][9] >> b[i][10] ;
      |                  ^
a.cc:18:24: error: expected ')' before ';' token
   18 |         while(int j = 0;j < 1024; j++){
      |              ~         ^
      |                        )
a.cc:18:25: error: 'j' was not declared in this scope
   18 |         while(int j = 0;j < 1024; j++){
      |                         ^
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
        int N;
	int a[N][9];
	long long int b[N][10];
	int c[9];
	long long int max = -10000000000;
    cin >> N ;
	for (int i = 0;i < N; i++){
	cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4] >> a[i][5] >> a[i][6] >> a[i][7] >> a[i][8] >> a[i][9] ;
}	for (int i = 0;i < N; i++){
	cin >> b[i][0] >> b[i][1] >> b[i][2] >> b[i][3] >> b[i][4] >> b[i][5] >> b[i][6] >> b[i][7] >> b[i][8] >> b[i][9] >> b[i][10] ;
}
	while(int j = 0;j < 1024; j++){
	while(int k = 0;k < 10;k++){
	c[k]=j%2;
	j = j-c[k]/2
}
int a = 0
int sum = 0
while(int l = 0;l < N;l++){
while(int m = 0;l < 10;l++){
a = a + a[l][m]*c[m];
}
sum = sum + b[l][a];
}
max = max( max ,sum );
}
           cout << max << endl;
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected ')' before ';' token
   18 |         while(int j = 0;j < 1024; j++){
      |              ~         ^
      |                        )
a.cc:18:25: error: 'j' was not declared in this scope
   18 |         while(int j = 0;j < 1024; j++){
      |                         ^
Language: C

//#define DEBUG
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>

int N;
int F[100][10];
int P[100][11];
int select[10] = {0};
long long max=-9000000000000000000;

void maxPrice(int v) {
	int i, j;
	if (v != -1) {
		select[v] = 1;
		/*
		for (i = 0; i < 10; i++) {
			printf("%d ", select[i]);
		}
		printf("\n");
		//*/
		int s[100] = { 0 };
		for (i = 0; i < 10; i++) {
			if (select[i] == 1) {
				for (j = 0; j < N; j++) {
					if (F[j][i] == 1)s[j]++;
				}
			}
		}
		long long p = 0;
		for (i = 0; i < N; i++) {
			//printf("%d ", s[i]);
			//printf("P[%d][%d]=%d", i, s[i], P[i][s[i]]);
			p += P[i][s[i]];
		}
		if (max < p)max = p;
		//printf("max=%lld\n", max);
	}
	for (i = v + 1; i < 10; i++) {
		maxPrice(i);
	}
	if (v != -1)select[v] = 0;
}

int main() {
#ifdef DEBUG

#endif

	scanf("%d", &N);
	int i,j;
	for (i = 0; i < N; i++) {
		for (j = 0; j < 10; j++) {
			scanf("%d", &F[i][j]);
		}
	}
	for (i = 0; i < N; i++) {
		for (j = 0; j < 11; j++) {
			scanf("%d", &P[i][j]);
		}
	}

	maxPrice(-1);
	printf("%d\n", max);
}

Compiler output:
main.c:10:5: error: 'select' redeclared as different kind of symbol
   10 | int select[10] = {0};
      |     ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
                 from /usr/include/stdlib.h:514,
                 from main.c:4:
/usr/include/x86_64-linux-gnu/sys/select.h:102:12: note: previous declaration of 'select' with type 'int(int,  fd_set * restrict,  fd_set * restrict,  fd_set * restrict,  struct timeval * restrict)'
  102 | extern int select (int __nfds, fd_set *__restrict __readfds,
      |            ^~~~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int f[100][10] = {};
long long p[100][11] = {};
int n;
long long total = -1000000000000;

vector<int> v;
vector<int> ans;

long long calc_score(){
  long long tmp_toatal = 0;
  for (int i=0;i<n;i++) {
    int simul_open = 0;
    for (int j=0;j<10;j++) {
      if (v[j] == 1 && f[i][j] == 1) {
	simul_open++;
      }
    }
    tmp_total += p[i][simul_open];
  }
  return(tmp_total);
}

void dfs(int k){
  if (k==10) {
    int open_sum = 0;
    for (int i=0;i<10;i++) {
      open_sum += v[i];
    }
    if (open_sum > 0) {
      long long tmp_total = calc_score();
      if (tmp_total > total) {
	total = tmp_total;
      }
    }
    return;
  }
  v.push_back(1);
  dfs(k+1);
  v.pop_back();
  v.push_back(0);
  dfs(k+1);
  v.pop_back();
  return;
}

int main(){
  cin >> n;
  for (int i=0;i<n;i++) {
    for (int j=0;j<10;j++) {
      int tmp;
      cin >> tmp;
      f[i][j] = tmp;
    }
  }
  for (int i=0;i<n;i++) {
    for (int j=0;j<=10;j++) {
      long long tmp;
      cin >> tmp;
      p[i][j] = tmp;
    }
  }
  dfs(0);
  cout << total << endl;
  return(0);
}



Compiler output:
a.cc: In function 'long long int calc_score()':
a.cc:23:5: error: 'tmp_total' was not declared in this scope; did you mean 'tmp_toatal'?
   23 |     tmp_total += p[i][simul_open];
      |     ^~~~~~~~~
      |     tmp_toatal
a.cc:25:10: error: 'tmp_total' was not declared in this scope; did you mean 'tmp_toatal'?
   25 |   return(tmp_total);
      |          ^~~~~~~~~
      |          tmp_toatal
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    cin >> n;
    
    vector<vector<int>> shop = vector<vector<int>>(100, vector<int>(10, 0));
    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < 10; ++j)
        {
            cin >> shop[i][j];
        }
    }
    vector<vector<int>> gain = vector<vector<int>>(100, vector<int>(10, 0));
    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < 11; ++j)
        {
            cin >> gain[i][j];
        }
    }
    vector<int> map = vector<int>(1024, 0);
    
    for (int i = 0; i < 1024; ++i)
    {
        for (int j = 0; j < n; ++j)
        {
            int count = 0;
            for (int k = 0; k < 10; ++k)
            {
                int num = ((i >> k) & 1);
                if (num & shop[j][k])
                {
                    count++;
                }
            }
            map[i] += gain[j][count];
        }
    }
    int ret = INT_MIN;
    for (int i = 1; i < 1024; ++i)
    {
        ret = max(ret, map[i]);
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:15: error: 'INT_MIN' was not declared in this scope
   45 |     int ret = INT_MIN;
      |               ^~~~~~~
a.cc:4:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 |
Language: Java

import java.util.*;
import java.io.*;

public class AA {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		boolean[][] f = new boolean[n][10];

		for(int i = 0; i < n; ++i) {
			for(int j = 0; j < 10; ++j) {
				f[i][j] = in.nextInt() == 1;
			}
		}

		int[][] p = new int[n][11];
		for(int  i = 0; i < n ; ++i) {
			for(int j = 0; j < 11; ++j) {
				p[i][j] = in.nextInt();
			}
		}


		long max = Long.MIN_VALUE;
		for(int mask = 1; mask < 1024; ++mask) {

			long localMax = 0;
			for(int s = 0; s < n; ++s){
				int cnt = 0;
				for(int b = 0; b < 10; ++b) {
					if((mask & (1 << b)) != 0 && (f[s][b])) {
						++cnt;
					}
				}


				localMax += p[s][cnt];
			}

			
			max = Math.max(max, localMax);
		}

		System.out.println(max);

	}


}

Compiler output:
Main.java:4: error: class AA is public, should be declared in a file named AA.java
public class AA {
       ^
1 error
Language: C++

int main(){
int n;
int f[n][5][2];
int p[n][11];
scanf("%d",&n);
for(int i=0;i<n;i++){
	for(int j=0;j<5;j++){
		for(int k=0;k<2;k++){
			scanf("%d",&f[i][j][k]);
		}
	}
}
for(int i=0;i<n;i++){
	for(int j=0;j<11;j++){
		scanf("%d",&p[i][j]);
	}
}
int x=-2;
for(int i=0;i<9;i++){
	x=x*10;
}
int l=1;
for(int i=0;i<10;i++){
	l=l*2;
}

for(int i=1;i<l;i++){
	int c[n];
	for(int j=0;j<n;j++){
		c[j]=0;
	}
	int m=i;
	for(int j=0;j<5;j++){
		for(int k=0;k<2;k++){
			for(int q=0;q<n;q++){
				if(f[q][j][k]==1){
					c[q]=c[q]+m%2;
				}
			}
			m=m/2;
		}
	}
	int y=0;
	for(int j=0;j<n;j++){
		y=y+p[j][c[j]];
	}
	if(x<y){
		x=y;
	}
}
printf("%d\n",x);
		
	
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'scanf' was not declared in this scope
    5 | scanf("%d",&n);
      | ^~~~~
a.cc:51:1: error: 'printf' was not declared in this scope
   51 | printf("%d\n",x);
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
Language: C++

# pragma GCC optimize("O3")
# include <bits/stdc++.h>
std::pair<int,int> DR[] = {{-1,0},{0,1},{1,0},{0,-1},{-1,1},{-1,-1},{1,1},{1,-1}};
# define maxn 100005
# define ll long long
# define clock (clock() * 1000.0 / CLOCKS_PER_SEC)
# define rc(s) return cout << s,0
# define _ ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
# define db(x) cerr << #x << " = " << x << '\n'
# define pb push_back
# define mp make_pair
# define sz(x) (int)((x).size())
# define int ll
using namespace std;

int n,f[105][105],cnt[105],ans = -1e18,p[105][105];

int32_t main(){_
    //freopen("input","r",stdin);
	cin >> n;
	for(int i = 1;i <= n;i++)
	{
		for(int j = 0;j < 5;j++)
		{
			cin >> f[i][j] >> f[i][j + 5];
		}
	}
	for(int i = 1;i <= n;i++)
	{
		for(int j = 0;j <= 10;j++)
		{
			cin >> p[i][j];
		}
	}
	for(int mask = 1;mask < (1 << 10);mask++)
	{
		vector<int>vec;
		memset(cnt,0,sizeof(cnt));
		for(int j = 0;j < 10;j++)
		{
			if(mask & (1 << j))
			{
				for(int i = 1;i <= n;i++)
				{
					cnt[i] += f[i][j];
				}
			}
		}
		int x = 0;
		for(int i = 1;i <= n;i++) x += p[i][cnt[i]];
		ans = max(ans,x);
	}
	rc(ans);
}


Compiler output:
a.cc:35:38: error: extended character   is not valid in an identifier
   35 |         for(int mask = 1;mask < (1 << 10);mask++)
      |                                      ^
a.cc: In function 'int32_t main()':
a.cc:35:38: error: '\U000000a010' was not declared in this scope
   35 |         for(int mask = 1;mask < (1 << 10);mask++)
      |                                      ^~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <math.h>
#include <queue>
#include <stack>
#include <list>
#include <functional>

using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)

int bitsNum(int bits)
{
	bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
	bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
	bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
	bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
	return (bits & 0x0000ffff) + (bits >> 16 & 0x0000ffff);
}

int main() {

	int N;
	int F[123];
	int P[123][16];

	scanf("%d", &N);

	rep(i, N) {
		F[i] = 0;
		rep(j, 10) {
			int t;
			scanf("%d", &t);
			F[i] <<= 1;
			F[i] += t;
		}
	}

	rep(i, N) {
		rep(j, 11) {
			scanf("%d", &P[i][j]);
		}
	}

	long long int ans = (-9223372036854775807i64 - 1);
	rep(i, 1 << 10) {
		if (!i) continue;
		long long int t = 0;
		rep(j, N) {
			t += P[j][bitsNum(F[j] & i)];
		}
		ans = max(ans, t);
	}

	printf("%lld", ans);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:31: error: unable to find numeric literal operator 'operator""i64'
   51 |         long long int ans = (-9223372036854775807i64 - 1);
      |                               ^~~~~~~~~~~~~~~~~~~~~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <math.h>
#include <queue>
#include <stack>
#include <list>
#include <functional>

using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)

int bitsNum(int bits)
{
	bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
	bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
	bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
	bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
	return (bits & 0x0000ffff) + (bits >> 16 & 0x0000ffff);
}

int main() {

	int N;
	int F[123];
	int P[123][16];

	scanf("%d", &N);

	rep(i, N) {
		F[i] = 0;
		rep(j, 10) {
			int t;
			scanf("%d", &t);
			F[i] <<= 1;
			F[i] += t;
		}
	}

	rep(i, N) {
		rep(j, 11) {
			scanf("%d", &P[i][j]);
		}
	}

	long long int ans = LLONG_MIN;
	rep(i, 1 << 10) {
		if (!i) continue;
		long long int t = 0;
		rep(j, N) {
			t += P[j][bitsNum(F[j] & i)];
		}
		ans = max(ans, t);
	}

	printf("%lld", ans);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:29: error: 'LLONG_MIN' was not declared in this scope
   51 |         long long int ans = LLONG_MIN;
      |                             ^~~~~~~~~
a.cc:14:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   13 | #include <functional>
  +++ |+#include <climits>
   14 |
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;

int pc(int a) {
	int res = 0;
	while (a > 0) {
		res += a % 2;
		a /= 2;
	}
	return res;
}
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	cin >> N;
	vector<int> A(N, 0);
	vector<vector<int> >B(N, vector<int>(11));
	int res = 0;
	int a;
	for (int i = 0; i < N; i++) {
		A[i] = 0;
		for (int j = 0; j < 10; j++) {
			cin >> a;
			A[i] += a;
			A[i] *= 2;
		}
		A[i] /= 2;
	}
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 11; j++) {
			cin >> B[i][j];
		}
	}
	int res = -100000000;
	int sum = 0;
	for (int i = 1; i < ((int)1 << 10); i++) {
		sum = 0;
		for (int j = 0; j < N; j++) {
			sum += B[j][pc(i & A[j])];
		}
		res = max(res, sum);
	}
	cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:13: error: redeclaration of 'long long int res'
   46 |         int res = -100000000;
      |             ^~~
a.cc:30:13: note: 'long long int res' previously declared here
   30 |         int res = 0;
      |             ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

#define MOD 1000000007
#define ll long long int
#define vi vector<int>
#define vii vector< vector<int> >
#define PI 3.1415926535897932384626433832795
#define INF 9223372036854775807LL

bool open[105][11];
int profit[105][11];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	int n;
	cin >> n;
	for(int i = 1; i <= n; i++) {
		for(int d = 1; d <= 10; d++) {
			int x;
			cin >> x;
			open[i][d] = (x == 1);
		}
	}
	for(int i = 1; i <= n; i++) {
		for(int d = 1; d <= 10; d++) {
			cin >> profit[i][d];
		}
	}
	ll ans = 0;
	for(int open = 1; open < 2048; open++) {
		ll sum = 0;
		for(int i = 1; i <= 10; i++) {
			if(open&(1<<(i-1))) {
				for(int j = 1; j <= n; j++) {
					if(open[j][i]) {
						sum+= profit[j][i];
					}
				}
			}
		}
		ans = max(ans,sum);
	}
	cout << ans;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:37:48: error: invalid types 'int[int]' for array subscript
   37 |                                         if(open[j][i]) {
      |                                                ^
Language: C++

#include <bits/stdc++.h>
#if __has_include(<atcoder/all>)
    #include <atcoder/all>
#endif
using namespace std;
using namespace atcoder;
namespace defines{
    typedef long long ll;
    typedef pair<ll,ll> P;
    #define FOR(i,a,b) for(ll i = a ; i < b ; i++) // for i in range(a,b)
    #define REP(i,n) for(ll i = 0 ; i < n ; i++) // for i in range(b)
    #define FORD(i,a,b) for(ll i = a ; i > b ; i--) // for i in range(a,b,-1)
    #define ALL(x) x.begin(),x.end()
    template<class T> vector<T> make_vec(size_t a){return vector<T>(a);}
    template<class T, class... Ts> auto make_vec(size_t a, Ts... ts){ return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));}

    /* for debug print */
    #define DEBUG(x) cerr << #x << ": " << x << '\n'
    #define DEBUGP(x) cerr << #x << ": (" << x.first << ", " << x.second << ")" << '\n' 
    #define DEBUGL(xl) dbgl_f(#xl,xl)
    #define DEBUGLP(xl) dbglp_f(#xl,xl)
    #define DEBUGLL(xll) dbgll_f(#xll,xll)
    #define DEBUGM(xl) dbgm_f(#xl,xl)
    template<class T> void dbgl_f(string name, vector<T> xl){cerr<<name<<": "; for(T x: xl) cerr<<x<<" "; cerr << '\n';}
    template<class T, class U> void dbgm_f(string name, map<T,U> xl){cerr<<name<<": ";for(auto x: xl)cerr<<"("<<x.first<<": "<<x.second<<") ";cerr<<'\n';}
    template<class T> void dbglp_f(string name, vector<T> xl){cerr<<name<<": ";for(T x: xl)cerr<<"("<<x.first<<", "<< x.second<<") ";cerr<<'\n';}
    template<class T> void dbgll_f(string name, vector<vector<T>> xll){
        cerr<< name << ": " << '\n'; 
        for(vector<T> xl: xll){
            for(T x : xl) cerr << x << " ";
            cerr << '\n';
        }
    }
}
using namespace defines;

const int IINF = 1'001'001'001;
const ll INF = 1'001'001'001'001'001'001ll;
const int MOD = 1'000'000'007;


void solve(){
    int n,C; cin >> n >> C;
    vector<vector<P>> c_stl(C, vector<P>(0));
    REP(i,n){
        int s,t,c; cin >> s >> t >> c;
        c-=1;
        c_stl[c].push_back(P(s,t));
    }

    vector<vector<bool>> c_exist(C, vector<bool>(pow(10,5)+1, false));
    REP(c,C){
        for( P st : c_stl[c] ){
            int s = st.first;
            int t = st.second;
            FOR(i,s,t+1){
                c_exist[c][i] = true;
            }
        }
    }
    int max_c = 0;
    REP(t,pow(10,5)+1){
        int cnt = 0;
        REP(c,C){
            if(c_exist[c][t]) cnt++;
        }
        max_c = max(max_c,cnt);
    }
    cout << max_c << endl;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    solve();
}

Compiler output:
a.cc:6:17: error: 'atcoder' is not a namespace-name
    6 | using namespace atcoder;
      |                 ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int N,C;
  cin>>N>>C;
  int S[100010]={};
  int T[100010]={};
  //int s=0,t=0,c=0;
  for(int i=1;i<=N;i++){
    cin>>s>>t>>c;
    S[s]++;
    T[t]++;
  }
  int now=0;
  int maxnow=0;
  for(int i=1;i<=10000;i++){
    now+=S[i];
    //cout<<"#"<<i<<" "<<now<<endl;
    maxnow=max(maxnow,now);
    now-=T[i];
  }
  cout<<maxnow<<endl;
  return 0;
}

    
 

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 's' was not declared in this scope
   11 |     cin>>s>>t>>c;
      |          ^
a.cc:11:13: error: 't' was not declared in this scope
   11 |     cin>>s>>t>>c;
      |             ^
a.cc:11:16: error: 'c' was not declared in this scope
   11 |     cin>>s>>t>>c;
      |                ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<bool> vb;
typedef vector<char> vc;
#define INF __INT32_MAX__
#define LINF __LONG_LONG_MAX__

int main() {
    int N, M; cin >> N >> M;
    vi S(N), T(N), C(N); rep(i, N) { cin >> S[i] >> T[i] >> C[i]; }

    // const int N_MAX = 100005;
    const int N_MAX = 100;

    // 種類ごとに店にいた時刻を計測する
    // 各種類で求めた後に、全体で計算する

    vi mm(N_MAX);

    vi imos(N_MAX);
    for (int i = 1; i <= M; i++) {
        // 種類ごとに店にいた時刻を計測
        for (int j = 0; j < N_MAX; j++) imos[j] = 0;


        for (int j = 0; j < N; j++) {
            if (C[j] == i) {
                imos[S[j]]++;
                imos[T[j]]--;
            }
        }

        for (int j = 0; j < N_MAX - 1; j++) {
            imos[j + 1] += imos[j];
        }

        for (int j = 0; j < N_MAX - 1; j++) {
            if (imos[j] == 0 && imos[j + 1] == 1) {
                mm[j]++;
            } else if (imos[j] == 1) mm[j]++;
        }

    int cnt = 0;
    rep(i, N_MAX) {
        cnt = max(cnt, mm[i]);
    }

    cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:2: error: expected '}' at end of input
   53 | }
      |  ^
a.cc:12:12: note: to match this '{'
   12 | int main() {
      |            ^
Language: C++

#include <cstdio>
int N, C;
int s[100000],　t[100000],　c[100000]; 
//時刻tを何個の区間が覆っているかをsm[t]に格納する。
int sm[200002];
//以下のfor文でsmの構築のために用いる一時配列。
//各チャンネルiについて、時刻jが区間に覆われているとき、tt[j]>0となるようにする。
int tt[200002]; 

int main () {
  scanf("%d%d",&N,&C); 
  for(int i=0;i<N;i++) scanf("%d%d%d",&s[i],&t[i],&c[i]);
  for(int i=1;i<=C;i++){//各チャンネルiについて
    for(int j=0;j<200002;j++)tt[j] = 0;
    for(int j=0;j<N;j++) if(c[j]==i) tt[s[j]*2-1]++,tt[t[j]*2]--; 
    for(int j=1;j<200002;j++)tt[j]+=tt[j-1];
    for(int j=0;j<200002;j++)if(tt[j]>0)sm[j]++;
  }
  int mx = 0;//求める最大値(答え)
  for(int j=0;j<200002;j++) if(mx < sm[j]) mx = sm[j];
  printf("%d\n",mx);
}

Compiler output:
a.cc:3:15: error: extended character 　 is not valid in an identifier
    3 | int s[100000],　t[100000],　c[100000];
      |               ^
a.cc:3:27: error: extended character 　 is not valid in an identifier
    3 | int s[100000],　t[100000],　c[100000];
      |                           ^
a.cc: In function 'int main()':
a.cc:12:46: error: 't' was not declared in this scope
   12 |   for(int i=0;i<N;i++) scanf("%d%d%d",&s[i],&t[i],&c[i]);
      |                                              ^
a.cc:12:52: error: 'c' was not declared in this scope
   12 |   for(int i=0;i<N;i++) scanf("%d%d%d",&s[i],&t[i],&c[i]);
      |                                                    ^
a.cc:15:29: error: 'c' was not declared in this scope
   15 |     for(int j=0;j<N;j++) if(c[j]==i) tt[s[j]*2-1]++,tt[t[j]*2]--;
      |                             ^
a.cc:15:56: error: 't' was not declared in this scope
   15 |     for(int j=0;j<N;j++) if(c[j]==i) tt[s[j]*2-1]++,tt[t[j]*2]--;
      |                                                        ^
Language: C

#include <cstdio.h>
int N, C;
int s[100000], t[100000], c[100000];
int sm[200002];
int tt[200002];
int main() {
  scanf("%d%d", &N, &C);
  for (int i = 0; i < N; i++)
    scanf("%d%d%d ", &s[i], &t[i], &c[i]);
  for (int i = 1; i <= C; i++) {
    for (int j = 0; j < 200002; j++)
      tt[j] = 0;
    for (int j = 0; j < N; j++)
      if (c[j] == i)
        tt[s[j] * 2 - 1]++, tt[t[j] * 2]--;
    for (int j = 1; j < 200002; j++)
      tt[j] += tt[j - 1];
    for (int j = 0; j < 200002; j++)
      if (tt[j] > 0)
        sm[j]++;
  }
  int mx = 0;
  for (int j = 0; j < 200002; j++)
    if (mx < sm[j])
      mx = sm[j];
  printf("%d\n ", mx);
}


Compiler output:
main.c:1:10: fatal error: cstdio.h: No such file or directory
    1 | #include <cstdio.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio>
int N, C;
int s[100000], t[100000], c[100000];
int sm[200002];
int tt[200002];
int main() {
  scanf("%d%d ", &N, &C);
  for (int i = 0; i < N; i++)
    scanf("%d%d% d ", &s[i], &t[i], &c[i]);
  for (int i = 1; i <= C; i++) {
    for (int j = 0; j < 200002; j++)
      tt[j] = 0;
    for (int j = 0; j < N; j++)
      if (c[j] == i)
        tt[s[j] * 2 - 1]++, tt[t[j] * 2] - -;
    for (int j = 1; j < 200002; j++)
      tt[j] += tt[j - 1];
    for (int j = 0; j < 200002; j++)
      if (tt[j] > 0)
        sm[j]++;
  }
  int mx = 0;
  for (int j = 0; j < 200002; j++)
    if (mx < sm[j])
      mx = sm[j];
  printf("%d\n ", mx);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:45: error: expected primary-expression before ';' token
   15 |         tt[s[j] * 2 - 1]++, tt[t[j] * 2] - -;
      |                                             ^
Language: C++

#include <cstdio>
int N , C ;
int s [100000] , t [100000] , c [100000];
int sm [200002];
int tt [200002];
int main ()
{
  scanf ("% d % d " ,&N ,& C );
  for ( int i =0; i < N ; i ++)
  scanf ("% d % d % d " ,& s [ i ] ,& t [ i ] ,& c [ i ]);
  for ( int i =1; i <= C ; i ++)
  {
    for ( int j =0; j <200002; j ++) tt [ j ]=0;
    for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
    for ( int j =1; j <200002; j ++) tt [ j ]+= tt [j -1];
    for ( int j =0; j <200002; j ++) if ( tt [ j ] >0) sm [ j ]++;
  }
  int mx =0;
  for ( int j =0; j <200002; j ++) if ( mx < sm [ j ]) mx = sm [ j ];
  printf ("% d \ n " , mx );
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:96: error: expected primary-expression before ';' token
   14 |     for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
      |                                                                                                ^
a.cc:20:11: warning: unknown escape sequence: '\040'
   20 |   printf ("% d \ n " , mx );
      |           ^~~~~~~~~~
Language: C

#include <cstdio>
int N , C ;
int s [100000] , t [100000] , c [100000];
int sm [200002];
int tt [200002];
int main ()
{
  scanf ("% d % d " ,&N ,& C );
  for ( int i =0; i < N ; i ++)
  scanf ("% d % d % d " ,& s [ i ] ,& t [ i ] ,& c [ i ]);
  for ( int i =1; i <= C ; i ++)
  {
    for ( int j =0; j <200002; j ++) tt [ j ]=0;
    for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
    for ( int j =1; j <200002; j ++) tt [ j ]+= tt [j -1];
    for ( int j =0; j <200002; j ++) if ( tt [ j ] >0) sm [ j ]++;
  }
  int mx =0;
  for ( int j =0; j <200002; j ++) if ( mx < sm [ j ]) mx = sm [ j ];
  printf ("% d \ n " , mx );
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

# include < cstdio >
int N , C ;
int s [100000] , t [100000] , c [100000];
int sm [200002];
int tt [200002];
int main ()
{
scanf ("% d % d " ,&N ,& C );
for ( int i =0; i < N ; i ++)
scanf ("% d % d % d " ,& s [ i ] ,& t [ i ] ,& c [ i ]);
for ( int i =1; i <= C ; i ++)
{
for ( int j =0; j <200002; j ++) tt [ j ]=0;
for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
for ( int j =1; j <200002; j ++) tt [ j ]+= tt [j -1];
for ( int j =0; j <200002; j ++) if ( tt [ j ] >0) sm [ j ]++;
}
int mx =0;
for ( int j =0; j <200002; j ++) if ( mx < sm [ j ]) mx = sm [ j ];
printf ("% d \ n " , mx );
}

Compiler output:
main.c:1:11: fatal error:  cstdio : No such file or directory
    1 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,c;
    cin >> n >> c;
    int ans=0;
    pair<pair<int,int>,int> p[n];
    for(int i=0;i<n;i++)cin >> p[i].first.first >> p[i].first.second >> p[i].second;
    sort(p,p+n);
    priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > q;
    q.push(make_pair(p[0].first.second,p[0].second));
    vector<pair<int,int> > tmp;
    for(int i=1;i<n;i++){
        while(q.top().first<p[i].first.first)q.pop();
        while(q.top().first==p[i].first.first && q.top().second<=p[i].second){
            if(q.top().second<p[i].second)tmp.push_back(make_pair(q.top().first,q.top().second));
            q.pop()
        }
        for(auto u:tmp)q.push(u);
        q.push(make_pair(p[i].first.second,p[i].second));
        ans=max(ans,(int)q.size());
    }
    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected ';' before '}' token
   17 |             q.pop()
      |                    ^
      |                    ;
   18 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
using ll = long long;
typedef pair<int, int> P;
ll Mod = 1000000007;
int main() {
  int N,C;
  cin >> N >> C;
  int s[N],t[N],c[N];
  vector<P> start;
  vector<P> stop;
  for (int i = 0; i < N; i++) {
    cin >> s[i] >> t[i] >> c[i];
    c[i]--;
    start.push_back(make_pair(s[i],c[i]));
    stop.push_back(make_pair(t[i],c[i]));
  }
  sort(start.begin(),start.end());
  sort(stop.begin(),stop.end());

  vector<int> Data(33);
  bool used[33];
  for (int i = 0; i <= 32; i++) {
    Data[i] = -1;
    used[i] = false;
  } 
  

  for (int i = 1; i <= 100060; i++) {
    if (lower_bound(start.begin(),start.end(),make_pair(i+1,-100)) - lower_bound(start.begin(),start.end(),make_pair(i,-100)) != 0) {
      for (int j = lower_bound(start.begin(),start.end(),make_pair(i,-100)) - start.begin(); j < N; j++) {
        for (int k = 0; k <= 32; k++) {
          if (Data[k] == -1) {
            used[k] = true;
            Data[k] = start[j].S;
            break;
          }
        }
        if (j == N-1) {
          break;
        }
        if (start[j+1].F != i) {
          break;
        }
      }
    }

    if (lower_bound(stop.begin(),stop.end(),make_pair(i+1,-1)) - lower_bound(stop.begin(),stop.end(),make_pair(i,-1)) != 0) {
      for (int j = lower_bound(stop.begin(),stop.end(),make_pair(i,-1)) - stop.begin(); j < N; j++) {
        for (int k = 0; k <= 32; k++) {
          if (Data[k] == stop[j].S) {
            uesd[k] = true;
            Data[k] = -1;
            break;
          }
        }
        if (j == N-1) {
          break;
        }
        if (stop[j+1].F != i) {
          break;
        }
      }
    }
  }
  int ans = 0;
  for (int i = 0; i <= 32; i++) {
    if (used[i]) {
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:13: error: 'uesd' was not declared in this scope; did you mean 'used'?
   54 |             uesd[k] = true;
      |             ^~~~
      |             used
Language: C++

# include < cstdio >
int N , C ;
int s [100000] , t [100000] , c [100000];
int sm [200002];
int tt [200002];
int main (){
  scanf ("% d % d " ,&N ,& C );
  for ( int i =0; i < N ; i ++)
  scanf ("% d % d % d " ,& s [ i ] ,& t [ i ] ,& c [ i ]);
  for ( int i =1; i <= C ; i ++)
  {
  	for ( int j =0; j <200002; j ++) tt [ j ]=0;
  	for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2]--;
  	for ( int j =1; j <200002; j ++) tt [ j ]+= tt [j -1];
  	for ( int j =0; j <200002; j ++) if ( tt [ j ] >0) sm [ j ]++;
  }
  int mx =0;
  for ( int j =0; j <200002; j ++) if ( mx < sm [ j ]) mx = sm [ j ];
  printf ("% d \ n " , mx );
}


Compiler output:
a.cc:1:11: fatal error:  cstdio : No such file or directory
    1 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.
Language: C++

# include < cstdio >
int N , C ;
int s [100000] , t [100000] , c [100000];
int sm [200002];
int tt [200002];
int main ()
{
scanf ("% d % d " ,&N ,& C );
for ( int i =0; i < N ; i ++)
scanf ("% d % d % d " ,& s [ i ] ,& t [ i ] ,& c [ i ]);
for ( int i =1; i <= C ; i ++)
{
for ( int j =0; j <200002; j ++) tt [ j ]=0;
for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
for ( int j =1; j <200002; j ++) tt [ j ]+= tt [j -1];
for ( int j =0; j <200002; j ++) if ( tt [ j ] >0) sm [ j ]++;
}
int mx =0;
for ( int j =0; j <200002; j ++) if ( mx < sm [ j ]) mx = sm [ j ];
printf ("% d \ n " , mx );
}


Compiler output:
a.cc:1:11: fatal error:  cstdio : No such file or directory
    1 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.