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

package aoj;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;

public class aoj031 {
	public static void main(String[] args){
		BigDecimal one = new BigDecimal("1.00");
		int[] abo = {0,0,0,0};
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String tmp = null;
		int cup = 0;
		int mun = 0;
		int ter = 0;
		String[] rrr;
		int st = 0,sr = 0;
		double mon = 0;
		int syo=0,hisi=0;
		double aaaa = 1;
		
		int zixtusi = 0;
		int touri = 0;
		int i = 0;
		
		ArrayList<Integer> fas = new ArrayList<Integer>();
		ArrayList<Integer> has = new ArrayList<Integer>();
		ArrayList<Integer> las = new ArrayList<Integer>();
		
		while(true){
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				fas.add(Integer.parseInt(sprit[0]));
			}
			
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				has.add(Integer.parseInt(sprit[0]));
			}
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<has.size();j++){
					
					if(fas.get(i) == has.get(j)){
						int k = 0;
						for(k=0;k<las.size();k++){
							if(las.get(k) == fas.get(i)){
								k = 1000000;
								break;
							}
						}
						if(k != 1000000){
							las.add(fas.get(i));
						}
					}
					
				}
			}
			
			Collections.sort(las);
			
			
			int[] las2 = new int[las.size()];
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(fas.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<has.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(has.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<las.size();i++){
				System.out.println(las.get(i)+" "+las2[i]);
			}
			
			
		}
		
	}

}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String[] args){
		int i = 0;
		
		ArrayList<Integer> fas = new ArrayList<Integer>();
		ArrayList<Integer> has = new ArrayList<Integer>();
		ArrayList<Integer> las = new ArrayList<Integer>();
		
		while(true){
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				fas.add(Integer.parseInt(sprit[0]));
			}
			
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				has.add(Integer.parseInt(sprit[0]));
			}
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<has.size();j++){
					
					if(fas.get(i) == has.get(j)){
						int k = 0;
						for(k=0;k<las.size();k++){
							if(las.get(k) == fas.get(i)){
								k = 1000000;
								break;
							}
						}
						if(k != 1000000){
							las.add(fas.get(i));
						}
					}
					
				}
			}
			
			Collections.sort(las);
			
			
			int[] las2 = new int[las.size()];
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(fas.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<has.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(has.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<las.size();i++){
				System.out.println(las.get(i)+" "+las2[i]);
			}
			
			
		}
		
	}

}

Compiler output:
Main.java:20: error: cannot find symbol
					tmp = br.readLine();
					^
  symbol:   variable tmp
  location: class Main
Main.java:20: error: cannot find symbol
					tmp = br.readLine();
					      ^
  symbol:   variable br
  location: class Main
Main.java:26: error: cannot find symbol
				if(tmp.equals("")){
				   ^
  symbol:   variable tmp
  location: class Main
Main.java:30: error: cannot find symbol
				String[] sprit = tmp.split(",",0);
				                 ^
  symbol:   variable tmp
  location: class Main
Main.java:38: error: cannot find symbol
					tmp = br.readLine();
					^
  symbol:   variable tmp
  location: class Main
Main.java:38: error: cannot find symbol
					tmp = br.readLine();
					      ^
  symbol:   variable br
  location: class Main
Main.java:44: error: cannot find symbol
				if(tmp.equals("")){
				   ^
  symbol:   variable tmp
  location: class Main
Main.java:48: error: cannot find symbol
				String[] sprit = tmp.split(",",0);
				                 ^
  symbol:   variable tmp
  location: class Main
8 errors
Language: Java

import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String[] args){
		int i = 0;
		
		ArrayList<Integer> fas = new ArrayList<Integer>();
		ArrayList<Integer> has = new ArrayList<Integer>();
		ArrayList<Integer> las = new ArrayList<Integer>();
		
		while(true){
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				fas.add(Integer.parseInt(sprit[0]));
			}
			
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				has.add(Integer.parseInt(sprit[0]));
			}
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<has.size();j++){
					
					if(fas.get(i) == has.get(j)){
						int k = 0;
						for(k=0;k<las.size();k++){
							if(las.get(k) == fas.get(i)){
								k = 1000000;
								break;
							}
						}
						if(k != 1000000){
							las.add(fas.get(i));
						}
					}
					
				}
			}
			
			Collections.sort(las);
			
			
			int[] las2 = new int[las.size()];
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(fas.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<has.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(has.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<las.size();i++){
				System.out.println(las.get(i)+" "+las2[i]);
			}
			
			
		}
		
	}

}

Compiler output:
Main.java:16: error: cannot find symbol
					tmp = br.readLine();
					^
  symbol:   variable tmp
  location: class Main
Main.java:16: error: cannot find symbol
					tmp = br.readLine();
					      ^
  symbol:   variable br
  location: class Main
