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

using namespace std;
int main(){
  stack< char > st;
  string s;
  while(cin >> s, s != "quit"){
    if(s == "pop"){
      cout << st.top() << endl;
      st.pop();
    }else{
      char c;
      cin >> c;
      st.push(c);
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'stack' was not declared in this scope
    3 |   stack< char > st;
      |   ^~~~~
a.cc:1:1: note: 'std::stack' is defined in header '<stack>'; this is probably fixable by adding '#include <stack>'
  +++ |+#include <stack>
    1 | using namespace std;
a.cc:3:10: error: expected primary-expression before 'char'
    3 |   stack< char > st;
      |          ^~~~
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |   while(cin >> s, s != "quit"){
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:5:16: error: 's' was not declared in this scope
    5 |   while(cin >> s, s != "quit"){
      |                ^
a.cc:7:7: error: 'cout' was not declared in this scope
    7 |       cout << st.top() << endl;
      |       ^~~~
a.cc:7:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:15: error: 'st' was not declared in this scope; did you mean 'std'?
    7 |       cout << st.top() << endl;
      |               ^~
      |               std
a.cc:7:27: error: 'endl' was not declared in this scope
    7 |       cout << st.top() << endl;
      |                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:12:7: error: 'st' was not declared in this scope; did you mean 'std'?
   12 |       st.push(c);
      |       ^~
      |       std
Language: C++

#include<iostream>
#include<stack>
#include<string>
using namespace std;

int(main){
  stack<char> sta;
  string s;
  char c;
  while(cin >> s, s != "quit"){
    if(s == "push"){
      cin >> c;
      sta.push(c);
    }
    else if(s == "pop"){
      cout << sta.top() << endl;
	sta.pop();
    }

Compiler output:
a.cc:6:5: error: cannot declare '::main' to be a global variable
    6 | int(main){
      |     ^~~~
a.cc:7:15: error: expected primary-expression before 'sta'
    7 |   stack<char> sta;
      |               ^~~
a.cc:7:15: error: expected '}' before 'sta'
a.cc:6:10: note: to match this '{'
    6 | int(main){
      |          ^
a.cc:10:3: error: expected unqualified-id before 'while'
   10 |   while(cin >> s, s != "quit"){
      |   ^~~~~
Language: C++

#include<iostream>
#include<stack>
#include<string>
using namespace std;

int(main){
  stack<char> sta;
  string s;
  char c;
  while(cin >> s, s != "quit"){
    if(s == "push"){
      cin >> c;
      sta.push(c);
    }
    else if(s == "pop"){
      cout << sta.top() << endl;
	sta.pop();
    }
  }
}

Compiler output:
a.cc:6:5: error: cannot declare '::main' to be a global variable
    6 | int(main){
      |     ^~~~
a.cc:7:15: error: expected primary-expression before 'sta'
    7 |   stack<char> sta;
      |               ^~~
a.cc:7:15: error: expected '}' before 'sta'
a.cc:6:10: note: to match this '{'
    6 | int(main){
      |          ^
a.cc:10:3: error: expected unqualified-id before 'while'
   10 |   while(cin >> s, s != "quit"){
      |   ^~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: Java

import java.lang.*;
import java.util.*;

interface Robot{
    void make_mountain(int p);
    void push(int p, String c);
    void pop(int p);
    void move(int p1, int p2);
}

class Stacking implements Robot{
    private char[][] mountain;

    public void make_mountain(int p){
        mountain = new char[p][1000];
        for(char[] is: mountain){
            Arrays.fill(is, '0');
        }
    }
    public void push(int p, String c){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = c.charAt(0);
                break;
            }
        }
    }
    public void pop(int p){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                System.out.println(is[i]);
                is[i] = '0';
                break;
            }
        }
    }
    public void move(int p1, int p2){
        char k = '0';
        char[] is = mountain[p1-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                k = is[i];
                is[i] = '0';
                break;
            }
        }
        is = mountain[p2-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = k;
                break;
            }
        }
    }
}

class IOAndRun{
    Robot rob;

    public void Run(){
        Scanner argvs = new Scanner(System.in);
        rob.make_mountain(argvs.nextInt());
        while(true){
            argvs = new Scanner(System.in);
            switch(argvs.next()){
                case "push":
                    rob.push(argvs.nextInt(), argvs.next());
                    break;
                case "pop":
                    rob.pop(argvs.nextInt());
                    break;
                case "move":
                    rob.move(argvs.nextInt(), argvs.nextInt());
                    break;
                case "quit":
                    System.exit(0);
            }
        }
    }
}

public class SRII{
    public static void main(String[] args){
        IOAndRun r = new IOAndRun();
        r.rob = new Stacking();
        r.Run();
    }
}

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

import java.lang.*;
import java.util.*;

interface Robot{
    void make_mountain(int p);
    void push(int p, String c);
    void pop(int p);
    void move(int p1, int p2);
}

class Stacking implements Robot{
    private char[][] mountain;

    public void make_mountain(int p){
        mountain = new char[p][1000];
        for(char[] is: mountain){
            Arrays.fill(is, '0');
        }
    }
    public void push(int p, String c){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = c.charAt(0);
                break;
            }
        }
    }
    public void pop(int p){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                System.out.println(is[i]);
                is[i] = '0';
                break;
            }
        }
    }
    public void move(int p1, int p2){
        char k = '0';
        char[] is = mountain[p1-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                k = is[i];
                is[i] = '0';
                break;
            }
        }
        is = mountain[p2-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = k;
                break;
            }
        }
    }
}

class IOAndRun{
    Robot rob;

    public void Run(){
        Scanner argvs = new Scanner(System.in);
        rob.make_mountain(argvs.nextInt());
        while(true){
            Scanner argvs = new Scanner(System.in);
            switch(argvs.next()){
                case "push":
                    rob.push(argvs.nextInt(), argvs.next());
                    break;
                case "pop":
                    rob.pop(argvs.nextInt());
                    break;
                case "move":
                    rob.move(argvs.nextInt(), argvs.nextInt());
                    break;
                case "quit":
                    System.exit(0);
            }
        }
    }
}

public class Main{
    public static void main(String[] args){
        IOAndRun r = new IOAndRun();
        r.rob = new Stacking();
        r.Run();
    }
}

Compiler output:
Main.java:66: error: variable argvs is already defined in method Run()
            Scanner argvs = new Scanner(System.in);
                    ^
1 error
Language: Java

import java.lang.*;
import java.util.*;

interface Robot{
    void make_mountain(int p);
    void push(int p, String c);
    void pop(int p);
    void move(int p1, int p2);
}

class Stacking implements Robot{
    private char[][] mountain;

    public void make_mountain(int p){
        mountain = new char[p][1000];
        for(char[] is: mountain){
            Arrays.fill(is, '0');
        }
    }
    public void push(int p, String c){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = c.charAt(0);
                break;
            }
        }
    }
    public void pop(int p){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                System.out.println(is[i]);
                is[i] = '0';
                break;
            }
        }
    }
    public void move(int p1, int p2){
        char k = '0';
        char[] is = mountain[p1-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                k = is[i];
                is[i] = '0';
                break;
            }
        }
        is = mountain[p2-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = k;
                break;
            }
        }
    }
}

