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

#include<iostream>
using namespace std;

int main()
{
 int a,b,n;
 while(cin>>n, n)
 {
  int x=0, y=0;
 while(n--)
 {
   cin>>a>>b;
   if(a<b) {y+=a+b;}
   else if(a>b) {x+=a+b;}
   else {x+=a; y+=b;}
  }
}
 cout<<x<<" "<<y<<endl;
}
 
 
   
  

Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: 'x' was not declared in this scope
   18 |  cout<<x<<" "<<y<<endl;
      |        ^
a.cc:18:16: error: 'y' was not declared in this scope
   18 |  cout<<x<<" "<<y<<endl;
      |                ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int x,y,n;
	while(cin>>n, n)
	{
		int a=0, b=0;
		while(n--)
		{
			cin>>x>>y;
			if(x<y) { b+=x+y;}
			else if(x>y) { a+=x+y;}
			else if(x==y) {a+=a; b+=b;}
		}
	}
		cout<<a<<b<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: 'a' was not declared in this scope
   18 |                 cout<<a<<b<<endl;
      |                       ^
a.cc:18:26: error: 'b' was not declared in this scope
   18 |                 cout<<a<<b<<endl;
      |                          ^
Language: C++

#include <stdio.h>

main()
{
	int A,B,a,b,i,n;
	while(1)
	while(scanf("%d",&n)){
	if(n==0) break;
	A=0;
	B=0;
		for(i=1;i<n+1;i++){
			scanf("%d %d",&a,&b);
				if(a>b) A+=a+b;
				else if(a<b) B+=a+b;
					else A+=a,B+=b;}
	}
	printf("%d %d\n",A,B);}
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include <stdio.h>

main()
{
	int A,B,a,b,i,n;
	while(1)
	while(scanf("%d",&n)){
	if(n==0) break;
	A=0;
	B=0;
		for(i=1;i<n+1;i++){
			scanf("%d %d",&a,&b);
				if(a>b) A+=a+b;
				else if(a<b) B+=a+b;
					else A+=a,B+=b;}
	}
	printf("%d %d\n",A,B);}
}
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <stdio.h>

main()
{
	int A,B,a,b,i,n;
	while(scanf("%d",&n),n==0){
	if(n==0) break;
	A=0;
	B=0;
	for(,,){
		for(i=1;i<n+1;i++){
			scanf("%d %d",&a,&b);
				if(a>b) A+=a+b;
				else if(a<b) B+=a+b;
					else A+=a,B+=b;}
	printf("%d %d\n",A,B);}
	}
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:13: error: expected primary-expression before ',' token
   10 |         for(,,){
      |             ^
a.cc:10:14: error: expected primary-expression before ',' token
   10 |         for(,,){
      |              ^
a.cc:10:15: error: expected primary-expression before ')' token
   10 |         for(,,){
      |               ^
a.cc:17:9: error: expected primary-expression before '}' token
   17 |         }
      |         ^
a.cc:16:32: error: expected ';' before '}' token
   16 |         printf("%d %d\n",A,B);}
      |                                ^
      |                                ;
   17 |         }
      |         ~                       
a.cc:17:9: error: expected primary-expression before '}' token
   17 |         }
      |         ^
a.cc:16:32: error: expected ')' before '}' token
   16 |         printf("%d %d\n",A,B);}
      |                                ^
      |                                )
   17 |         }
      |         ~                       
a.cc:10:12: note: to match this '('
   10 |         for(,,){
      |            ^
a.cc:17:9: error: expected primary-expression before '}' token
   17 |         }
      |         ^
Language: C++

#include <iostream>

using namespace std;

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