Main.java:17: error: cannot find symbol
				} catch (IOException e) {
				         ^
  symbol:   class IOException
  location: class Main
Main.java:22: error: cannot find symbol
				if(tmp.equals("")){
				   ^
  symbol:   variable tmp
  location: class Main
Main.java:26: error: cannot find symbol
				String[] sprit = tmp.split(",",0);
				                 ^
  symbol:   variable tmp
  location: class Main
Main.java:34: error: cannot find symbol
					tmp = br.readLine();
					^
  symbol:   variable tmp
  location: class Main
Main.java:34: error: cannot find symbol
					tmp = br.readLine();
					      ^
  symbol:   variable br
  location: class Main
Main.java:35: error: cannot find symbol
				} catch (IOException e) {
				         ^
  symbol:   class IOException
  location: class Main
Main.java:40: error: cannot find symbol
				if(tmp.equals("")){
				   ^
  symbol:   variable tmp
  location: class Main
Main.java:44: error: cannot find symbol
				String[] sprit = tmp.split(",",0);
				                 ^
  symbol:   variable tmp
  location: class Main
10 errors
Language: Java

import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String[] args){
		int i = 0;
		String tmp;
		ArrayList<Integer> fas = new ArrayList<Integer>();
		ArrayList<Integer> has = new ArrayList<Integer>();
		ArrayList<Integer> las = new ArrayList<Integer>();
		
		while(true){
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				fas.add(Integer.parseInt(sprit[0]));
			}
			
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				has.add(Integer.parseInt(sprit[0]));
			}
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<has.size();j++){
					
					if(fas.get(i) == has.get(j)){
						int k = 0;
						for(k=0;k<las.size();k++){
							if(las.get(k) == fas.get(i)){
								k = 1000000;
								break;
							}
						}
						if(k != 1000000){
							las.add(fas.get(i));
						}
					}
					
				}
			}
			
			Collections.sort(las);
			
			
			int[] las2 = new int[las.size()];
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(fas.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<has.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(has.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<las.size();i++){
				System.out.println(las.get(i)+" "+las2[i]);
			}
			
			
		}
		
	}

}

Compiler output:
Main.java:16: error: cannot find symbol
					tmp = br.readLine();
					      ^
  symbol:   variable br
  location: class Main
Main.java:17: error: cannot find symbol
				} catch (IOException e) {
				         ^
  symbol:   class IOException
  location: class Main
Main.java:34: error: cannot find symbol
					tmp = br.readLine();
					      ^
  symbol:   variable br
  location: class Main
Main.java:35: error: cannot find symbol
				} catch (IOException e) {
				         ^
  symbol:   class IOException
  location: class Main
4 errors
Language: Java

import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String[] args){
		int i = 0;
		String tmp;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> fas = new ArrayList<Integer>();
		ArrayList<Integer> has = new ArrayList<Integer>();
		ArrayList<Integer> las = new ArrayList<Integer>();
		
		while(true){
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				fas.add(Integer.parseInt(sprit[0]));
			}
			
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				has.add(Integer.parseInt(sprit[0]));
			}
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<has.size();j++){
					
					if(fas.get(i) == has.get(j)){
						int k = 0;
						for(k=0;k<las.size();k++){
							if(las.get(k) == fas.get(i)){
								k = 1000000;
								break;
							}
						}
						if(k != 1000000){
							las.add(fas.get(i));
						}
					}
					
				}
			}
			
			Collections.sort(las);
			
			
			int[] las2 = new int[las.size()];
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(fas.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<has.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(has.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<las.size();i++){
				System.out.println(las.get(i)+" "+las2[i]);
			}
			
			
		}
		
	}

}

Compiler output:
Main.java:8: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:8: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:8: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:18: error: cannot find symbol
				} catch (IOException e) {
				         ^
  symbol:   class IOException
  location: class Main
Main.java:36: error: cannot find symbol
				} catch (IOException e) {
				         ^
  symbol:   class IOException
  location: class Main
5 errors
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args){
		int i = 0;
		String tmp;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> fas = new ArrayList<Integer>();
		ArrayList<Integer> has = new ArrayList<Integer>();
		ArrayList<Integer> las = new ArrayList<Integer>();
		
		while(true){
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				fas.add(Integer.parseInt(sprit[0]));
			}
			
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				has.add(Integer.parseInt(sprit[0]));
			}
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<has.size();j++){
					
					if(fas.get(i) == has.get(j)){
						int k = 0;
						for(k=0;k<las.size();k++){
							if(las.get(k) == fas.get(i)){
								k = 1000000;
								break;
							}
						}
						if(k != 1000000){
							las.add(fas.get(i));
						}
					}
					
				}
			}
			
			Collections.sort(las);
			
			
			int[] las2 = new int[las.size()];
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(fas.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<has.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(has.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<las.size();i++){
				System.out.println(las.get(i)+" "+las2[i]);
			}
			
			
		}
		
	}

}