class IOAndRun{
    Robot rob;

    public void Run(){
        Scanner argvs = new Scanner(System.in);
        rob.make_mountain(argvs.nextInt());
        while(true){
            argvs = new Scanner(System.in);
            String argv0 = argvs.next();
            if(argv0=="push") rob.push(argvs.nextInt(), argvs.next());
            else if(argv0=="pop") rob.pop(argvs.nextInt());
            else if(argv0=="move") rob.move(argvs.nextInt(), argvs.nextInt());
            else if(argv0=="quit") System.exit(0);
        }
    }
}

public class SRII{
    public static void main(String[] args){
        IOAndRun r = new IOAndRun();
        r.rob = new Stacking();
        r.Run();
    }
}

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

import java.lang.*;
import java.util.*;

interface Robot{
    void make_mountain(int p);
    void push(int p, String c);
    void pop(int p);
    void move(int p1, int p2);
}

class Stacking implements Robot{
    private char[][] mountain;

    public void make_mountain(int p){
        mountain = new char[p][1000];
        for(char[] is: mountain){
            Arrays.fill(is, '0');
        }
    }
    public void push(int p, String c){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = c.charAt(0);
                break;
            }
        }
    }
    public void pop(int p){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                System.out.println(is[i]);
                is[i] = '0';
                break;
            }
        }
    }
    public void move(int p1, int p2){
        char k = '0';
        char[] is = mountain[p1-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                k = is[i];
                is[i] = '0';
                break;
            }
        }
        is = mountain[p2-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = k;
                break;
            }
        }
    }
}

class IOAndRun{
    Robot rob;

    public void Run(){
        String argv0;
        Scanner argvs = new Scanner(System.in);
        rob.make_mountain(argvs.nextInt());
        while(true){
            argvs = new Scanner(System.in);
            argv0 = argvs.next();
            if(argv0.equals("push")) rob.push(argvs.nextInt(), argvs.next());
            else if(argv0.equals("pop")) rob.pop(argvs.nextInt());
            else if(argv0.equals("move")) rob.move(argvs.nextInt(), argvs.nextInt());
            else if(argv0.equals("quit")) System.exit(0);
        }
    }
}

public class SRII{
    public static void main(String[] args){
        IOAndRun r = new IOAndRun();
        r.rob = new Stacking();
        r.Run();
    }
}

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

import java.lang.*;
import java.util.*;

interface Robot{
    void make_mountain(int p);
    void push(int p, String c);
    void pop(int p);
    void move(int p1, int p2);
}

class Stacking implements Robot{
    private char[][] mountain;

    public void make_mountain(int p){
        mountain = new char[p][1000];
        for(char[] is: mountain){
            Arrays.fill(is, '0');
        }
    }
    public void push(int p, String c){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = c.charAt(0);
                break;
            }
        }
    }
    public void pop(int p){
        char[] is = mountain[p-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                System.out.println(is[i]);
                is[i] = '0';
                break;
            }
        }
    }
    public void move(int p1, int p2){
        char k = '0';
        char[] is = mountain[p1-1];
        for(int i=0; i<1000; i++){
            if(is[i+1]=='0' && is[i]!='0'){
                k = is[i];
                is[i] = '0';
                break;
            }
        }
        is = mountain[p2-1];
        for(int i=0; i<1000; i++){
            if(is[i]=='0'){
                is[i] = k;
                break;
            }
        }
    }
}

class IOAndRun{
    Robot rob;

    public void Run(){
        String argv0;
        Scanner argvs = new Scanner(System.in);
        rob.make_mountain(argvs.nextInt());
        while(true){
            argvs = new Scanner(System.in);
            argv0 = argvs.next();
            if(argv0.equals("push")) rob.push(argvs.nextInt(), argvs.next());
            else if(argv0.equals("pop")) rob.pop(argvs.nextInt());
            else if(argv0.equals("move")) rob.move(argvs.nextInt(), argvs.nextInt());
            else if(argv0.equals("quit")) break;
        }
    }
}

