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

import java.util.*;
public class atcoder 
{
	public static void main(String[] args) 
	{
		Scanner sc=new Scanner(System.in);
		String s=sc.nextLine();
		String t=sc.nextLine();
		if(isStringLowerCase(s)==true && isStringLowerCase(t)==true)
		{
			int s1=s.length();
			int t1=t.length();
			if(!s.equals(t)==true && (s1<=10||s1>=1) && (t1<=10||t1>=1))	
			{
				Scanner scan=new Scanner(System.in);
				int a=scan.nextInt();
				int b=scan.nextInt();
				if(a<=10 && b<=10)
				{
					String u=sc.nextLine();
					if(u.equals(s)==true || u.equals(t)==true)
					{
						int s2=0,t2=0;
						if(u.equals(s)==true)
						{
							 s2=a-1;
							 System.out.println(s2);
							System.out.println(b);
						}
						if(u.equals(t)==true)
						{
							 t2=b-1;
							 System.out.println(a);
							System.out.println(t2);
						}
					}
				}
			}
		}	


	}






	private static boolean isStringLowerCase(String str){
        
        //convert String to char array
        char[] charArray = str.toCharArray();
        
        for(int i=0; i < charArray.length; i++){
            
            //if any character is not in lower case, return false
            if( !Character.isLowerCase( charArray[i] ))
                return false;
        }
        
        return true;
 
    }
}

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

#include <iostream>
#include <vector>

using namespace std;