int main(void){
	int n;
	int a = 0, b = 0;
	while(true){
		cin >> n;
		if(c == 0) break;
		rep(i, n){
			int x, y;
			cin >> x >> y;
			if(x > y){
				a += x + y;
			}
			if(y > x){
				b += x + y;
			}
			if(y == x){
				a += x;
				b += y;
			}
		}
		cout << a << " " << b << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: 'c' was not declared in this scope
   12 |                 if(c == 0) break;
      |                    ^
Language: C++

#include <stdio.h>

int main(){
int n,i;
int a,b,f,t;

while(1){
scanf("%d",&n);
if(n==0)break;
a=0;
b=0;
f=0;
t=0;
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a==b){
f+=a;
t+=b;
}
else if(a>b){
f+=a+b;
}
else if(a<b){
t+=a+b;
}
}
ptintf("%d %d\n",f,t);
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:1: error: 'ptintf' was not declared in this scope; did you mean 'printf'?
   27 | ptintf("%d %d\n",f,t);
      | ^~~~~~
      | printf
Language: C++

#include <iostream>
using namespace std;
  
int n, a, b, sa, sb;
  
int main(){
  for(;;){
    cin >> n;
      if(n == 0){
        break;
      }else{
        for(int i = 0; i < n; i++){
          cin >> a >> b;
          if(a < b){
            sb += a + b;
          }else if(a > b){
            sa += b + a;
          }else{
            sa += a;
            sb += b;
          }
        }
        cout << sa << " " << sb << endl;
      }
    }
  }
  return 0;
}

Compiler output:
a.cc:27:3: error: expected unqualified-id before 'return'
   27 |   return 0;
      |   ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

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

struct player{
    int point ;
    int card[10000];
private:
  void player(){point =0;}
};

int main()
{
    int loop;
    player a, b;
    cin >> loop;
    for(int c = 0; c < loop; c++)
    {
        cin >> a.card[c];
        cin >> b.card[c];
    }

    for(int c = 0; c < loop; c++)
    {
        if(a.card[c] < b.card[c]) b.point += a.card[c] + b.card[c];
        if(a.card[c] == b.card[c]) a.point += a.card[c], b.point +=b.card[c];
        if(a.card[c] > b.card[c]) a.point += a.card[c] + b.card[c];
    }
    cout << a.point << " " << b.point << endl;
    return EXIT_SUCCESS;
}

Compiler output:
a.cc:9:3: error: return type specification for constructor invalid
    9 |   void player(){point =0;}
      |   ^~~~
a.cc: In function 'int main()':
a.cc:15:12: error: 'player::player()' is private within this context
   15 |     player a, b;
      |            ^
a.cc:9:8: note: declared private here
    9 |   void player(){point =0;}
      |        ^~~~~~
a.cc:15:15: error: 'player::player()' is private within this context
   15 |     player a, b;
      |               ^
a.cc:9:8: note: declared private here
    9 |   void player(){point =0;}
      |        ^~~~~~
Language: C++

// cardgame.cpp
#include <iostream>
using namespace std;

void main(){
	int n;
	int i,j;
	int a[10000], b[10000];
	int a_point=0, b_point=0;
	cin >> n;
	for(i=0;i<n;++i){
			cin >> a[i];
			cin >> b[i];
	}
	for(j=0;j<n;++j){
		if(a[j]>b[j])
			a_point+=(a[j]+b[j]);
        else if(a[j]<b[j])
			b_point+=(a[j]+b[j]);
		else if(a[j]==b[j]){
			a_point+=a[j];
			b_point+=b[j];
		}
	}
		cout << a_point << " " << b_point << endl;
}

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main(){
      | ^~~~
Language: C++

#include<iostream>
#include<vector>

int main(){
	int a,b,c,m=0;
    while(m==0){
		std::cin>>c;
		if(c==0)break;
		for(int i=0;i<c;i++){
			int ap=0,bp=0;
			std::cin>>a>>b;
			if(a>b)ap+=a,ap+=b;
			else if(b>a){
				bp+=a;bp+=b;
			}else{
				ap+=a,bp+=b;
			}
		}
		std::cout<<ap<<" "<<bp<<std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: 'ap' was not declared in this scope; did you mean 'a'?
   19 |                 std::cout<<ap<<" "<<bp<<std::endl;
      |                            ^~
      |                            a
a.cc:19:37: error: 'bp' was not declared in this scope; did you mean 'b'?
   19 |                 std::cout<<ap<<" "<<bp<<std::endl;
      |                                     ^~
      |                                     b
Language: C++

#include <iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	while(n!=0)
		int point[2];
		enum {
			A,
			B,
		};
		int sum[2] = {};
		for (int i = 0; i < n; i++) {
			cin>>point[A]>>point[B];
			if (point[A]>point[B]) {
				for (auto j : point) {
					sum[A]+=j;
				}
			} else if(point[A] == point[B]) {
				for (auto j : sum) {
					j+=point[A];
				}
			} else {
				for (auto j : point) {
					sum[B]+=j;
				}
			}
		}
		cout<<sum[A]<<" "<<sum[B]<<endl;
		cin>>n;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: 'point' was not declared in this scope
   14 |                         cin>>point[A]>>point[B];
      |                              ^~~~~
a.cc: At global scope:
a.cc:32:9: error: expected unqualified-id before 'return'
   32 |         return 0;
      |         ^~~~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(void) {
	int i, n, a, b, as = 0, bs = 0;
	cin >> n;

	for(i=0 ; i<n ; i++) {
		cin >> a >> b;
		if(a > b)		{ as += a + b; }
		else if(a < b)	{ bs += a + b; }
		else 			{ as += a; bs += b; }
	}
	cout.form("%d %d\n", as, bs);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: 'std::ostream' {aka 'class std::basic_ostream<char>'} has no member named 'form'
   14 |         cout.form("%d %d\n", as, bs);
      |              ^~~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <iostream>

using namespace std;

void main(){
  int n;
  int a,b;
  while(cin >> n, n){
    int asum = 0;
    int bsum = 0;
    for(int i=0; i<n; i++){
      cin >> a >> b;
      if(a > b) asum += a+b;
      else if(a < b) bsum += a+b;
      else{
        asum += a;
        bsum += b;
      }
    }
    cout << asum << " " << bsum << endl;
  }
  return;
}

Compiler output:
a.cc:7:1: error: '::main' must return 'int'
    7 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:24:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   24 |   return;
      |   ^~~~~~
Language: C++

#include<stdio.h>

int main(void){
	int a_point,b_point,i,a_card,b_card,n;
	while(1){
		scanf("%d",&n);
		if(n==0) break;
		a_point=0,b_point=0;
		for(i=0;i<n;n++){
			scanf("%d %d",&a_card,&b_card);
			if(a_card>b_card) a_point+=a_card+b_card;
			else if(a_card<b_card) b_point+=a_card+b_card;
			else {
				a_point+=a_card;
				b_point+=b_card;
			}
			printf("%d %d\n",a_point,b_point);
		}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: Java

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.Map;

public class Main0501 {
	
	MyScanner sc;
	PrintWriter writer;

	public void solve() {
		int n = sc.nextInt();
		if (n == 0) {
			return;
		}
		Map<Character, Character> map = new HashMap<>(n);
		for (int i = 0; i < n; i++) {
			map.put(sc.nextChar(), sc.nextChar());
		}
		StringBuilder sb = new StringBuilder();
		int m = sc.nextInt();
		for (int i = 0; i < m; i++) {
			char c = sc.nextChar();
			if (map.containsKey(c)) {
				sb.append(map.get(c));
			} else {
				sb.append(c);
			}
		}
		writer.println(sb);
	}

	public Main0501() {
		sc = new MyScanner(System.in);
		writer = new PrintWriter(System.out);
	}

	public static void main(String[] args) {
		Main0501 m = new Main0501();
		m.solve();
		m.writer.flush();
	}

	class MyScanner {
		InputStream is;
		private byte[] buffer = new byte[1024];
		private int bufferPointer = 0;
		private int bufferLength = 0;

		MyScanner(InputStream is) {
			this.is = is;
		}

		private int readByte() {
			if (bufferLength == -1) {
				throw new InputMismatchException();
			}
			if (bufferPointer >= bufferLength) {
				bufferPointer = 0;
				try {
					bufferLength = is.read(buffer);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (bufferLength <= -1) {
					return -1;
				}
			}
			return buffer[bufferPointer++];
		}

		String next() {
			int b = skip();
			StringBuilder sb = new StringBuilder();
			while (isChar(b)) {
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}
		
		char nextChar() {
			int b = skip();
			return (char) b;
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		int nextInt() {
			int num = 0;
			int b;
			boolean negative = false;
			while ((b = readByte()) != -1 && !isDigit(b) && b != '-')
				;
			if (b == '-') {
				negative = true;
				b = readByte();
			}
			while (true) {
				if (isDigit(b)) {
					num = num * 10 + (b - '0');
				} else {
					return negative ? -num : num;
				}
				b = readByte();
			}
		}

		int[] nextIntArray(int length) {
			int[] array = new int[length];
			for (int i = 0; i < length; i++) {
				array[i] = sc.nextInt();
			}
			return array;
		}

		long nextLong() {
			long num = 0;
			int b;
			boolean negative = false;
			while ((b = readByte()) != -1 && !isDigit(b) && b != '-')
				;
			if (b == '-') {
				negative = true;
				b = readByte();
			}
			while (true) {
				if (isDigit(b)) {
					num = num * 10 + (b - '0');
				} else {
					return negative ? -num : num;
				}
				b = readByte();
			}
		}

		// from '!' to '~'
		private boolean isChar(int b) {
			return b >= 33 && b <= 126;
		}

		private boolean isDigit(int b) {
			return b >= '0' && b <= '9';
		}

		private int skip() {
			int b;
			while ((b = readByte()) != -1 && !isChar(b))
				;
			return b;
		}

	}
}

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

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.Map;

public class Main0501 {
	
	MyScanner sc;
	PrintWriter writer;

	public void solve() {
		int n = sc.nextInt();
		if (n == 0) {
			return;
		}
		Map<Character, Character> map = new HashMap<Character, Character>(n);
		for (int i = 0; i < n; i++) {
			map.put(sc.nextChar(), sc.nextChar());
		}
		StringBuilder sb = new StringBuilder();
		int m = sc.nextInt();
		for (int i = 0; i < m; i++) {
			char c = sc.nextChar();
			if (map.containsKey(c)) {
				sb.append(map.get(c));
			} else {
				sb.append(c);
			}
		}
		writer.println(sb);
	}

	public Main0501() {
		sc = new MyScanner(System.in);
		writer = new PrintWriter(System.out);
	}

	public static void main(String[] args) {
		Main0501 m = new Main0501();
		m.solve();
		m.writer.flush();
	}

	class MyScanner {
		InputStream is;
		private byte[] buffer = new byte[1024];
		private int bufferPointer = 0;
		private int bufferLength = 0;

		MyScanner(InputStream is) {
			this.is = is;
		}

		private int readByte() {
			if (bufferLength == -1) {
				throw new InputMismatchException();
			}
			if (bufferPointer >= bufferLength) {
				bufferPointer = 0;
				try {
					bufferLength = is.read(buffer);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (bufferLength <= -1) {
					return -1;
				}
			}
			return buffer[bufferPointer++];
		}

		String next() {
			int b = skip();
			StringBuilder sb = new StringBuilder();
			while (isChar(b)) {
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}
		
		char nextChar() {
			int b = skip();
			return (char) b;
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		int nextInt() {
			int num = 0;
			int b;
			boolean negative = false;
			while ((b = readByte()) != -1 && !isDigit(b) && b != '-')
				;
			if (b == '-') {
				negative = true;
				b = readByte();
			}
			while (true) {
				if (isDigit(b)) {
					num = num * 10 + (b - '0');
				} else {
					return negative ? -num : num;
				}
				b = readByte();
			}
		}

		int[] nextIntArray(int length) {
			int[] array = new int[length];
			for (int i = 0; i < length; i++) {
				array[i] = sc.nextInt();
			}
			return array;
		}

		long nextLong() {
			long num = 0;
			int b;
			boolean negative = false;
			while ((b = readByte()) != -1 && !isDigit(b) && b != '-')
				;
			if (b == '-') {
				negative = true;
				b = readByte();
			}
			while (true) {
				if (isDigit(b)) {
					num = num * 10 + (b - '0');
				} else {
					return negative ? -num : num;
				}
				b = readByte();
			}
		}

		// from '!' to '~'
		private boolean isChar(int b) {
			return b >= 33 && b <= 126;
		}

		private boolean isDigit(int b) {
			return b >= '0' && b <= '9';
		}

		private int skip() {
			int b;
			while ((b = readByte()) != -1 && !isChar(b))
				;
			return b;
		}

	}
}

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

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.Map;
import java.util.PriorityQueue;
import java.math.BigInteger;
    
public class Main{

static final InputStream in=System.in;
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
static final long LINF=Long.MAX_VALUE/2;
int n,m;

public static void main(String[] args) throws IOException{
InputReader ir=new InputReader(in);
HashMap<String,String> map=new HashMap<String,String>();
StringBuilder sb=new StringBuilder();
while(true){
n=ir.nextInt();
if(n==0) break;
while(n-->0){
String b=ir.next();
String a=ir.next();
map.put(a,b);
}
m=ir.nextInt();
while(m-->0){
String str=ir.next();
sb.append(map.containsKey(str)?map.get(str):str);
}
out.println(sb.toString());
map.clear();
}
out.flush();
}

static class InputReader {
private InputStream in;
private byte[] buffer=new byte[1024];
private int curbuf;
private int lenbuf;

public InputReader(InputStream in) {this.in=in;}
  
public int readByte() {
if(lenbuf==-1) throw new InputMismatchException();
if(curbuf>=lenbuf){
curbuf= 0;
try{
lenbuf=in.read(buffer);
}
catch (IOException e) {
throw new InputMismatchException();
}
if(lenbuf<=0)
return -1;
}
return buffer[curbuf++];
}

public boolean isSpaceChar(int c){return !(c>=33&&c<=126);}

private int skip() {int b; while((b = readByte())!=-1&&isSpaceChar(b)); return b;}

public String next() {
int b=skip();
StringBuilder sb=new StringBuilder();
while(!isSpaceChar(b)){
sb.appendCodePoint(b);
b=readByte();
}
return sb.toString();
}
 
public int nextInt() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
int res=0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}

public long nextLong() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
long res = 0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}

public int[] toIntArray(int n){
int[] a=new int[n];
for(int i=0;i<n;i++) a[i]=nextInt();
return a;
}
}
}

Compiler output:
Main.java:29: error: non-static variable n cannot be referenced from a static context
n=ir.nextInt();
^
Main.java:30: error: non-static variable n cannot be referenced from a static context
if(n==0) break;
   ^
Main.java:31: error: non-static variable n cannot be referenced from a static context
while(n-->0){
      ^
Main.java:36: error: non-static variable m cannot be referenced from a static context
m=ir.nextInt();
^
Main.java:37: error: non-static variable m cannot be referenced from a static context
while(m-->0){
      ^
5 errors
Language: Java

import java.io.PrintWriter;
import java.util.Scanner;
public class Mian{
	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		PrintWriter out = new PrintWriter(System.out);
		while(sc.hasNext()){
			int m = sc.nextInt();
			if(m == 0)break;
			String temp [][] = new String[2][m];
			for (int i = 0; i < m ; i++ ){
				temp[0][i] = sc.next();
				temp[1][i] = sc.next();
			}
			int n = sc.nextInt();
			String ans = "";
			for(int i = 0 ; i < n ; i++){
				ans = sc.next();
				for(int j = 0 ; j < m ; j++){
					if(( temp[0][j].equals(ans) )) ans = temp[1][j];
				}
				out.print(ans);
			}
			out.println();
			out.flush();
		}
	}
}

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

import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;

public class Main{

static PrintWriter out;
static InputReader ir;

static void solve(){
 for(;;){
  int n=ir.nextInt();
  if(n==0) return;
  HashMap<String,String> map=new HashMap<String,String>();
  StringBuilder sb=new StringBuilder();
  while(n-->0) map.put(ir.next(),ir.next());
  int m=ir.nextInt();
  while(m-->0){
   String str=ir.next();
   sb.append((map.containsKey(str))?map.get(str):str);
  }
  out.println(sb.toString());
 }
}

public static void main(String[] args) throws Exception{
 ir=new InputReader(System.in);
 out=new PrintWriter(System.out);
 solve();
 out.flush();
}

static class InputReader {
 private InputStream in;
 private byte[] buffer=new byte[1024];
 private int curbuf;
 private int lenbuf;

 public InputReader(InputStream in) {this.in=in; this.curbuf=this.lenbuf=0;}
 
 public boolean hasNextByte() {
  if(curbuf>=lenbuf){
   curbuf= 0;
   try{
    lenbuf=in.read(buffer);
   }catch(IOException e) {
    throw new InputMismatchException();
   }
   if(lenbuf<=0) return false;
  }
  return true;
 }

 private int readByte(){if(hasNextByte()) return buffer[curbuf++]; else return -1;}
 
 private boolean isSpaceChar(int c){return !(c>=33&&c<=126);}
 
 private void skip(){while(hasNextByte()&&isSpaceChar(buffer[curbuf])) curbuf++;}
 
 public boolean hasNext(){skip(); return hasNextByte();}
 
 public String next(){
  if(!hasNext()) throw new NoSuchElementException();
  StringBuilder sb=new StringBuilder();
  int b=readByte();
  while(!isSpaceChar(b)){
   sb.appendCodePoint(b);
   b=readByte();
  }
  return sb.toString();
 }
 
 public int nextInt() {
  if(!hasNext()) throw new NoSuchElementException();
  int c=readByte();
  while (isSpaceChar(c)) c=readByte();
  boolean minus=false;
  if (c=='-') {
   minus=true;
   c=readByte();
  }
  int res=0;
  do{
   if(c<'0'||c>'9') throw new InputMismatchException();
   res=res*10+c-'0';
   c=readByte();
  }while(!isSpaceChar(c));
  return (minus)?-res:res;
 }
}
}

Compiler output:
Main.java:20: error: cannot find symbol
  HashMap<String,String> map=new HashMap<String,String>();
  ^
  symbol:   class HashMap
  location: class Main
Main.java:20: error: cannot find symbol
  HashMap<String,String> map=new HashMap<String,String>();
                                 ^
  symbol:   class HashMap
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Converse{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		StringBuilder[] ans = new StringBuilder[1000];
		int index = 0;

		while( n != 0 ){
			String[][] data = new String[n][2];
			for(int i = 0; i < n; i++){
				data[i][0] = stdIn.next();
				data[i][1] = stdIn.next();
			}
		
			int x = stdIn.nextInt();
			for(int i = 0; i < x; i++){
				String s = stdIn.next();
				for(int j = 0; j < n; j++){
					if( s.equals(data[j][0]) ){
						s = new String(data[j][1]);
						break;
					}
				}
				if( i == 0 ){
					ans[index] = new StringBuilder(s);
				} else {
					ans[index].append(s);
				}
			
			}
			index++;
			n = stdIn.nextInt();
		}
		for(int i = 0; i < index; i++){
			System.out.println(ans[i].toString());
		}
	}
}

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

import java.util.*;
public class DataConversion0501 {
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    int n = kbd.nextInt();
	    if(n!=0){
		String[] in = new String[n];
		String[] out = new String[n];
		String s = "";
		int i;

		for(i=0; i<n; i++){
		    in[i] = kbd.next();
		    out[i] = kbd.next();
		}

		n = kbd.nextInt();
		for(; n>0; n--){
		    String a = kbd.next();
		    for(i=0; !in[i].equals(a) && i+1<in.length; i++);
		    if(!in[i].equals(a))  s += a;
		    else s += out[i];
		}
		System.out.println(s);
	    }
	}
    }
}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;

public class Main {
    public static void main(String[] args) {
    	BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    	HashMap<String,String> c = new HashMap<String,String>();
    	
    	while(true){
				int tn = Integer.parseInt(in.readLine());
			
				if(tn == 0) break;
    			    
    			for(int i=0; i < tn; i++){
    				String[] tl = in.readLine().split(" ");
    				c.put(tl[0],tl[1]);
    			}
	    		
    			int wn = Integer.parseInt(in.readLine());
    			StringBuilder answer = new StringBuilder(); 
   
    			for(int i=0; i < wn; i++){
    				String word = in.readLine();
    				if(c.containsKey(word)){
    					answer.append(c.get(word));
    				}else{
    					answer.append(word);
    				}
    			}
             System.out.println(answer.toString());
    	}
    }
}

Compiler output:
Main.java:11: error: unreported exception IOException; must be caught or declared to be thrown
				int tn = Integer.parseInt(in.readLine());
				                                     ^
Main.java:16: error: unreported exception IOException; must be caught or declared to be thrown
    				String[] tl = in.readLine().split(" ");
    				                         ^
Main.java:20: error: unreported exception IOException; must be caught or declared to be thrown
    			int wn = Integer.parseInt(in.readLine());
    			                                     ^
Main.java:24: error: unreported exception IOException; must be caught or declared to be thrown
    				String word = in.readLine();
    				                         ^
4 errors
Language: C

#include <cstdio>
#include <map>

using namespace std;

int main()
{
    int n, m;
    char before, after;
    map<char, char> conversion;
    int i;
    
    while (scanf("%d", &n) * n != 0){
        conversion.clear();

        for (i = 0; i < n; i++){
            scanf(" %c %c", &before, &after);

            conversion[before] = after;
        }

        scanf("%d", &m);
        for (i = 0; i < m; i++){
            scanf(" %c", &before);

            if (conversion.count(before)){
                printf("%c", conversion[before]);
            }
        }
        puts("");
    }

    return (0);
}

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

#include<stdio.h>
#include<stdlib.h>

int main()
{
  int n;
  int m;
  int i,j;
  char before[100];
  char after[100];
  char str[100];

  while(1)
  {
  scanf("%d",&n);
  if(n==0)break;
  for(i<0;i<n;i++)
  {
	scanf("\n%c %c",&before[i],&after[i]);
  }

  scanf("\n%d",&m);


  for(i=0;i<m;i++)
  {

   scanf("\n%c",&str[i]);

	for(j=0;j<n;j++)
	{
		if(str[i]==before[j])
		{
			str[i]=after[j];
			break;
		}
	}
  }

  for(i=0;i<strnum;i++)
  {
	printf("%c",str[i]);
  }

  printf("\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:40:13: error: 'strnum' undeclared (first use in this function)
   40 |   for(i=0;i<strnum;i++)
      |             ^~~~~~
main.c:40:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){
    int n,m,i,j,flag;
    char a,b;
    int sb[62]={0},sa[62]={0};

    while(scanf("%d%*c",&n),n!=0){
        for(i=0;i<n;i++){
            for(scanf("%c",&b);c!=' ';scanf("%c",&b));
            scanf("%c %c",&sb[i],&sa[i]);
            getchar();

            for(scanf("%c",&b);c!=' ';scanf("%c",&b));
        }   
        scanf("%d%*c",&m);

            for(scanf("%c",&b);c!=' ';scanf("%c",&b));
        for(i=0;i<m;i++){
            flag=0;
            scanf("%c",&a);
            getchar();
            for(scanf("%c",&b);c!=' ';scanf("%c",&b));
            for(j=0;j<n;j++){
                if(sb[j]==a){
                    printf("%c",sa[j]);
                    flag=1;
                    break;
                }   
            }   
            if(!flag)printf("%c",a);
        }   
    }   
    puts("");
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:32: error: 'c' undeclared (first use in this function)
   10 |             for(scanf("%c",&b);c!=' ';scanf("%c",&b));
      |                                ^
main.c:10:32: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void){

	int n,m,flag;
	int i,j;
	char ah[70],bh[70],jo;

	while(1){
		scanf("%d ",&n);
		if(!n) break;
		for(i=0;i<n;i++){
			scanf("%c %c ",&ah[i],&bh[i]);
		}
		scanf("%d ",&m);
		for(i=0;i<m;i++){
			scanf("%c ",&jo);
			flag=0;
			for(j=0;j<n;j++){
				if(jo==ah[j]){
					printf("%c",bh[j]);
					flag=1;
					break;
				}
			}
			if(!flag) printf("%c",jo);
		}
		printf("\n");
	}
	return 0;

Compiler output:
main.c: In function 'main':
main.c:29:9: error: expected declaration or statement at end of input
   29 |         return 0;
      |         ^~~~~~
Language: C

#include <stdio.h>


int main()
{
	int n, m, i;
	char change[10000]={0}, ans[100000004];
	char a,b, data;

	scanf("%d", &n);
	if(n==0)
		return 0;

	for(i=0; i<n; i++){
		scanf("%c%c", &a, &b);
		change[a] = b;
	}
	scanf("%d", &m);
	for(i=0; i<m; i++){
		scanf("%c", &data);
		if(change[data] != 0){
			ans[i] = change[data];
		}else
			ans[i] = data;
	}

	main();

Compiler output:
main.c: In function 'main':
main.c:27:9: error: expected declaration or statement at end of input
   27 |         main();
      |         ^~~~
Language: C

#include<stdio.h>
#include<String.h>
int main(){
  char **conv;
  char *str;
  char c1,c2,c;
  int i,j,n,l;
  scanf("%d",&n);//convert data num
  while(n!=0){
    conv = (char**)malloc(sizeof(char*)*n);
    for(i=0;i<n;i++) conv[i]=(char*)malloc(sizeof(char)*2);

    i = 0;
    while(1){
      c = getchar();
      if(c != '\n' && c !=' '){
	conv[i/2][i%2] = c;
	i++;
	if(i == n*2) break;
      }
    }
    
    scanf("\n%d",&l);//converted data num
    str = (char*)malloc(sizeof(char)*(l + 1));
    i = 0;
    while(1){
      c = getchar();
      if(c != '\n' && c !=' '){
	for(j = 0; j < n; j++){
	  if(conv[j][0] == c){ c = conv[j][1];break;}
	}
	str[i] = c;
	i++;
      }
      if(l == i)break;
    }
    str[l]='\0';
    printf("%s \n",str);

    for(i=0;i<n;i++) free(conv[i]);
    free(conv);
    free(str);
    scanf("%d",&n);//convert data num
  }
  
  return 0;
}

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

#include<stdio.h>
#include<stdlib.h>
#include<String.h>
int main(){
  char **conv;
  char *str;
  char c1,c2,c;
  int i,j,n,l;
  scanf("%d",&n);//convert data num
  while(1){
    if(n==0)break; 
    conv = (char**)malloc(sizeof(char*)*n);
    for(i=0;i<n;i++) conv[i]=(char*)malloc(sizeof(char)*2);

    i = 0;
    while(1){
      c = getchar();
      if(c != '\n' && c !=' '){
	conv[i/2][i%2] = c;
	i++;
	if(i == n*2) break;
      }
    }
    
    scanf("\n%d",&l);//converted data num
    str = (char*)malloc(sizeof(char)*(l + 1));
    i = 0;
    while(1){
      c = getchar();
      if(c != '\n' && c !=' '){
	for(j = 0; j < n; j++){
	  if(conv[j][0] == c){ c = conv[j][1];break;}
	}
	str[i] = c;
	i++;
      }
      if(l == i)break;
    }
    str[l]='\0';
    printf("%s \n",str);

    for(i=0;i<n;i++) free(conv[i]);
    free(conv);
    free(str);
    scanf("%d",&n);//convert data num
  }
  
  return 0;
}

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

#include <stdio.h>


int main()
{
	int n, m, i;
	char change[1000][2], c;

	while (1) {
		scanf("%d", &n);
		if (n == 0) break;
		for (i = 0;i < n;i++) {
			scanf("%c %c", &change[i][0], &change[i][1]);
		}
		scanf("%d", &m);
		while (m--) {
			scanf("%c", &c);

			for (i = 0;i < n;i++) {
				if (c == change[i][0]) {
					c = change[i][1];
					break;
				}
			}
			printf("%c", c);
		}

		return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:29:9: error: expected declaration or statement at end of input
   29 |         }
      |         ^
Language: C

#include<stdio.h>
#include<string.h>

int n,m,i,j;
char s[1000][9],x[9];

int main(){
	scanf("%d",&n);
	while(n!=0){
		for(i=0;i<=n;i++)gets(s[i]);
		//printf("\nAKB%d\n",n);
		scanf("%d",&m);
		for(i=0;i<m;i++){
			scanf("%s",&x);
			for(j=0;j<n;j++){
				if(x[0]==s[j][0]){
					//strcpy(x,s[i]);
					x[0]=s[j][2];
					break;
				}
			}
			printf("%c",x[0]);
		}
		printf("\n");
		scanf("%d",&n);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:34: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   10 |                 for(i=0;i<=n;i++)gets(s[i]);
      |                                  ^~~~
      |                                  fgets
Language: C

#include <stdio.h>
#include <string.h>

int main(void)
{
	int n;
	char conv[100][3];
	int m;
	char c, t;
	int i, j;
	
	while (1){
		scanf("%d", &n);
		getchar();
		if (n == 0){
			break;
		}
		
		for (i = 0; i < 26; i++){
			conv[i][0] = 'a' + i;
			conv[i][1] = 'a' + i;
		}
		
		for (i = 30; i < 56; i++){
			conv[i][0] = 'A' + i - 30;
			conv[i][1] = 'A' + i - 30;
		}
		
		for (i = 60; i < 70; i++){
			conv[i][0] = '0' + i - 60;
			conv[i][1] = '0' + i - 60;
		}
		
		for (i = 0; i < n; i++){
			scanf("%c", &c);
			getchar();
			scanf("%c", &t);
			getchar();
			if ('a' <= c && c <= 'z'){
				conv[c - 'a'][1] = t;
			}
			else if ('A' <= c && c <= 'Z'){
				conv[c - 'A' + 30][1] = t;
			}
			else {
				conv[c - '0' + 60][1] = t;
			}
		}
		
		scanf("%d", &m);
		getchar();
		for (i = 0; i < m; i++){
			scanf("%c", &c);
			getchar();
/*			if ('a' <= c && c <= 'z'){
				printf("%c", conv[c - 'a'][1]);
			}
			else if ('A' <= c && c <= 'Z'){
				printf("%c", conv[c - 'A' + 30][1]);
			}
			else {
				printf("%c", conv[c - '0' + 60][1]);*/
			}
		}
		printf("\n");
	}
	
	return (0);
}

Compiler output:
main.c:68:9: error: expected identifier or '(' before 'return'
   68 |         return (0);
      |         ^~~~~~
main.c:69:1: error: expected identifier or '(' before '}' token
   69 | }
      | ^
Language: C

#include <iostream>
using namespace std;
int main(){
    int n,i,tail;
    char s;
    char dic[256];
    while(cin>>n,n){
	    for(i=0;i<256;i++) dic[i]=i;
	    while(n--){
		    cin>>s;
		    cin>>dic[(int)s];
	    }
	    cin>>n;
	    while(n--){
		    cin>>s;
		    cout<<dic[(int)s];
	    }
	    cout<<endl;
    }
}

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

//#include <stdio.h>
//  int main(){
//    int n,m,i,j;
//    char x[62][2];
//    char z,l;
//while(1){
//    scanf("%d",&n);
//	if(n==0){break;}
//    for(i=0;i<n;i++){
//      scanf("%s",&x[i]);
//      }
//scanf("%d",&m);
//for(i=0;i<m;i++){
//scanf("%c",&l);
//for(j=0;j<n;j++){
//if(l==x[j][0]){
//l=x[j][1];
//break;
//}
//}
//printf("%c",l);
//}
//printf("\n");
//}
//return 0;
//}
  #include<stdio.h>
 int n,m,i,j;
char z[1000][2],x;
 int main(){ 
    while(n!=0){
		 scanf("%d",&n);
        for(i=0;i<n*2;i++){
scanf("%s",z[i]);
}
       scanf("%d",&m);   
     for(i=0;i<m;i++){  
          scanf("%c",x);     
       for(j=0;j<=n;j++){       
         if(x==z[j*2][0]){      
                 x=z[j*2+1][0];  
                  break;   
             }    
        }         
   printf("%c",x[0]);  
      }       
 printf("\n");  
    }    
     return 0;
}

Compiler output:
main.c: In function 'main':
main.c:45:17: error: subscripted value is neither array nor pointer nor vector
   45 |    printf("%c",x[0]);
      |                 ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifdef DEBUG
#define LOG(...) fprintf(stderr, __VA_ARGS__)
#elif
#define LOG(...) 
#endif // DEBUG

struct convert_list
{
    char from;
    char to;
    struct convert_list *next;
};
typedef struct convert_list CONVERT_LIST;


CONVERT_LIST* insert_list(CONVERT_LIST *list, char from, char to);
char search_list(CONVERT_LIST *head, char target);

int main(void)
{
    
    while (1) {
        int num, convert_num;
        char from, to, target;
        int i;
        CONVERT_LIST *list_head;
        
        scanf("%d\n", &num);
        LOG("num = %d\n", num);

        if (num == 0) {
            break;
        }
        
        /* Make convert table */
        for (i = 0; i < num; i++) {
            scanf("%c %c\n", &from, &to);
            LOG("from = %c, to = %c\n", from, to);
            list_head = insert_list(list_head, from, to);
        }

        /* Convert */
        scanf("%d\n", &convert_num);
        LOG("convert_num = %d\n", convert_num);
        for (i = 0; i < convert_num; i++) {
            scanf("%c\n", &target);
            LOG("target = %c\n", target);

            printf("%c", search_list(list_head, target));
        }
        printf("\n");
        
    }
    
    return 0;
}

CONVERT_LIST* insert_list(CONVERT_LIST *list, char from, char to) 
{
    CONVERT_LIST *head, *tail, *new_node;
    head = tail = list;

    if (tail != NULL) {
        for ( ; tail->next != NULL ; tail = tail->next) {
            /* NOP */
        }
    }
        
    new_node = (CONVERT_LIST*)malloc(sizeof(CONVERT_LIST));
    if (new_node == NULL) {
        /* malloc failed */
        return NULL;
    }

    memset(new_node, '\0', sizeof(CONVERT_LIST));
    new_node->from = from;
    new_node->to = to;
    new_node->next = NULL;

    if (tail != NULL) {
        tail->next = new_node;
    }
    else {
        head = new_node;
    }

    return head;

}

char search_list(CONVERT_LIST *head, char target) 
{
    CONVERT_LIST *tmp;
    tmp = head;
    if (head == NULL) {
        return target;
    }

    for ( ; tmp != NULL ; tmp = tmp->next) {
        if (tmp->from == target) {
            return tmp->to;
        }
    }

    return target;
    
}

Compiler output:
main.c:7:6: error: #elif with no expression
    7 | #elif
      |      ^
main.c: In function 'main':
main.c:33:9: error: implicit declaration of function 'LOG' [-Wimplicit-function-declaration]
   33 |         LOG("num = %d\n", num);
      |         ^~~
Language: C

#include <cstdio>
#include <vector>

using namespace std;

struct CODE
{
	char before;
	char after;
};

int main(void)
{
	int n;
	
	while (scanf("%d", &n) * n != 0){
		vector<CODE> code;
		vector<char> str;
		
		while (n-- > 0){
			CODE c;
			scanf(" %c %c", &c.before, &c.after);
			code.push_back(c);
		}
		
		int m;
		scanf("%d", &m);
		while (m-- > 0){
			char c;
			
			scanf(" %c", &c);
			for (int i = 0; i < code.size(); i++){
				if (c == code[i].before){
					c = code[i].after;
					break;
				}
			}
			str.push_back(c);
		}
		for (int i = 0; i < str.size(); i++){
			putchar(str[i]);
		}
		puts("");
	}
	
	return 0;
}

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

use std::io;
use std::str::FromStr;
use std::collections::HashMap;

fn read() -> i32 {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    let x: i32 = s.trim().parse().unwrap();
    x
}
fn read_char() -> String {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    let x: String = s.trim().parse().unwrap();
    x
}

 fn main(){
    loop{
        let mut rules : HashMap<String,String> = HashMap::new();
    
        let n = read();
        if n == 0{
            break;
        }
        for i in 0..n{
            let mut buf = String::new();
            io::stdin().read_line(&mut buf).unwrap();
            let mut it = buf.split_whitespace().map(|n| String::from_str(n).unwrap());
            let a = it.next().unwrap();
            let b = it.next().unwrap();

            rules.insert(a,b);
        }

        let m = read();
        for i in 0..m{
            let mut a = read_char();
            match rules.get(&a){
                Some(e) =>{
                    print!("{}",e);
                },
                None => print!("{}",&a),
            }
        }
        println!();
    }
 }
 


Compiler output:
a.cc:26:18: error: too many decimal points in number
   26 |         for i in 0..n{
      |                  ^~~~
a.cc:37:18: error: too many decimal points in number
   37 |         for i in 0..m{
      |                  ^~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io;
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::str::FromStr;
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::collections::HashMap;
      | ^~~
a.cc:5:1: error: 'fn' does not name a type
    5 | fn read() -> i32 {
      | ^~
a.cc:11:1: error: 'fn' does not name a type
   11 | fn read_char() -> String {
      | ^~
a.cc:18:2: error: 'fn' does not name a type
   18 |  fn main(){
      |  ^~
Language: C++

#include<iostream>
using namespace std;

int main()
{
    int n, m;
    char c[200], a, b, p;

    while( cin >> n )
    {
        if( n == 0 )
            break;    
        for( int i = 0; i < 200; i++ )
            c[i] = '.';
        for( int i = 0; i < n; i++ )
        {
            cin >> a >> b;
            c[a] = b;
        }

        cin >> m;

        for( int i = 0; i < m; i++ )
        {
            cin >> p[i];
            if( c[p] == '.' )
                cout << p;
            else
                cout << c[p];
        }
        cout << endl;
    }   
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:21: error: invalid types 'char[int]' for array subscript
   25 |             cin >> p[i];
      |                     ^
Language: C++

#include <cstdio>
#include <map>

using namespace std;

int main()
{
    int n, m;
    char before, after;
    map<char, char> conversion;
    int i;
    
    while (scanf("%d", &n) * n != 0){
        conversion.clear();

        for (i = 0; i < n; i++){
            scanf(" %c %c", &before, &after);

            conversion[before] = after;
        }

        scanf("%d", &m);
        for (i = 0; i < m; i++){
            scanf(" %c", &before);

            if (conversion.count(before)){
                printf("%c", conversion[before]);
            }
            else {
                printf("%c", before);
            }<`0`>
        }
        puts("");
    }

    return (0);
}

Compiler output:
a.cc:31:15: error: stray '`' in program
   31 |             }<`0`>
      |               ^
a.cc:31:17: error: stray '`' in program
   31 |             }<`0`>
      |                 ^
a.cc: In function 'int main()':
a.cc:31:14: error: expected primary-expression before '<' token
   31 |             }<`0`>
      |              ^
a.cc:32:9: error: expected primary-expression before '}' token
   32 |         }
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main () {
int n,i.m;
char s[100000000];
char list[100][100];
while(cin >> n,n) {
    for(i=0;i<n;i++) {
        for(j=0;j<2;j++)
        cin >> list[i][j];
    }
    cin >> m;
    for(i=0;i<m;i++) {
        cin >> s[i];
        for(j=0;j<n;j++) {
            if(s[i] == list[j][1]){
                s[i] = list[j][2];
                break;
            }
        }
    }
    cout << s << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '.' token
    5 | int n,i.m;
      |        ^
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     for(i=0;i<n;i++) {
      |         ^
a.cc:10:13: error: 'j' was not declared in this scope
   10 |         for(j=0;j<2;j++)
      |             ^
a.cc:13:12: error: 'm' was not declared in this scope
   13 |     cin >> m;
      |            ^
a.cc:14:9: error: 'i' was not declared in this scope
   14 |     for(i=0;i<m;i++) {
      |         ^
a.cc:16:13: error: 'j' was not declared in this scope
   16 |         for(j=0;j<n;j++) {
      |             ^
Language: C++

#include<iostream>
using namespace std;

int main () {
int n,i.m;
char s[100000000];
char list[100][100];
while(cin >> n,n) {
    for(i=0;i<n;i++) {
        for(j=0;j<2;j++)
        cin >> list[i][j];
    }
    cin >> m;
    for(i=0;i<m;i++) {
        cin >> s[i];
        for(j=0;j<n;j++) {
            if(s[i] == list[j][1]){
                s[i] = list[j][2];
                break;
            }
        }
    }
for(i=0,i<s.sizeof(),i++)
    cout << s << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '.' token
    5 | int n,i.m;
      |        ^
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     for(i=0;i<n;i++) {
      |         ^
a.cc:10:13: error: 'j' was not declared in this scope
   10 |         for(j=0;j<2;j++)
      |             ^
a.cc:13:12: error: 'm' was not declared in this scope
   13 |     cin >> m;
      |            ^
a.cc:14:9: error: 'i' was not declared in this scope
   14 |     for(i=0;i<m;i++) {
      |         ^
a.cc:16:13: error: 'j' was not declared in this scope
   16 |         for(j=0;j<n;j++) {
      |             ^
a.cc:23:5: error: 'i' was not declared in this scope
   23 | for(i=0,i<s.sizeof(),i++)
      |     ^
a.cc:23:13: error: expected unqualified-id before 'sizeof'
   23 | for(i=0,i<s.sizeof(),i++)
      |             ^~~~~~
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
a.cc:24:23: error: expected ';' before '}' token
   24 |     cout << s << endl;
      |                       ^
      |                       ;
   25 | }
      | ~                      
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
a.cc:24:23: error: expected ')' before '}' token
   24 |     cout << s << endl;
      |                       ^
      |                       )
   25 | }
      | ~                      
a.cc:23:4: note: to match this '('
   23 | for(i=0,i<s.sizeof(),i++)
      |    ^
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main () {
int n,i,j,m;
char s[100000000];
char list[100][100];
while(cin >> n,n) {
    for(i=0;i<n;i++) {
        for(j=0;j<2;j++)
        cin >> list[i][j];
    }
    cin >> m;
    for(i=0;i<m;i++) {
        cin >> s[i];
        for(j=0;j<n;j++) {
            if(s[i] == list[j][1]){
                s[i] = list[j][2];
                break;
            }
        }
    }
for(i=0;i<s.sizeof();i++)
    cout << s << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: expected unqualified-id before 'sizeof'
   23 | for(i=0;i<s.sizeof();i++)
      |             ^~~~~~
a.cc:23:13: error: expected ';' before 'sizeof'
   23 | for(i=0;i<s.sizeof();i++)
      |             ^~~~~~
      |             ;
a.cc:23:20: error: expected primary-expression before ')' token
   23 | for(i=0;i<s.sizeof();i++)
      |                    ^
a.cc:23:21: error: expected ')' before ';' token
   23 | for(i=0;i<s.sizeof();i++)
      |    ~                ^
      |                     )
a.cc:23:25: error: expected ';' before ')' token
   23 | for(i=0;i<s.sizeof();i++)
      |                         ^
      |                         ;