public class SRII{
    public static void main(String[] args){
        IOAndRun r = new IOAndRun();
        r.rob = new Stacking();
        r.Run();
    }
}

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

import java.util.*;

public class Mainu1 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int j = sc.nextInt();
		Stack<String>[] t = new Stack[j+1];
		for ( int i = 1; i <= j; i++ )
			t[i] = new Stack<String>();
		while ( !sc.hasNext("quit") ) {
			String order = sc.next();
			int index = sc.nextInt();
			if ( order.equals("push") )
				t[index].push(sc.next());
			else if ( order.equals("pop") )
				System.out.println(t[index].pop());
			else {
				int to = sc.nextInt();
				t[to].push(t[index].pop());
			}
		}
	}
}

Compiler output:
Main.java:3: error: class Mainu1 is public, should be declared in a file named Mainu1.java
public class Mainu1 {
       ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nexInt();
    String block[][] = new String[n][1000];
    int counter[] = new int[n];
    while (true) {
      String command = sc.next();
      if (command.equals("quit")) {
        break;
      }
      else if (command.equals("pop")) {
        int p = sc.nexInt();
        counter[p]--;
        System.out.println(block[p][counter[p]]);
        block[p][counter[p]] = null;
      }
      else if (command.equals("move")) {
        int p1 = sc.nexInt();
        int p2 = sc.nexInt();
        counter[p1]--;
        block[p2][counter[p2]] = block[p1][counter[p1]];
        block[p1][counter[p1]] = null;
        counter[p2]++;
      }
      else {
        int p = sc.nextInt();
        String color = sc.next();
        block[p][counter[p]] = color;
        counter[p]++;
      }
    }
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    int n = sc.nexInt();
              ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
Main.java:14: error: cannot find symbol
        int p = sc.nexInt();
                  ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
Main.java:20: error: cannot find symbol
        int p1 = sc.nexInt();
                   ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
Main.java:21: error: cannot find symbol
        int p2 = sc.nexInt();
                   ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
4 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nexInt();
    String block[][] = new String[n][1000];
    int counter[] = new int[n];
    while (true) {
      String command = sc.next();
      if (command.equals("quit")) {
        break;
      }
      else if (command.equals("pop")) {
        int p = sc.nexInt();
        counter[p]--;
        System.out.println(block[p][counter[p]]);
        block[p][counter[p]] = null;
      }
      else if (command.equals("move")) {
        int p1 = sc.nextInt();
        int p2 = sc.nextInt();
        counter[p1]--;
        block[p2][counter[p2]] = block[p1][counter[p1]];
        block[p1][counter[p1]] = null;
        counter[p2]++;
      }
      else {
        int p = sc.nextInt();
        String color = sc.next();
        block[p][counter[p]] = color;
        counter[p]++;
      }
    }
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    int n = sc.nexInt();
              ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
Main.java:14: error: cannot find symbol
        int p = sc.nexInt();
                  ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
2 errors
Language: C

#include <stdio.h>

int main(void)
{
  char command[8];
  int n, i;
  int j = 0;
  char c;
  char pops[100000];
  char blocks[100][1000] = {'\0'};
  int b_num[100] = {};
  scanf("%d", &n);
  while(1){
    for(i = 0; i < 8; i++){
      scanf("%c", &c);
      if(c == '\n'){
	command[i] = '\n';
	break;
      }else{
	command[i] = c;
      }
    }
    if(command[0] == 'q'){
      break;
    }else if(command[0] == 'p' && command[1] == 'u'){
      blocks[command[5] - 1][b_num[command[5] - 1]] = command[7];
      b_num[command[5] - 1]++;
    }else if(command[0] == 'm'){
      if(blocks[command[5] - 1][b_num[command[5] - 1] - 1] != '\0'){
	blocks[command[7] - 1][b_num[command[7] - 1]] = blocks[command[5] - 1][b_num[command[5] - 1] - 1];
	b_num[command[5] - 1]--;
	b_num[command[7] - 1]++;
      }
    }else if(command[0] == 'p' && command[1] == 'o'){
      if(blocks[command[4] - 1][b_num[command[4] - 1] - 1] != '\0'){
	pops[j] = blocks[command[4] - 1][b_num[command[4] - 1] - 1];
	b_num[command[4] - 1]--;
	j++;	
      }
  }
  for(i = 0; i < j; i++){
    printf("%c\n", pops[i]);
  }
  
  return 0;
}

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

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

//#define DEBUG 1
#define BLOCK_NUMBER 1000
#define MOUNTEN_NUMBER 100
#define INPUT_LENGTH 9
 
void push(char array[MOUNTEN_NUMBER][BLOCK_NUMBER + 1], int num, char *sp_2);
char pop(char array[MOUNTEN_NUMBER][BLOCK_NUMBER + 1], int num);
void move(char array[MOUNTEN_NUMBER][BLOCK_NUMBER + 1], int num, int mo);
void sprit(char *input, char *sw, char *in_1, char *in_2);

main()
{
	char array[MOUNTEN_NUMBER][BLOCK_NUMBER + 1];
	char ans[(MOUNTEN_NUMBER) * (BLOCK_NUMBER + 1)];
	int ans_c = 0;
	char input[INPUT_LENGTH];
	char sw;
	char *sprit_1;
	sprit_1 = (char*)malloc( sizeof( char) * 4 );
	char *sprit_2;
	sprit_2 = (char*)malloc( sizeof( char) * 2 );
	int i, j, set_mou;
	
	scanf("%d", &set_mou);
	for(i = 0; < set_mou; i++)
	{
		for(j = 0; j < BLOCK_NUMBER; j++)
		{
			array[i][j] = '\0';
		}
	}
	while (1)
	{	
		for(i = 0; i < INPUT_LENGTH; i++)
		{
			input[i] = '\0';
		}
		for(i = 0; i < 4; i++)
		{
			sprit_1[i] = '\0';
		}
		for(i = 0; i < 2; i++)
		{
			sprit_2[i] = '\0';
		}		
		scanf("\n");
		gets(input);
		
		if(strcmp(input, "quit") == 0)
		{
			break;
		}
		else
		{
			sprit(input, &sw, sprit_1, sprit_2);
#ifdef DEBUG
			printf("sw = %c\nin1 = %s\nin2 = %s\n",sw, sprit_1, sprit_2);
#endif

			int number = atoi(sprit_1) - 1;
			if(sw == 's')
			{
				push(array, number, sprit_2);
			}
			else if(sw == 'p')
			{
				ans[ans_c] = pop(array, number);
				ans_c++;
			}
			else if(sw == 'v')
			{
				int mo_num = atoi(sprit_2) - 1;
				move(array, number, mo_num);
			}
		}

	
	}
	for(i = 0; i < ans_c; i++)
	{
		printf("%c\n", ans[i]);
	}

	free(sprit_1);
	free(sprit_2);
	return 0;
}

void push(char array[MOUNTEN_NUMBER][BLOCK_NUMBER + 1], int num, char *sp_2)
{
	int length = strlen(array[num]);
	array[num][length] = *sp_2;
#ifdef DEBUG
	printf("array: %c\n", array[num][length]);
#endif
	
}

char pop(char array[MOUNTEN_NUMBER][BLOCK_NUMBER + 1], int num)
{
	char re_ch = '\0';
	int length = strlen(array[num]);
	re_ch = array[num][length - 1];
	array[num][length- 1] = '\0';
#ifdef DEBUG
	printf("%c\n", re_ch); 
#endif
	return re_ch;

}

void move(char array[MOUNTEN_NUMBER][BLOCK_NUMBER + 1], int num, int mo)
{
	char set_ch = pop(array, num);
	push(array, mo, &set_ch);
}

void sprit(char *input, char *sw, char *in_1, char *in_2)
{
	int i;
	*sw = input[2];
	for(i = 0; i < strlen(input); i++)
	{
		if(input[i] == ' ')
		{
			i++;
			
			while(input[i] != ' ' && input[i] != '\0')
			{
				*in_1 = input[i];
				in_1++;
				i++;
			}
			if(input[i] == ' ')
			{
				*in_2 = input[i + 1];
			}
			break;
		}
	}
}

Compiler output:
main.c:15:1: error: return type defaults to 'int' [-Wimplicit-int]
   15 | main()
      | ^~~~
main.c: In function 'main':
main.c:29:20: error: expected expression before '<' token
   29 |         for(i = 0; < set_mou; i++)
      |                    ^
main.c:51:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   51 |                 gets(input);
      |                 ^~~~
      |                 fgets
Language: C

#include <stdio.h>

int Marge_sort(int x,int left,int right){
    int mid,i,j,k;
    
    if(left>=right){
        return;
    }
    mid=(left+right)/2;
    Marge_sort(x,left,mid);
    Marge_sort(x,mid+1,right);
    for(i=left;i<=mid;i++){
        temp[i]=x[i];
    }
    for(i=mid+1,j=right;i<=right;i++,j--){
        temp[i]=x[i];
    }
    i=left;
    j=right;
    for(k=left;k<=right;k++){
        if(temp[i]<=temp[j]){
            x[k]=temp[i++];
        }else{
            x[k]=temp[j--];
        }
    }
}

int main(){
    int i,n;
    int x[100000];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&x[i]);
    }
    Marge_sort(x,0,n-1);
    