int main(void){
  String a, b, e;
  int c, d;

  cin >> a, b;
  cin >> c, d;
  cin >> e;

  if(a==e){
    cout << c-1 << " " << d << endl;
  }else{
    cout << c << " " << d-1 << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'String' was not declared in this scope
    7 |   String a, b, e;
      |   ^~~~~~
a.cc:10:10: error: 'a' was not declared in this scope
   10 |   cin >> a, b;
      |          ^
a.cc:10:13: error: 'b' was not declared in this scope
   10 |   cin >> a, b;
      |             ^
a.cc:12:10: error: 'e' was not declared in this scope
   12 |   cin >> e;
      |          ^
Language: C++

#include<stdio.h>
#include<string.h>
char  a[105];
int main()
{
	gets_s(a);
	int i;
	for (i = 0;i<=strlen(a); i++)
	{
		if ((a[i] >= 'a' && a[i] <= 'z') || (a[i] >= 'A' && a[i] <= 'Z'))
			a[i] = 'x';
	}
	for (i = 0; i <= strlen(a); i++)
	{
		printf("%c", a[i]);
	}
	printf("\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'gets_s' was not declared in this scope
    6 |         gets_s(a);
      |         ^~~~~~
Language: C++

int main(){
    string A,B,U;
    int a_num,b_num;
    cin >> A >> B;
    cin >> a_num >> b_num;
    cin >> U;
    if(A==U){
        a_num -=1;
    }else{
        b_num -=1;
    }
    cout << a_num << ' ' << b_num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'string' was not declared in this scope
    2 |     string A,B,U;
      |     ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> A >> B;
      |     ^~~
a.cc:4:12: error: 'A' was not declared in this scope
    4 |     cin >> A >> B;
      |            ^
a.cc:4:17: error: 'B' was not declared in this scope
    4 |     cin >> A >> B;
      |                 ^
a.cc:6:12: error: 'U' was not declared in this scope
    6 |     cin >> U;
      |            ^
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << a_num << ' ' << b_num << endl;
      |     ^~~~
a.cc:12:38: error: 'endl' was not declared in this scope
   12 |     cout << a_num << ' ' << b_num << endl;
      |                                      ^~~~
Language: C++

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

int main(){

string S,T,U;
int A,B;

cin >> S >> T;
cin >> A >> B;
cin >> U;

if(U == S){
 A -= 1;
}elseif(U == T){
 B -= 1;
}

cout << A << " " << B << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:2: error: 'elseif' was not declared in this scope
   15 | }elseif(U == T){
      |  ^~~~~~
Language: Java

import java.util.Scanner;

public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner scanner = new Scanner(System.in);
	    String tmp = scanner.nextLine();
        String[] ST = tmp.split(" ");

	    tmp = scanner.nextLine();   
	    String[] ab = tmp.split(" ");
	    Integer a = Integer.parseInt(ab[0]);
	    Integer b = Integer.parseInt(ab[1]);

	    String U = scanner.nextLine();
	    
	    if(U.equals(ST[0])) {
	    	System.out.println(a-1+" "+b);
	    }
	    else if(U.equals(ST[1])) {
	    	System.out.println(a+" "+(b-1));
	    }
	    
	    
	    scanner.close();

}



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

import java.util.*;
public class atcoder 
{
	public static void main(String[] args) 
	{
		Scanner sc=new Scanner(System.in);
		String s=sc.nextLine();
		String t=sc.nextLine();
		if(isStringLowerCase(s)==true && isStringLowerCase(t)==true)
		{
			int s1=s.length();
			int t1=t.length();
			if(!s.equals(t)==true && (s1<=10||s1>=1) && (t1<=10||t1>=1))	
			{
				Scanner scan=new Scanner(System.in);
				int a=scan.nextInt();
				int b=scan.nextInt();
				if(a<=10 && b<=10)
				{
					String u=sc.nextLine();
					if(u.equals(s)==true || u.equals(t)==true)
					{
						int s2=0,t2=0;
						if(u.equals(s)==true)
						{
							 s2=a-1;
							 System.out.println(s2);
							System.out.println(b);
						}
						if(u.equals(t)==true)
						{
							 t2=b-1;
							 System.out.println(a);
							System.out.println(t2);
						}
					}
				}
			}
		}	


	}






	private static boolean isStringLowerCase(String str){
        
       
        char[] charArray = str.toCharArray();
        
        for(int i=0; i < charArray.length; i++){
            
          
            if( !Character.isLowerCase( charArray[i] ))
                return false;
        }
        
        return true;
 
    }
}

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


import java.util.Scanner;

public class RemmainingBalls {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner scanner = new Scanner(System.in);
	    String tmp = scanner.nextLine();
        String[] ST = tmp.split(" ");

	    tmp = scanner.nextLine();   
	    String[] ab = tmp.split(" ");
	    Integer a = Integer.parseInt(ab[0]);
	    Integer b = Integer.parseInt(ab[1]);

	    String U = scanner.nextLine();
	    
	    if(U.equals(ST[0])) {
	    	System.out.println(a-1+" "+b);
	    }
	    else if(U.equals(ST[1])) {
	    	System.out.println(a+" "+(b-1));
	    }
	    
	    
	    scanner.close();

		
	}

}


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

#include <iostream>
using namespace std;


int main(){
    string str;

    cin >> str;

    for (int i=0; i<str.length(); i++){
        str[i]="x";
    }

    cout << str <<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   11 |         str[i]="x";
      |                ^~~
      |                |
      |                const char*
Language: C++

#include <iostream>
using namespace std;


int main(){
    string str;

    cin >> str;

    for (int i=0; i<str.length(); i++){
        str[i]="x";
    }

    cout << str <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   11 |         str[i]="x";
      |                ^~~
      |                |
      |                const char*
Language: C++

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

int main() {
	// your code goes here
	string s,t;
	cin>>s>>t;
	cout<<s<<
	int a,b;
	cin>>a>>b;
	string u;
	cin>>u;
	if(u==s)
	a-=1;
	if(u==t)
	b-=1;
	cout<<a<<" "<<b;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected primary-expression before 'int'
    9 |         int a,b;
      |         ^~~
a.cc:10:14: error: 'a' was not declared in this scope
   10 |         cin>>a>>b;
      |              ^
a.cc:10:17: error: 'b' was not declared in this scope
   10 |         cin>>a>>b;
      |                 ^
Language: Java

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String  T = sc.next();
		int A = sc.nextInt();
		int B = sc.nextInt();
		String U = sc.next();
		if(U == S) A--;
		else B--;
		System.out.println(A+ " "+B);
		
	}
}

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

#include <bits/stdc++.h>
#include <string>
#include <math.h>
using namespace std;
int main()
{
  int a=0,b=0,c=0,d=0,e=0,f=0,i=0,j=0;
  string s1,s2,s3;
  
  cin>>s1>>s2>>a>>b>>s3;
  if(s3==s1) cout<<a-1<<b<<endl;
  else if(s3==s2) cout<<a<<b-1<<<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:33: error: expected primary-expression before '<<' token
   12 |   else if(s3==s2) cout<<a<<b-1<<<<endl;
      |                                 ^~
Language: C++

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-8;

//int N, M, K, H, W, L, R;
//long long int N, M, K, H, W, L, R;



int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	string s,t;
	cin>>s>>t;
	cin>>N>>M;
	string u;
	cin>>u;
	if(s==u)N--;
	else M--;
	cout<<N<<" "<<M<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:14: error: 'N' was not declared in this scope
   41 |         cin>>N>>M;
      |              ^
a.cc:41:17: error: 'M' was not declared in this scope
   41 |         cin>>N>>M;
      |                 ^
Language: Java

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String  T = sc.next();
		int A = sc.nextInt();
		int B = sc.nextInt();
		String U = sc.next();
		if(U == S) B--;
		else A--;
		System.out.println(A+ " "+B);
		
	}
}

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

s = intput().split()
a = list(map(int, input().split()))
u = input()

if u == s[0]:
    print(a[0]-1, a[1])
else:
    print(a[0], a[1]-1)

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = intput().split()
      | ^
Language: C

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
     char s1[100],s2[100],s3[100];
     int a,b;
     cin>>s1>>s2>>a>>b>>s3;
     if(strcmp(s1,s3)==0)
     {
         cout<<(a-1)<<" "<<b<<endl;
     }
     else
     {
         cout<<(a)<<" "<<(b-1)<<endl;
     }
     return 0;
}


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

#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<type_traits>
#include<math.h>
#include<fstream>
#include<set>
#include<queue>
using namespace std;
typedef long long ll;

const ll MOD = 1e9 + 7; 

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i = (int)(a); i < (int)(b); i++)
#define out(str) cout << str << endl
#define ALL(a) (a).begin(),(a).end()
#define INF_INT (1<<30)
#define INF_LL (1ll<<62)

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int a,b;
string s,t,u;

int main(){
    cin>>s>>t>>a>>b>>u;
    if(s==u)a--;
    else b--;
    cout<<a<<" "<<b<<endl;
}
    
    
}

Compiler output:
a.cc:40:1: error: expected declaration before '}' token
   40 | }
      | ^