Compiler output:
Main.java:26: error: variable tmp might not have been initialized
				if(tmp.equals("")){
				   ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String[] args){
		BigDecimal one = new BigDecimal("1.00");
		int[] abo = {0,0,0,0};
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String tmp = null;
		int cup = 0;
		int mun = 0;
		int ter = 0;
		String[] rrr;
		int st = 0,sr = 0;
		double mon = 0;
		int syo=0,hisi=0;
		double aaaa = 1;
		
		int zixtusi = 0;
		int touri = 0;
		int i = 0;
		
		ArrayList<Integer> fas = new ArrayList<Integer>();
		ArrayList<Integer> has = new ArrayList<Integer>();
		ArrayList<Integer> las = new ArrayList<Integer>();
		int counta=0;
		
		while(true){
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
			}
			if(counta > 999){
				break;
			}
				
				String[] sprit = tmp.split(",",0);
				
				fas.add(Integer.parseInt(sprit[0]));
				counta++;
			}
			
			counta=0;
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				if(counta > 999){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				has.add(Integer.parseInt(sprit[0]));
				counta++;
			}
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<has.size();j++){
					
					if(fas.get(i) == has.get(j)){
						int k = 0;
						for(k=0;k<las.size();k++){
							if(las.get(k) == fas.get(i)){
								k = 1000000;
								break;
							}
						}
						if(k != 1000000){
							las.add(fas.get(i));
						}
					}
					
				}
			}
			
			Collections.sort(las);
			
			
			int[] las2 = new int[las.size()];
			
			for(i=0;i<fas.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(fas.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<has.size();i++){
				for(int j=0;j<las.size();j++){
					
					if(has.get(i) == las.get(j)){
						las2[j]++;
					}
				}
			}
			
			for(i=0;i<las.size();i++){
				System.out.println(las.get(i)+" "+las2[i]);
			}
			
			
		}
		
	}

}

Compiler output:
Main.java:130: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String tmp = null;
		
		int i = 0;
		
		ArrayList<Integer> fas = new ArrayList<Integer>();
		ArrayList<Integer> has = new ArrayList<Integer>();
		ArrayList<Integer> las = new ArrayList<Integer>();
		int counta=0;
		
		while(true){
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				if(tmp.length() < 2){
					break;
				}
				if(counta > 999){
					break;
				}
				String[] sprit = tmp.split(",",0);
				
				fas.add(Integer.parseInt(sprit[0]));
				counta++;
			}
			
			counta=0;
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp == null){
					break;
				}
				return;
				if(tmp.equals("")){
					break;
				}
				if(tmp.length() < 2){
					break;
				}
				if(counta > 999){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				has.add(Integer.parseInt(sprit[0]));
				counta++;
			}
//			
//			for(i=0;i<fas.size();i++){
//				for(int j=0;j<has.size();j++){
//					
//					if(fas.get(i) == has.get(j)){
//						int k = 0;
//						for(k=0;k<las.size();k++){
//							if(las.get(k) == fas.get(i)){
//								k = 1000000;
//								break;
//							}
//						}
//						if(k != 1000000){
//							las.add(fas.get(i));
//						}
//					}
//					
//				}
//			}
//			
//			Collections.sort(las);
//			
//			
//			int[] las2 = new int[las.size()];
//			
//			for(i=0;i<fas.size();i++){
//				for(int j=0;j<las.size();j++){
//					
//					if(fas.get(i) == las.get(j)){
//						las2[j]++;
//					}
//				}
//			}
//			
//			for(i=0;i<has.size();i++){
//				for(int j=0;j<las.size();j++){
//					
//					if(has.get(i) == las.get(j)){
//						las2[j]++;
//					}
//				}
//			}
//			
//			for(i=0;i<las.size();i++){
//				System.out.println(las.get(i)+" "+las2[i]);
//			}
			
			
		}
		
	}
}