    for(i=0;i<n;i++){
        printf("%d\t",x[i]);
    }
    printf("\n");
    return 0;
}

Compiler output:
main.c: In function 'Marge_sort':
main.c:7:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
    7 |         return;
      |         ^~~~~~
main.c:3:5: note: declared here
    3 | int Marge_sort(int x,int left,int right){
      |     ^~~~~~~~~~
main.c:13:9: error: 'temp' undeclared (first use in this function)
   13 |         temp[i]=x[i];
      |         ^~~~
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:18: error: subscripted value is neither array nor pointer nor vector
   13 |         temp[i]=x[i];
      |                  ^
main.c:16:18: error: subscripted value is neither array nor pointer nor vector
   16 |         temp[i]=x[i];
      |                  ^
main.c:22:14: error: subscripted value is neither array nor pointer nor vector
   22 |             x[k]=temp[i++];
      |              ^
main.c:24:14: error: subscripted value is neither array nor pointer nor vector
   24 |             x[k]=temp[j--];
      |              ^
main.c: In function 'main':
main.c:36:16: error: passing argument 1 of 'Marge_sort' makes integer from pointer without a cast [-Wint-conversion]
   36 |     Marge_sort(x,0,n-1);
      |                ^
      |                |
      |                int *
main.c:3:20: note: expected 'int' but argument is of type 'int *'
    3 | int Marge_sort(int x,int left,int right){
      |                ~~~~^
Language: C

#include <stdio.h>

int Marge_sort(int x,int left,int right,int n){
    int mid,i,j,k,temp[n];
    
    if(left>=right){
        return;
    }
    mid=(left+right)/2;
    Marge_sort(x,left,mid);
    Marge_sort(x,mid+1,right);
    for(i=left;i<=mid;i++){
        temp[i]=x[i];
    }
    for(i=mid+1,j=right;i<=right;i++,j--){
        temp[i]=x[i];
    }
    i=left;
    j=right;
    for(k=left;k<=right;k++){
        if(temp[i]<=temp[j]){
            x[k]=temp[i++];
        }else{
            x[k]=temp[j--];
        }
    }
}

int main(){
    int i,n;
    int x[100000];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&x[i]);
    }
    Marge_sort(x,0,n-1);
    
    for(i=0;i<n;i++){
        printf("%d\t",x[i]);
    }
    printf("\n");
    return 0;
}

