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


import java.util.*;

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

public class Main {
    int INF = 1 << 28;
    int d, n;
    int[] a, e, r;
    void run() {
        Scanner sc = new Scanner(System.in);
        for (;;) {
            d = sc.nextInt(); n = sc.nextInt();
            if ((d|n) == 0) break;
            
            a = new int[n]; e = new int[n]; r = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = sc.nextInt(); e[i] = sc.nextInt(); r[i] = sc.nextInt();
            }
            
            mem = new int[300][300];
            for (int[] a : mem) fill(a, -1);
            
            int ret = solve(0, d);
            if (ret == INF) {
                System.out.println("NA");
            } else {
                System.out.println(ret);
            }
        }
    }
    
    int[][] mem;
    int solve(int exp, int hp) {
        if (hp < 0) return 0; 
        if (mem[exp][hp] > 0) return mem[exp][hp];
        
        int min = INF;
        for (int i = 0; i < n; i++) if (r[i] <= exp){
            min = min(min, solve(exp + e[i], hp - a[i]) + 1);
        }
        
        return mem[exp][hp] = min;
    }
    
    void debug(Object...os) {
        System.out.println(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: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: C++

#include <iostream>
#include <algorithm>
#define INF 100000000
using namespace std;

int n;
int a[101],e[101],r[101];
int dp[kai][ex];
int ans ;

void saiki(int d,int ex,int kai) {

  if(d <= 0 &&  ans > kai) ans = kai;
  if(d > 0) {
    for(int i=0;i<n;i++) {
      if(r[i] <= ex) {
	saiki(d-a[i],ex+e[i],kai+1);
      }
    }
  }
}

int main() {

  while(1) {
    int d;
    cin >> d >> n;
    if(d==0 && n ==0) break;


    for(int i=0;i<n;i++) cin >> a[i] >> e[i] >> r[i];
    ans =INF;
    saiki(d,0,0);
    if(ans == INF) cout << "NA" <<endl;
    else cout << ans <<endl;
  }
  
  return 0;
}
  

Compiler output:
a.cc:8:8: error: 'kai' was not declared in this scope
    8 | int dp[kai][ex];
      |        ^~~
a.cc:8:13: error: 'ex' was not declared in this scope; did you mean 'e'?
    8 | int dp[kai][ex];
      |             ^~
      |             e
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int D, N, w, a[111], e[111], r[111], dp[111][111][222];
int rec(int f1, int f2, int d) {
	if (f1 >= D) return d;
	if (dp[f1][f2][d]) return dp[f1][f2][d] - 1;
	int ret = 999999999;
	for (int i = 0; i < N; i++) {
		if (!a[i] && (!e[i] || f2 == w)) continue;
		if (f2 >= r[i]) ret = min(ret, rec(f1 + a[i], min(f2 + e[i], w), d + 1));
	}
	dp[f1][f2][d] = ret + 1;
	return ret;
}
int main() {
	while (cin >> D >> N, D | N) {
		for (int i = 0; i < N; i++) cin >> a[i] >> e[i] >> r[i];
		w = max_element(r, r + N);
		for (int i = 0; i < D; i++) {
			for (int j = 0; j <= w; j++) {
				for (int k = 0; k < N * 2; k++) {
					dp[i][j][k] = 0;
				}
			}
		}
		int ret = rec(0, 0, 0);
		if (ret == 999999999) cout << "NA" << endl;
		else cout << ret << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   19 |                 w = max_element(r, r + N);
      |                     ~~~~~~~~~~~^~~~~~~~~~
      |                                |
      |                                int*
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<list>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<unordered_map>
using namespace std;

struct c {
	int d, e, f;
};
c k[100];
int a, b;
int memo[101][101];
int saiki(int n, int m) {//????????????n??§????¨???????m
	if (memo[n][m] != -1)return memo[n][m];
	int MIN = 1 << 29;
	for (int i = 0; i < b; i++) {
		if (k[i].f <= m) {
			if (k[i].d >= n)return memo[n][m]=1;
			MIN = min(MIN, 1+saiki(n-k[i].d, min(100, k[i].e + m)));
		}
	}
	return memo[n][m]=MIN;
}
int main() {
	while (cin >> a >> b, a | b) {
		memset(memo, -1, sizeof(memo));
		for (int g = 0; g < b; g++) {
			int h, i, j; scanf("%d%d%d", &h, &i, &j);
			k[g] = { h,i,j };
		}
		int S = saiki(a, 0);
		if (S >= 1 << 29) { puts("NA"); }
		else cout << S << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: 'memset' was not declared in this scope
   31 |                 memset(memo, -1, sizeof(memo));
      |                 ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include<unordered_map>
  +++ |+#include <cstring>
   10 | using namespace std;
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<list>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<unordered_map>
using namespace std;

struct c {
	int d, e, f;
};
c k[100];
int a, b;
int memo[101][101];
int saiki(int n, int m) {//????????????n??§????¨???????m
	int MIN = 1 << 29;
	for (int i = 0; i < b; i++) {
		if (k[i].f <= m) {
			if (k[i].d >= n)return memo[n][m]=1;
			int O = 0;
			if (memo[n - k[i].d][min(100, k[i].e + m)] != -1) {
				O = 1+memo[n - k[i].d][min(100, k[i].e + m)];
			}
			else {
				O = 1 + saiki(n - k[i].d, min(100, k[i].e + m));
			}
			MIN = min(MIN,O);
		}
	}
	return memo[n][m]=MIN;
}
int main() {
	while (cin >> a >> b, a | b) {
		memset(memo, -1, sizeof(memo));
		for (int g = 0; g < b; g++) {
			int h, i, j; scanf("%d%d%d", &h, &i, &j);
			k[g] = { h,i,j };
		}
		int S = saiki(a, 0);
		if (S >= 1 << 29) { puts("NA"); }
		else cout << S << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: 'memset' was not declared in this scope
   37 |                 memset(memo, -1, sizeof(memo));
      |                 ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include<unordered_map>
  +++ |+#include <cstring>
   10 | using namespace std;
Language: C++

#include<bits/stdc++.h>
#define mk make_pair
#define f first
#define s second
using namespace std;
int d,n,dp[10000][100010];
vector<pair<pair<int,int>,int> >v;
int dfs(int p,int x){
  int res=0,k=1;
  if(p<=0)return 0;
  if(dp[p][x])return dp[p][x];
  for(int i=0;i<v.size();i++)
    if(v[i].s<=x){
      if(k)k--,res=dfs(p-v[i].f.f,x+v[i].f.s)+1;
      else res=min(res,dfs(p-v[i].f.f,x+v[i].f.s)+1);
    }
  return dp[p][x]=res;
}
int main(){
  while(cin>>d>>n,d){
    memset(dp,0,sizeof(dp));
    v.clear();
    while(n--){
      int a,b,c;
      cin>>a>>b>>c;
      v.push_back(mk(mk(a,b),c));
    }
    int p=dfs(d,0);
    if(!p)cout<<"NA"<<endl;
    else cout<<p<<endl;
  }
}

Compiler output:
/tmp/cc0ax1X8.o: in function `dfs(int, int)':
a.cc:(.text+0x9b): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
a.cc:(.text+0xcd): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
a.cc:(.text+0xed): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
a.cc:(.text+0x11c): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
a.cc:(.text+0x13c): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
a.cc:(.text+0x183): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
/tmp/cc0ax1X8.o: in function `main':
a.cc:(.text+0x221): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
a.cc:(.text+0x2af): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
/tmp/cc0ax1X8.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x394): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
a.cc:(.text+0x3ad): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc0ax1X8.o
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
#define mk make_pair
#define f first
#define s second
using namespace std;
int d,n,dp[110][1000];
vector<pair<pair<int,int>,int> >v;
int dfs(int p,int x,int q){
  int res=0,k=1;
  if(x>=1000&&p==q)return 10000000;
  if(p<=0)return 0;
  if(dp[p][x])return dp[p][x];
  for(int i=0;i<v.size();i++)
    if(v[i].s<=x){
      if(k)k--,res=dfs(p-v[i].f.f,x+v[i].f.s,p)+1;
      else res=min(res,dfs(p-v[i].f.f,x+v[i].f.s,p)+1);
    }
  return dp[p][x]=res;
}
int main(){
  while(cin>>d>>n,d){
    memset(dp,0,sizeof(dp));
    v.clear();
    while(n--){
      int a,b,c;
      cin>>a>>b>>c;
      if(a+b)v.push_back(mk(mk(a,b),c));
    }
    int p=dfs(d,0,d);
    if(!p)cout<<"NA"<<endl;
    else cout<<p<<endl;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:31:24: error: expected '}' at end of input
   31 |     else cout<<p<<endl;
      |                        ^
a.cc:21:21: note: to match this '{'
   21 |   while(cin>>d>>n,d){
      |                     ^
a.cc:31:24: error: expected '}' at end of input
   31 |     else cout<<p<<endl;
      |                        ^
a.cc:20:11: note: to match this '{'
   20 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
#define mk make_pair
#define f first
#define s second
using namespace std;
int d,n,s;
vector<pair<pair<int,int>,int> >v;
void dfs(int p,int x,int t){
  if(t>=s)return;
  if(p<0){s=t;return;}
  if(x>10000)return;
  for(int i=0;i<v.size();i++)
    if(v[i].s<=x)dfs(p-v[i].f.f,x+v[i].f.s,t+1);
}
int main(){
  while(cin>>d>>n,d){
    memset(dp,0,sizeof(dp));
    v.clear();s=1000000;
    while(n--){
      int a,b,c;
      cin>>a>>b>>c;
      if(a+b)v.push_back(mk(mk(a,b),c));
    }
    sort(v.begin(),v.end());
    dfs(d,0,0);
    if(s!=10000000)cout<<"NA"<<endl;
    else cout<<s<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: 'dp' was not declared in this scope; did you mean 'dup'?
   17 |     memset(dp,0,sizeof(dp));
      |            ^~
      |            dup
Language: C++

#include<bits/stdc++.h>
#define mk make_pair
#define f first
#define s second
using namespace std;
int d,n,s;
vector<pair<pair<int,int>,int> >v;
void dfs(int p,int x,int t){
  if(t>=s)return;
  if(p<0){s=t;return;}
  if(x>10000)return;
  for(int i=v.size()-1;i>=0;i--)
    if(v[i].s<=x)dfs(p-v[i].f.f,x+v[i].f.s,t+1);
}
int main(){
  while(cin>>d>>n,d){
    memset(dp,0,sizeof(dp));
    v.clear();s=1000000;
    while(n--){
      int a,b,c;
      cin>>a>>b>>c;
      if(a+b)v.push_back(mk(mk(a,b),c));
    }
    sort(v.begin(),v.end());
    dfs(d,0,0);
    if(s!=10000000)cout<<"NA"<<endl;
    else cout<<s<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: 'dp' was not declared in this scope; did you mean 'dup'?
   17 |     memset(dp,0,sizeof(dp));
      |            ^~
      |            dup
Language: C++

#include<bits/stdc++.h>
#define mk make_pair
#define f first
#define s second
using namespace std;
int d,n,dp[110][100000];
vector<pair<pair<int,int>,int> >v;
int dfs(int p,int x,int t){
  int res=0,k=1;
  if(t>=100)return 10000000;
  if(p<=0)return 0;
  if(dp[p][x])return dp[p][x];
  for(int i=0;i<v.size();i++)
    if(v[i].s<=x){
      if(k)k--,res=dfs(p-v[i].f.f,x+v[i].f.s,t+1)+1;
      else res=min(res,dfs(p-v[i].f.f,x+v[i].f.s,t+1)+1);
    }
  return dp[p][x]=res;
}
int main(){
  while(cin>>d>>n,d){
    memset(dp,0,sizeof(dp));
    v.clear();
    while(n--){
      int a,b,c;
      cin>>a>>b>>c;
      if(a+b)v.push_back(mk(mk(a,b),c));
    }
    sort(v.begin(),v.end(),greater<pair<pair<in,int>,int> >());
    int p=dfs(d,0,0);
    if(!p)cout<<"NA"<<endl;
    else cout<<p<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:46: error: 'in' was not declared in this scope; did you mean 'yn'?
   29 |     sort(v.begin(),v.end(),greater<pair<pair<in,int>,int> >());
      |                                              ^~
      |                                              yn
a.cc:29:52: error: template argument 1 is invalid
   29 |     sort(v.begin(),v.end(),greater<pair<pair<in,int>,int> >());
      |                                                    ^
a.cc:29:57: error: template argument 1 is invalid
   29 |     sort(v.begin(),v.end(),greater<pair<pair<in,int>,int> >());
      |                                                         ^
a.cc:29:59: error: template argument 1 is invalid
   29 |     sort(v.begin(),v.end(),greater<pair<pair<in,int>,int> >());
      |                                                           ^
Language: C++

#include<bits/stdc++.h>
#define mk make_pair
#define f first
#define s second
using namespace std;
int d,n,dp[110];
vector<pair<pair<int,int>,int> >v;
int dfs(int p,int x,int t){
  int res=0;
  if(t>=100)return 10000000;
  if(p<=0)return 0;
  if(dp[p])return dp[p];
  for(int i=0;i<v.size();i++)
    if(v[i].s<=x){
      if(k)k--,res=dfs(p-v[i].f.f,x+v[i].f.s,t+1)+1;
      else res=min(res,dfs(p-v[i].f.f,x+v[i].f.s,t+1)+1);
    }
  return dp[p]=res;
}
int main(){
  while(cin>>d>>n,d){
    memset(dp,0,sizeof(dp));
    v.clear();
    while(n--){
      int a,b,c;
      cin>>a>>b>>c;
      if(a+b)v.push_back(mk(mk(a,b),c));
    }
    sort(v.begin(),v.end(),greater<pair<pair<int,int>,int> >());
    int p=dfs(d,0,0);
    if(!p)cout<<"NA"<<endl;
    else cout<<p<<endl;
  }
}

Compiler output:
a.cc: In function 'int dfs(int, int, int)':
a.cc:15:10: error: 'k' was not declared in this scope
   15 |       if(k)k--,res=dfs(p-v[i].f.f,x+v[i].f.s,t+1)+1;
      |          ^
Language: C++

require 'set'

def bfs(start_node, extra = nil)
    return 0 if start_node.is_goal?(extra)
    reached = Set[start_node]
    dist = 1
    queue = [start_node]
    until queue.empty?
        next_queue = []
        until queue.empty?
            node = queue.shift
            node.each_next_node(extra) do |next_node|
                return dist if next_node.is_goal?(extra)
                next if reached.include?(next_node)
                reached << next_node
                next_queue << next_node
            end
        end
        dist += 1
        queue = next_queue
    end
    return nil
end

class Array
    def is_goal?(extra)
        self[0] <= 0
    end

    def each_next_node(extra)
        d, t = self
        (extra[:valid_weapons][t] || []).each do |a, e|
            ne = t + e
            ne = extra[:max_e] if ne > extra[:max_e]
            yield [d - a, ne]
        end
    end
end

loop do
    d, n = gets.split.map(&:to_i)
    break if n == 0
    weapons = (1..n).map { gets.split.map(&:to_i) }
    weapons.sort_by!(&:last)
    valid_weapons = {}
    (0..weapons[-1][2]).each do |t|
        l = weapons.select {|a, e, r| r <= t}
        l.map! {|a, e, _| [a, e]}
        l.uniq!
        l = l.select {|a1, e1| l.all?{|a2, e2| (a1 == a2 && e1 == e2) || (a1 > a2 || e1 > e2)}}
        valid_weapons[t] = l
    end
    puts bfs([d, 0], {:valid_weapons => valid_weapons, :max_e => weapons[-1][2]}) || 'NA'
end



Compiler output:
a.cc:1:9: warning: multi-character character constant [-Wmultichar]
    1 | require 'set'
      |         ^~~~~
a.cc:43:16: error: too many decimal points in number
   43 |     weapons = (1..n).map { gets.split.map(&:to_i) }
      |                ^~~~
a.cc:46:6: error: too many decimal points in number
   46 |     (0..weapons[-1][2]).each do |t|
      |      ^~~~~~~~~~
a.cc:53:86: warning: multi-character character constant [-Wmultichar]
   53 |     puts bfs([d, 0], {:valid_weapons => valid_weapons, :max_e => weapons[-1][2]}) || 'NA'
      |                                                                                      ^~~~
a.cc:1:1: error: 'require' does not name a type
    1 | require 'set'
      | ^~~~~~~
a.cc:44:5: error: 'weapons' does not name a type
   44 |     weapons.sort_by!(&:last)
      |     ^~~~~~~
a.cc:46:6: error: expected unqualified-id before numeric constant
   46 |     (0..weapons[-1][2]).each do |t|
      |      ^~~~~~~~~~
a.cc:46:6: error: expected ')' before numeric constant
   46 |     (0..weapons[-1][2]).each do |t|
      |     ~^~~~~~~~~~
      |      )
a.cc:48:9: error: 'l' does not name a type
   48 |         l.map! {|a, e, _| [a, e]}
      |         ^
a.cc:49:9: error: 'l' does not name a type
   49 |         l.uniq!
      |         ^
a.cc:51:9: error: 'valid_weapons' does not name a type
   51 |         valid_weapons[t] = l
      |         ^~~~~~~~~~~~~
a.cc:53:81: error: expected unqualified-id before ')' token
   53 |     puts bfs([d, 0], {:valid_weapons => valid_weapons, :max_e => weapons[-1][2]}) || 'NA'
      |                                                                                 ^
Language: Java

??import java.util.*;

class Main {
    public static void main(String... args) {
        final Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        for (int i = 0; i < N; i++) {
            final int a = sc.nextInt();
            final int b = sc.nextInt();
            System.out.println(Integer.bitCount(Math.abs(a)) + Integer.bitCount(Math.abs(b)));
        }
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
??import java.util.*;
^
1 error
Language: Java

??import java.util.*;

public class Main {
    public static void main(String... args) {
        final Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        for (int i = 0; i < N; i++) {
            final int a = sc.nextInt();
            final int b = sc.nextInt();
            System.out.println(Integer.bitCount(Math.abs(a)) + Integer.bitCount(Math.abs(b)));
        }
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
??import java.util.*;
^
1 error
Language: Java

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
	      // ?¨??????\??????????????????????????????Scanner???????????§??????????????????
        Scanner sc = new Scanner(System.in);

        // int ????????????????????????
        int n = sc.nextInt();
        for(int i=0;i<n;i++){
        int b = sc.nextInt();
        int c = sc.nextInt();

        int dirst = Math.abs(b-c);
        int cnt=0;
        int flag=0;
        while(true){
        	if (dirst%2!=1){
        		cnt++;
        		dirst=dirst/2;
        	}else if (dirst!=1){//?\???°
        		flag++;
        		dirst--;
        	}else if(dirst==1){
        		break;
        	}
        }

        // ?¨????????????????????????????
        System.out.println(cnt+flag);
}
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C

main(){
int n,m;
scanf("%d%d",&n,&m);
if(n*m<0)printf("%d\n",__builtin_popcnt(-n)+__builtin_popcnt(m));
else printf("%d\n",__builtin_popcnt(m-n));
exit(0);
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d%d",&n,&m);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d%d",&n,&m);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:10: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    4 | if(n*m<0)printf("%d\n",__builtin_popcnt(-n)+__builtin_popcnt(m));
      |          ^~~~~~
main.c:4:10: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:10: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:4:10: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:24: error: implicit declaration of function '__builtin_popcnt'; did you mean '__builtin_popcount'? [-Wimplicit-function-declaration]
    4 | if(n*m<0)printf("%d\n",__builtin_popcnt(-n)+__builtin_popcnt(m));
      |                        ^~~~~~~~~~~~~~~~
      |                        __builtin_popcount
main.c:5:6: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    5 | else printf("%d\n",__builtin_popcnt(m-n));
      |      ^~~~~~
main.c:5:6: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:1: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    6 | exit(0);
      | ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | main(){
main.c:6:1: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    6 | exit(0);
      | ^~~~
main.c:6:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C

main(){
int t,n,m;
for(scanf("%d",&t);t--;){
scanf("%d%d",&n,&m);
if(n*m<0)printf("%d\n",__builtin_popcount(-n)+__builtin_popcount(m));
else{if(m<0)m=-m;if(n<0)n=-n;printf("%d\n",__builtin_popcount(m^n));
}
exit(0);
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | for(scanf("%d",&t);t--;){
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:3:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | for(scanf("%d",&t);t--;){
      |     ^~~~~
main.c:3:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:10: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 | if(n*m<0)printf("%d\n",__builtin_popcount(-n)+__builtin_popcount(m));
      |          ^~~~~~
main.c:5:10: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:10: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:10: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    6 | else{if(m<0)m=-m;if(n<0)n=-n;printf("%d\n",__builtin_popcount(m^n));
      |                              ^~~~~~
main.c:6:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:1: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    8 | exit(0);
      | ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | main(){
main.c:8:1: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    8 | exit(0);
      | ^~~~
main.c:8:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:9:1: error: expected declaration or statement at end of input
    9 | }
      | ^
Language: C

main(){
int t,n,m,l;
for(scanf("%d",&t);t--;){
scanf("%d%d",&n,&m);
if(n*m<0)printf("%d\n",__builtin_popcount(-n)+__builtin_popcount(m));
else{l=if(m<0)m=-m;if(n<0)n=-n;printf("%d\n",__builtin_popcount(n-(n^m))+__builtin_popcount(m-(n^m)));}
}
exit(0);
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | for(scanf("%d",&t);t--;){
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:3:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | for(scanf("%d",&t);t--;){
      |     ^~~~~
main.c:3:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:10: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 | if(n*m<0)printf("%d\n",__builtin_popcount(-n)+__builtin_popcount(m));
      |          ^~~~~~
main.c:5:10: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:10: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:10: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:8: error: expected expression before 'if'
    6 | else{l=if(m<0)m=-m;if(n<0)n=-n;printf("%d\n",__builtin_popcount(n-(n^m))+__builtin_popcount(m-(n^m)));}
      |        ^~
main.c:6:32: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    6 | else{l=if(m<0)m=-m;if(n<0)n=-n;printf("%d\n",__builtin_popcount(n-(n^m))+__builtin_popcount(m-(n^m)));}
      |                                ^~~~~~
main.c:6:32: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:1: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    8 | exit(0);
      | ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | main(){
main.c:8:1: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    8 | exit(0);
      | ^~~~
main.c:8:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int s, d;
bool check(int train,int n){
  if(!train) return true;
  int shift = pow(2,train);
  if(n + shift > d) return false;
  rep(i,32){
    if(abs(n) & (1<<i)){
      if(i && (1<<i) % shift == 0) return true;
      else return false;
    }
  }
  return true;
}
int cnt(int no){
  int i = 0;
  while(check(i,no)) i++;
  return i - 1;
}
int solve(int now, int cost){
  if(now == d) return cost;
  int train = cnt(now);
  if(now + pow(2,train) <= d){
    return solve(now+pow(2,train),cost+1);
  }else{
    return solve(now,cost+1);
  }
}
int main(){
  int N;
  cin >> N;
  while(N--){
    cin >> s >> d;
    cout << solve(s,0) << endl;
  }
}

Compiler output:
a.cc: In function 'bool check(int, int)':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   rep(i,32){
      |       ^
a.cc:8:3: error: 'rep' was not declared in this scope
    8 |   rep(i,32){
      |   ^~~
Language: C++

int s, d;
bool check(int train,int n){
  if(!train) return true;
  int shift = pow(2,train);
  if(n + shift > d) return false;
  for(int i = 0; i < 32; i++){
    if(abs(n) & (1<<i)){
      if(i && (1<<i) % shift == 0) return true;
      else return false;
    }
  }
  return true;
}
int cnt(int no){
  int i = 0;
  while(check(i,no)) i++;
  return i - 1;
}
int solve(int now, int cost){
  if(now == d) return cost;
  int train = cnt(now);
  if(now + pow(2,train) <= d){
    return solve(now+pow(2,train),cost+1);
  }else{
    return solve(now,cost+1);
  }
}
int main(){
  int N;
  cin >> N;
  while(N--){
    cin >> s >> d;
    cout << solve(s,0) << endl;
  }
}

Compiler output:
a.cc: In function 'bool check(int, int)':
a.cc:4:15: error: 'pow' was not declared in this scope
    4 |   int shift = pow(2,train);
      |               ^~~
a.cc:7:8: error: 'abs' was not declared in this scope
    7 |     if(abs(n) & (1<<i)){
      |        ^~~
a.cc: In function 'int solve(int, int)':
a.cc:22:12: error: 'pow' was not declared in this scope; did you mean 'now'?
   22 |   if(now + pow(2,train) <= d){
      |            ^~~
      |            now
a.cc: In function 'int main()':
a.cc:30:3: error: 'cin' was not declared in this scope
   30 |   cin >> N;
      |   ^~~
a.cc:33:5: error: 'cout' was not declared in this scope
   33 |     cout << solve(s,0) << endl;
      |     ^~~~
a.cc:33:27: error: 'endl' was not declared in this scope
   33 |     cout << solve(s,0) << endl;
      |                           ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <cstdio>
#include <Windows.h>
#include "MT.h"

using namespace std;

#define int long long

int solve(int s, int d) {
    int ret = abs(s)%2 + abs(d)%2;

    if (s == d) return 0;

    s += abs(s)%2;
    d -= abs(d)%2;

    ret += solve(s/2, d/2);

    return ret;
}

signed main(){
    int N;
    cin >> N;

    for (int i = 0; i < N; i++) {
	int s, d;
	cin >> s >> d;

	cout << solve(s, d) << endl;
    }

    return 0;
}

Compiler output:
a.cc:7:10: fatal error: Windows.h: No such file or directory
    7 | #include <Windows.h>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
#include<iostream>
#include<math.h>


using namespace std;

int choise(int s, int d);




int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int N,M,a;
	
	int s;
	int d;
	
	cin >> N;
	for (int i=0; i < N; i++) {
	cin >> s;
	cin >> d;
	count = 0;
	choise(s,d);
	
	}

}


	
int choise(int s,int d) {
	int max = d - s;
	int i = 1;
	int ans=0;
	for (i=1;i<=max;i=i*2) {

		if (s%i == 0) {
			ans = i;
		}


		
	}
	static int count=0;
	count++;
	if (ans == 0) {
		printf("%d\n",count-1);

		return 0;

	}
	

	choise(s + ans, d);

	

}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'count' was not declared in this scope
   26 |         count = 0;
      |         ^~~~~
a.cc: In function 'int choise(int, int)':
a.cc:58:15: warning: control reaches end of non-void function [-Wreturn-type]
   58 |         choise(s + ans, d);
      |         ~~~~~~^~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define int long long
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3f
#define EPS (1e-10)
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<int, int>P;

int dfs(int s, int g) {
	if (s == g)return 0;
	int n = 1;
	while ((g / n + (g < 0 && g%n != 0))*n - (s / n)*n) / n > 0)n <<= 1; n >>= 1;
	int a = (s / n)*n, b = (g / n + (g < 0 && g%n != 0))*n;
	if (b > g)abort();
	return 1 + dfs(s, a) + dfs(b, g);
}
signed main() {
	int n; scanf("%lld", &n);
	rep(i, n) {
		int s, d; scanf("%lld%lld", &s, &d);
		printf("%lld\n", dfs(s, d));
	}
}

Compiler output:
a.cc: In function 'long long int dfs(long long int, long long int)':
a.cc:15:61: error: expected primary-expression before '/' token
   15 |         while ((g / n + (g < 0 && g%n != 0))*n - (s / n)*n) / n > 0)n <<= 1; n >>= 1;
      |                                                             ^
Language: C++

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

int main(){
   int a;
   cin>>a;
   for(int b=0;b<a;b++){
       int c,d;cin>>c>>d;
       int i=0;
       for(;c!=d;i++){
	   for(int j=1;;j<<=1){
	       if(j>d-c){c+=j/2;break;}
	       }
	   }
	   cout<<i<<endl;
       }
    }

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <iostream>
#include <intrin.h>
#include <assert.h>
using namespace std;

int main()
{
	int N;
	cin >> N;
	for (int i = 0; i < N; ++i)
	{
		int s, d;
		cin >> s >> d;
		if (s <= 0 && d >= 0)
		{
			cout << __popcnt(-s) + __popcnt(d) << endl;
		}
		else if (s < 0 && d < 0)
		{
			cout << __popcnt((-s) ^ (-d)) << endl;
		}
		else if (s >= 0)
		{
			assert(d > 0);
			cout << __popcnt(s^d) << endl;
		}
	}
}

Compiler output:
a.cc:2:10: fatal error: intrin.h: No such file or directory
    2 | #include <intrin.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

int m, w;
int bm[22], bw[22];
int memo[22][1<<13];

int e(int i, int j){

  int p = abs(bm[i] - bw[j]);
  return p * (p-30) * (p-30);

}

int solve(int cntm, int bitw){

  if(~memo[cntm][bitw]) return memo[cntm][bitw];
  if(cntm == m) return 0;
  
  int ret = 0;
  for(int i=0;i<w;i++)
    if(!(bitw & (1<<i)))
      ret = max(ret, solve(cntm+1, (bitw | (1<<i))) + e(cntm, i));

  ret = max(ret, solve(cnt+1, bitw));
  
  return memo[cntm][bitw] = ret;
  
}

int main(){

  while(cin >> m >> w){
    for(int i=0;i<m;i++) cin >> bm[i];
    for(int i=0;i<w;i++) cin >> bw[i];
    
    memset(memo, -1, sizeof(memo));
    cout << solve(0, 0) << endl;
  }
  
}

Compiler output:
a.cc: In function 'int solve(int, int)':
a.cc:25:24: error: 'cnt' was not declared in this scope; did you mean 'cntm'?
   25 |   ret = max(ret, solve(cnt+1, bitw));
      |                        ^~~
      |                        cntm
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int n, m, a[12], b[12], dp[1 << 12];
int main() {
	cin >> n >> m;
	for (int i = 0; i < n; i++) cin >> a[i];
	for (int i = 0; i < m; i++) cin >> b[i];
	if (n < m) swap(n, m), swap(a, b);
	for (int i = 1; i < (1 << n); i++) {
		int r = __builtin_popcount(i);
		if (r > m) continue;
		for (int j = 0; j < n; j++) {
			if (i & (1 << j)) {
				int p = abs(a[j] - b[r - 1]);
				dp[i] = max(dp[i], dp[i - (1 << j)] + p * (p - 30) * (p - 30));
			}
		}
	}
	cout << *max_element(dp, dp + 1 << n) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:41: error: invalid operands of types 'int*' and 'int' to binary 'operator<<'
   20 |         cout << *max_element(dp, dp + 1 << n) << endl;
      |                                  ~~~~~~ ^~ ~
      |                                     |      |
      |                                     int*   int
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
struct edge { int to,cap,cost,rev; };
int N,M,B;
int ax[100],ay[100];
int bx[5],by[5];
int c[5],d[5];
int g[100][5];

int h[200],dist[200];
vector<edge> G[200];
int prevv[200],preve[200];
int INF = 1e8;

void init_edge(){
  for(int i=0;i<200;i++)G[i].clear();
}

void add_edge(int from,int to,int cap,int cost){
  G[from].push_back((edge){to,cap,cost,(int)G[to].size()});
  G[to].push_back((edge){from,0,-cost,(int)G[from].size()-1});
}

int min_cost_flow(int s,int t,int f){
  int res = 0;
  fill(h,h+200,0);
  while(f>0){
    priority_queue< P, vector<P>, greater<P> >  que;
    fill( dist, dist+200 , INF );
    dist[s]=0;
    que.push(P(0,s));
    while(!que.empty()){
      P p = que.top(); que.pop();
      int v = p.second;
      if(dist[v]<p.first)continue;
      for(int i=0;i<(int)G[v].size();i++){
        edge &e = G[v][i];
        if(e.cap>0&&dist[e.to] > dist[v]+e.cost+h[v]-h[e.to]){
          dist[e.to]=dist[v]+e.cost+h[v]-h[e.to];
          prevv[e.to]=v;
          preve[e.to]=i;
          que.push(P(dist[e.to],e.to));
        }
      }
    }

    if(dist[t]==INF)return INF;
    
    for(int v=0;v<105;v++)h[v]+=dist[v];

    int d=f;
    for(int v=t;v!=s;v=prevv[v]){
      d=min(d,G[prevv[v]][preve[v]].cap);
    }
    f-=d;
    res+=d*h[t];
    for(int v=t;v!=s;v=prevv[v]){
      edge &e = G[prevv[v]][preve[v]];
      e.cap -= d;
      G[v][e.rev].cap += d;
    }
  }
  return res;
}

int solve(int x){
  int res=INF;
  for(int S=0;S<(1<<M);S++){
    int cost=0;
    init_edge();
    for(int i=0;i<N;i++){
      add_edge(N+M,i,1,0);
      for(int j=0;j<M;j++){
        if(S>>j&1){
          add_edge(i,N+j,1,max(0,g[i][j]-x));
        }
      }
    }
    for(int i=0;i<M;i++){
      if(S>>i&1){
        add_edge(N+i,N+M+1,c[i],0);
        cost+=d[i];
      }
    }
    int A1=min_cost_flow(N+M,N+M+1,N);
    int A2=cost;
    int A3=B*x* __builtin_popcount(S);
  
    res=min(res,A1+A2+A3);
  }
  return res;
}
int main(){
  while(1){
    scanf("%d %d %d",&N,&M,&B);
    if(N==0&&M==0&&B==0)break;    
    for(int i=0;i<N;i++)scanf("%d %d",&ax[i],&ay[i]);    
    for(int i=0;i<M;i++)scanf("%d %d %d %d",&bx[i],&by[i],&c[i],&d[i]);
    int ans=INF;
    for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){
        g[i][j]=abs(ax[i]-bx[j])+abs(ay[i]-by[j]);
      }
      
    }
    /*
    map<int,bool> used;
    for(int i=0;i<N;i++){
      for(int j=0;j<M;j++){        
        for(int k=-5;k<5;k++){
          int nk=max(0,g[i][j]+k);
          if(used[nk])continue;
          used[nk]=true;
          ans=min(ans,solve(nk));
        }
      }
    }
    */
    int X=INF;
    for(int i=0;i<=4000;i++){
      int Y=solve(i);
      if(X<Y)break;
      ans=min(ans,Y);
      X=Y;
    }

    int X=INF;
    for(int i=100;i<=4000;i++){
      int Y=solve(i);
      if(X<Y)break;
      ans=min(ans,Y);
      X=Y;
    }
    cout<<ans<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:128:9: error: redeclaration of 'int X'
  128 |     int X=INF;
      |         ^
a.cc:120:9: note: 'int X' previously declared here
  120 |     int X=INF;
      |         ^
Language: C++

#define EQ(a,b) (fabs((a)-(b)) < EPS)

#define MAX_N 100000
#define MAX_M 300000

int main(){
	int n, m;
	cin >> n >> m;
	vector<pair<int, int> > e;
	for (int i = 0; i < m; ++i) {
		int s, t;
		cin >> s >> t;
		e.push_back(make_pair(t, s));
	}
	sort(e.begin(), e.end());
	int ret[MAX_N + 1] = {};
	int j = 0;
	for (int i = 2; i <= n; ++i) {
		while (e[j].first != i) ++j;
		if (e[j].second == 1 || (j+1 < e.size() && e[j+1].first == i)) ret[i] = i;
		else ret[i] = e[j].second;
	}
	int q;
	cin >> q;
	for (int i = 0; i < q; ++i) {
		int r;
		cin >> r;
		cout << ret[r] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> n >> m;
      |         ^~~
a.cc:9:9: error: 'vector' was not declared in this scope
    9 |         vector<pair<int, int> > e;
      |         ^~~~~~
a.cc:9:16: error: 'pair' was not declared in this scope
    9 |         vector<pair<int, int> > e;
      |                ^~~~
a.cc:9:21: error: expected primary-expression before 'int'
    9 |         vector<pair<int, int> > e;
      |                     ^~~
a.cc:13:17: error: 'e' was not declared in this scope
   13 |                 e.push_back(make_pair(t, s));
      |                 ^
a.cc:13:29: error: 'make_pair' was not declared in this scope
   13 |                 e.push_back(make_pair(t, s));
      |                             ^~~~~~~~~
a.cc:15:14: error: 'e' was not declared in this scope
   15 |         sort(e.begin(), e.end());
      |              ^
a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |         sort(e.begin(), e.end());
      |         ^~~~
      |         short
a.cc:28:17: error: 'cout' was not declared in this scope
   28 |                 cout << ret[r] << endl;
      |                 ^~~~
a.cc:28:35: error: 'endl' was not declared in this scope
   28 |                 cout << ret[r] << endl;
      |                                   ^~~~
Language: Java

public class AOJ0295{public static void main(String[] a){java.util.Scanner s=new java.util.Scanner(System.in);System.out.println(s.nextInt()*s.nextInt());}}

Compiler output:
Main.java:1: error: class AOJ0295 is public, should be declared in a file named AOJ0295.java
public class AOJ0295{public static void main(String[] a){java.util.Scanner s=new java.util.Scanner(System.in);System.out.println(s.nextInt()*s.nextInt());}}
       ^
1 error
Language: Java

import java.util.Scanner;
public class Mon1 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d = sc.nextInt();
		int c = sc.nextInt();
		System.out.println(d*c);

	}

}

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


public class Main {
	
	public static void main(String[] args) {
		
		Scanner stdin = new Scanner(System.in);
		
		int table = stdin.nextInt();
		int chairs = stdin.nextInt();
		System.out.println(table * chairs);
	}

}

Compiler output:
Main.java:6: error: cannot find symbol
		Scanner stdin = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner stdin = new Scanner(System.in);
		                    ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

#include <stdio.h>

int main(void){
int a,b;
scanf("%d%d", &a, &b);
printf("%d\n",aB; );
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: 'aB' undeclared (first use in this function); did you mean 'a'?
    6 | printf("%d\n",aB; );
      |               ^~
      |               a
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:17: error: expected ')' before ';' token
    6 | printf("%d\n",aB; );
      |       ~         ^
      |                 )
Language: C

#include<stdio.h>
int main
{
int c,d;
scanf("%d %d",&c,&d);
c=c*d;
printf("%d",c);
return 0;
}

Compiler output:
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | {
      | ^
Language: C

#include<stdio.h>
 int main(void){
  int i,a,b;
   scanf("%d%d"&a,&b);
    i=a*b;
    printf("%d\n",i);

 }

Compiler output:
main.c: In function 'main':
main.c:4:16: error: invalid operands to binary & (have 'char *' and 'int')
    4 |    scanf("%d%d"&a,&b);
      |          ~~~~~~^
      |          |
      |          char *
Language: C

#include <stdio.h>

int main(void) {
	int d=<100;
	int c=<10;
	scanf("%d %d",&d,&c);
	d=d*c;
	
	printf("%d\n",d);
	// your code goes here
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: expected expression before '<' token
    4 |         int d=<100;
      |               ^
main.c:5:15: error: expected expression before '<' token
    5 |         int c=<10;
      |               ^
Language: C

#include <stdio.h>

int main(void) {
	int d<101;
	int c<11;
	scanf("%d %d",&d,&c);
	d=d*c;
	
	printf("%d\n",d);
	// your code goes here
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    4 |         int d<101;
      |              ^
main.c:4:14: error: expected expression before '<' token
main.c:5:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    5 |         int c<11;
      |              ^
main.c:5:14: error: expected expression before '<' token
main.c:6:24: error: 'd' undeclared (first use in this function)
    6 |         scanf("%d %d",&d,&c);
      |                        ^
main.c:6:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:27: error: 'c' undeclared (first use in this function)
    6 |         scanf("%d %d",&d,&c);
      |                           ^
Language: C

#include <stdio.h>

int main(void) {
	int d,c;
	scanf("%d %d",&d,&c);
	printf("%d",d*c\n);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:24: error: stray '\' in program
    6 |         printf("%d",d*c\n);
      |                        ^
main.c:6:24: error: expected ')' before 'n'
    6 |         printf("%d",d*c\n);
      |               ~        ^~
      |                        )
Language: C

#include <stdio.h>

int main(void) {
	int d[99];
	int c[9];
	scanf("%d %d",&d,&c);
	d=d*c;
	
	printf("%d\n",d);
	// your code goes here
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:12: error: invalid operands to binary * (have 'int *' and 'int *')
    7 |         d=d*c;
      |           ~^
      |           ||
      |           |int *
      |           int *
Language: C

#include<stdio.h>
int main(void)
{
  int chair,table;

  scanf("%d %d",&chair,&table);

  printf("%d\n"chair*table);

  return 0;

}

Compiler output:
main.c: In function 'main':
main.c:8:16: error: expected ')' before 'chair'
    8 |   printf("%d\n"chair*table);
      |         ~      ^~~~~
      |                )
Language: C

#include<iostream>

using namespace std;

int main () {

	int d, c;

	cin >>d >> c;

	int sosu=d*c;

	cout<<d*c<<end|;

	return 0;
}

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

clude<iostream>

using namespace std;

int main () {

	int d, c#in;

	cin >>d >> c;

	int sosu=d*c;

	cout<<d*c<<endl;

	return 0;
}

Compiler output:
main.c:1:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | clude<iostream>
      |      ^
main.c: In function 'main':
main.c:7:17: error: stray '#' in program
    7 |         int d, c#in;
      |                 ^
main.c:7:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'in'
    7 |         int d, c#in;
      |                  ^~
main.c:9:9: error: 'cin' undeclared (first use in this function)
    9 |         cin >>d >> c;
      |         ^~~
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:20: error: 'c' undeclared (first use in this function)
    9 |         cin >>d >> c;
      |                    ^
main.c:13:9: error: 'cout' undeclared (first use in this function)
   13 |         cout<<d*c<<endl;
      |         ^~~~
main.c:13:20: error: 'endl' undeclared (first use in this function)
   13 |         cout<<d*c<<endl;
      |                    ^~~~
Language: C

#include<stdio.h>
int main(void) {
	int d, c;
	scanf_s("%d %d", &d, &c);
	printf("%d", d*c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |         scanf_s("%d %d", &d, &c);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

int main(void)
{
	int a, b;
	scanf_s("%d %d", &a, &b);
	printf("%d", a * b);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d %d", &a, &b);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>
int main(void){
    int d,c;

    scanf("%d%d",&d,&c);
    printf("%d\n",d*c);

    return 0:
}

Compiler output:
main.c: In function 'main':
main.c:8:13: error: expected ';' before ':' token
    8 |     return 0:
      |             ^
      |             ;
Language: C++

#include  <iostream>
using namespace std;
int main(){
int d.c;
   cin>>d>>c;
   cout<<d*2=c<<endl:
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:6: error: expected initializer before '.' token
    4 | int d.c;
      |      ^
a.cc:5:9: error: 'd' was not declared in this scope
    5 |    cin>>d>>c;
      |         ^
a.cc:5:12: error: 'c' was not declared in this scope
    5 |    cin>>d>>c;
      |            ^
Language: C++

#include  <iostream>
using namespace std;
int main(){
int d.c;
   cin>>d>>c;
   cout<<d*2="c"<<endl:
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:6: error: expected initializer before '.' token
    4 | int d.c;
      |      ^
a.cc:5:9: error: 'd' was not declared in this scope
    5 |    cin>>d>>c;
      |         ^
a.cc:5:12: error: 'c' was not declared in this scope
    5 |    cin>>d>>c;
      |            ^
a.cc:6:17: error: invalid operands of types 'const char [2]' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |    cout<<d*2="c"<<endl:
      |              ~~~^~~~~~
Language: C++

#include  <iostream>
using namespace std;
int main(){
int d,c;
   cin>>d>>c;
   cout<<d*2=c<<endl:
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |    cout<<d*2=c<<endl:
      |              ~^~~~~~
Language: C++

#include  <iostream>
using namespace std;
int main(){
int d,c;
   cin>>d>>c;
   cout<<d*c<<endl:
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected ';' before ':' token
    6 |    cout<<d*c<<endl:
      |                   ^
      |                   ;