Language: Java

import java.util.Scanner;

public class SnakeToy {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		String T = sc.next();

		int A = sc.nextInt();
		int B = sc.nextInt();

		String U = sc.next();

		if (S.equals(U)) {
			A = A - 1;
		} else if (T.equals(U)) {
			B = B - 1;
		}
		System.out.print(A+" "+B);
	}
}

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

#include<stdio.h>

int main(){
  int A,B;
  char S[],T[],U[];
  scanf("%s %s %d %d %s", &S, &T, &A, &B, &U);
  if(strcmp(S,U)==0){
   A--;
  }
  else if(strcmp(T,U)==0){
   B--;
  }
  printf("%d %d", A, B);
}


Compiler output:
main.c: In function 'main':
main.c:5:8: error: array size missing in 'S'
    5 |   char S[],T[],U[];
      |        ^
main.c:5:12: error: array size missing in 'T'
    5 |   char S[],T[],U[];
      |            ^
main.c:5:16: error: array size missing in 'U'
    5 |   char S[],T[],U[];
      |                ^
main.c:7:6: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    7 |   if(strcmp(S,U)==0){
      |      ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 |
Language: C++

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

int main(){
  string S, T, U;
  int A, B;
  cin >> S >> T;
  cin >> A >> B;
  cin >> U;
  
  if(U == S){
    A--;
    cout << A << B << endl;
    }
  if(U == T){
    B--;
    cout << A << B << endl;
    }
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:18:6: error: expected '}' at end of input
   18 |     }
      |      ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include <stdio.h>
int main(void){
char s,t,u;
 s=t=u=0;
int ss=0,tt=0;
 
scanf("%s%s",&s,&t);
scanf("%d%d",&ss,&tt);
scanf("%s",&u);
 
if(u=s){
printf("%d %d",ss-1,tt);
}
 
if(u=t){
printf("%d %d",ss,tt-1);
}
 
return0;
}

Compiler output:
main.c: In function 'main':
main.c:19:1: error: 'return0' undeclared (first use in this function)
   19 | return0;
      | ^~~~~~~
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		sc.nextLine();
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.nextLine();
		String u = sc.nextLine();
		if(u.equals(s)) {
			a--;
		}
		else {
			b--;
		}
		System.out.print(a+" "+b);
	}
}

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