Compiler output:
main.c: In function 'Marge_sort':
main.c:7:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
    7 |         return;
      |         ^~~~~~
main.c:3:5: note: declared here
    3 | int Marge_sort(int x,int left,int right,int n){
      |     ^~~~~~~~~~
main.c:10:5: error: too few arguments to function 'Marge_sort'
   10 |     Marge_sort(x,left,mid);
      |     ^~~~~~~~~~
main.c:3:5: note: declared here
    3 | int Marge_sort(int x,int left,int right,int n){
      |     ^~~~~~~~~~
main.c:11:5: error: too few arguments to function 'Marge_sort'
   11 |     Marge_sort(x,mid+1,right);
      |     ^~~~~~~~~~
main.c:3:5: note: declared here
    3 | int Marge_sort(int x,int left,int right,int n){
      |     ^~~~~~~~~~
main.c:13:18: error: subscripted value is neither array nor pointer nor vector
   13 |         temp[i]=x[i];
      |                  ^
main.c:16:18: error: subscripted value is neither array nor pointer nor vector
   16 |         temp[i]=x[i];
      |                  ^
main.c:22:14: error: subscripted value is neither array nor pointer nor vector
   22 |             x[k]=temp[i++];
      |              ^
main.c:24:14: error: subscripted value is neither array nor pointer nor vector
   24 |             x[k]=temp[j--];
      |              ^
main.c: In function 'main':
main.c:36:16: error: passing argument 1 of 'Marge_sort' makes integer from pointer without a cast [-Wint-conversion]
   36 |     Marge_sort(x,0,n-1);
      |                ^
      |                |
      |                int *
main.c:3:20: note: expected 'int' but argument is of type 'int *'
    3 | int Marge_sort(int x,int left,int right,int n){
      |                ~~~~^
main.c:36:5: error: too few arguments to function 'Marge_sort'
   36 |     Marge_sort(x,0,n-1);
      |     ^~~~~~~~~~
main.c:3:5: note: declared here
    3 | int Marge_sort(int x,int left,int right,int n){
      |     ^~~~~~~~~~
Language: C

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

int main(int argc,const char *argv[]){
    char s[10],c,pop_stack[1000];
    int i=0,j=0,p1,p2;
    scanf("%d",&n);
    char stack[n][1000];
    int count[n];
    while(1){
        scanf("%s",s);
        if(strcmp(s,"push")==0){
            scanf(" %d ",&p1);
            scanf(" %c",&c);
            stack[p1][count[p1]]=c;
            count[p1]++;
        }
        if(strcmp(s,"pop")==0){
            scanf(" %d",&p1);
            count[p1]--;
            pop_stack[j]=stack[p1][count[p1]];
            stack[p1][count[p1]]='\0';
            j++;
        }
        if(strcmp(s,"move")==0){
            scanf(" %d %d",&p1,&p2);
            stack[p1]
            count[p1]--;
            stack[p2][count[p2]]=stack[p1][count[p1]];
            stack[p1][count[p1]]='\0';
            count[p2]++;
        }
        if(strcmp(s,"quit")==0){
            break;
        }
        
    }
    for(i=0;i<j;i++){
        printf("%c\n",pop_stack[i]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'n' undeclared (first use in this function)
    7 |     scanf("%d",&n);
      |                 ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:22: error: expected ';' before 'count'
   27 |             stack[p1]
      |                      ^
      |                      ;
   28 |             count[p1]--;
      |             ~~~~~
Language: C

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

typedef struct mounten
{
        char *box;
        int count;
}MOUNTEN;

int main( void )
{
        int n = 0;
        char *ans;
        MOUNTEN yama[];
        int i = 0,count=0;
        char *in;
        int ynum=0;
        int input=0,output=0;



        scanf("%d",&n);
        for(i = 0; i < n; i++)
        {
                yama[i].box = (char *)malloc(sizeof(char)*1001);
                yama[i].count=0;
        }
        in = (char *)malloc(sizeof(char)*100);
        ans = (char *)malloc(sizeof(char)*1010);


        while(1)
        {
                scanf("%s",in);

                if(strcmp(in,"push") == 0)
                {
                        scanf("\n");
                        scanf("%d", &ynum);
                        scanf("\n");
                        scanf("%c", &yama[ ynum ].box[yama[ynum].count]);


                        yama[ynum].count++;
                }
                else if(strcmp(in,"pop") == 0)
                {
                        scanf("\n");
                        scanf("%d", &ynum);

                        yama[ynum].count--;
                        ans[count] = yama[ ynum ].box[ yama[ynum].count ];
                        /*yama[ ynum ].box[ yama[ynum].count ]='\0';*/
                        printf("%c\n",ans[count]);
                }
                else if(strcmp(in,"move")==0)
                {

                        scanf("\n");
                        scanf("%d %d", &input, &output);

                        yama[ input ].count--;
                        yama[ output ].box[ yama[output].count ] = yama[input].box[yama[input].count];
                        /*yama[input].box[yama[input].count]='\0';*/
                        yama[ output ].count++;

                }
                else if(strcmp(in,"quit")==0)
                {
                        break;
                }
        }

        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:17: error: array size missing in 'yama'
   15 |         MOUNTEN yama[];
      |                 ^~~~
Language: C

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

typedef struct mounten
{
        char *box;
        int count;
}MOUNTEN;

int main( void )
{
        int n = 0;
        char *ans;
        MOUNTEN yama[];
        int i = 0,count=0;
        char *in;
        int ynum=0;
        int input=0,output=0;



        scanf("%d",&n);
        for(i = 0; i < n; i++)
        {
                yama[i].box = (char *)malloc(sizeof(char)*1001);
                yama[i].count=0;
        }
        in = (char *)malloc(sizeof(char)*100);
        ans = (char *)malloc(sizeof(char)*1010);


        while(1)
        {
                scanf("%s",in);

                if(strcmp(in,"push") == 0)
                {
                        scanf("\n");
                        scanf("%d", &ynum);
                        scanf("\n");
                        scanf("%c", &yama[ ynum ].box[yama[ynum].count]);


                        yama[ynum].count++;
                }
                else if(strcmp(in,"pop") == 0)
                {
                        scanf("\n");
                        scanf("%d", &ynum);

                        yama[ynum].count--;
                        ans[count] = yama[ ynum ].box[ yama[ynum].count ];
                        yama[ ynum ].box[ yama[ynum].count ]='\0';
                        printf("%c\n",ans[count]);
                }
                else if(strcmp(in,"move")==0)
                {

                        scanf("\n");
                        scanf("%d %d", &input, &output);

                        yama[ input ].count--;
                        yama[ output ].box[ yama[output].count ] = yama[input].box[yama[input].count];
                        yama[input].box[yama[input].count]='\0';
                        yama[ output ].count++;

                }
                else if(strcmp(in,"quit")==0)
                {
                        break;
                }
        }

        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:17: error: array size missing in 'yama'
   15 |         MOUNTEN yama[];
      |                 ^~~~
Language: C

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

void push(char *p, char color)
{
	p += strlen(p);
	*p++ = color;
	*p = '\0';
}

char pop(char *p)
{
	char ret;
	p += strlen(p) - 1;
	ret = *p;
	*p = '\0';
	return ret;
}

void move(char *p1, char *p2)
{
	p1 += strlen(p1) - 1;
	p2 += strlen(p2);
	*p2 = *p1;
	*p1 = '\0';
}

int main(void)
{
	int info[100], from, to, i, num;
	scanf("%d", %num);
	char op[5], stack[num][1000] = {};
	for (;;) {
		scanf("%s", op);
		if (!strcmp(op, "push")) {
			scanf("%d %c", &to, &color);
			push(stack[to - 1], color);
		} else if (!strcmp(op, "pop")) {
			scanf("%d", &from);
			printf("%c\n", pop(stack[from - 1]));
		} else if (!strcmp(op, "move")) {
			scanf("%d %d", &from, &to);
			move(stack[from - 1], stack[to - 1]);
		} else {
			return 0;
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:31:21: error: expected expression before '%' token
   31 |         scanf("%d", %num);
      |                     ^
main.c:36:46: error: 'color' undeclared (first use in this function)
   36 |                         scanf("%d %c", &to, &color);
      |                                              ^~~~~
main.c:36:46: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

void push(char *p, char color)
{
	p += strlen(p);
	*p++ = color;
	*p = '\0';
}

char pop(char *p)
{
	char ret;
	p += strlen(p) - 1;
	ret = *p;
	*p = '\0';
	return ret;
}

void move(char *p1, char *p2)
{
	p1 += strlen(p1) - 1;
	p2 += strlen(p2);
	*p2 = *p1;
	*p1 = '\0';
}

int main(void)
{
	int info[100], from, to, i, num;
	scanf("%d", &num);
	char op[5], stack[num][1000] = {};
	for (;;) {
		scanf("%s", op);
		if (!strcmp(op, "push")) {
			scanf("%d %c", &to, &color);
			push(stack[to - 1], color);
		} else if (!strcmp(op, "pop")) {
			scanf("%d", &from);
			printf("%c\n", pop(stack[from - 1]));
		} else if (!strcmp(op, "move")) {
			scanf("%d %d", &from, &to);
			move(stack[from - 1], stack[to - 1]);
		} else {
			return 0;
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:36:46: error: 'color' undeclared (first use in this function)
   36 |                         scanf("%d %c", &to, &color);
      |                                              ^~~~~
main.c:36:46: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
#define M 100
#define N 1001

int main(void){
  char Order[N]; // Orderは"push","pop","quit"のいずれか
  char Array[M][N];
  int top[M];
  char color[N];
  int p1,p2;
  int n;

  
  scanf("%d" ,&n);

  while(1){
    
    scanf("%s" ,Order);

      if(strcmp(Order,"push") == 0){ 
	scanf("%d" ,&p1);
	scanf("%s" ,color);
	p1--;
	Array[p1][top[p1]++] = color[0];
      }
      
      
    else if(strcmp(Order,"pop") == 0){
      scanf("%d" ,&top);
       top--;
      if(top[p1] > 0)
	printf("%c\n" ,Array[p1][top[p1]--]);
    }
      
      
    else if(strcmp(Order,"move") == 0){
      scanf("%d" ,&p1);
      scanf("%d" ,&p2);
      p1--;
      p2--;
      if(top[p1] > 0){
	Array[p2][top[p2]++] = Array[p1][top[p1]--];
      }
  }

    else if(strcmp(Order,"quit") == 0)
      break;
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:11: error: lvalue required as decrement operand
   31 |        top--;
      |           ^~
Language: C

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

int main(){
	char block,cmd[5],yama[100][1000],value[1000];
	int i = 0,j = 0,k = 0,y = 0,num =10,p,p2,num[100];
	for(i = 0; i < 100;i++){
		num[i] = 0;
	}
	scanf("%d",&k);
	while(1){
		scanf("%s",cmd);
		if(strcmp(cmd,"quit") == 0){
			break;
		}
		if(strcmp(cmd,"push") == 0){
			scanf("%d %s",&p,&block);
			yama[p-1][num[p-1]] = block;
			num[p-1] = num[p-1] + 1;
			
		}else if(strcmp(cmd,"pop") == 0){
			scanf("%d",&p);
			value[j] = yama[p-1][num[p-1] - 1];
			j = j + 1;
			num[p-1] = num[p-1] - 1;
			yama[p-1][num[p-1]] = '\0';
		}else{
			scanf("%d %d",&p,&p2);
			yama[p2 - 1][num[p2 - 1]] = yama[p-1][num[p - 1] - 1];
			num[p2-1] = num[p2-1] +1;
			num[p-1] = num[p-1] - 1;
			
		}
		for(y = 0; y <5;y++){
			cmd[y] = '\0';
		}
	}
	for(i = 0; i < j; i++){
		printf("%c\n",value[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:50: error: conflicting types for 'num'; have 'int[100]'
    6 |         int i = 0,j = 0,k = 0,y = 0,num =10,p,p2,num[100];
      |                                                  ^~~
main.c:6:37: note: previous definition of 'num' with type 'int'
    6 |         int i = 0,j = 0,k = 0,y = 0,num =10,p,p2,num[100];
      |                                     ^~~
Language: C

#define A atoi(c+4)\
char c[];s[99][1000],p[99];main(i){for(gets(c);gets(c),*c-=113;c[3]-32?*c+4?s[A][p[A]++]=c[strlen(c)-1]:(s[i=atoi(c+7+(int)log10(A))][p[i]++]=s[A][--p[A]]):puts(s[A]+--p[A]));}

Compiler output:
main.c:1:20: warning: backslash-newline at end of file
    1 | #define A atoi(c+4)\
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#define A atoi(c+1)
c[100],s[9

Compiler output:
main.c:2:1: warning: data definition has no type or storage class
    2 | c[100],s[9
      | ^
main.c:2:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:2:11: error: expected ']' at end of input
    2 | c[100],s[9
      |           ^
      |           ]
Language: C++

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

public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuffer sb = new StringBuffer();
        int num = Integer.parseInt(in.readLine());
        StringBuffer[] li = new StringBuffer[num];
        for(int i=0; i<num; i++){
            li[i] = new StringBuffer();
        }

        int arr, arr2;
        while(true){
            String[] str = in.readLine().split(" ");
            if     (str[0].equals("push") == true){
                arr = Integer.parseInt(str[1]);
                li[arr - 1].append(str[2].charAt(0));
            }
            else if(str[0].equals("pop")  == true){
                arr = Integer.parseInt(str[1]);
                sb.append(li[arr - 1].charAt(li[arr - 1].length() - 1) + "\n");
                li[arr - 1].deleteCharAt(li[arr - 1].length() - 1);
            }
            else if(str[0].equals("move") == true){
                arr = Integer.parseInt(str[1]);
                arr2 = Integer.parseInt(str[2]);
                char ch = li[arr - 1].charAt(li[arr - 1].length() - 1);
                li[arr - 1].deleteCharAt(li[arr - 1].length() - 1);
                li[arr2 - 1].append(ch);
            }
            else break;
        }

        System.out.print(sb);
        in.close();
    }
}

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

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

int main(){
	char stack[100][1000]={0,0};
	int top[100]={999};
	char result[1000];
	int pos=0;
	int n;
	char tmp;
	string s;
	char* b;
	char* c;
	int i, p1 , p2;
	cin >> n;
	while(1){
		getline(cin , s);
		if (s[2]=='s'){
			b=(char*)s.c_str();
			b+=5;
			for(i=0 ; ; i++){
				if(b[i]==' ') break;
			}
			b[i]='\0';
			c=b+i+1;
			p1=atoi(b);
			stack[p1][top[p1]--]=c[0];
		} else if (s[2]=='p'){
			b=(char*)s.c_str();
			b+=4;
			p1=atoi(b);
			result[pos++]=stack[p1][++top[p1]];
		} else if (s[2]=='v'){
			b=(char*)s.c_str();
			b+=5;
			for(i=0 ; ; i++){
				if(b[i]==' ') break;
			}
			b[i]='\0';
			p1=atoi(b);
			c=b+i+1;
			p2=atoi(c);
			tmp=stack[p1][++top[p1]];
			stack[p2][top[p2]--]=tmp;
		} else if (s[2]=='i'){
			break;
		}
	}
	for(i=0 ; i<strlen(result) ; i++){
		cout << result[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:21: error: 'strlen' was not declared in this scope
   50 |         for(i=0 ; i<strlen(result) ; i++){
      |                     ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
	char stack[100][1000]={0,0};
	int top[100]={999};
	char result[1000];
	int pos=0;
	int n;
	char tmp;
	string s;
	char* b;
	char* c;
	int i, p1 , p2;
	cin >> n;
	while(1){
		getline(cin , s);
		if (s[2]=='s'){
			b=(char*)s.c_str();
			b+=5;
			for(i=0 ; ; i++){
				if(b[i]==' ') break;
			}
			b[i]='\0';
			c=b+i+1;
			p1=atoi(b);
			stack[p1][top[p1]--]=c[0];
		} else if (s[2]=='p'){
			b=(char*)s.c_str();
			b+=4;
			p1=atoi(b);
			result[pos++]=stack[p1][++top[p1]];
		} else if (s[2]=='v'){
			b=(char*)s.c_str();
			b+=5;
			for(i=0 ; ; i++){
				if(b[i]==' ') break;
			}
			b[i]='\0';
			p1=atoi(b);
			c=b+i+1;
			p2=atoi(c);
			tmp=stack[p1][++top[p1]];
			stack[p2][top[p2]--]=tmp;
		} else if (s[2]=='i'){
			break;
		}
	}
	for(i=0 ; i<strlen(result) ; i++){
		cout << result[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:21: error: 'strlen' was not declared in this scope
   51 |         for(i=0 ; i<strlen(result) ; i++){
      |                     ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include <iostream>
#include <string>

using namespace std;

struct mountain{
  char stack[1001];
  int sp;
};

int main(){

  int n,p1,p2;
  char c,cmd[5];

  cin >> n;
  mountain mnt[n];

  while(1){
    cin >> cmd;
    if(!strcmp(cmd, "push")){
      cin >> p1 >> c;
      mnt[p1-1].stack[mnt[p1-1].sp] = c;
      mnt[p1-1].sp++;
    }
    if(!strcmp(cmd, "pop")){
      cin >> p1;
      cout << mnt[p1-1].stack[mnt[p1-1].sp-1] << endl;
      mnt[p1-1].sp--;
    }
    if(!strcmp(cmd, "move")){
      cin >> p1 >> p2;
      mnt[p2-1].stack[mnt[p2-1].sp] = mnt[p1-1].stack[mnt[p1-1].sp-1];
      mnt[p1-1].sp--;
      mnt[p2-1].sp++;
    }
    if(!strcmp(cmd, "quit")){
      break;
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'strcmp' was not declared in this scope
   21 |     if(!strcmp(cmd, "push")){
      |         ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
a.cc:26:9: error: 'strcmp' was not declared in this scope
   26 |     if(!strcmp(cmd, "pop")){
      |         ^~~~~~
a.cc:26:9: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:31:9: error: 'strcmp' was not declared in this scope
   31 |     if(!strcmp(cmd, "move")){
      |         ^~~~~~
a.cc:31:9: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:37:9: error: 'strcmp' was not declared in this scope
   37 |     if(!strcmp(cmd, "quit")){
      |         ^~~~~~
a.cc:37:9: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

// AIZU ONLINE JUDGE http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=10033
//*
#include <stdio.h>
#include <string.h>
#define Mt 100
#define MAX 1000

char stack[Mt][MAX];
int top[Mt] = {0};

void push(int n, char c){
    if(top[n] != MAX){
        stack[n][top[n]] = c;
        top[n]++;
    }
}

char pop(int n){
    if(top[n] != 0){
        top[n]--;
        return stack[n][top[n]];
    }
    return;
}

int main(){
    int n, m;
    char cmnd[10], pops[Mt*MAX];
    char c;
    int i, j=0;
    
    scanf("%d", &n);
    while(1){
        scanf("%s", cmnd);
        if(strcmp(cmnd, "quit")==0){
            break;
        }else if(strcmp(cmnd, "pop")==0){
            scanf("%d", &n);
            pops[j++]=pop(n);
        }else if(strcmp(cmnd, "push")==0){
            scanf("%d %c", &n, &c);
            push(n, c);
        }else if(strcmp(cmnd, "move")==0){
            scanf("%d %d", &n, &m);
            push(m, pop(n));
        }
    }
    for(i=0;i<j;i++){
        printf("%c\n", pops[i]);
    }

    return 0;
}
//*/

Compiler output:
a.cc: In function 'char pop(int)':
a.cc:23:5: error: return-statement with no value, in function returning 'char' [-fpermissive]
   23 |     return;
      |     ^~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<stack>
enum{
 push,pop,move,quit
};
inline int jm(const std::string& s){
  if(s=="push")return push;
  if(s=="pop")return pop;
  if(s=="move")return move;
  if(s=="quit")return quit;
  return -1;
}
int main(){
  unsigned int n;
  std::cin>>n;
  std::vector<std::stack<char> > v(n);
  while(1){
    std::string str;
    std::cin>>str;
    switch(jm(str)){
    case push:
      int p;
      char c;
      std::cin>>p>>c;
      v[p].push(c);
      break;
    case pop:
      int p;
      std::cin>>p;
      std::cout<<v[p].top()<<std::endl;
      v[p].pop();
      break;
    case move:
      int p1,p2;
      std::cin>>p1>>p2;
      v[p2].push(v[p1].top());
      v[p1].pop();
      break;
    case quit:
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:11: error: redeclaration of 'int p'
   29 |       int p;
      |           ^
a.cc:23:11: note: 'int p' previously declared here
   23 |       int p;
      |           ^
Language: C++

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

int main(){
string s;
char c;
stack<char> st[110];
int n;
cin >> n;

while(cin >> s, s!="quit"){
if(s=="pop"){
cin >> n;
if(st.empty())continue;
cout << st[n].top() << endl;
st[n].pop();
}else{
cin >> n >> c;
st[n].push(c);
}
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: request for member 'empty' in 'st', which is of non-class type 'std::stack<char> [110]'
   15 | if(st.empty())continue;
      |       ^~~~~