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

#include<iostream>
#include<complex>
#include<cstdio>
using namespace std;
typedef complex<double> p;

double det(p a,p b)
{
	return a.real()*b.imag()-a.imag()*b.real();
}

bool comp(p a,p b)
{
	if(a.real()!=b.real()) return a.real()<b.real();
	return a.imag()<b.imag();
}

int main()
{
	int n;
	while(cin>>n,n)
	{
		p ps[n];
		for(int i = 0; i < n; ++i)
		{
			scanf("%lf,%lf",&ps[i].real(),&ps[i].imag());
		}

		sort(ps,ps+n,comp);
		int k=0;
		p qs[n*2];

		for(int i = 0; i < n; ++i)
		{
			while(k>1&&det(qs[k-1]-qs[k-2],ps[i]-qs[k-1])<=0) --k;
			qs[k++]=ps[i];
		}

		for(int i = n-2, t=k; i >= 0; --i)
		{
			while(k>t&&det(qs[k-1]-qs[k-2],ps[i]-qs[k-1])<=0) --k;
			qs[k++]=ps[i];
		}

		cout<<n-k+1<<endl;
	}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:52: error: lvalue required as unary '&' operand
   26 |                         scanf("%lf,%lf",&ps[i].real(),&ps[i].imag());
      |                                          ~~~~~~~~~~^~
a.cc:26:66: error: lvalue required as unary '&' operand
   26 |                         scanf("%lf,%lf",&ps[i].real(),&ps[i].imag());
      |                                                        ~~~~~~~~~~^~
a.cc:29:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   29 |                 sort(ps,ps+n,comp);
      |                 ^~~~
      |                 sqrt
Language: C++

#include<iostream>
#include<algorithm>
#include<queue>
#include<map>
#include<string.h>
#include<math.h>
#include<functional>

using namespace std;



int main(){
    
    
    int count = 0;
    pair<double, double> xy[100];
    while(cin>>count){
        
        if(count==0)break;
        for(int i=0; i<count; i++)scanf("%lf,%lf",&xy[i].first,&xy[i].second);
        sort(xy,xy+count);
        int now = 0;
        int end = count;
        while(now<end-1){
            double max = INTMAX_MIN;
            int max_n = now;
            for(int i=now+1; i<end; i++){
                double temp;
                double x = xy[i].first-xy[now].first;
                double y = xy[i].second-xy[now].second;
                if(x==0){
                    if(y>0)temp=INTMAX_MAX;
                    else temp= INTMAX_MIN+1;
                }else{
                    temp = y/x;
                }
                if(temp>max){
                    max = temp;
                    max_n = i;
                }
            }
            now = max_n;
            count--;
        }
        now = 0;
        while(now<end-1){
            double min = INTMAX_MAX;
            int min_n = now;
            for(int i=now+1; i<end; i++){
                double temp;
                double x = xy[i].first-xy[now].first;
                double y = xy[i].second-xy[now].second;
                if(x==0){
                    if(y>0)temp=INTMAX_MAX-1;
                    else temp= INTMAX_MIN;
                }else{
                    temp = y/x;
                }
                if(temp<min){
                    min = temp;
                    min_n = i;
                }
            }
            now = min_n;
            count--;
        }
        cout<<count<<endl;
        
        
    }
    
    
    

        


}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:26: error: 'INTMAX_MIN' was not declared in this scope
   26 |             double max = INTMAX_MIN;
      |                          ^~~~~~~~~~
a.cc:33:33: error: 'INTMAX_MAX' was not declared in this scope; did you mean 'TMP_MAX'?
   33 |                     if(y>0)temp=INTMAX_MAX;
      |                                 ^~~~~~~~~~
      |                                 TMP_MAX
a.cc:48:26: error: 'INTMAX_MAX' was not declared in this scope; did you mean 'TMP_MAX'?
   48 |             double min = INTMAX_MAX;
      |                          ^~~~~~~~~~
      |                          TMP_MAX
a.cc:56:32: error: 'INTMAX_MIN' was not declared in this scope
   56 |                     else temp= INTMAX_MIN;
      |                                ^~~~~~~~~~
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
char[][] map;
while(!(line=br.readLine()).equals("0")){
if(line.isEmpty()){
continue;
}
int n=Integer.parseInt(line);
int m=Integer.parseInt(br.readLine()):
int g=Integer.parseInt(br.readLine()):
int d=Integer.parseInt(br.readLine()):
map=new char[d][n+1];
for(int i=0;i<d;i++){
line="0"+br.readLine()+"0";
for(int j=0;j<=n;j++){
map[i][j]=line.charAt(j);
}
}
System.out.println(solve(m,g,map));
}
}

private static boolean canReachGoal(int m,int g,char[][] map){
int now=m;
for(int i=0;i<map.length;i++){
if(char[i][now-1]=='1'){
now--;
}
else if(char[i][now]=='1'){
now++;
}
}
return g==now;
}

private static String solve(int m,int g,char[][] map){
if(canReachGoal(m,g,map)){
return "0";
}
for(int i=0;i<map.length;i++){
for(int j=1;j<map[0].length;j++){
if(map[i][j-1]=='0'&&map[i][j]=='0'&&map[i][j+1]=='0'){
map[i][j]='1';
if(canReachGoal(m,g,map)){
return String.valueOf(i+1)+" "+String.valueOf(j);
}
map[i][j]='0';
}
}
}
return "1";
}
}

Compiler output:
Main.java:13: error: ';' expected
int m=Integer.parseInt(br.readLine()):
                                     ^
Main.java:14: error: ';' expected
int g=Integer.parseInt(br.readLine()):
                                     ^
Main.java:15: error: ';' expected
int d=Integer.parseInt(br.readLine()):
                                     ^