Compiler output:
Main.java:58: error: unreachable statement
				if(tmp.equals("")){
				^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String tmp = null;
		
		int i = 0;
		
		ArrayList<Integer> fas = new ArrayList<Integer>();
		ArrayList<Integer> has = new ArrayList<Integer>();
		ArrayList<Integer> las = new ArrayList<Integer>();
		int counta=0;
		
		while(true){
			
			while(true){
				try {
					tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp.equals("")){
					break;
				}
				if(tmp.length() < 2){
					break;
				}
				if(counta > 999){
					break;
				}
				String[] sprit = tmp.split(",",0);
				
				fas.add(Integer.parseInt(sprit[0]));
				counta++;
			}
			
			counta=0;
			
			while(true){
				try {
					//tmp = br.readLine();
				} catch (IOException e) {
					// TODO 自動生成された catch ブロック
					e.printStackTrace();
				}
				
				if(tmp == null){
					break;
				}
				//if(tmp.equals("")){
				//	break;
				//}
				if(tmp.length() < 2){
					break;
				}
				if(counta > 999){
					break;
				}
				
				String[] sprit = tmp.split(",",0);
				
				has.add(Integer.parseInt(sprit[0]));
				counta++;
			}
//			
//			for(i=0;i<fas.size();i++){
//				for(int j=0;j<has.size();j++){
//					
//					if(fas.get(i) == has.get(j)){
//						int k = 0;
//						for(k=0;k<las.size();k++){
//							if(las.get(k) == fas.get(i)){
//								k = 1000000;
//								break;
//							}
//						}
//						if(k != 1000000){
//							las.add(fas.get(i));
//						}
//					}
//					
//				}
//			}
//			
//			Collections.sort(las);
//			
//			
//			int[] las2 = new int[las.size()];
//			
//			for(i=0;i<fas.size();i++){
//				for(int j=0;j<las.size();j++){
//					
//					if(fas.get(i) == las.get(j)){
//						las2[j]++;
//					}
//				}
//			}
//			
//			for(i=0;i<has.size();i++){
//				for(int j=0;j<las.size();j++){
//					
//					if(has.get(i) == las.get(j)){
//						las2[j]++;
//					}
//				}
//			}
//			
//			for(i=0;i<las.size();i++){
//				System.out.println(las.get(i)+" "+las2[i]);
//			}
			
			
		}
		
	}
}