#include<iostream>
using namespace std;
int main() {
	char a[15], b[15], c[15];
	int as, bs;
	cin >> a >> b;
	cin >> as >> bs;
	cin >> c;
	if (!strcmp(a, c)) {
		as--;
	}
	else {
		bs--;
	}
	cout << as << ' ' << bs;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'strcmp' was not declared in this scope
    9 |         if (!strcmp(a, c)) {
      |              ^~~~~~
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 | using namespace std;
Language: C

#include <stdio.h>

int main(void){
char s,t,u;
 s=t=u=0;
int ss=0,tt=0;
 
scanf("%c,%c",&s,&t);
scanf("%d,%d",&ss,&tt);
scanf("%c",&u);
 
if(u=s){
printf("%d %d",ss-1,tt);
}
 
if(u=t){
printf("%d %d",ss,tt-1);
}
 
return0;
}

Compiler output:
main.c: In function 'main':
main.c:20:1: error: 'return0' undeclared (first use in this function)
   20 | return0;
      | ^~~~~~~
main.c:20:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){
  int A,B;
  String S[11],T[11],U[11];
  
  scanf("%s %s",S,T);
  scanf("%d %d",&A,&B);
  scanf("%s",U);
  
  if(S == U){
    A = A - 1;
  }
  if(T == U){
    B = B - 1;
  }
  return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:5:3: error: unknown type name 'String'
    5 |   String S[11],T[11],U[11];
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a =s.size()
    for(int i = 0;i<a;i++){cout << 'x'}
  return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected ',' or ';' before 'for'
    6 |     for(int i = 0;i<a;i++){cout << 'x'}
      |     ^~~
a.cc:6:19: error: 'i' was not declared in this scope
    6 |     for(int i = 0;i<a;i++){cout << 'x'}
      |                   ^
a.cc:7:11: error: expected ';' before '}' token
    7 |   return 0
      |           ^
      |           ;
    8 | }
      | ~
Language: C

#clude <bits/stdc++.h>
int main(void){
char s,t,u;
 s=t=u=0;
int ss=0,tt=0;
 
scanf(%c,%c,&s,&t);
scanf(%d,%d,&ss,&tt);
scanf(%c,&u);
 
if(u=s){
printf("%d %d",ss-1,tt);
}
 
if(u=t){
printf("%d %d",ss,tt-1);
}
 
return0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #clude; did you mean #include?
    1 | #clude <bits/stdc++.h>
      |  ^~~~~
      |  include
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 | scanf(%c,%c,&s,&t);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #clude <bits/stdc++.h>
main.c:7:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 | scanf(%c,%c,&s,&t);
      | ^~~~~
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:7: error: expected expression before '%' token
    7 | scanf(%c,%c,&s,&t);
      |       ^
main.c:8:7: error: expected expression before '%' token
    8 | scanf(%d,%d,&ss,&tt);
      |       ^
main.c:9:7: error: expected expression before '%' token
    9 | scanf(%c,&u);
      |       ^
main.c:12:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 | printf("%d %d",ss-1,tt);
      | ^~~~~~
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   16 | printf("%d %d",ss,tt-1);
      | ^~~~~~
main.c:16:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:1: error: 'return0' undeclared (first use in this function)
   19 | return0;
      | ^~~~~~~
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

c1,c2 = input().split()
a1,a2 = input().split()
tem = input()
a1 = int(a1)
a2 = int(a2)
if tem == c1:
   a1 = a1-1
else:
   a2 = a2 -1

print(str(a1)+" "+ str(a2))


Compiler output:
a.cc:1:1: error: 'c1' does not name a type
    1 | c1,c2 = input().split()
      | ^~
Language: Java

import java.util.*;

public class Remaining_Balls {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		String t = sc.next();
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		
		String u = sc.next();
		
		if (u.equals(s)) {
			System.out.print(a - 1 + " ");
			System.out.print(b);
		}
		else if (u.equals(t)){
			System.out.print(a + " ");
			System.out.print(b - 1);
		}
	}

}


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

#include <iostream>
#include <string>
using namespace std;
int main() 
{
  char str1[100];
  char str2[100];
  int num[2];
  char input[100];
  cin >> str1 >> str2;
  cin >> num[0] >> num[1];
  cin >> input;
  
  if(input.compare(str1)){
    num[0]--;
  }
  else if(input.compare(str2)){
    num[1]--;
  }
  cout << num[0] << " " << num[1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: request for member 'compare' in 'input', which is of non-class type 'char [100]'
   14 |   if(input.compare(str1)){
      |            ^~~~~~~
a.cc:17:17: error: request for member 'compare' in 'input', which is of non-class type 'char [100]'
   17 |   else if(input.compare(str2)){
      |                 ^~~~~~~
Language: C++

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

int main()
{
  string s, t;
  cin >> s >> t;
  int a, b;
  cin >> a >> b;
  string x;
  cin >> x;
  if(s == x)
    a--;
  else if(t == x)
    b--;
  cout << a << " " << b ;
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespcae'
    2 | using namespcae std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s, t;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> s >> t;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s >> t;
      |          ^
a.cc:7:15: error: 't' was not declared in this scope; did you mean 'tm'?
    7 |   cin >> s >> t;
      |               ^
      |               tm
a.cc:10:9: error: expected ';' before 'x'
   10 |   string x;
      |         ^~
      |         ;
a.cc:11:10: error: 'x' was not declared in this scope
   11 |   cin >> x;
      |          ^
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout << a << " " << b ;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#clude <stido.h>
int main(void){
char s,t,u;
 s=t=u=0;
int ss=0,tt=0;
 
scanf(%c,%c,&s,&t);
scanf(%d,%d,&ss,&tt);
scanf(%c,&u);
 
if(u=s){
printf("%d %d",ss-1,tt);
}
 
if(u=t){
printf("%d %d",ss,tt-1);
}
 
return0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #clude; did you mean #include?
    1 | #clude <stido.h>
      |  ^~~~~
      |  include
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 | scanf(%c,%c,&s,&t);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #clude <stido.h>
main.c:7:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 | scanf(%c,%c,&s,&t);
      | ^~~~~
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:7: error: expected expression before '%' token
    7 | scanf(%c,%c,&s,&t);
      |       ^
main.c:8:7: error: expected expression before '%' token
    8 | scanf(%d,%d,&ss,&tt);
      |       ^
main.c:9:7: error: expected expression before '%' token
    9 | scanf(%c,&u);
      |       ^
main.c:12:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 | printf("%d %d",ss-1,tt);
      | ^~~~~~
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   16 | printf("%d %d",ss,tt-1);
      | ^~~~~~
main.c:16:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:1: error: 'return0' undeclared (first use in this function)
   19 | return0;
      | ^~~~~~~
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>
int main()
{
    int i;
char a1[100];
//char x;

scanf("%c",&a1);

for(i=0;i>=a1[i];i++)
{
if(a1[i]=!x)
a1[i]=x;
}
printf("%d",a[1]);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'x' was not declared in this scope
   12 | if(a1[i]=!x)
      |           ^
a.cc:15:13: error: 'a' was not declared in this scope; did you mean 'a1'?
   15 | printf("%d",a[1]);
      |             ^
      |             a1
Language: C

#include <stdio.h>

int mygetline(char s[], int size)
{
    int c, i;

    for ( i = 0;  (c = getchar()) != EOF && c != '\n' && i < size - 1; i++ ) {
        s[i] = c;
    }

    s[i] = '\0';

    if ( c == EOF && i == 0 ){
        return -1;
    }

    return i;
}

int main()
{
    char s[256],t[256],u[256];
    int a,b;

    mygetline(s,256); mygetline(t,256);
    scanf("%d %d",&a,&b);

    mygetline(u,256);

    int s_cnt=0,t_cnt=0;

    while (s[s_cnt]!=0) {
        s_cnt++;
    }
    while (t[t_cnt]!=0) {
        t_cnt++;
    }

    for (int i=0;u[i]!=0;i++) {
        if (u[i]!=s[i]) break;
        if (i==s_cnt) a--;
    }
    for (int i=0;u[i]!=0;i++) {
        if (u[i]!=t[i]) break;
        if (i==t_cnt) t--;
    }
    printf("%d %d",s_cnt,t_cnt);


    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:45:24: error: lvalue required as decrement operand
   45 |         if (i==t_cnt) t--;
      |                        ^~
Language: C

#include<stdio.h>

int main(void){
  int A,B;
  char S[11],T[11],U[11];
  
  scanf("%s %s",S,T);
  scanf("%d %d",&A,&B);
  scanf("%s",U);
  
  if(S == U){
    A = A - 1;
  if(T == U){
    B = B - 1;
  }
  return 0;
  }

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

#include <iostream>
using namespace std;
int main() 
{
  char str1[100];
  char str2[100];
  int num[2];
  char input[100];
  cin >> str1 >> str2;
  cin >> num[0] >> num[1];
  cin >> input;
  
  if(input.compare(str1)){
    num[0]--;
  }
  else if(input.compare(str2)){
    num[1]--;
  }
  cout << num[0] << " " << num[1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: request for member 'compare' in 'input', which is of non-class type 'char [100]'
   13 |   if(input.compare(str1)){
      |            ^~~~~~~
a.cc:16:17: error: request for member 'compare' in 'input', which is of non-class type 'char [100]'
   16 |   else if(input.compare(str2)){
      |                 ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
   char  *s,*t,*u;int a,b;
	gets(s);
	gets(t);
  scanf("%d %d",&a,&b);
	
    gets(u);
	if(s==u) a=a-1;
	if(t==u) b=b-1;
	cout<<a<<" "<<b<<endl;
	return 0;
 } 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

#include <bits/stdc++.h>
// https://gcc.gnu.org/onlinedocs/gcc-4.6.2/libstdc++/api/a01040_source.html
using namespace std;
#define REP(i, n) for(ll i=0;i<(ll)(n);i++)
#define RREP(i, n) for(ll i=(ll)(n-1);i>=0;i--)
#define FOR(i, a, b) for(ll i=(ll)(a); i<=(ll)(b); i++)
#define RFOR(i, a, b) for(ll i=(ll)(a);i>=(ll)(b); i--)
#define pb push_back // 配列の最後にappendする
#define mp make_pair 
#define ALL(x) (x).begin(),(x).end()   // accumulateする場合、最初から最後までということか？
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define cYES cout<<"YES"<<endl
#define cNO cout<<"NO"<<endl
#define cYes cout<<"Yes"<<endl
#define cNo cout<<"No"<<endl

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
typedef vector<int> veci;
typedef vector<long long> vecl;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll A,B,C,D,E,F,K,G,H,L,M,N,P,Q,R,W,X,Y,Z;
string S,T, U;
vector<ll> V;
int ans_s, ans_t;

// #define LOCAL
#ifdef LOCAL
	#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
	#define eprintf(...) 42
#endif

auto main(){
//    pair <int,int> foo;
//    vector<int> vec{ 1, 2, 3 };

//    ll ans = 1;
  // int x =10;
  // int y =5;
  // swap(x,y);
  // cout << min(x,y)<< '\n';
  // cout << max(x,y)<< '\n';

  // cin >> N >> K;
  // REP(i,N){
  //   cin >> X;
  //   V.pb(X);
  // }

    cin >> S >> T;
    cin >> A >> B;
    cin >> U;
    ans_s = A;
    ans_t = B;

    int UPos = S.find(U);
    if (UPos != std::string::npos) {
      ans_s = A -1;
    }
    UPos = T.find(U);
    if (UPos != std::string::npos) {
      ans_t = B -1;
    }

 cout << ans_s << " " << ans_t;


  // auto result = find(ALL(S), 10);
  
  // if (result != S.end()) {
  //   ans_s = A -1;
  // }

  //   cout << s << endl;
  //   s = s + t; //連結
  //   s == t; //比較
  //   s.length(); //長さ
  //   cout << s[0] << '\n';    //i番目の文字を参照
  //   cout << s.substr(0, 5)<< '\n'; //i番目以降k文字を抽出して得られる文字列
  //   cout << s.find("abc")<< '\n';  //sの中に文字列tがあればその先頭のアドレスを返す．なければs.nopsを返却
  //   cout << s.replace(0, 3, "zxc")<< '\n'; //i番目以降k文字を文字列tで置換する．tを空文字列にすれば削除の動作
  //   cout << s.insert(5, "ins")<< '\n'; //i番目の文字の前に文字列tを挿入

  //   vector<int> a{1,2,3,4,5};
  //   cout << a.size()<< '\n'; //aの大きさ
  //   cout << a[3]<< '\n'; //i番目の要素にアクセス
  //   cout << a.front()<< '\n';  //先頭を参照
  //   cout << a.back()<< '\n';   //末尾を参照
  //   a.push_back(10);  //末尾に要素を追加
  //   // cout << a << '\n';
  //   a.pop_back();   //末尾の要素を削除
  //   // cout << a << '\n';

  //   FOR(i,0,10){
  //       //   vec.push_back(i);
  //       a.pb(i);
  //   }
  //   // reverse(a, a.end());
  //   sort(ALL(a));
  //   cout << binary_search(a.begin(), a.end(), 20)<< '\n'; //trueかfalseを返す
  //   vector<int>::iterator lit = lower_bound(a.begin(), a.end(), 5);   //x以上の値が初めて現れる位置のイテレータを返す
  //   vector<int>::iterator uit = upper_bound(a.begin(), a.end(), x);   //xより大きい値が初めて現れる位置のイテレータを返す 
	// if(lit != a.end() && lit != uit)
	// 	cout << uit - lit << '\n';	// この場合, ult - lit は vc 中の x の個数になる    
}

Compiler output:
a.cc:40:1: error: '::main' must return 'int'
   40 | auto main(){
      | ^~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
public class Main {
 
    public static void main(String[] args) {
 
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
 
        System.out.println("キーボードから入力してください");
 
        String inputStr = null;
        String inputBallNum = null;
        String inputSelectStr = null;
      
        try {
            inputStr = br.readLine();
            inputBallNum = br.readLine();
            inputSelectStr = br.readLine();
            br.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
 
 		String[] str = inputStr.split(" ");
 		String[] ball = inputBallNum.split(" ");
      	
		int a = Integer.parseInt(ball[0]);
		int b = Integer.parseInt(ball[1]);
      
      	if(str[1].equals(inputSelectStr)){
          a--; 
        }else if(str[1].equals(inputSelectStr)){
          b--
        }
      System.out.println(a + " " + b);
      
    }
 
}

Compiler output:
Main.java:36: error: ';' expected
          b--
             ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main()
{
  string s, out;
  cin >> s;
  int char_size = s.size();
  for (char_size > 0; char_size--) {
    out = out + "x";
  }
  cout << out << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: expected ';' before ')' token
    8 |   for (char_size > 0; char_size--) {
      |                                  ^
      |                                  ;
Language: C

#clude <stdio.h>
int main(void){
char s,t,u;
 s=t=u=0;
int ss=0,tt=0;
 
scanf(%c,%c,&s,&t);
scanf(%d,%d,&ss,&tt);
scanf(%c,&u);
 
if(u=s){
printf("%d %d",ss-1,tt);
}
 
if(u=t){
printf("%d %d",ss,tt-1);
}
 
return0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #clude; did you mean #include?
    1 | #clude <stdio.h>
      |  ^~~~~
      |  include
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 | scanf(%c,%c,&s,&t);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #clude <stdio.h>
main.c:7:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 | scanf(%c,%c,&s,&t);
      | ^~~~~
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:7: error: expected expression before '%' token
    7 | scanf(%c,%c,&s,&t);
      |       ^
main.c:8:7: error: expected expression before '%' token
    8 | scanf(%d,%d,&ss,&tt);
      |       ^
main.c:9:7: error: expected expression before '%' token
    9 | scanf(%c,&u);
      |       ^
main.c:12:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 | printf("%d %d",ss-1,tt);
      | ^~~~~~
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   16 | printf("%d %d",ss,tt-1);
      | ^~~~~~
main.c:16:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:1: error: 'return0' undeclared (first use in this function)
   19 | return0;
      | ^~~~~~~
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void){
  int a,b;
  char s,t,u;
  scanf("%d%d%s%s%s",&a,&b,&s,&t,&u);
  if(s==u)
    printf("%d %d",a-1 b);
  else
    printf("%d %d",a b-1);
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:7:23: error: expected ')' before 'b'
    7 |     printf("%d %d",a-1 b);
      |           ~           ^~
      |                       )
main.c:9:21: error: expected ')' before 'b'
    9 |     printf("%d %d",a b-1);
      |           ~         ^~
      |                     )
Language: C++

#include<stdio.h>
#include<string.h>
void main(){
    char str_s[11]={},str_t[11]={},str_u[11]={};
    int n_a=0,n_b=0;

    scanf("%s %s",str_s,str_t);
    scanf("%d %d",&n_a,&n_b);
    scanf("%s",str_u);

    if(strcmp(str_s,str_u) == 0){
        n_a--;
    }else if(strcmp(str_t,str_u)){
        n_b++;
    }

    printf("%d %d\n",n_a,n_b);

}

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

#include <iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
using namespace std;

int main()
{
    char a[100],b[100],c[100];
    int n,m;
    scanf("%s %s",a,b);
    cin>>n>>m;
    getchar();
    gets(c);
    if(strcmp(a,c)==0)
        cout<<n-1<<" "<<m;
    else
        cout<<n<<" "<<m-1;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   15 |     gets(c);
      |     ^~~~
      |     getw
Language: C++

include <bits/stdc++.h>
using namespace std;
int main(){
  int A ,B;
  string S, T, U;
  cin >> S >> T;
  cin >> A >> B;
  cin >> U;
  
  if(U == S)
    A--;
  else
    B--;
  
  cout << A << ' ' << B << endl;
  }


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string S, T, U;
      |   ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> S >> T;
      |   ^~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S >> T;
      |          ^
a.cc:6:15: error: 'T' was not declared in this scope
    6 |   cin >> S >> T;
      |               ^
a.cc:8:10: error: 'U' was not declared in this scope
    8 |   cin >> U;
      |          ^
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout << A << ' ' << B << endl;
      |   ^~~~
a.cc:15:28: error: 'endl' was not declared in this scope
   15 |   cout << A << ' ' << B << endl;
      |                            ^~~~
Language: C++

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

int main()
{
    char a[100000],b[100000],c[100000];
    long long aint a1,a2;

    cin>>a>>b;
    cin>>a1>>a2;
    cin>>c;

    if(c[0]=='r')
    {
        cout<<a1-1<<' '<<a2<<endl;
    }
    else cout<<a1<<' '<<a2-1<<endl;




    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected initializer before 'a1'
    7 |     long long aint a1,a2;
      |                    ^~
a.cc:10:10: error: 'a1' was not declared in this scope; did you mean 'a'?
   10 |     cin>>a1>>a2;
      |          ^~
      |          a
a.cc:10:14: error: 'a2' was not declared in this scope; did you mean 'a'?
   10 |     cin>>a1>>a2;
      |              ^~
      |              a
Language: C++

#include<bits/stdc++.h>
#include<string.h>

using namespace std;

int main()
{
    string s, t;
    cin>>s>>t;
    int a ,b;
    cin>>a>>b;
    string u;
    cin>>u;
    if(s=u)
        cout<<a-1<<" "<<b;
    else
        cout<<a<<" "<<b-1;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(u)' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |     if(s=u)
      |        ~^~
      |         |
      |         std::__cxx11::basic_string<char>
Language: C++

#include <iostream>
using namespace std;
int main() 
{
  char str1[100];
  char str2[100];
  int num[2];
  char input[100];
  cin >> str1 >> str2;
  cin >> num[0] >> num[1];
  cin >> input;
  
  if(input == str1){
    num[0]--;
  }
  else if(iput == str2){
    num[1]--;
  }
  cout << num[0] << " " << num[1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'iput' was not declared in this scope; did you mean 'input'?
   16 |   else if(iput == str2){
      |           ^~~~
      |           input
Language: C++

#include<stdio.h>
#include<string>
using namespace std;
int main() {
	char s[105];
	int i;
	scanf("%s", &s);
	for (i = 0; i < strlen(s); i++) printf("x");
	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'strlen' was not declared in this scope
    8 |         for (i = 0; i < strlen(s); i++) printf("x");
      |                         ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<string>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: Java


import java.util.*;

public class abc1{
    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);     
        String s1=sc.next();
        String s2=sc.next();
        long a1=sc.nextLong();
        long a2=sc.nextLong();
        String s3=sc.next();
        if(s3.equals(s1))
        {
        	a1=a1-1;
        	System.out.println(a1);
        	System.out.println(a2);
        	
        }
        else
        {

        	a2=a2-1;
        	System.out.println(a1);
        	System.out.println(a2);
        


        }
       



        }
    
}

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

#include<stdio.h>
#include<string.h>
int main()
{
  char s[10],t[10],u[10];
  int a,b;
  //gets(s);
  //gets(t);
  scanf("%[^\n]c",s);
  scanf("%[^\n]c",t);
  scanf("%d %d",&a,&b);
  //gets(u);
  scanf("%[^\n]c",u);
  if(a[0]-u[0]==0)
  {a=a-1;}
  if(b[0]-u[0]==0)
     {b=b-1;}
     printf("%d %d",&a,&b);
     
     }
     


Compiler output:
main.c: In function 'main':
main.c:14:7: error: subscripted value is neither array nor pointer nor vector
   14 |   if(a[0]-u[0]==0)
      |       ^
main.c:16:7: error: subscripted value is neither array nor pointer nor vector
   16 |   if(b[0]-u[0]==0)
      |       ^
Language: C

char s[10],t[10],u[10];
int ss=0,tt=0;

int main(void){
scanf(%c,%c,&s[],&t[]);
scanf(%d,%d,&ss,&tt);
scanf(%d,&u[]);
 
if(u[]=s[]){
printf("%d %d",ss-1,tt);
}
 
if(u[]=t[]){
printf("%d %d",ss,tt-1);
}
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 | scanf(%c,%c,&s[],&t[]);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | char s[10],t[10],u[10];
main.c:5:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 | scanf(%c,%c,&s[],&t[]);
      | ^~~~~
main.c:5:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:7: error: expected expression before '%' token
    5 | scanf(%c,%c,&s[],&t[]);
      |       ^
main.c:6:7: error: expected expression before '%' token
    6 | scanf(%d,%d,&ss,&tt);
      |       ^
main.c:7:7: error: expected expression before '%' token
    7 | scanf(%d,&u[]);
      |       ^
main.c:9:6: error: expected expression before ']' token
    9 | if(u[]=s[]){
      |      ^
main.c:10:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   10 | printf("%d %d",ss-1,tt);
      | ^~~~~~
main.c:10:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:6: error: expected expression before ']' token
   13 | if(u[]=t[]){
      |      ^
main.c:14:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   14 | printf("%d %d",ss,tt-1);
      | ^~~~~~
main.c:14:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: Java

package othes;
import java.util.*;
public class A {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		String s = input.next() , t = input.next();
		Map<String, Integer> store = new HashMap<>();
		store.put(s , input.nextInt());
		store.put(t , input.nextInt());
		String remove = input.next();
		store.put(remove , store.getOrDefault(remove, 0) - 1);
		System.out.println(store.getOrDefault(s , 0) + " " + store.getOrDefault(t, 0));
		
	}

}


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

#include<iostream>
using namespace std;
int main() {
	char S[11];
	char T[11];
	char U[11];
	int A, B;
	cin >> S >> T >> A >> B >> U;
	if (strcmp(S,U) == 0) {
		A -= 1;
	}
	else {
		B -= 1;
	}
	cout << A <<" "<< B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'strcmp' was not declared in this scope
    9 |         if (strcmp(S,U) == 0) {
      |             ^~~~~~
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 | using namespace std;
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
  char s[10],t[10],u[10];
  int a,b;
  //gets(s);
  //gets(t);
  scanf("%[^\n]c",s);
  scanf("%[^\n]c",t);
  scanf("%d %d",&a,&b);
  //gets(u);
  scanf("%[^\n]c",u);
  if(a[0]==u[0])
  {a=a-1;}
  if(b[0]==u[0])
     {b=b-1;}
     printf("%d %d",&a,&b);
     
     }
     


Compiler output:
main.c: In function 'main':
main.c:14:7: error: subscripted value is neither array nor pointer nor vector
   14 |   if(a[0]==u[0])
      |       ^
main.c:16:7: error: subscripted value is neither array nor pointer nor vector
   16 |   if(b[0]==u[0])
      |       ^
Language: C++

 #include <bits/stdc++.h>
#include"list"
using namespace std;
#define ll long long
#define inf (long long)1e10
#define IO {\
	freopen("input.txt","r",stdin);\
	freopen("output.txt","w",stdout);\
}
#define fast() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define nmbr(c) (int)(c-'0')
#define ltr(c) (int)(c-'a')
#define bug(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {cout << endl ;}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << ' ' ;
    err(++it, args...);
}



int_fast32_t main(){
    string s1,s2,tst;
    int a1,a2;
    cin>>s1>>s2>>a1>>a2>>tst;

    if(tst==s1){
        cout<<a1-1<<" "<<a2<<endl;
    }
    else cout<<a1<<" "<<a2-1<<endl;







}


Compiler output:
a.cc:23:1: error: '::main' must return 'int'
   23 | int_fast32_t main(){
      | ^~~~~~~~~~~~
Language: Java

package othes;
import java.util.*;
public class a {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		String s = input.next() , t = input.next();
		Map<String, Integer> store = new HashMap<>();
		store.put(s , input.nextInt());
		store.put(t , input.nextInt());
		String remove = input.next();
		store.put(remove , store.getOrDefault(remove, 0) - 1);
		System.out.println(store.getOrDefault(s , 0) + " " + store.getOrDefault(t, 0));
		
	}

}


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

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

int main()
{
    char a[100],b[100],c[100];
    int a1,a2;

    cin>>a>>b;
    cin>>a1>>a2;a
    cin>>c;

    if(c[0]=='r')
    {
        printf("%d %d\n",a1-1,a2);
    }
    else printf("%d %d\n",a1,a2-1);




    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before 'cin'
   10 |     cin>>a1>>a2;a
      |                  ^
      |                  ;
   11 |     cin>>c;
      |     ~~~