Main.java:30: error: ']' expected
if(char[i][now-1]=='1'){
        ^
Main.java:30: error: ';' expected
if(char[i][now-1]=='1'){
         ^
Main.java:30: error: not a statement
if(char[i][now-1]=='1'){
              ^
Main.java:30: error: ';' expected
if(char[i][now-1]=='1'){
                ^
Main.java:33: error: ']' expected
else if(char[i][now]=='1'){
             ^
Main.java:33: error: ';' expected
else if(char[i][now]=='1'){
              ^
Main.java:33: error: 'else' without 'if'
else if(char[i][now]=='1'){
^
Main.java:33: error: not a statement
else if(char[i][now]=='1'){
                ^
Main.java:33: error: ';' expected
else if(char[i][now]=='1'){
                   ^
12 errors
Language: C++

#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <utility>
#include <algorithm>
#include <vector>
#include <cmath>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,a,b) for(int i=a;i<b;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define Yes(f) cout<<(f?"Yes":"No")<<endl
#define yes(f) cout<<(f?"yes":"no")<<endl
#define YES(f) cout<<(f?"YES":"NO")<<endl

using namespace std;

const int mod=1e9+7;

void run();

void init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(12);
}

signed main(){
    init();
    run();
    return 0;
}

int n,d,m,g;
int a[30][10];

bool solve(){
  int x=m-1;
  rep(i,d){
    if(x>0&&a[i][x-1])x--;
    else if(x<n-1&&a[i][x])x++;
  }
  return x==g-1;
}

void run(){
  while(cin>>n,n){
    cin>>m>>g>>d;
    MEMSET(a);
    char c;
    rep(i,d){
      rep(j,n-1){
	cin>>c;
	a[i][j]=c-'0';
      }
    }
    if(solve()){
      cout<<0<<endl;
      continue;
    }
    rep(i,d){
      rep(j,n-1){
	if(a[i][j])continue;
	if(j>0&&a[i][j-1])continue;
	if(j<n-1&&a[i][j+1])continue;
	a[i][j]=1;
	if(solve()){
	  cout<<(i+1)<<" "<<(j+1)<<endl;
	  goto BR;
	}
	a[i][j]=0;
      }
    }
    cout<<1<<endl;
  BR:;
  }
}



Compiler output:
a.cc: In function 'void run()':
a.cc:22:19: error: 'memset' was not declared in this scope
   22 | #define MEMSET(a) memset(a,0,sizeof(a))
      |                   ^~~~~~
a.cc:61:5: note: in expansion of macro 'MEMSET'
   61 |     MEMSET(a);
      |     ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <cmath>
  +++ |+#include <cstring>
    8 | #define int long long
Language: C++

loop do
  n = gets.to_i
  break if n==0
  m = gets.to_i
  g = gets.to_i
  d = gets.to_i
  b = d.times.map{gets.chomp.chars.map(&:to_i)}

  map = Array.new(d+1){Array.new(n,0)}
  n.times do |i|
    map[0][i] = i+1
  end

  d.times do |j|
    n.times do |i|
      if i<n && b[j][i] == 1 
        map[j+1][i] = map[j][i+1]
      elsif i>0 && b[j][i-1] == 1
        map[j+1][i] = map[j][i-1]
      else
        map[j+1][i] = map[j][i]
      end
    end
  end

  puts map.map{|x| x*' '}*"\n"
  if map[d][g-1] == m
    puts 0
  elsif
    k = map[d][g-1]

    (d-1).times do |j|
      i = map[j].find_index(m)
      if i<n && b[j][i] == 0 && (i<=0 || b[j][i-1] == 0) && (i>=n-2 || b[j][i+1] == 0)
        if map[j][i+1] == k
          puts [j+1, i+1].join(' ')
          exit()
        end
      elsif i>0 && b[j][i-1] == 0 && (i>=n || b[j][i] == 0) && (i<2 || b[j][i-2] == 0)
        if map[j][i-1] == k
          puts [j+1, i].join(' ')
          exit()
        end
      end
    end

    puts '1'
  end
end

Compiler output:
a.cc:1:1: error: 'loop' does not name a type
    1 | loop do
      | ^~~~
a.cc:9:3: error: 'map' does not name a type
    9 |   map = Array.new(d+1){Array.new(n,0)}
      |   ^~~
a.cc:10:3: error: 'n' does not name a type
   10 |   n.times do |i|
      |   ^
a.cc:26:27: error: expected unqualified-id before string constant
   26 |   puts map.map{|x| x*' '}*"\n"
      |                           ^~~~
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	static boolean node[][];
	static int root[][];
	public static void main(String[] args)throws IOException{
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(isr);
		Main app = new Main();
		String string;
		
		int n, m, d, ans, tmp;
		while(!(string = reader.readLine()).equals("0")){
			n = Integer.valueOf(string);
			m = Integer.valueOf(reader.readLine()) - 1;
			ans = Integer.valueOf(reader.readLine()) - 1;
			d = Integer.valueOf(reader.readLine());
			
			node = new boolean[n][n];
			root = new int[2][d];
			tmp = m;
			for(int i = 0; i < d; i++){
				char ch[] = reader.readLine().toCharArray();
				
				for(int j = 0; j < n - 1; j++){
					if(ch[j] == '1'){
						root[0][i] = j;
						
						node[j][j + 1] = true;
						node[j + 1][j] = true;
					}
				}
				if(tmp + 1 < n && node[tmp][tmp + 1]) tmp++;
				else if(tmp - 1 >= 0 && node[tmp][tmp - 1]) tmp--;
				
				root[1][i] = tmp;
			}
			
			if(ans == app.doing(0, m)){
				System.out.println(0);
				continue;
			}else{
				boolean judge = false;
				for(int i = 0; i < d - 1; i++){
					if(root[1][i] - 1 >= 0){
						if(ans == app.doing(i, root[1][i] - 1)){
							System.out.println(i + 1 + " " + (root[1][i] + 1));
							judge = true;
							break;
						}
					}else if(root[1][i] + 1 < n){
						if(ans == app.doing(i, root[1][i] + 1)){
							System.out.println(i + 1 + " " + (root[1][i] + 1));
							judge = true;
							break;
						}
					}
				}
				if(judge) continue;
			}
			System.out.println(1);
		}
		reader.close();
	}
	
	public int doing(int n, int ing){
		int len = node.length;
		for(int i = n + 1; i < len; i++){
			if(ing + 1 < len && node[ing][ing + 1]) ing++;
			else if(ing - 1 >= 0 && node[ing][ing - 1]) ing--;
		}
		return ing;
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main{
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std;int n,m,g,d,l[10],f,i,j,y,x;string p[30];int c(){for(y=n;y-->0;)l[y]=y+1;for(;++y<d;)for(x=n-1;x-->0;)if(p[y][x]^48)swap(l[x],l[x+1]);return l[g-1]==m;}Main(){for(;cin>>n>>m>>g>>d;f-1?puts(f?"0":"1"):printf("%d %d\n",i,j)){for(i=0;i<d;)cin>>p[i++];f=c()*2;for(i=0;!f & i<d;i++)for(j=0;!f & j<n-1;j++)if(p[i][j]-49&p[i][j-1]-49&p[i][j+1]-49){p[i][j]++,f=c(),p[i][j]--;};}}

Compiler output:
a.cc:2:173: error: ISO C++ forbids declaration of 'Main' with no type [-fpermissive]
    2 | using namespace std;int n,m,g,d,l[10],f,i,j,y,x;string p[30];int c(){for(y=n;y-->0;)l[y]=y+1;for(;++y<d;)for(x=n-1;x-->0;)if(p[y][x]^48)swap(l[x],l[x+1]);return l[g-1]==m;}Main(){for(;cin>>n>>m>>g>>d;f-1?puts(f?"0":"1"):printf("%d %d\n",i,j)){for(i=0;i<d;)cin>>p[i++];f=c()*2;for(i=0;!f & i<d;i++)for(j=0;!f & j<n-1;j++)if(p[i][j]-49&p[i][j-1]-49&p[i][j+1]-49){p[i][j]++,f=c(),p[i][j]--;};}}
      |                                                                                                                                                                             ^~~~
a.cc: In function 'int Main()':
a.cc:2:391: warning: no return statement in function returning non-void [-Wreturn-type]
    2 | using namespace std;int n,m,g,d,l[10],f,i,j,y,x;string p[30];int c(){for(y=n;y-->0;)l[y]=y+1;for(;++y<d;)for(x=n-1;x-->0;)if(p[y][x]^48)swap(l[x],l[x+1]);return l[g-1]==m;}Main(){for(;cin>>n>>m>>g>>d;f-1?puts(f?"0":"1"):printf("%d %d\n",i,j)){for(i=0;i<d;)cin>>p[i++];f=c()*2;for(i=0;!f & i<d;i++)for(j=0;!f & j<n-1;j++)if(p[i][j]-49&p[i][j-1]-49&p[i][j+1]-49){p[i][j]++,f=c(),p[i][j]--;};}}
      |                                                                                                                                                                                                                                                                                                                                                                                                       ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int n,d;
int a[10]={0,1,2,3,4,5,6,7,8,9};
char str[50][20];
void check();
int main(){
    int m,s;
    for(;;){
        cin>>n;
        if(n==0)exit(0);
        cin>>m>>s>>d;
        for(int i=1;i<=d;i++)cin>>str[i];
        check();
        if(a[s]==m)cout<<0<<endl;
        else {
            for(int i=1;i<=d;i++){
                for(int j=0;j<n-1;j++){
                    if((j==n-2&&str[i][j]!='1'&&str[i][j-1]!='1')||
                        (j==0&&str[i][j]!='1'&&str[i][j+1]!='1')||
                        (j!=0&&j!=n-2&&str[i][j]!='1'&&str[i][j+1]!='1'&&str[i][j-1]!='1')){
                        str[i][j]='1';
                        check();
                        if(a[s]==m){
                            cout<<i<<" "<<j+1<<endl;
                            goto end;
                        }
                        str[i][j]='0';
　　　　　　　　　　　　　for(int k=0;k<10;k++)a[k]=k;
                    }
                }
            }
            cout<<1<<endl;
        }
        end:;
        for(int i=0;i<10;i++)a[i]=i;
        for(int i=0;i<50;i++)for(int j=0;j<20;j++)str[i][j]=0;
    }
    return 0;
}
void check(){
    for(int i=1;i<=d;i++){
        for(int j=1;j<n;j++){
            if(str[i][j-1]=='1')swap(a[j],a[j+1]);
        }
    }
    return;
}

Compiler output:
a.cc:31:1: error: extended character 　 is not valid in an identifier
   31 | 　　　　　　　　　　　　　for(int k=0;k<10;k++)a[k]=k;
      | ^
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc:31:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:31:31: error: expected primary-expression before 'int'
   31 | 　　　　　　　　　　　　　for(int k=0;k<10;k++)a[k]=k;
      |                               ^~~
a.cc:31:39: error: 'k' was not declared in this scope
   31 | 　　　　　　　　　　　　　for(int k=0;k<10;k++)a[k]=k;
      |                                       ^
Language: C++


import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;

public class Main {

	int INF = 1 << 28;
	//long INF = 1L << 62;
	double EPS = 1e-10;

	void run() {
		Scanner sc = new Scanner(System.in);
		for(;;) {
			int n = sc.nextInt();
			if(n==0) break;
			int m=sc.nextInt()-1, c=sc.nextInt()-1, d=sc.nextInt();
			int g[] = new int[n];
			for(int i=0;i<n;i++) g[i] = i;
			HashSet<P> s = new HashSet<P>();
			for(int i=0;i<d;i++) {
				int l = Integer.valueOf((new StringBuilder(sc.next()).reverse().toString()), 2) << 1;
				for(int j=1;j<=n-1;j++) {
					if(((l>>j)&1) == 1) {
						swap(g, j,  j-1);
					}
					else if( ((l>>(j-1))&1) == 0 && ((l>>(j+1))&1) == 0 ){
						s.add(new P(g[j], g[j-1], i, j));
//						debug(g[j], g[j-1], i, j);
					}
//					debug(g);
				}
			}
//			for(P p: s) debug(p.v1, p.v2, p.x, p.y);
//			debug(g);
			if( g[c] == m ) System.out.println(0);
			else {
				int t = g[c];
				if( t < m ) {
					int tmp = t; 
					t = m;
					m = tmp;
				}
				boolean f = false;
				for(P p: s) {
					if( p.v1 == m && p.v2 == t ) {
						System.out.println((p.x+1) + " " + p.y);
						f = true;
					}
				}
				if(!f) System.out.println(1);
			}
		}
	}
	
	void swap(int[] s, int a, int b) {
		int tmp = s[a];
		s[a] = s[b];
		s[b] = tmp;
	}
	
	class P {
		int v1, v2;
		int x, y;
		P(int v1, int v2, int x, int y) {
			this.v1 = min(v1, v2); this.v2 = max(v1, v2);
			this.x = x; this.y = y;
		}
		
		public boolean equals(Object o) {
			if( o instanceof P) {
				return v1 == ((P)o).v1 && v2 == ((P)o).v2;
			}
			return false;
		}
		
		public int hashCode() {
			return v1*100 + v2;
		}
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}

	public static void main(String[] args) {
		new Main().run();
	}
}

Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import static java.util.Arrays.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import static java.util.Collections.*;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import static java.lang.Math.*;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: expected unqualified-id before 'public'
    8 | public class Main {
      | ^~~~~~
Language: Java

import sun.jvm.hotspot.jdi.IntegerTypeImpl;

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

public class Main {
    int[][][] memo;

    int solve(int n, int bits, int sum) {
        if (n == 0) {
            if (sum == 0) return 1;
            return 0;
        }
        if (sum > 330) return 0;
        if (sum < 0) return 0;
        if (memo[n][bits][sum] != -1) return memo[n][bits][sum];
        int ans = 0;
        for (int i = 0; i < 10; ++i) {
            if (((bits >> i) & 1) != 0) {
                ans += solve(n - 1, bits & ~(1 << i), sum - i*(10 - Integer.bitCount(bits) + 1));
            }
        }
        return memo[n][bits][sum] = ans;
    }

    void run() {
        memo = new int[11][1024][331];
        for (int i = 0; i < 11; ++i) {
            for(int j = 0; j < 1024; ++j) {
                for (int k = 0; k < 331; ++k) {
                    memo[i][j][k] = -1;
                }
            }
        }
        try {
            while (true) {
                int N = readInt();
                int S = readInt();
                sysout.println(solve(N, (1 << 10) - 1, S));
            }
        } catch (NullPointerException e) {
        }
    }

    public static void main(String[] args) {
        new Main().run();
    }

    // flush automatically iff you call `println` or `printf` or `format`.
    PrintWriter sysout = new PrintWriter(System.out, true);

    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer buffer = new StringTokenizer("");

    String read() {
        if (!buffer.hasMoreTokens()) {
            try {
                buffer = new StringTokenizer(in.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return buffer.nextToken();
    }

    int readInt() {
        return Integer.parseInt(read());
    }

    long readLong() {
        return Long.parseLong(read());
    }

    double readDouble() {
        return Double.parseDouble(read());
    }

    String readLine() {
        buffer = new StringTokenizer("");
        try {
            return in.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

Compiler output:
Main.java:1: error: package sun.jvm.hotspot.jdi does not exist
import sun.jvm.hotspot.jdi.IntegerTypeImpl;
                          ^
1 error
Language: Java

import???java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
int[][] dp;
boolean[] use;
while((line=br.readLine())!=null){
String[] values=line.split(" ");
int n=Integer.parseInt(values[0]);
int s=Integer.parseInt(values[1]);
dp=new int[11][331];
use=new boolean[10];
if(n>10||s>330){
System.out.println("0");
continue;
}
dfs(1,0,dp,use);
}
}
private static void dfs(int depth,int sum,int[][] dp,boolean[] use){
dp[depth-1][sum]++;
for(int i=0;i<=9;i++){
if(!use[i]){
use[i]=true;
dfs(depth+1,sum+depth*i);
use[i]=false;
}
}
}
}

Compiler output:
Main.java:1: error: <identifier> expected
import???java.io.*;
      ^
1 error
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
int[][] dp;
boolean[] use;
while((line=br.readLine())!=null){
String[] values=line.split(" ");
int n=Integer.parseInt(values[0]);
int s=Integer.parseInt(values[1]);
dp=new int[11][331];
use=new boolean[10];
if(n>10||s>330){
System.out.println("0");
continue;
}
dfs(1,0,dp,use);
}
}
private static void dfs(int depth,int sum,int[][] dp,boolean[] use){
dp[depth-1][sum]++;
for(int i=0;i<=9;i++){
if(!use[i]){
use[i]=true;
dfs(depth+1,sum+depth*i);
use[i]=false;
}
}
}
}

Compiler output:
Main.java:27: error: method dfs in class Main cannot be applied to given types;
dfs(depth+1,sum+depth*i);
^
  required: int,int,int[][],boolean[]
  found:    int,int
  reason: actual and formal argument lists differ in length
1 error
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

class Main {
	private static int terminal = 0;
	private static int numConsist = 0;

	public void nextFor(int iteration, List<Integer> array, int constant, int sum){
		int tmpSum;
		List<Integer> tmpArray = null;
		for( int i = 0; i <array.size(); i++){
			tmpArray.clear();
			
			tmpSum = new Integer(sum);
			tmpArray = new ArrayList<Integer>(array);
			
			tmpSum += tmpArray.get(i) * (constant + 1);
			tmpArray.remove(i);
			if (tmpArray.size() != 0 && iteration > 1)
				nextFor(iteration -1, tmpArray, constant + 1, tmpSum);
			if((iteration == 1 && tmpSum == terminal) || (tmpArray.size() == 0 && tmpSum == terminal)){
				numConsist++;
			}
		}
	}

	public static void main(String[] args){

		CombinationOfNumberSequences cNS = new CombinationOfNumberSequences();
		List<Integer> array = new ArrayList<Integer>();
		for(int i = 0; i < 10; i++){
			array.add(i);
		}

		Scanner input = new Scanner(System.in);
		while(input.hasNext()){
			String[] paraSet = input.nextLine().split(" ");
			int iteration = Integer.parseInt(paraSet[0]);
			terminal = Integer.parseInt(paraSet[1]);
			numConsist = 0;

			cNS.nextFor(iteration, array, 0, 0);
			System.out.println(numConsist);
		}
		input.close();
	}
}

Compiler output:
Main.java:15: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
			tmpSum = new Integer(sum);
			         ^
Main.java:30: error: cannot find symbol
		CombinationOfNumberSequences cNS = new CombinationOfNumberSequences();
		^
  symbol:   class CombinationOfNumberSequences
  location: class Main
Main.java:30: error: cannot find symbol
		CombinationOfNumberSequences cNS = new CombinationOfNumberSequences();
		                                       ^
  symbol:   class CombinationOfNumberSequences
  location: class Main
2 errors
1 warning
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

class Main {
    private static int terminal = 0;
    private static int numConsist = 0;

    public void nextFor(int iteration, List<Byte> integerList, int constant, int sum){

        for( int i = 0; i <integerList.size(); i++){
            List<Byte> tmpIntegerList = new ArrayList<Byte>(integerList);
            sum += tmpIntegerList.get(i) * (constant + 1);
            tmpIntegerList.remove(i);
            if(sum >= terminal && (iteration > 1 || tmpIntegerList.size() > 0)){
            	tmpIntegerList.clear();
                i = integerList.size();
            } else {
                if (tmpIntegerList.size() != 0 && iteration > 1)
                    nextFor(iteration -1, tmpIntegerList, constant + 1, sum);
                if((iteration == 1 && sum == terminal) || (tmpIntegerList.size() == 0 && sum == terminal)){
                    numConsist++;
                }
            }
        }
    }

    public static void main(String[] args){

        Main cNS = new Main();
        List<Byte> integerList = new ArrayList<Byte>();
        for(short i = 0; i < 10; i++){
            integerList.add(i);
        }

        Scanner input = new Scanner(System.in);
        while(input.hasNext()){
            int iteration = input.nextInt();
            terminal = input.nextInt();

            if(iteration >= 1 && iteration <=10 && terminal >= 0 && terminal <= 330){
                numConsist = 0;
                cNS.nextFor(iteration, integerList, 0, 0);
                System.out.println(numConsist);
            } else if(iteration >= 1 && iteration <=10 && terminal > 330 && terminal <= 10000){
                System.out.println(0);
            }

        }
        input.close();
    }
}

Compiler output:
Main.java:33: error: incompatible types: short cannot be converted to Byte
            integerList.add(i);
                            ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Main2 {

	static int n, s, count;
	static boolean[] already;
	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		while(cin.hasNext()){
			n = cin.nextInt();
			s = cin.nextInt();
			if(n>10){
				System.out.println(0);
				continue;
			}
			count=0;
			already = new boolean[10];
			int[] a  =new int[n];
			Arrays.fill(a, -1);
			dfs(0, 0);
			System.out.println(count);
		}
	}
	static void dfs(int depth, int sum){
		if(sum > s){
			return;
		}
		if(depth == n){
			if(sum==s){
				count++;
			}
			return;
		}
		for(int i = 0; i < 10;i++){
			if(already[i]){
				continue;
			}
			already[i]=true;
			int tmp = sum;
			sum += (depth+1)*i;

			dfs(depth+1, sum);
			sum = tmp;
			already[i]=false;
		}
	}
	static boolean is(int[] a){
		int sum=0;
		for(int i = 0; i < a.length;i++){
			if(a[i]>=0){
			sum += a[i]*(i+1);
			}
		}
		return sum==s;
	}
}

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

import java.util.*;

public class Main {
	int n, s, count;
	
	@SuppressWarnings("unchecked")
	ArrayDeque<Integer> q = new ArrayDeque();
	
	
	void loop(int a, int b){
		if(a==n){
			if(b==s) count++;
		}else if(b<=s){
			for(int i=0;i<10;i++){
				if(q.contains(i)==false){
					q.push(i);
					loop(a+1,b+(a+1)*i);
					q.pop();
				}
			}
		}
	}
	
	void solve(){
		Scanner sc = new Scanner(System.in);
		
		while(sc.hasNext()){
			n = sc.nextInt();
			s = sc.nextInt();
			count = 0;
			q = new ArrayDeque();
			if(n<11 && s<370) loop(0, 0);
			System.out.println(count);
		}
	}
		
	public static void main(String[] args) {
		new Main.solve();	
	}	
}

Compiler output:
Main.java:38: error: cannot find symbol
		new Main.solve();	
		        ^
  symbol:   class solve
  location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: Java

package jp.ac.saburou.volume0.p70;

import java.util.NoSuchElementException;
import java.util.Scanner;

public class P70 {

	static boolean[] used = new boolean[10];
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		while(true){
			try{
				int n = scan.nextInt();
				int s = scan.nextInt();
				System.out.println(solve(n, s));
			}catch(NoSuchElementException e){
				//DO NOTHING
			}
		}
	}

	private static int solve(int numRemained, int s){
		if(s < 0)
			return 0;
		
		if(numRemained < 1){
			if(s == 0)
				return 1;
			else
				return 0;
		}
		
		int c = 0;
		for(int i = 0; i < 10; i++){
			if(used[i])	continue;
			used[i] = true;
			c += solve(numRemained - 1, s - numRemained * i);
			used[i] = false;
		}
		return c;
	}
}

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

#include<stdio.h>
int n,c;
void k(int s,int num[10]){
  int i;
  for(i=0;i<10;i++){
    if(num[i]==0&&s>=n*i){//1
      s-=n*i;
      num[i]=1;
      n--;//2
      if(n==0&&s==0){
	c++;
      }
      else if(s>=0&&n>0){
	k(s,num);//3
      }
      num[i]=0;
      n++;
      s+=n*i;//4
    }
  }
}
int main(){
  int s;
  while(scanf("%d %d",&n,&s)!=EOF){
    c=0;
    int num[10]={0};
    lc=1;
    k(s,num);
    printf("%d\n",c);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:5: error: 'lc' undeclared (first use in this function); did you mean 'c'?
   27 |     lc=1;
      |     ^~
      |     c
main.c:27:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <cstdio>

bool used[10];
int sum, ans, n, s, Min, Max;

inline void A(int x){
	if(x == 0){
		if(sum == s) ans++;
		return;
	}
	int tmp = -x;
	for(int i = 9; i >= 0; i--){
		tmp += x;
		if(used[i]) continue;
		used[i] = true;
		sum += tmp;
		A(x-1);
		sum -= tmp;
		used[i] = false;
	}
}

int main(){
	while(scanf("%d%d", &n, &s) != EOF){
		Min = 0, Max = 0;
		for(int i = n-1; i >= 0; i--) Max += (i+1)*(i+1);
		for(int i = n-1; i >= 0; i--) Min += (n-i)*(i+1);
		if(s > Max || s < Min){
			printf("0\n");
			continue;
		}
		ans = 0; sum = 0;
		for(int i = 9; i >= 0; i--) used[i] = false;
		A(n);
		printf("%d\n", ans);
	}
}

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

#include <cstdio>
#include <algorithm>

#define N 10

using namespace std;

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int n, s;
  int i;

  while ( scanf ( "%d%d", &n, &s ) == 2 )
  {
    int d[ N ] = { 0 };
    int c = 0;

    for ( i = 1; i <= n; ++i )
    {
      d[ N - i ] = i;
    }

    do
    {
      int r = 0;

      for ( i = 0; i < N; ++i )
      {
        r += i * d[ i ];
      }

      c += !!( r == s );
    }
    while ( next_permutation ( d, d + N ) );

    printf ( "%d\n", c );
  }

  return ( 0 );
}

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

/*
AizuOnline A0070
Combination of Number Sequences
*/
#include <stdio.h>
#define min(x,y) (((x)>(y))?(y):(x))

int used_list[10];

long int c_n_s(int n,int s,int used_list_ptr)
{
  int i,j;
  long int sum,ret;

/* printf("%d %d %d\n",n,s,used_list_ptr);*/
    
  if(n==1)
    {
      for(i=0;i<used_list_ptr;i++)
        {
          if(s == used_list[i])
            return(0);
        }
      if(s > 9)
        return(0);
      else
        {
          /*printf("*");*/
          return(1);
        }
    }
  else
    { sum = 0;
      for(i=min(9,(int)(s/n));i>=0;i--)
        { 
          {for(j=0;j<used_list_ptr;j++)
            if(i == used_list[j])
              goto AAA;
          }
         
          used_list[used_list_ptr]=i;
          
          ret = c_n_s(n-1,s-i*n,used_list_ptr+1);
          if(ret == 0)
            goto BBB:
          sum += ret;
        AAA:
          ;
        }
    BBB:
      ;
    }
  return(sum);
}



main()
{
int n , s;
long int ret;

  while(EOF != scanf("%d %d",&n,&s))
    {
      ret = c_n_s (n,s,0);

      printf("%ld\n",ret);
    }
  return(0);
}

Compiler output:
main.c: In function 'c_n_s':
main.c:45:21: error: expected ';' before ':' token
   45 |             goto BBB:
      |                     ^
      |                     ;
main.c: At top level:
main.c:58:1: error: return type defaults to 'int' [-Wimplicit-int]
   58 | main()
      | ^~~~
Language: C

#include <stdio.h>

int search(int, int, int, int[]);

int main(void)
{
  int i;
  int count;
  int isUsed[10]={0,0,0,0,0,0,0,0,0,0};

  while(scanf("%d %d",&n, &s)!=EOF){
    count=0;
    for(i=0; i<10; i++){
      isUsed[i]=1;
      count+=search(s, n, i, isUsed);
      isUsed[i]=0;
    }
    printf("%d\n", count);
  }
  return 0;
}

int search(int remain, int n, int k, int isUsed[])
{
  int i;
  int count;

  remain-=n*k;
  if(remain<0) return 0;
  if(n==1 && remain==0) return 1;

  for(i=0; i<10; i++){
    if(isUsed[i]==1) continue;
    isUsed[i]=1;
    count+=search(remain, n-1, i, isUsed);
    isUsed[i]=0;
  }
  return count;
}

Compiler output:
main.c: In function 'main':
main.c:11:24: error: 'n' undeclared (first use in this function)
   11 |   while(scanf("%d %d",&n, &s)!=EOF){
      |                        ^
main.c:11:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:28: error: 's' undeclared (first use in this function)
   11 |   while(scanf("%d %d",&n, &s)!=EOF){
      |                            ^
Language: C

#include <stdio.h>

int search(int, int, int, int*);

int main(void)
{
  int i;
  int count;
  int isUsed[10]={0,0,0,0,0,0,0,0,0,0};

  while(scanf("%d %d",&n, &s)!=EOF){
    count=0;
    for(i=0; i<10; i++){
      isUsed[i]=1;
      count+=search(s, n, i, isUsed);
      isUsed[i]=0;
    }
    printf("%d\n", count);
  }
  return 0;
}

int search(int remain, int n, int k, int* isUsed)
{
  int i;
  int count;

  remain-=n*k;
  if(remain<0) return 0;
  if(n==1 && remain==0) return 1;

  for(i=0; i<10; i++){
    if(isUsed[i]==1) continue;
    isUsed[i]=1;
    count+=search(remain, n-1, i, isUsed);
    isUsed[i]=0;
  }
  return count;
}

Compiler output:
main.c: In function 'main':
main.c:11:24: error: 'n' undeclared (first use in this function)
   11 |   while(scanf("%d %d",&n, &s)!=EOF){
      |                        ^
main.c:11:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:28: error: 's' undeclared (first use in this function)
   11 |   while(scanf("%d %d",&n, &s)!=EOF){
      |                            ^
Language: C

#include <stdio.h>

int main(void)
{
  int ball[10];
  int N;
  int B, C, tmp;
  int i, j;
  
  scanf("%d", &N);
  for(i=0; i<N; i++){
    scanf("%d %d %d %d %d %d %d %d %d %d",
	  &ball[0], &ball[1], &ball[2], &ball[3], &ball[4],
	  &ball[5], &ball[6], &ball[7], &ball[8], &ball[9]);
    B=11; C=11;
    for(j=9; j>=0; j--){
      //B is always smaller.
      if(B>ball[j]) B=ball[j];
      else if(C>ball[j]) C=ball[j];
      else break;
      if(B>C){ tmp=B; B=C; C=tmp;}
    }
    if(j==-1) printf("YES\n");
    else printf("NO\n");
  }
  return 0;
}


//0070 Combination of Number Sequences

#include <stdio.h>

int search(int, int, int, int*);

int main(void)
{
  int i;
  int n, s;
  int count;
  int isUsed[10]={0,0,0,0,0,0,0,0,0,0};

  while(scanf("%d %d",&n, &s)!=EOF){
    count=0;
    for(i=0; i<10; i++){
      isUsed[i]=1;
      count+=search(s, n, i, isUsed);
      isUsed[i]=0;
    }
    printf("%d\n", count);
  }
  return 0;
}

int search(int remain, int n, int k, int* isUsed)
{
  int i;
  int count=0;

  remain-=n*k;
  if(remain<0) return 0;
  if(n==1 && remain==0) return 1;

  for(i=0; i<10; i++){
    if(isUsed[i]==1) continue;
    isUsed[i]=1;
    count+=search(remain, n-1, i, isUsed);
    isUsed[i]=0;
  }
  return count;
}

Compiler output:
main.c:36:5: error: redefinition of 'main'
   36 | int main(void)
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
    3 | int main(void)
      |     ^~~~
Language: C

using System;
using System.Collections;
//using System.Collections.Generic;
 
class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		String s="";
		while(true){
			if((s=rs())==null)return;
			var d=s.Split(' ');
			N=int.Parse(d[0]);
			S=int.Parse(d[1]);
			if(S>=400 || N>10){
				Console.WriteLine("0");
			}else{
				Console.WriteLine("{0}",memo[N][S]);
			}
		}
	}
	
	
	void dfs(int[] route_,int sum){
		//if(sum>S)return;
		int[] route=new int[10];
		int[] used=new int[10];
		for(int i=0;i<10;i++)used[i]=0;
		int now=-1;
		for(int i=0;i<10;i++){
			route[i]=route_[i];
			if(route[i]!=-1){
				now=i;
				used[route[i]]=1;
			}
		}
		sum+=(now+1)*route[now];
		memo[now+1][sum]+=1;
		if(now==10-1){
			//if(S==sum)Ans++;
			return;
		}
	
		for(int i=0;i<=9;i++){
			if(used[i]==0){
				route[now+1]=i;
				dfs(route,sum);
				route[now+1]=-1;
			}
		}
		sum-=(now+1)*route[now];
		return;
	
	}
	
	
	int[][] memo;
	int N;
	int S;
	public Sol(){
		memo=new int[11][];
		for(int i=0;i<=10;i++){
			memo[i]=new int[400];
			for(int j=0;j<400;j++)memo[i][j]=0;
		}
		int[] route=new int[10];
		for(int i=0;i<10;i++)route[i]=-1;
		for(int i=0;i<=9;i++){
			int sum=0;
			route[0]=i;
			dfs(route,sum);
			route[0]=-1;
		}

	}




	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(){return Console.ReadLine().Split(' ');}
	static int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}
	static long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}
	static double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}
}

Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using System;
      | ^~~~~
main.c:2:1: error: unknown type name 'using'
    2 | using System.Collections;
      | ^~~~~
main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | using System.Collections;
      |             ^
main.c:5:1: error: unknown type name 'class'
    5 | class TEST{
      | ^~~~~
main.c:5:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    5 | class TEST{
      |           ^
main.c:12:1: error: unknown type name 'class'
   12 | class Sol{
      | ^~~~~
main.c:12:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   12 | class Sol{
      |          ^
Language: C++

#include<iostream>
using namespace std;
int a[10],n,s;
int f(int i,int sum)
{
    if(i==n)return sum==s;
    int ans=0;
    for(int j=0;j<10;j++)
    {
        if(a[j])continue;
        a[j]=1;
        ans+=f(i+1,sum+j*(i+1));
        a[j]=0;
    }
    return ans;
}
main()
{
    while(cin>>n>>s)
    {
        cout<<f()<<endl;
    }
}


Compiler output:
a.cc:17:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   17 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:21:16: error: too few arguments to function 'int f(int, int)'
   21 |         cout<<f()<<endl;
      |               ~^~
a.cc:4:5: note: declared here
    4 | int f(int i,int sum)
      |     ^
Language: C++

#include<iostream>
using namespace std;
int a[10],n,s;
int memo[11][330];
void f(int i,int sum)
{
    dp[i][sum]++;
    if(i==10)return;
    for(int j=0;j<10;j++)
    {
        if(sum+j*(i+1)>s)return ans;
        if(a[j])continue;
        a[j]=1;
        f(i+1,sum+j*(i+1));
        a[j]=0;
    }
}
main()
{
    f(0,0);
    while(cin>>n>>s)
    {
        cout<<(s>330?0:dp[n][s])<<endl;
    }
}


Compiler output:
a.cc: In function 'void f(int, int)':
a.cc:7:5: error: 'dp' was not declared in this scope
    7 |     dp[i][sum]++;
      |     ^~
a.cc:11:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |         if(sum+j*(i+1)>s)return ans;
      |                                 ^~~
      |                                 abs
a.cc: At global scope:
a.cc:18:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   18 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:23:24: error: 'dp' was not declared in this scope
   23 |         cout<<(s>330?0:dp[n][s])<<endl;
      |                        ^~
Language: C++

#include<iostream>
using namespace std;
int a[10],n,s;
int dp[11][330];
void f(int i,int sum)
{
    dp[i][sum]++;
    if(i==10)return;
    for(int j=0;j<10;j++)
    {
        if(sum+j*(i+1)>s)return ans;
        if(a[j])continue;
        a[j]=1;
        f(i+1,sum+j*(i+1));
        a[j]=0;
    }
}
main()
{
    f(0,0);
    while(cin>>n>>s)
    {
        cout<<(s>330?0:dp[n][s])<<endl;
    }
}


Compiler output:
a.cc: In function 'void f(int, int)':
a.cc:11:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |         if(sum+j*(i+1)>s)return ans;
      |                                 ^~~
      |                                 abs
a.cc: At global scope:
a.cc:18:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   18 | main()
      | ^~~~
Language: C++

include <iostream>
#include <string.h>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int flag[10];
int count;

void dfs(int i,int max,int a,int sum)
{
	if(a > sum || i > max+1 || sum > 330)
	{
		return;
	}
	else if(a == sum && i == max+1)
	{
		count++;
	}
	else
	{
		rep(k,10)
		{
			if(flag[k] == 0)
			{
				flag[k] = 1;
				int temp = i*k;
				dfs(i+1,max,a+i*k,sum);
				flag[k] = 0;
			}
		}
	}
}


int main()
{
	int n,s;
	while(cin >> n >> s)
	{
		memset(flag,0,sizeof(flag));		
		count = 0;
		dfs(1,n,0,s);
		cout << count << endl;
	}
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:41:15: error: 'cin' was not declared in this scope
   41 |         while(cin >> n >> s)
      |               ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string.h>
  +++ |+#include <iostream>
    3 | 
a.cc:43:17: error: 'memset' was not declared in this scope
   43 |                 memset(flag,0,sizeof(flag));
      |                 ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <string.h>
  +++ |+#include <cstring>
    3 | 
a.cc:46:17: error: 'cout' was not declared in this scope
   46 |                 cout << count << endl;
      |                 ^~~~
a.cc:46:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:46:34: error: 'endl' was not declared in this scope
   46 |                 cout << count << endl;
      |                                  ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string.h>
  +++ |+#include <ostream>
    3 |
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <bitset>
using namespace std;

int n, s;
int dp[1 << 10][10000];

int c (int i, int sum, int t) {
    if (t == 0) return (sum == s ? 1 : 0);
    if (sum > s) return 0;
    if (dp[i][s-sum] >= 0) return dp[i][s-sum];
    int res = 0;
    for (int j = 0; j < 10; j++) {
        if ((i & 1 << j) > 0 && c(i - (1 << j), sum + j * t, t-1)) res++;
    }
    return dp[i][s-sum] = res;
}

int main ()
{
    for (int i = 0; i < 1 << 10; i++)
        for (int j = 0; j < 10000; j++)
            dp[i][j] = -1;

    while (cin >> n >> s) {
        int res = 0;
        for (int i = 1; i < 1 << 10; i++) {
            int t = 0;
            for (int j = 0; j < 10; j++)
                if ((i & (1 << j)) > 0) t++;
            if (t == n) {
                res += c(i,0,t);
            }
        }
        cout << res << endl;
    }

    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:41:14: error: expected '}' at end of input
   41 |     return 0;
      |              ^
a.cc:23:1: note: to match this '{'
   23 | {
      | ^
Language: C++

#include <bits/stdc++.h>
#define range(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define rep(i,n) range(i,0,n)
using namespace std;

int n,s;

int rec(int index,int sum,int mask){
	if(sum>s) continue;
	if(index==n){
		if(sum==s)
			return 1;
		else
			return 0;
	}
	int res=0;
	rep(i,10){
		if(mask&(1<<i)) continue;
		int nmask=mask|(1<<i);
		int nsum=sum+(index+1)*i;
		res+=rec(index+1,nsum,nmask);
	}
	return res;
}

int main(void){
	while(cin >> n >> s){
		if(cin.eof())
			break;
		cout << rec(0,0,0) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int rec(int, int, int)':
a.cc:9:19: error: continue statement not within a loop
    9 |         if(sum>s) continue;
      |                   ^~~~~~~~