Compiler output:
Main.java:49: error: exception IOException is never thrown in body of corresponding try statement
				} catch (IOException e) {
				  ^
1 error
Language: Java

s = Hash.new
nums = Array.new
while (line = gets) != "\n" do
  num,=line.split(",").map(&:to_i)
  s[num]||=0
  s[num]+=1
end
while line = gets do
  num,=line.split(",").map(&:to_i)
  next unless s[num]
  nums << num
  s[num]+=1
end
nums.sort!
nums.each{|n|
  puts n.to_s+" "+s[n].to_s
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
s = Hash.new
^
1 error
Language: Java

import java.util.*;
public class test {
	static List<Integer> sengetu = new ArrayList<Integer>();
	static List<Integer> result = new ArrayList<Integer>();
	static boolean hantei(int n){
		for(int i=0;i<sengetu.size();i++)if(n==sengetu.get(i))return true;
		return false;
	}
	static boolean hantei2(int n){
		for(int i=0;i<result.size();i++)if(n==result.get(i))return true;
		return false;
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		boolean sw=false;
		Map<Integer,Integer> m = new HashMap<Integer,Integer>();//数をカウント
		while(in.hasNext()){
			String input = in.nextLine();
			if(input.length()==0){
				sw=true;
				continue;
			}
			String data[] = input.split(",");
			int ban=Integer.parseInt(data[0]);
			int num=Integer.parseInt(data[1]);
			if(m.containsKey(ban)){
				m.put(ban,m.get(ban)+1);
			}else m.put(ban,1);
			if(!sw)if(!hantei(ban))sengetu.add(ban);
			if(sw)if(hantei(ban))if(!hantei2(ban))result.add(ban);
		}
		Collections.sort(result);
		for(int i=0;i<result.size();i++)System.out.println(result.get(i)+" "+m.get(result.get(i)));
	}
}

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

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


int p[10010],n[10010];

int main(){
	char line[100];
	int a,b;
	int flag=1;
	int i;
	while(gets(line)!=NULL){
		if(line[0]=='\n')flag=0;
		else{
			sscanf(line,"%d,%d",&a,&b);
			if(flag)p[a]++;
			else n[a]++;
		}
	}
	for(int i=0; i<10010; i++){
		if(p[i]>0&&n[i]>0){
			printf("%d %d\n",i,p[i]+n[i]);
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   12 |         while(gets(line)!=NULL){
      |               ^~~~
      |               fgets
main.c:12:25: warning: comparison between pointer and integer
   12 |         while(gets(line)!=NULL){
      |                         ^~
Language: C

include<stdio.h>
	void swap(int *a,int *b){
		int t=*a;
		*a=*b;
		*b=t;
}
	int main(){
		int a,b,x[2000],y[2000],z[2000],s[2000],i=0,j,k=0;
		while(scanf("%d,%d",&a,&b)!=EOF){
			for(j=0;j<i;j++)
				if(x[j]==a){
					y[j]++;
					break;
			}
			if(j==i){
				x[i]=a;
				y[i++]=1;
			}
		}
		while(scanf("%d,%d",&a,&b)!=EOF){
			for(j=0;j<k;j++)
				if(z[j]==a)
				s[j]++;
			for(j=0;j<i;j++)
				if(x[j]==a){
					z[k]=a;
					s[k++]=y[j]+1;
					break;
			}
		}
		for(j=0;j<k;j++)
			if(z[j]>z[j+1]){
				swap(&z[j],&z[j+1]);
				swap(&s[j],&s[i+1]);
		}
		for(j=0;j<k;j++)
			printf("%d %d\n",z[j],s[j]);
		return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:9:23: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |                 while(scanf("%d,%d",&a,&b)!=EOF){
      |                       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:9:23: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |                 while(scanf("%d,%d",&a,&b)!=EOF){
      |                       ^~~~~
main.c:9:23: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:45: error: 'EOF' undeclared (first use in this function)
    9 |                 while(scanf("%d,%d",&a,&b)!=EOF){
      |                                             ^~~
main.c:9:45: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:9:45: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:23: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   20 |                 while(scanf("%d,%d",&a,&b)!=EOF){
      |                       ^~~~~
main.c:20:23: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:33:33: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   33 |                                 swap(&z[j],&z[j+1]);
      |                                 ^~~~
main.c:37:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   37 |                         printf("%d %d\n",z[j],s[j]);
      |                         ^~~~~~
main.c:37:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:37:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:37:25: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>
#include <stdlib.h>
#define N 1000

int main( void ) {
  int i;
  char ch[ N ];
  int comp[ N ][ 3 ]; // 使用未使用、顧客番号、カウント
  int num;

  for( i = 0; i < N; i++ )
    comp[ i ][ 0 ] = comp[ i ][ 1 ] = comp[ i ][ 2 ] = 0;

  while( gets( ch ) ) {
    if( !*ch ) break;

    num = atoi( ch );
    for( i = 0; i < N; i++ )
      if( !comp[ i ][ 0 ] || // 未使用かどうか
          comp[ i ][ 1 ] == num ) { // 同じ顧客番号があるか
        comp[ i ][ 0 ] = 1;
        comp[ i ][ 1 ] = num;
        comp[ i ][ 2 ]++;
        break;
      }
  }

  while( gets( ch ) ) {
    num = atoi( ch );

    for( i = 0; i < N; i++ )
      if( !comp[ i ][ 0 ] || // 未使用かどうか
          comp[ i ][ 1 ] == num ) { // 同じ顧客番号があるか
        if( comp[ i ][ 0 ] )
          comp[ i ][ 0 ] = 2;
        comp[ i ][ 1 ] = num;
        comp[ i ][ 2 ]++;
        break;
      }
  }

  while( 1 ) {
    int Min, MIn; // 最小値、最小値インデックス

    for( i = 0; i < N; i++ )
      if( comp[ i ][ 0 ] == 2 )
        break;

    if( i == N ) break;

    Min = comp[ i ][ 1 ];
    MIn = i;

    for( i++ ; i < N; i++ )
      if( comp[ i ][ 0 ] == 2 &&
          Min > comp[ i ][ 1 ] ) {
        Min = comp[ i ][ 1 ];
        MIn = i;
      }

    comp[ MIn ][ 0 ] = 0;
    printf( "%d %d\n", comp[ MIn ][ 1 ], comp[ MIn ][ 2 ] );
  }

  return( 0 );
}

Compiler output:
main.c: In function 'main':
main.c:14:10: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   14 |   while( gets( ch ) ) {
      |          ^~~~
      |          fgets
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <map>
#include <utility>
using namespace std;
#define rep2(x,from,to) for(int x = (from); x < (to); ++(x))
#define rep(x,to) rep2(x,0,to)
int main() {
	char s[10];
	vector<int> v1;
	while(gets(s) && *s != '\0') {
		v1.push_back(atoi(s));
	}
	vector<int> v2;
	while(cin >> s) {
		if(find(v1.begin(), v1.end(), atoi(s)) != v1.end()) {
			v2.push_back(atoi(s));
		}
	}
	map<int, int> m;
	rep(i,v2.size()) {
		auto it = m.find(v2[i]);
		if(it == m.end()) {
			m.insert(make_pair(v2[i], 1));
		} else {
			it->second++;
		}
	}
	rep(i,v1.size()) {
		auto it = m.find(v1[i]);
		if(it != m.end()) {
			it->second++;
		}
	}
	for(auto it = m.begin(); it != m.end(); ++it) {
		cout << (*it).first << " " << (*it).second << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
   13 |         while(gets(s) && *s != '\0') {
      |               ^~~~
      |               getw
a.cc:18:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)'
   18 |                 if(find(v1.begin(), v1.end(), atoi(s)) != v1.end()) {
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:18:24: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   18 |                 if(find(v1.begin(), v1.end(), atoi(s)) != v1.end()) {
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <stdio.h>


int main() {
	int f[3000] = {}, n[3000] = {}, k, d, t = 0;
	char s[100];
	while(gets(s)){
		if(s[0] == NULL)
			t++;
		else{
			sscanf(s, "%d,%d", &k, &d);
			if(t == 0){
				f[k]++;
			}
			else{
				n[k]++;
			}
		}
	}
	int i = 0;
	for(i = 0; i < 3000; ++i){
		if(n[i] && f[i])
			printf("%d %d\n", i, n[i] + f[i]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |         while(gets(s)){
      |               ^~~~
      |               getw
a.cc:8:28: warning: NULL used in arithmetic [-Wpointer-arith]
    8 |                 if(s[0] == NULL)
      |                            ^~~~
Language: C++

// ConsoleApplication1.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
#include "stdafx.h"
#include<iostream>
#include<string>
using namespace std;

int main() {
	
	int ky[1000] = {};
	int ny[1000] = {};
	string s;
	while (cin>>s&&s.empty()) {
		int it=1;
		for (int i = 0;i<s.size();i++) {
			if (s[i] == ',') {
				it = i;
				break;
			}
		}

		string a, b;
		a = s.substr(0, it - 1);
		b = s.substr(it + 1, s.size() - 1);
		int c = stoi(a);
		int d = stoi(b);
		ky[c - 1]++;

	}

	while (cin >> s) {
		int it;
		for (int i = 0;i<s.size();i++) {
			if (s[i] == ',') {
				it = i;
				break;
			}
		}

		string a, b;
		a = s.substr(0, it - 1);
		b = s.substr(it + 1, s.size() - 1);
		int c = stoi(a);
		int d = stoi(b);

		ny[c - 1]++;
	}

	for (int i = 0;i<1000;i++) {
		if (ky[i] != 0 && ny[i] != 0)cout << i + 1 << ' ' << ky[i] + ny[i] << endl;
	}
	return 0;
}

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

// ConsoleApplication1.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
#include "stdafx.h"
#include<iostream>
#include<string>
using namespace std;

int main() {
	
	int ky[1000] = {};
	int ny[1000] = {};
	string s;
	while (cin>>s&&s.empty()) {
		int it=1;
		for (int i = 0;i<s.size();i++) {
			if (s[i] == ',') {
				it = i;
				break;
			}
		}

		string a;
		a = s.substr(0, it);
		int c = stoi(a);
		ky[c - 1]++;

	}

	string sa;
	while (cin >> sa) {
		int it;
		for (int i = 0;i<sa.size();i++) {
			if (sa[i] == ',') {
				it = i;
				break;
			}
		}

		string a;
		a = sa.substr(0, it);
		int c = stoi(a);

		ny[c - 1]++;
	}

	for (int i = 0;i<1000;i++) {
		if (ky[i] != 0 && ny[i] != 0)cout << i + 1 << ' ' << ky[i] + ny[i] << endl;
	}
	return 0;
}

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

#include<stdio.h>
int main(void){
    int c[1000] = { 0 }, d[100], count[3000], i = 0;
    while( scanf("%d,%d", &c[i], &d[i]) !=EOF ) {
        count[c[i]]++;
        i++;
    }
    n = i;
    for ( i = 0; i < n; i++ ) {
        if ( count)
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'n' was not declared in this scope
    8 |     n = i;
      |     ^
a.cc:11:5: error: expected primary-expression before '}' token
   11 |     }
      |     ^
Language: C++

#include<cstdio>
#include<cstring>
#include<map>
using namespace std;
int main(){
	int id,d;
	map<int,int> lastm,currm;
	char buf[99];
	while(gets(buf)&&strlen(buf)){
		sscanf(buf,"%d,%d",&id,&d);
		lastm[id]++;
	}
	while(gets(buf)&&strlen(buf)){
		sscanf(buf,"%d,%d",&id,&d);
		currm[id]++;
	}
	for(__typeof(lastm.begin()) i=lastm.begin(); i!=lastm.end(); i++){
		if(currm[i->first]>0)cout<<i->first<<" "<<(i->second+currm[i->first])<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |         while(gets(buf)&&strlen(buf)){
      |               ^~~~
      |               getw
a.cc:13:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
   13 |         while(gets(buf)&&strlen(buf)){
      |               ^~~~
      |               getw
a.cc:18:38: error: 'cout' was not declared in this scope
   18 |                 if(currm[i->first]>0)cout<<i->first<<" "<<(i->second+currm[i->first])<<endl;
      |                                      ^~~~
a.cc:4:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<map>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:18:88: error: 'endl' was not declared in this scope
   18 |                 if(currm[i->first]>0)cout<<i->first<<" "<<(i->second+currm[i->first])<<endl;
      |                                                                                        ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include<map>
  +++ |+#include <ostream>
    4 | using namespace std;
Language: C++

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": # "<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int main()
{
	map<int,int> data[2];
	rep(i,2)
		for(char buf[100];gets(buf) && strlen(buf);){
			int n;
			sscanf(buf,"%d,%*d",&n);
			data[i][n]++;
		}
	map<int,int> res;
	tr(data[0],i)
		if(data[1][i->first])
			res[i->first]=i->second+data[1][i->first];
	tr(res,i)
		cout<<i->first<<" "<<i->second<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:35: error: 'gets' was not declared in this scope; did you mean 'getw'?
   44 |                 for(char buf[100];gets(buf) && strlen(buf);){
      |                                   ^~~~
      |                                   getw
Language: C++

#include <cstdio>
#include <cstring>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
	int num, day;
	char input[80];
	vector<int> mon;
	map<int, int> res;
	while (gets(input)&&strlen(input)!=0) {
		sscanf(input, "%d%*c%d", &num, &day);
		mon.push_back(num);
	}
	while (scanf("%s", input)!=EOF) {
		sscanf(input, "%d%*c%d", &num, &day);
		int cnt = count(mon.begin(), mon.end(), num);
		if (cnt != 0) {
			if (res.find(num) == res.end()) {
				res.insert(make_pair(num, cnt+1));
			} else {
				res[num]++;
			}
		}
	}
	map<int, int>::iterator itr;
	for (itr = res.begin(); itr != res.end(); itr++) {
		printf("%d %d\n", (*itr).first, (*itr).second);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'gets' was not declared in this scope; did you mean 'getw'?
   12 |         while (gets(input)&&strlen(input)!=0) {
      |                ^~~~
      |                getw
Language: C++

#include <map>
#include <cstdio>
#include <sstream>

int main(){
  std::map<int, int> m;
  std::string s;
  int num, sales,t;
  while(getline(std::cin, s), s.size()){
    std::stringstream ss;
    char c;
    ss << s;
    ss >> num >> c >> sales;
    m[num] = -(-m[num]+1);
  }
  while(getline(std::cin, s), s.size()){
    std::stringstream ss;
    char c;
    ss << s;
    ss >> num >> c >> sales;
    if(m[num] >= 0)
      m[num]++;
    else
      m[num] = -(-m[num]+1);
  }
  std::map<int, int>::iterator it = m.begin();
  while(it != m.end()){
    if((*it).second < -1)
      std::cout << (*it).first << " " << -(*it).second << std::endl;
    it++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'cin' is not a member of 'std'
    9 |   while(getline(std::cin, s), s.size()){
      |                      ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <sstream>
  +++ |+#include <iostream>
    4 | 
a.cc:16:22: error: 'cin' is not a member of 'std'
   16 |   while(getline(std::cin, s), s.size()){
      |                      ^~~
a.cc:16:22: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:29:12: error: 'cout' is not a member of 'std'
   29 |       std::cout << (*it).first << " " << -(*it).second << std::endl;
      |            ^~~~
a.cc:29:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	char s[50];
	bool month = false;
	int com[2][1000] = {0},x = 0;
	while(cin.getline(s,50)){
		if(s[0] == 0){
			sort(com[0],com[0]+x);
			month = true;
			continue;
		}
		int n;
		sscanf(s,"%d,%*d",&n);
		if(!month){
			com[0][x] = n;
			com[1][x]++;
			x++;
		}
		else if(month){
			for(int i=0; i<x; i++){
				if(com[0][i] == n){com[1][i]++;break;}
				else if(com[0][i] > n){break;}
			}
		}
	}
	for(int i=0; i<x; i++){
		if(com[1][i] > 1){cout <<com[0][i]<<" "<<com[1][i]<<endl;}
	}
	return 0;
}
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	char s[50];
	bool month = false;
	int com[2][1000] = {0},x = 0;
	while(cin.getline(s,50)){
		if(s[0] == 0){
			sort(com[0],com[0]+x);
			month = true;
			continue;
		}
		int n;
		sscanf(s,"%d,%*d",&n);
		if(!month){
			com[0][x] = n;
			com[1][x]++;
			x++;
		}
		else if(month){
			for(int i=0; i<x; i++){
				if(com[0][i] == n){com[1][i]++;break;}
				else if(com[0][i] > n){break;}
			}
		}
	}
	for(int i=0; i<x; i++){
		if(com[1][i] > 1){cout <<com[0][i]<<" "<<com[1][i]<<endl;}
	}
	return 0;
}

Compiler output:
a.cc:38:5: error: redefinition of 'int main()'
   38 | int main(){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(){
      |     ^~~~
Language: C++

#include<iostream>
#include<map>
#include<cstdio>
using namespace std;
int main(){
	bool month = false;
	map<int, pair<int, int> > com;
	int n;
	char s[50];
	while(cin.getline(s,50)){
		if(s == 0){month = true;continue;}
		sscanf(s,"%d,%*d",&n);
		if(!month){com[n].first = 1;}
		else if(month && com[n].first){com[n].first = 2;}
		com[n].second ++;
	}
	for(__typeof(map.begin()) i=map.begin(); i<map.end(); i++){
		if(i->second.first == 2){cout <<i->first<<" "<<i->second.second<<endl;}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: missing template arguments before '.' token
   17 |         for(__typeof(map.begin()) i=map.begin(); i<map.end(); i++){
      |                         ^
a.cc:17:40: error: missing template arguments before '.' token
   17 |         for(__typeof(map.begin()) i=map.begin(); i<map.end(); i++){
      |                                        ^
a.cc:17:55: error: missing template arguments before '.' token
   17 |         for(__typeof(map.begin()) i=map.begin(); i<map.end(); i++){
      |                                                       ^
a.cc:18:21: error: base operand of '->' is not a pointer
   18 |                 if(i->second.first == 2){cout <<i->first<<" "<<i->second.second<<endl;}
      |                     ^~
a.cc:18:50: error: base operand of '->' is not a pointer
   18 |                 if(i->second.first == 2){cout <<i->first<<" "<<i->second.second<<endl;}
      |                                                  ^~
a.cc:18:65: error: base operand of '->' is not a pointer
   18 |                 if(i->second.first == 2){cout <<i->first<<" "<<i->second.second<<endl;}
      |                                                                 ^~
Language: C++

#include <iostream>
#include <map>
#include <vector>
using namespace std;

int main(){
    vector<int> last;
    char str[256];
    map<int,int> m;
    map<int,int>::iterator itm;
    char* tp;
    while(fgets(str,256,stdin)){
        if(strlen(str) == 1) break;
        tp = strtok(str,",");
        last.push_back(atoi(tp));
    }

    while(fgets(str,256,stdin)){
        if(str == "\0") break;
        tp = strtok(str,",");
        vector<int>::iterator it;
        for(it=last.begin();it!=last.end();++it){
            if(atoi(tp) == *it){
                if((itm = m.find(*it)) != m.end()){
                    itm -> second++;
                }else{
                    m.insert(pair<int,int>(*it,2));
                }
            }
        }
    }

    for(itm=m.begin(); itm != m.end(); ++itm){
        cout << itm->first << " " << itm->second << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'strlen' was not declared in this scope
   13 |         if(strlen(str) == 1) break;
      |            ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <vector>
  +++ |+#include <cstring>
    4 | using namespace std;
a.cc:14:14: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   14 |         tp = strtok(str,",");
      |              ^~~~~~
      |              strtoq
a.cc:20:14: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   20 |         tp = strtok(str,",");
      |              ^~~~~~
      |              strtoq
Language: C++

#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
    vector<int> last;
    char str[256];
    map<int,int> m;
    map<int,int>::iterator itm;
    char* tp;
    while(fgets(str,256,stdin)){
        if(strlen(str) == 1) break;
        tp = strtok(str,",");
        last.push_back(atoi(tp));
    }

    while(fgets(str,256,stdin)){
        if(str == "\0") break;
        tp = strtok(str,",");
        vector<int>::iterator it;
        for(it=last.begin();it!=last.end();++it){
            if(atoi(tp) == *it){
                if((itm = m.find(*it)) != m.end()){
                    itm -> second++;
                }else{
                    m.insert(pair<int,int>(*it,2));
                }
            }
        }
    }

    for(itm=m.begin(); itm != m.end(); ++itm){
        cout << itm->first << " " << itm->second << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'strlen' was not declared in this scope
   14 |         if(strlen(str) == 1) break;
      |            ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <algorithm>
  +++ |+#include <cstring>
    5 | using namespace std;
a.cc:15:14: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   15 |         tp = strtok(str,",");
      |              ^~~~~~
      |              strtoq
a.cc:21:14: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   21 |         tp = strtok(str,",");
      |              ^~~~~~
      |              strtoq
Language: C++

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <vector>
using namespace std;

int main(){
    vector<int> last;
    char str[256];
    map<int,int> m;
    map<int,int>::iterator itm;
    char* tp;
    while(fgets(str,256,stdin)){
        if(strlen(str) == 1) break;
        tp = strtok(str,",");
        last.push_back(atoi(tp));
    }

    while(fgets(str,256,stdin)){
        if(str == "\0") break;
        tp = strtok(str,",");
        vector<int>::iterator it;
        for(it=last.begin();it!=last.end();++it){
            if(atoi(tp) == *it){
                if((itm = m.find(*it)) != m.end()){
                    itm -> second++;
                }else{
                    m.insert(pair<int,int>(*it,2));
                }
            }
        }
    }

    for(itm=m.begin(); itm != m.end(); ++itm){
        cout << itm->first << " " << itm->second << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:9: error: 'cout' was not declared in this scope
   36 |         cout << itm->first << " " << itm->second << endl;
      |         ^~~~
a.cc:6:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include <vector>
  +++ |+#include <iostream>
    6 | using namespace std;
a.cc:36:53: error: 'endl' was not declared in this scope
   36 |         cout << itm->first << " " << itm->second << endl;
      |                                                     ^~~~
a.cc:6:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    5 | #include <vector>
  +++ |+#include <ostream>
    6 | using namespace std;