criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Scanner;
import java.util.Random;
import java.util.Arrays;
import java.util.Comparator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.HashMap;

public class Main {
	
	public static void main(String[] args) {
		Scanner	sc = new Scanner();
		int n = sc.nextInt();
		int len = String.valueOf(n).length();
		int d = (int)Math.pow(10, len - 1);
		int sum = 0;
		
		for (int i = 0; i < len; i++) {
			sum += (n / d);
			n %= d;
			d /= 10;
		}
		
		if (n % sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
		
}
	
	


Compiler output:
Main.java:13: error: no suitable constructor found for Scanner(no arguments)
		Scanner	sc = new Scanner();
		       	     ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main(){
    long long int x,a=0;
    cin >> x;
    if(x < 0) x *= -1;
    if(x < 10){
        cout << "Yes" << endl;
        return 0;
    }
    for(int i = 9; i >= 0; i--){
        long long int  = x / pow(10,i);
        a += tmp;
    }
    if(x%a){
        cout <<  "No"<< endl;
    }else{
        cout << "Yes" << endl;
    }
    return 0;
} 



Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected unqualified-id before '=' token
   13 |         long long int  = x / pow(10,i);
      |                        ^
a.cc:14:14: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   14 |         a += tmp;
      |              ^~~
      |              tm
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int number = scan.nextInt();
		String num = String.valueOf(number);
		int sum = 0;
		String[] strs = num.split("");
		for (int i = 1; i < strs.length; i++) {
			sum += Integer.parseInt(strs[i]);
			
		}
		if(number % sum == 0){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
		
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		int number = scan.nextInt();
		             ^
  symbol:   variable scan
  location: class Main
1 error
Language: C++

#include<stdio.h>
#include<math.h>
int main(){
int N,fx=0;
scanf("%d",&N);
for(int i=0;N>pow(10,i);i++){
fx+=(N/pow(10,i))%10;
}
printf("%s",N/fx==0?"Yes","No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
    7 | fx+=(N/pow(10,i))%10;
      |     ~~~~~~~~~~~~~^~~
      |       |           |
      |       |           int
      |       __gnu_cxx::__promote<double>::__type {aka double}
a.cc:9:31: error: expected ':' before ')' token
    9 | printf("%s",N/fx==0?"Yes","No");
      |                               ^
      |                               :
a.cc:9:31: error: expected primary-expression before ')' token
Language: C++

#include<stdio.h>
#include<math.h>
int main(){
int N,fx=0;
scanf("%d",&N);
for(int i=0;N>pow(10,i);i++){
fx+=(N/pow(10*i))%10;
}
printf("%s",N/fx==0?"Yes","No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: no matching function for call to 'pow(int)'
    7 | fx+=(N/pow(10*i))%10;
      |        ~~~^~~~~~
In file included from /usr/include/c++/14/math.h:36,
                 from a.cc:2:
/usr/include/c++/14/cmath:1074:5: note: candidate: 'template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::pow(_Tp, _Up)'
 1074 |     pow(_Tp __x, _Up __y)
      |     ^~~
/usr/include/c++/14/cmath:1074:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: candidate: 'double pow(double, double)'
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/cmath:380:3: note: candidate: 'constexpr long double std::pow(long double, long double)'
  380 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/14/cmath:380:3: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/cmath:376:3: note: candidate: 'constexpr float std::pow(float, float)'
  376 |   pow(float __x, float __y)
      |   ^~~
/usr/include/c++/14/cmath:376:3: note:   candidate expects 2 arguments, 1 provided
a.cc:9:31: error: expected ':' before ')' token
    9 | printf("%s",N/fx==0?"Yes","No");
      |                               ^
      |                               :
a.cc:9:31: error: expected primary-expression before ')' token
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include <string>
#include<cmath>
#include<map>
#include<cstdio>
#include<stack>
#include<queue>
#define ok printf("ok\n");
#define MAX 1000000
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(g);(i)--)
#define all(a) (a).begin(),(a).end()
#define pb push_back
using namespace std;
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;

int main()
{
	int a,b,c;
	string s,t;
	vi v;
	cin>>s;
	a=0;
	rep(i,s.size())
		a+=s[i]+’0’;
	b=s+‘0’;
	if(a%b==0)
	cout<<“Yes”;
	else
	cout<<“No”;
	return 0;
}

Compiler output:
a.cc:32:25: error: extended character ’ is not valid in an identifier
   32 |                 a+=s[i]+’0’;
      |                         ^
a.cc:32:25: error: extended character ’ is not valid in an identifier
a.cc:33:13: error: extended character ‘ is not valid in an identifier
   33 |         b=s+‘0’;
      |             ^
a.cc:33:13: error: extended character ’ is not valid in an identifier
a.cc:35:15: error: extended character “ is not valid in an identifier
   35 |         cout<<“Yes”;
      |               ^
a.cc:35:15: error: extended character ” is not valid in an identifier
a.cc:37:15: error: extended character “ is not valid in an identifier
   37 |         cout<<“No”;
      |               ^
a.cc:37:15: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:32:25: error: '\U000020190\U00002019' was not declared in this scope
   32 |                 a+=s[i]+’0’;
      |                         ^~~
a.cc:33:13: error: '\U000020180\U00002019' was not declared in this scope
   33 |         b=s+‘0’;
      |             ^~~
a.cc:35:15: error: '\U0000201cYes\U0000201d' was not declared in this scope
   35 |         cout<<“Yes”;
      |               ^~~~~
a.cc:37:15: error: '\U0000201cNo\U0000201d' was not declared in this scope
   37 |         cout<<“No”;
      |               ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include <string>
#include<cmath>
#include<map>
#include<cstdio>
#include<stack>
#include<queue>
#define ok printf("ok\n");
#define MAX 1000000
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(g);(i)--)
#define all(a) (a).begin(),(a).end()
#define pb push_back
using namespace std;
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;

int main()
{
	int a,b,c;
	string s,t;
	vi v;
	cin>>s;
	a=0;
	rep(i,s.size())
		a+=s[i]+"0";
	b=s+"0";
	if(a%b==0)
	cout<<Yes;
	else
	cout<<No;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:25: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   32 |                 a+=s[i]+"0";
      |                         ^~~
      |                         |
      |                         const char*
a.cc:33:12: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
   33 |         b=s+"0";
      |           ~^~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:35:15: error: 'Yes' was not declared in this scope
   35 |         cout<<Yes;
      |               ^~~
a.cc:37:15: error: 'No' was not declared in this scope
   37 |         cout<<No;
      |               ^~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include <string>
#include<cmath>
#include<map>
#include<cstdio>
#include<stack>
#include<queue>
#define ok printf("ok\n");
#define MAX 1000000
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(g);(i)--)
#define all(a) (a).begin(),(a).end()
#define pb push_back
using namespace std;
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;

int main()
{
	int a,b,c;
	string s,t;
	vi v;
	cin>>s;
	a=0;
	rep(i,s.size)
		a+=s[i]+"0";
	b=s+"0";
	if(a%b==0)
	cout<<Yes;
	else
	cout<<No;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   31 |         rep(i,s.size)
      |               ~~^~~~
a.cc:12:32: note: in definition of macro 'rep'
   12 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:32:25: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   32 |                 a+=s[i]+"0";
      |                         ^~~
      |                         |
      |                         const char*
a.cc:33:12: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
   33 |         b=s+"0";
      |           ~^~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:35:15: error: 'Yes' was not declared in this scope
   35 |         cout<<Yes;
      |               ^~~
a.cc:37:15: error: 'No' was not declared in this scope
   37 |         cout<<No;
      |               ^~
Language: C++

#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main() {

	string s;

	cin >> s;

	int sum = 0;
	for (int i = 0; i < s.length(); i++) {
		sum += (int)(s[i].c_str()-"0");
	}
	int a = (int)std::stoi(s.c_str());

	if (a%sum == 0)cout << "Yes" << endl;
	else	cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:35: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   13 |                 sum += (int)(s[i].c_str()-"0");
      |                                   ^~~~~
Language: Java

import java.util.*;
import java.lang.*;
 
 //O(100000000)
public class Main {
    public static void main(String[] args) {
 
        Scanner sc  = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        long a,s,d,f,g,h,j,k,l;
        
        a = N / 10 ;
        s = N / 100 ;
        d = N / 1000 ;
        f = N / 10000 ;
        g = N / 100000 ;
        h = N / 1000000 ;
        j = N / 10000000 ;
        k = N / 100000000 ;
       // l = N / 1000000000 ;
        
        long v = a+s+d+f+g+h+j+k+l;
        
        if(N%v==0)System.out.print("Yes");
        else  System.out.print("No");
        
        //System.out.print();
        System.out.println();
    }
 
}

Compiler output:
Main.java:22: error: variable l might not have been initialized
        long v = a+s+d+f+g+h+j+k+l;
                                 ^
1 error
Language: C++

#include<stdio.h>
#include<stdlib.h>
int main(){
    int n,s=0;
    char a[20];
    scanf("%d",&n);
    itoa(n,a,10);
    for(int i = 0;a[i]!='\0';i++)
        s = s+a[i]-'0';
    if(n%s==0)
        printf("Yes");
    else
        printf("No");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'itoa' was not declared in this scope
    7 |     itoa(n,a,10);
      |     ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
int sum(int n)
{
    int s=0;
  while(n)
  {
    s=n%10;
    n=n/10;
  }
}
int main()
{
  int n;
  cin>>n;
  if(n%(sum(n)==0)
     cout<<"YES";
     else
    cout<<"NO";
}

Compiler output:
a.cc: In function 'int sum(int)':
a.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^
a.cc: In function 'int main()':
a.cc:17:19: error: expected ';' before 'cout'
   17 |   if(n%(sum(n)==0)
      |                   ^
      |                   ;
   18 |      cout<<"YES";
      |      ~~~~          
a.cc:19:6: error: expected primary-expression before 'else'
   19 |      else
      |      ^~~~
a.cc:18:18: error: expected ')' before 'else'
   18 |      cout<<"YES";
      |                  ^
      |                  )
   19 |      else
      |      ~~~~         
a.cc:17:5: note: to match this '('
   17 |   if(n%(sum(n)==0)
      |     ^
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
    int N,a;
    cin >> N ;
	int sum = 0;
	int X = N;
	for (int i = 0;i < 8; i++){
	a = X%10;
	X = X/10;
	sum = sum + a;
}
	if(N % sum = 0){
           cout << "Yes" << endl;
}	else{
           cout << "No" << endl;
}
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: lvalue required as left operand of assignment
   16 |         if(N % sum = 0){
      |            ~~^~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
    int n,s=0;
    char a[20];
    scanf("%d",&n);
    itoa(n,a,10);
    for(int i = 0;a[i]!='\0';i++)
        s = s+a[i]-'0';
    if(n%s==0)
        printf("Yes");
    else
        printf("No");
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
    7 |     itoa(n,a,10);
      |     ^~~~
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
    int N,a,b;
    cin >> N ;
	int sum = 0
	for (int i = 0;i < 8; i++){
	a = N%10;
	N = N/10;
	sum = sum + a
}
	if(N % sum = 0){
           cout << "Yes" << endl;
}	else{
           cout << "No" << endl;
}
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ',' or ';' before 'for'
   10 |         for (int i = 0;i < 8; i++){
      |         ^~~
a.cc:10:24: error: 'i' was not declared in this scope
   10 |         for (int i = 0;i < 8; i++){
      |                        ^
a.cc:15:14: error: lvalue required as left operand of assignment
   15 |         if(N % sum = 0){
      |            ~~^~~~~
Language: C++

#include <map>
#include <iostream>
 
using namespace std;
 
int main() {
    int N,a,b;
    cin >> N ;
	int sum = 0
	for (int i = 0;i < 8; i++){
	a = N%10;
	N = N/10
	sum = sum + a
}
	if(N % sum = 0){
           cout << "Yes" << endl;
}	else{
           cout << "No" << endl;
}
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ',' or ';' before 'for'
   10 |         for (int i = 0;i < 8; i++){
      |         ^~~
a.cc:10:24: error: 'i' was not declared in this scope
   10 |         for (int i = 0;i < 8; i++){
      |                        ^
a.cc:15:14: error: lvalue required as left operand of assignment
   15 |         if(N % sum = 0){
      |            ~~^~~~~
Language: C++

#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main() {

	string s;

	cin >> s;

	int sum = 0;
	for (int i = 0; i < s.length(); i++) {
		sum += s[i].c_str()-"0";
	}
	int a = std::stoi(s.c_str());

	if (a%sum == 0)cout << "Yes" << endl;
	else	cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   13 |                 sum += s[i].c_str()-"0";
      |                             ^~~~~
Language: C++

#include <iostream>
#include <vector> //可変長配列
#include <queue> //キュー
#include <unordered_map> //ハッシュ連想配列
#include <numeric>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#define ll long long int
#define INFTY (1<<21)

using namespace std;

int main(void){
    cin.sync_with_stdio(false);
    ll N,n,a;
    cin>>N;
    n = N;
    while(n%10 == 0){
        a += n/10;
        n %= 10;
    }
    a += n;
    cout<<((N%a==0)?"Yes":"No")<<endl;
    return 0;
}


Compiler output:
a.cc:16:1: error: extended character   is not valid in an identifier
   16 |     cin.sync_with_stdio(false);
      | ^
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
a.cc:17:1: error: extended character   is not valid in an identifier
   17 |     ll N,n,a;
      | ^
a.cc:17:1: error: extended character   is not valid in an identifier
a.cc:17:1: error: extended character   is not valid in an identifier
a.cc:17:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
   18 |     cin>>N;
      | ^
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
   26 |     return 0;
      | ^
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc: In function 'int main()':
a.cc:16:1: error: '\U000000a0\U000000a0\U000000a0\U000000a0cin' was not declared in this scope
   16 |     cin.sync_with_stdio(false);
      | ^~~~~~~
a.cc:17:1: error: '\U000000a0\U000000a0\U000000a0\U000000a0ll' was not declared in this scope
   17 |     ll N,n,a;
      | ^~~~~~
a.cc:18:10: error: 'N' was not declared in this scope
   18 |     cin>>N;
      |          ^
a.cc:19:5: error: 'n' was not declared in this scope; did you mean 'yn'?
   19 |     n = N;
      |     ^
      |     yn
a.cc:21:9: error: 'a' was not declared in this scope
   21 |         a += n/10;
      |         ^
a.cc:24:5: error: 'a' was not declared in this scope
   24 |     a += n;
      |     ^
a.cc:26:1: error: '\U000000a0\U000000a0\U000000a0\U000000a0return' was not declared in this scope
   26 |     return 0;
      | ^~~~~~~~~~
Language: C++

#include<stdio.h>
int main()
{
	__int64 n;
	while(~scanf("%I64d",&n))
	{
		int sum=0;
		__int64 t=n;
		while(t)
		{
			sum+=t%10;
			t/=10;
		}
		if(n%sum==0)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    4 |         __int64 n;
      |         ^~~~~~~
      |         __int64_t
a.cc:5:31: error: 'n' was not declared in this scope
    5 |         while(~scanf("%I64d",&n))
      |                               ^
a.cc:8:24: error: expected ';' before 't'
    8 |                 __int64 t=n;
      |                        ^~
      |                        ;
a.cc:9:23: error: 't' was not declared in this scope
    9 |                 while(t)
      |                       ^
Language: C++

#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main() {

	string s;

	cin >> s;

	int sum = 0;
	for (int i = 0; i < s.length(); i++) {
		sum += s[i]-"0";
	}
	int a = std::stoi(s.c_str());

	if (a%sum == 0)cout << "Yes" << endl;
	else	cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char [2]' to binary 'operator-'
   13 |                 sum += s[i]-"0";
Language: C++

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <iostream>
#include <climits>
using namespace std;

#define rep(i,N) for(int i = 0;i < N;++i)
using LL = long long;

typedef pair<LL, LL> P;

char n[20];

int main() {
	cin >> n;
	int sum = 0, x = atoi(n);
	rep(i, strlen(n)) {
		sum += n[i] - '0';
	}
	if (x % sum == 0) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:16: error: 'strlen' was not declared in this scope
   23 |         rep(i, strlen(n)) {
      |                ^~~~~~
a.cc:13:36: note: in definition of macro 'rep'
   13 | #define rep(i,N) for(int i = 0;i < N;++i)
      |                                    ^
a.cc:11:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   10 | #include <climits>
  +++ |+#include <cstring>
   11 | using namespace std;
Language: C++

<?php
// Your code here!
$N = trim(fgets(STDIN));
$result = 0;
foreach(strval($N) as $n){
    $result += intval($n);
}
echo ($result % $n) == 0 ? 'Yes' : 'No';
?>


Compiler output:
a.cc:8:28: warning: multi-character character constant [-Wmultichar]
    8 | echo ($result % $n) == 0 ? 'Yes' : 'No';
      |                            ^~~~~
a.cc:8:36: warning: multi-character character constant [-Wmultichar]
    8 | echo ($result % $n) == 0 ? 'Yes' : 'No';
      |                                    ^~~~
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:4:1: error: '$result' does not name a type
    4 | $result = 0;
      | ^~~~~~~
a.cc:5:8: error: expected constructor, destructor, or type conversion before '(' token
    5 | foreach(strval($N) as $n){
      |        ^
a.cc:8:6: error: expected constructor, destructor, or type conversion before '(' token
    8 | echo ($result % $n) == 0 ? 'Yes' : 'No';
      |      ^
a.cc:9:1: error: expected unqualified-id before '?' token
    9 | ?>
      | ^
Language: C++

#pragma GCC optimize("O3")
#include<bits/stdc++.h>
#define rc(x) return cout<<x<<endl,0
#define pb push_back
#define in insert
#define er erase
#define fr first
#define sc second
typedef long long ll;
const long long llnrm=LLONG_MAX;
const int nrm=INT_MAX;
const int nrn=INT_MIN;
const int nmax=1e5+5;
const int mod=1e9+7;
using namespace std;
int ans,n,a,b,sum,tmp;
string s;
int main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
	cin>>n;
	tmp=n;
	while(n!=0)
    {
        tmp=n%10;
        sum+=tmp;
        n/=10;
    }
    if(n%sum==0) cout<<"YES"<<endl else cout<<"NO"<<ndl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:35: error: expected ';' before 'else'
   29 |     if(n%sum==0) cout<<"YES"<<endl else cout<<"NO"<<ndl;
      |                                   ^~~~~
      |                                   ;
Language: C++

#include <bits/stdc++.h>
  
using namespace std;
  
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define repr(i, n) REPR(i, n, 0)
#define REPR(i, s, e) for(int i=(int)(s-1); i>=(int)(e); i--)
#define pb push_back
#define all(r) (r).begin(),(r).end()
#define rall(r) (r).rbegin(),(r).rend()
#define fi first
#define se second
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
 
const int INF = 1e9;
const ll MOD = 1e9 + 7;
double EPS = 1e-8;

int digsum(int x) {
    int ret = 0;
    while(x > 0) {
        ret += x % 10;
        x /= 10;
    }
    return ret;
}

int main(){
#ifdef LOCAL_TEST
    freopen("in", "r", stdin);
    freopen("out", "w", stdout);
#endif
    string yes = "Yes", no = "No";
    int x;
    cin >> x;
    if(x %f(x) == 0) {
        cout << yes << endl;
    }
    else cout << no << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:11: error: 'f' was not declared in this scope
   42 |     if(x %f(x) == 0) {
      |           ^
Language: C++

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

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcount

#define INF INT_MAX/3

string s;
int main(){
  int sum=0;
  cin>>s;
  rep(i,s,size())sum+=s[i]-'0';
  if(sum%stoi(s)==0)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
	return 0;
}


Compiler output:
a.cc:30:17: error: macro "rep" passed 3 arguments, but takes just 2
   30 |   rep(i,s,size())sum+=s[i]-'0';
      |                 ^
a.cc:11:9: note: macro "rep" defined here
   11 | #define rep(i,n) repl(i,0,n)
      |         ^~~
a.cc: In function 'int main()':
a.cc:30:3: error: 'rep' was not declared in this scope
   30 |   rep(i,s,size())sum+=s[i]-'0';
      |   ^~~
Language: C++

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

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcount

#define INF INT_MAX/3

string s;
int main(){
  int sum=0;
  cin>>s;
  rep(i,s,size())sum+=s[i]-'0';
  if(sum%stoi(s)==0)cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
	return 0;
}


Compiler output:
a.cc:30:17: error: macro "rep" passed 3 arguments, but takes just 2
   30 |   rep(i,s,size())sum+=s[i]-'0';
      |                 ^
a.cc:11:9: note: macro "rep" defined here
   11 | #define rep(i,n) repl(i,0,n)
      |         ^~~
a.cc: In function 'int main()':
a.cc:30:3: error: 'rep' was not declared in this scope
   30 |   rep(i,s,size())sum+=s[i]-'0';
      |   ^~~
Language: C++

#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <limits>
#include <random>
#include <complex>
#include <cmath>
#include <cstdio>
#include <cstdlib>
using namespace std;
 
#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;i>=0;i--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())

int main() {

	ll N; cin >> N;

	ll t = N;
	ll sum = 0;
	while (t > 0) {
		sum += t % 10;
		t /= 10;
	}

	if (N % sum == 0) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'll' was not declared in this scope
   29 |         ll N; cin >> N;
      |         ^~
a.cc:29:22: error: 'N' was not declared in this scope
   29 |         ll N; cin >> N;
      |                      ^
a.cc:31:11: error: expected ';' before 't'
   31 |         ll t = N;
      |           ^~
      |           ;
a.cc:32:11: error: expected ';' before 'sum'
   32 |         ll sum = 0;
      |           ^~~~
      |           ;
a.cc:33:16: error: 't' was not declared in this scope; did you mean 'tm'?
   33 |         while (t > 0) {
      |                ^
      |                tm
a.cc:34:17: error: 'sum' was not declared in this scope
   34 |                 sum += t % 10;
      |                 ^~~
a.cc:38:17: error: 'sum' was not declared in this scope
   38 |         if (N % sum == 0) {
      |                 ^~~
Language: C++

#include <cstdio > int N;
int F[100][14]; int P[100][15]; int main ()
 {
}
scanf("%d",&N); for(int i=0;i<N;i++) {
for(int j=0;j<10;j++)scanf("%d",&F[i][j]);
}
for(int i=0;i<N;i++)for(int j=0;j<11;j++)scanf("%d",&P[i][j]); int res = -(1 < <30);
for(int b=1;b<(1<<10);b++)
{
int cc =0;
for(int i=0;i<N;i++) {
int c=0;
for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++; cc+=P[i][c];
} if(res<cc)res=cc;
} printf("%d\n",res);
 

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <cstdio > int N;
      |                    ^~~
a.cc:1:10: fatal error: cstdio : No such file or directory
    1 | #include <cstdio > int N;
      |          ^~~~~~~~~
compilation terminated.
Language: C

#include <cstdio > int N;
int F[100][14]; int P[100][15]; int main ()
 {
}
scanf("%d",&N); for(int i=0;i<N;i++) {
for(int j=0;j<10;j++)scanf("%d",&F[i][j]);
}
for(int i=0;i<N;i++)for(int j=0;j<11;j++)scanf("%d",&P[i][j]); int res = -(1 < <30);
for(int b=1;b<(1<<10);b++)
{
int cc =0;
for(int i=0;i<N;i++) {
int c=0;
for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++; cc+=P[i][c];
} if(res<cc)res=cc;
} printf("%d\n",res);
 

Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | #include <cstdio > int N;
      |                    ^~~
main.c:1:10: fatal error: cstdio : No such file or directory
    1 | #include <cstdio > int N;
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>
#include<limits.h>
using namespace std;

int maxprofit=INT_MIN;

void recur(vector<int>v,int index,vector<vector<int>>f,vector<vector<int>>profit)
{
    if(v.size()==10)
    {
        int finalprofit=0;
        int days=0;
        for(int i=0;i<f.size();i++)
        {
            int count=0;
            for(int j=0;j<10;j++)
            {
                if(v[j]==1&&v[j]==f[i][j]){
                    count++;
                }
            }
            finalprofit+=profit[i][count];
            days+=count;
        }
        if(days!=0&&finalprofit>maxprofit)
        {
            tdays=days;
            maxprofit=finalprofit;
        }
    }
    else
    {
        v.push_back(1);
        recur(v,index+1,f,profit);
        v.pop_back();
        v.push_back(0);
        recur(v,index+1,f,profit);
    }
}


int main(){
    int n;
    cin>>n;
    vector<vector<int>>f(n,vector<int>(10)),profit(n,vector<int>(11));
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<10;j++)
        {
            cin>>f[i][j];
        }
    }
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<11;j++)
        {
            cin>>profit[i][j];
        }
        
    }
    vector<int>v;
    recur(v,0,f,profit);
    cout<<maxprofit;
    
    
    

}

Compiler output:
a.cc: In function 'void recur(std::vector<int>, int, std::vector<std::vector<int> >, std::vector<std::vector<int> >)':
a.cc:28:13: error: 'tdays' was not declared in this scope; did you mean 'days'?
   28 |             tdays=days;
      |             ^~~~~
      |             days
Language: C++

#include <bits/stdc++.h>
using namespace std;
int N;
int F[100][14];
int P[100][15];
int main() {
    scanf("% d ", &N);
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < 10; j++) scanf("% d ", &F[i][j]);
    }
    for (int i = 0; i < N; i++)
        for (int j = 0; j < 11; j++) scanf("% d ", &P[i][j]);
    int res = -(1 < < 30);
    for (int b = 1; b < (1 < < 10); b++) {
        int cc = 0;
        for (int i = 0; i < N; i++) {
            int c = 0;
            for (int j = 0; j < 10; j++)
                if ((b >> j & 1) && F[i][j]) c++;
            cc += P[i][c];
        }
        if (res < cc) res = cc;
    }
    printf("% d \ n ", res);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: expected primary-expression before '<' token
   13 |     int res = -(1 < < 30);
      |                     ^
a.cc:14:30: error: expected primary-expression before '<' token
   14 |     for (int b = 1; b < (1 < < 10); b++) {
      |                              ^
a.cc:24:12: warning: unknown escape sequence: '\040'
   24 |     printf("% d \ n ", res);
      |            ^~~~~~~~~~
Language: C++

#include  <cstdio >int N;int F[100][14];int P[100][15];int  main(){scanf ("%d",&N);for(int i=0;i<N;i++){for(int j=0;j<10;j++) scanf ("%d",&F[i][j]);}for(int i=0;i<N;i++) for(int j=0;j<11;j++) scanf ("%d",&P[i][j]);int  res=-(1<<30);for(int b=1;b<(1 <<10);b++){int cc=0;for(int i=0;i<N;i++){int c=0;for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++;cc+=P[i][c];}if(res <cc)res=cc;}printf ("%d\n",res);}2


Compiler output:
a.cc:1:24: warning: extra tokens at end of #include directive
    1 | #include  <cstdio >int N;int F[100][14];int P[100][15];int  main(){scanf ("%d",&N);for(int i=0;i<N;i++){for(int j=0;j<10;j++) scanf ("%d",&F[i][j]);}for(int i=0;i<N;i++) for(int j=0;j<11;j++) scanf ("%d",&P[i][j]);int  res=-(1<<30);for(int b=1;b<(1 <<10);b++){int cc=0;for(int i=0;i<N;i++){int c=0;for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++;cc+=P[i][c];}if(res <cc)res=cc;}printf ("%d\n",res);}2
      |                        ^
a.cc:1:11: fatal error: cstdio >in: No such file or directory
    1 | #include  <cstdio >int N;int F[100][14];int P[100][15];int  main(){scanf ("%d",&N);for(int i=0;i<N;i++){for(int j=0;j<10;j++) scanf ("%d",&F[i][j]);}for(int i=0;i<N;i++) for(int j=0;j<11;j++) scanf ("%d",&P[i][j]);int  res=-(1<<30);for(int b=1;b<(1 <<10);b++){int cc=0;for(int i=0;i<N;i++){int c=0;for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++;cc+=P[i][c];}if(res <cc)res=cc;}printf ("%d\n",res);}2
      |           ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)

using namespace std;

vector<bool> V(10, false);
//二進数に変換
void change(int n){
  while(n > 0){
    int x;
    x = n%2;
    V.push_back(x);
    n /= 2;
  }
}

int main(){
  int N;
  cin >> N;
  int ans = 0;
  
  vector<vector<bool>> inf(100, vector<bool> (10, false));
  rep(i, N){
    rep(j, 10){
      int F;
      cin >> F;
      if(F == 1){
        inf[i][j] = true;
      }
    }
  }
  
  vector<vector<int>> benefit(N, vector<int> (N));
  rep(i, N){
    rep(j, N){
      int P;
      cin >> P;
      benefit[i][j] = P;
    }
  }
  
  for(int i = 1, i < 1024){//営業時間を決める
    vector<bool> V(10, false);//初期化
    change(i);
    
    int sum = 0;
    
    rep(j, N){//店を決める      
      //被っている回数を数える
      int counter = 0;
      rep(k, 10){
        if(V[k] == true && inf[j][k] == true){
          counter++;
        }
      }
      
      sum += benefit[j][counter];
    }
    
    ans = max(ans, sum);
  }
  
  cout << ans << endl;
}
       
          
      
    
  
      
   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:19: error: expected ';' before '<' token
   42 |   for(int i = 1, i < 1024){//営業時間を決める
      |                   ^~
      |                   ;
a.cc:42:20: error: expected primary-expression before '<' token
   42 |   for(int i = 1, i < 1024){//営業時間を決める
      |                    ^
a.cc:42:26: error: expected ';' before ')' token
   42 |   for(int i = 1, i < 1024){//営業時間を決める
      |                          ^
      |                          ;
a.cc: At global scope:
a.cc:72:1: error: expected declaration before '}' token
   72 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
    ll n;
    cin >> n;
    vector<vector<ll>> sh(n, vector<ll>(10));
    vector<vector<ll>> pro(n, vector<ll>(11));
    for (ll i = 0; i < n; i++)
    {
        for (ll j = 0; j < 10; j++)
        {
            cin >> sh[i][j];
        }
    }
    for (ll i = 0; i < n; i++)
    {
        for (ll j = 0; j < 11; j++)
        {
            cin >> pro[i][j];
        }
    }
    ll ans = -10000000000000;
    for (ll bit = 0; bit < (1 << 10); bit++)
    {
        ll sum = 0;
        set<ll> st;
        st.insert(0);
        for (ll i = 0; i < 10; i++)
        {
            if (bit & (1 << i))
                st.insert(i);
        }
        vector<ll> open_or_not(n, 0);
        ll cnt = 0;
        for (ll i = 0; i < n; i++)
        {
            for (ll j = 0; j < 10; j++)
            {
                if (sh[i][j] == 1 && st.count(j))
                    open_or_not[i]++;
            }
            if (open_or_not[i] == 0)
                cnt++;
        }
        else
        {
            for (ll i = 0; i < n; i++)
            {
                sum += pro[i][open_or_not[i]];
            }
            ans = max(ans, sum);
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:9: error: 'else' without a previous 'if'
   47 |         else
      |         ^~~~
Language: C++

#include <iostream>

using namespace std;
int main(){
  int n;cin>>n;
  int A[n][10]
  for(int i = 0; n > i; i++){
    for(int j = 0; 10 > j; j++){
      cin>>A[i][j];
    }
  }
  int B[n][10];
  for(int i = 0; n > i; i++){
    for(int j = 0; 10 > j; j++){
      cin>>B[i][j];
    }
  }
  int ans = 0;
  for(int bit = 0; (1<<10) > bit; bit++){
    int tmp = 0;
    for(int i = 0; n > i; i++){
      int nw = 0;
      for(int j = 0; 10 > j; j++){
        if(bit & (1<<j)){
          if(A[i][j]){
            nw++;
          }
        }
      }
      tmp += B[i][nw];
    }
    ans = max(ans,tmp);
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'for'
    7 |   for(int i = 0; n > i; i++){
      |   ^~~
a.cc:7:22: error: 'i' was not declared in this scope
    7 |   for(int i = 0; n > i; i++){
      |                      ^
a.cc:25:14: error: 'A' was not declared in this scope
   25 |           if(A[i][j]){
      |              ^
Language: C++

#include  <cstdio >int N;int F[100][14];int P[100][15];int  main(){scanf ("%d",&N);for(int i=0;i<N;i++){for(int j=0;j<10;j++) scanf ("%d",&F[i][j]);}for(int i=0;i<N;i++) for(int j=0;j<11;j++) scanf ("%d",&P[i][j]);int  res=-(1<<30);for(int b=1;b<(1 <<10);b++){int cc=0;for(int i=0;i<N;i++){int c=0;for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++;cc+=P[i][c];}if(res <cc)res=cc;}printf ("%d\n",res);}

Compiler output:
a.cc:1:24: warning: extra tokens at end of #include directive
    1 | #include  <cstdio >int N;int F[100][14];int P[100][15];int  main(){scanf ("%d",&N);for(int i=0;i<N;i++){for(int j=0;j<10;j++) scanf ("%d",&F[i][j]);}for(int i=0;i<N;i++) for(int j=0;j<11;j++) scanf ("%d",&P[i][j]);int  res=-(1<<30);for(int b=1;b<(1 <<10);b++){int cc=0;for(int i=0;i<N;i++){int c=0;for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++;cc+=P[i][c];}if(res <cc)res=cc;}printf ("%d\n",res);}
      |                        ^
a.cc:1:11: fatal error: cstdio >in: No such file or directory
    1 | #include  <cstdio >int N;int F[100][14];int P[100][15];int  main(){scanf ("%d",&N);for(int i=0;i<N;i++){for(int j=0;j<10;j++) scanf ("%d",&F[i][j]);}for(int i=0;i<N;i++) for(int j=0;j<11;j++) scanf ("%d",&P[i][j]);int  res=-(1<<30);for(int b=1;b<(1 <<10);b++){int cc=0;for(int i=0;i<N;i++){int c=0;for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++;cc+=P[i][c];}if(res <cc)res=cc;}printf ("%d\n",res);}
      |           ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i,l,r) for(i=l;i<r;i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define F first
#define S second
signed main(){
  ll N,i,j,k,ans=-1000000000;
  cin>>N;bool F[N][10],P[N][11];
  REP(i,N)REP(j,10)cin>>F[i][j];
  REP(i,N)REP(j,11)cin>>P[i][j];
  FOR(i,1,1024){
    bool X[10];ll c[N],rieki=0;
    REP(j,10)X[j]=(0^i).at(j);
    REP(j,N){
      c[j]=0;
      REP(k,10)if(X[k]&&F[j][k])c[j]++;
      rieki+=P[j][c[j]];
    }
    ans=max(ans,rieki);
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: request for member 'at' in '(0 ^ i)', which is of non-class type 'll' {aka 'long long int'}
   16 |     REP(j,10)X[j]=(0^i).at(j);
      |                         ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i,l,r) for(i=l;i<r;i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define F first
#define S second
signed main(){
  ll N,i,j,k,ans=-1000000000;
  cin>>N;bool F[N][10],P[N][11];
  REP(i,N)REP(j,10)cin>>F[i][j];
  REP(i,N)REP(j,11)cin>>P[i][j];
  FOR(i,1,1024){
    bool X[10];ll c[N],rieki=0;
    REP(j,10)X[j]=i.at(j);
    REP(j,N){
      c[j]=0;
      REP(k,10)if(X[k]&&F[j][k])c[j]++;
      rieki+=P[j][c[j]];
    }
    ans=max(ans,rieki);
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: request for member 'at' in 'i', which is of non-class type 'll' {aka 'long long int'}
   16 |     REP(j,10)X[j]=i.at(j);
      |                     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i,l,r) for(i=l;i<r;i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define P pair<ll,ll>
#define F first
#define S second
signed main(){
  ll N,i,j,k,ans=-1000000000;
  cin>>N;bool F[N][10],P[N][11];
  REP(i,N)REP(j,10)cin>>F[i][j];
  REP(i,N)REP(j,11)cin>>P[i][j];
  FOR(i,1,1024){
    bool X[10];ll c[N],rieki=0;
    REP(j,10)X[j]=i.at(j);
    REP(j,N){
      c[j]=0;
      REP(k,10)if(X[k]&&F[j][k])c[j]++;
      rieki+=P[j][c[j]];
    }
    ans=max(ans,rieki);
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: invalid declarator before '[' token
   12 |   cin>>N;bool F[N][10],P[N][11];
      |                         ^
a.cc:14:26: error: expected primary-expression before '[' token
   14 |   REP(i,N)REP(j,11)cin>>P[i][j];
      |                          ^
a.cc:17:21: error: request for member 'at' in 'i', which is of non-class type 'll' {aka 'long long int'}
   17 |     REP(j,10)X[j]=i.at(j);
      |                     ^~
a.cc:21:15: error: expected primary-expression before '[' token
   21 |       rieki+=P[j][c[j]];
      |               ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;
constexpr lint mod2 = 998244353;

int main() {
  int n, m = -1e9; scanf("%d", &n);
  v2b v(n, v1b(10)); v2i u(n, v1i(11));
  rep(i, n) rep(j, 10) scanf("%d", &v[i][j]);
  rep(i, n) rep(j, 11) scanf("%d", &u[i][j]);
  rep(i, 1 << 10){
    if(i == 0) continue;
    int t = 0;
    rep(j, n){
      int x = 0;
      rep(k, 10) if(i & 1 << k && v[j][k]) ++x;
      t += v[j][x];
    }
    m = max(m, t);
  }
  printf("%d\n", m);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:43: error: taking address of rvalue [-fpermissive]
   33 |   rep(i, n) rep(j, 10) scanf("%d", &v[i][j]);
      |                                     ~~~~~~^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n;
  cin>>n;
  int f[n][10];
  int p[n][10];
  int ans=-1.e32;
  
  for(int i=0;i<n;i++){
    for(int j=0;j<10;j++){
      cin>>f[i][j];
    }
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<10;j++){
      cin>>p[i][j];
    }
  }
  for(int b=0;b<(1<<10):b++){
    int cc=0;
    for(int i=0;i<n;i++){
      int c=0;
      for(int j=0;j<10;j++){
        if(b>>j&1 && f[i][j]) c++;
        cc+=p[i][j];
      } 
    }
    if(ans<cc) ans=cc;
  }
  cout<<ans<<endl;
}
  
      

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: warning: overflow in conversion from 'double' to 'int' changes value from '-1.0000000000000001e+32' to '-2147483648' [-Woverflow]
    9 |   int ans=-1.e32;
      |           ^~~~~~
a.cc:21:15: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   21 |   for(int b=0;b<(1<<10):b++){
      |               ^
a.cc:21:24: error: expected ';' before ':' token
   21 |   for(int b=0;b<(1<<10):b++){
      |                        ^
      |                        ;
a.cc:33:1: error: expected primary-expression before '}' token
   33 | }
      | ^
a.cc:32:19: error: expected ')' before '}' token
   32 |   cout<<ans<<endl;
      |                   ^
      |                   )
   33 | }
      | ~                  
a.cc:21:6: note: to match this '('
   21 |   for(int b=0;b<(1<<10):b++){
      |      ^
a.cc:33:1: error: expected primary-expression before '}' token
   33 | }
      | ^