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

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

int main() {
  String S,T,U;
  int A,B;
  cin >> S/* variable */;
  cin >> T;
  cin >> A;
  cin >> B;
  cin >> U;
  if("S"=="U"){
    A=A-1;
  }else{
    B=B-1;
  }
  cout << A <<" "<< B << endl;
}

Compiler output:
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:7:10: error: 'S' was not declared in this scope
    7 |   cin >> S/* variable */;
      |          ^
a.cc:8:10: error: 'T' was not declared in this scope
    8 |   cin >> T;
      |          ^
a.cc:11:10: error: 'U' was not declared in this scope
   11 |   cin >> U;
      |          ^
Language: C++

					#include <bits/stdc++.h>

					using namespace std;
					typedef long long ll;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:58: error: expected ';' before 'string'
    8 |                                                 int a,b;a
      |                                                          ^
      |                                                          ;
    9 |                                                 string s,t,u;
      |                                                 ~~~~~~    
a.cc:10:56: error: 's' was not declared in this scope
   10 |                                                 cin >> s >> t >> a >> b >> u;
      |                                                        ^
a.cc:10:61: error: 't' was not declared in this scope
   10 |                                                 cin >> s >> t >> a >> b >> u;
      |                                                             ^
a.cc:10:76: error: 'u' was not declared in this scope
   10 |                                                 cin >> s >> t >> a >> b >> u;
      |                                                                            ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int A,B;
  string S,T,U;
  cin>>A>>B>>S>>T>>U;
  
  
  
  
  cout<<A<<" "<<B<<endl;
  
  
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: expected '}' at end of input
   12 |   cout<<A<<" "<<B<<endl;
      |                         ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: Java

import java.util.*;
public class atcodervc1 {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Random rand = new Random();
        //ArrayList<Integer> list;
        String name1 = sc.next();
        String name2 = sc.next();
        int ball1 = sc.nextInt();
        int ball2 = sc.nextInt();
        String unstocked_ball = sc.next();

        if(name1.equals(unstocked_ball)){
            ball1 = ball1 -1;
        }else{
            ball2 = ball2 -1;
        }

        System.out.println(ball1 + " " + ball2);



    
	}
}

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

using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
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; }
string S, T; int A, B; string U;
//---------------------------------------------------------------------------------------------------
void _main() {
	cin >> S >> T >> A >> B >> U;
 
	if (S == U) A--;
	else B--;
 
	printf("%d %d\n", A, B);
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:1:49: error: 'cin' was not declared in this scope
    1 | using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
      |                                                 ^~~
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; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
a.cc:1:61: error: 'ios' has not been declared
    1 | using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
      |                                                             ^~~
a.cc: At global scope:
a.cc:2:39: error: 'INT_MAX' was not declared in this scope
    2 | typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
      |                                       ^~~~~~~
a.cc:1:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
  +++ |+#include <climits>
    1 | using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
a.cc:5:1: error: 'string' does not name a type
    5 | string S, T; int A, B; string U;
      | ^~~~~~
a.cc:5:24: error: 'string' does not name a type
    5 | string S, T; int A, B; string U;
      |                        ^~~~~~
a.cc: In function 'void _main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> S >> T >> A >> B >> U;
      |         ^~~
a.cc:8:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:16: error: 'S' was not declared in this scope
    8 |         cin >> S >> T >> A >> B >> U;
      |                ^
a.cc:8:21: error: 'T' was not declared in this scope
    8 |         cin >> S >> T >> A >> B >> U;
      |                     ^
a.cc:8:36: error: 'U' was not declared in this scope
    8 |         cin >> S >> T >> A >> B >> U;
      |                                    ^
a.cc:13:9: error: 'printf' was not declared in this scope
   13 |         printf("%d %d\n", A, B);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
Language: C++

string S, T; int A, B; string U;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> S >> T >> A >> B >> U;

    if (S == U) A--;
    else B--;

    printf("%d %d\n", A, B);
}

Compiler output:
a.cc:1:1: error: 'string' does not name a type
    1 | string S, T; int A, B; string U;
      | ^~~~~~
a.cc:1:24: error: 'string' does not name a type
    1 | string S, T; int A, B; string U;
      |                        ^~~~~~
a.cc: In function 'void _main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> S >> T >> A >> B >> U;
      |     ^~~
a.cc:4:12: error: 'S' was not declared in this scope
    4 |     cin >> S >> T >> A >> B >> U;
      |            ^
a.cc:4:17: error: 'T' was not declared in this scope
    4 |     cin >> S >> T >> A >> B >> U;
      |                 ^
a.cc:4:32: error: 'U' was not declared in this scope
    4 |     cin >> S >> T >> A >> B >> U;
      |                                ^
a.cc:9:5: error: 'printf' was not declared in this scope
    9 |     printf("%d %d\n", A, B);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | string S, T; int A, B; string U;
Language: C

string S, T; int A, B; string U;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> S >> T >> A >> B >> U;

    if (S == U) A--;
    else B--;

    printf("%d %d\n", A, B);
}

Compiler output:
main.c:1:1: error: unknown type name 'string'
    1 | string S, T; int A, B; string U;
      | ^~~~~~
main.c:1:24: error: unknown type name 'string'
    1 | string S, T; int A, B; string U;
      |                        ^~~~~~
main.c: In function '_main':
main.c:4:5: error: 'cin' undeclared (first use in this function)
    4 |     cin >> S >> T >> A >> B >> U;
      |     ^~~
main.c:4:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    9 |     printf("%d %d\n", A, B);
      |     ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | string S, T; int A, B; string U;
main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 |     printf("%d %d\n", A, B);
      |     ^~~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b;
  string s,t;
  cin>>s>>t;
  cin>>a>>b;
  cin>>u;
  if(s.compare(u)==0)
  {
    cout<<a-1<<" "<<b;
    
  }
  else
  {
    cout<<a<<" "<<b-1;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'u' was not declared in this scope
    9 |   cin>>u;
      |        ^
Language: C++

S, T = input().split()
A, B = [int(i) for i in input().split()]
U = input()
if U == S:
    print(A-1, B)
else :
    print(A, B-1)

Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S, T = input().split()
      | ^
Language: C++

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

int main(void){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.toe(NULL);
  string a, b, c;
  cin >> a >> b;
  int A, B;
  cin >> A >> B;
  cin >> c;
  if(c[0] == a[0])
    --A;
  else
    --B;
  cout << A << " " << B << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'std::ostream' {aka 'class std::basic_ostream<char>'} has no member named 'toe'; did you mean 'tie'?
    7 |   cout.toe(NULL);
      |        ^~~
      |        tie
Language: C++

#include <iostream>
#include<string>
#include<sstream>

using namespace std;

int main()
{
int a,b;
string s,t,u;
cin>>s>>t;
cin>>a>>b;
cin>>u;

if(u==s)cout<<--a cout<<b;
if(u==t)  cout<<a;cout<<--b;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: expected ';' before 'cout'
   15 | if(u==s)cout<<--a cout<<b;
      |                  ^~~~~
      |                  ;
Language: C++

#include <iostream>

int main() {
  int a, b;
  string A, B;
  string u;
  cin >> A >> B;
  cin >> a >> b;
  cin >> u;
  if(u == A)
    a--;
  else
    b--;
  cout << a << " " << b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string A, B;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:9: error: expected ';' before 'u'
    6 |   string u;
      |         ^~
      |         ;
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> A >> B;
      |   ^~~
      |   std::cin
/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: 'A' was not declared in this scope
    7 |   cin >> A >> B;
      |          ^
a.cc:7:15: error: 'B' was not declared in this scope
    7 |   cin >> A >> B;
      |               ^
a.cc:9:10: error: 'u' was not declared in this scope
    9 |   cin >> u;
      |          ^
a.cc:14:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |   cout << a << " " << b << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |   cout << a << " " << b << endl;
      |                            ^~~~
      |                            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

S, T = [str(s) for s in input().split()]
A, B = [int(i) for i in input().split()]
U = str(input())

if S == U:
    print(A-1, B)
else:
    print(A, B-1)


Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S, T = [str(s) for s in input().split()]
      | ^
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--;
  cout<<a<<" "<<b<<endl;
  }
  else
  {
    b--;
  cout<<a<<" "<<b<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'iF' was not declared in this scope
   10 |   iF(u==s){
      |   ^~
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else
      |   ^~~~
Language: Java

import java.util.Scanner;

public class Main2 {
	    public static void main(String[] args) {
	        Scanner scan = new Scanner(System.in);
	        String S = scan.next();
	        String T = scan.next();
	        int num1 = scan.nextInt();
	        int num2 = scan.nextInt();
	        String U = scan.next();

	        if(U.equals(S)){
	        	num1--;
	        }else if(U.equals(T)){
	         	num2--;
	        }
	        scan.close();
	      	System.out.print(num1 + " " + num2);
    }
}


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

public class Main {
	    public static void main(String[] args) {
	        Scanner scan = new Scanner(System.in);
	        String S = scan.next();
	        String T = scan.next();
	        int num1 = scan.nextInt();
	        int num2 = scan.nextInt();
	        String U = scan.next();

	        if(U.equals(S)){
	        	num1--;
	        }else if(U.equals(T)){
	         	num2--;
	        }
	        scan.close();
	      	System.out.print(num1 + " " + num2);
    }
}


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

import java.util.Scanner;

public class Main2 {
	    public static void main(String[] args) {
	        Scanner scan = new Scanner(System.in);
//	        String S = scan.next();
//	        String T = scan.next();
//	        int num1 = scan.nextInt();
//	        int num2 = scan.nextInt();
//	        String U = scan.next();

//	        if(U.equals(S)){
//	        	num1--;
//	        }else if(U.equals(T)){
//	         	num2--;
//	        }

//	        scan.close();

//	      	System.out.print(num1 + " " + num2);
    }
}


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

import java.util.Scanner;

public class Main2 {
	    public static void main(String[] args) {
	        Scanner scan = new Scanner(System.in);
	        String S = scan.next();
	        String T = scan.next();
	        int num1 = scan.nextInt();
	        int num2 = scan.nextInt();
	        String U = scan.next();

	        if(U.equals(S)){
	        	num1--;
	        }else if(U.equals(T)){
	         	num2--;
	        }

	        scan.close();

	      	System.out.print(num1 + " " + num2);
    }
}


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

package practice;
import java.util.Scanner;

public class Main2 {

	    public static void main(String[] args) {
	        Scanner scan = new Scanner(System.in);
	        String S = scan.next();
	        String T = scan.next();
	        int num1 = scan.nextInt();
	        int num2 = scan.nextInt();
	        String U = scan.next();

	        if(U.equals(S)){
	        	num1--;
	        }else if(U.equals(T)){
	         	num2--;
	        }

	        scan.close();

	      	System.out.print(num1 + " " + num2);
    }
}


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

import java.util.Scanner;

public class Main2 {

	    public static void main(String[] args) {
	        Scanner scan = new Scanner(System.in);
	        String S = scan.next();
	        String T = scan.next();
	        int num1 = scan.nextInt();
	        int num2 = scan.nextInt();
	        String U = scan.next();

	        if(U.equals(S)){
	        	num1--;
	        }else if(U.equals(T)){
	         	num2--;
	        }

	      	System.out.print(num1 + " " + num2);
    }
}


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

package practice;
import java.util.Scanner;

public class Main2 {

	    public static void main(String[] args) {
	        Scanner scan = new Scanner(System.in);
	        String S = scan.next();
	        String T = scan.next();
	        int num1 = scan.nextInt();
	        int num2 = scan.nextInt();
	        String U = scan.next();

	        if(U.equals(S)){
	        	num1--;
	        }else if(U.equals(T)){
	         	num2--;
	        }

	      	System.out.print(num1 + " " + num2);
    }
}


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

import java.util.Scanner;                   

public class Main {                                 
    public static void main(String[] args) {                
        Scanner scan = new Scanner(System.in);          
        String S = scan.nextString();          
        String T = scan.nextString();
        int num1 = scan.nextInt();
        int num2 = scan.nextInt();
        String U = scan.nextString();
      
        if(U.equals(S)){
        	num1--;
        }else if(U.equals(T)){
         	num2--; 
        }

      	System.out.print(num1 + " " + num2);
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
        String S = scan.nextString();          
                       ^
  symbol:   method nextString()
  location: variable scan of type Scanner
Main.java:7: error: cannot find symbol
        String T = scan.nextString();
                       ^
  symbol:   method nextString()
  location: variable scan of type Scanner
Main.java:10: error: cannot find symbol
        String U = scan.nextString();
                       ^
  symbol:   method nextString()
  location: variable scan of type Scanner
3 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: expected primary-expression before ';' token
   12 |     A-=;
      |        ^
a.cc:14:11: error: expected primary-expression before ';' token
   14 |   else B-=;
      |           ^
Language: Java

import java.util.*;
class Main {
  public static void main(String[]args){
    Scanner scanner = new Scanner(System.in);
    String s = scanner.next();
    String t = scanner.next();
    int sN = scanner.nextInt();
    int tN = scanner.nextInt();
    
    String u = scanner.next();
    
    if(u==s){
      s--;
    }else{
      t--;
    }
      
    System.out.println(sN + " " + tN);
  }
}

Compiler output:
Main.java:13: error: bad operand type String for unary operator '--'
      s--;
       ^
Main.java:15: error: bad operand type String for unary operator '--'
      t--;
       ^
2 errors
Language: Java

import java.util.*;
class Main {
  public static void main(String[]args){
    Scanner scanner = new scanner(System.in);
    String s = scanner.next();
    String t = scanner.next();
    int sN = scanner.nextInt();
    int tN = scanner.nextInt();
    
    String u = scanner.next();
    
    if(u==s){
      s -= 1;
    }else{
      t -= 1;
    }
      
    System.out.println(sN + " " + tN);
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    Scanner scanner = new scanner(System.in);
                          ^
  symbol:   class scanner
  location: class Main
Main.java:13: error: bad operand types for binary operator '-'
      s -= 1;
        ^
  first type:  String
  second type: int
Main.java:15: error: bad operand types for binary operator '-'
      t -= 1;
        ^
  first type:  String
  second type: int
3 errors
Language: C++

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

int main(){
	char s,u;
	cin >> s >> u;
	ll ns,nu;
	cin >> ns >> nu;
	char str;
	cin >> str;
	if(strcmp(str,s) == 0){
      cout << ns-1 <<" "<< nu<<endl;
    }
	if(strcmp(str,u) == 0){
      cout << ns<<" "<< nu-1<<endl;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |         if(strcmp(str,s) == 0){
      |                   ^~~
      |                   |
      |                   char
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:12:23: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |         if(strcmp(str,s) == 0){
      |                       ^
      |                       |
      |                       char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:15:19: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(str,u) == 0){
      |                   ^~~
      |                   |
      |                   char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:15:23: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(str,u) == 0){
      |                       ^
      |                       |
      |                       char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C++

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

int main(){
	char s,u;
	cin >> s >> u;
	ll ns,nu;
	cin >> ns >> nu;
	char str;
	cin >> str;
	if(str == s){cout << ns-1 <<" "<< nu<<endl};
	if(str == u){cout << ns<<" "<< nu-1<<endl};
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:51: error: expected ';' before '}' token
   12 |         if(str == s){cout << ns-1 <<" "<< nu<<endl};
      |                                                   ^
      |                                                   ;
a.cc:13:50: error: expected ';' before '}' token
   13 |         if(str == u){cout << ns<<" "<< nu-1<<endl};
      |                                                  ^
      |                                                  ;
Language: Java

import java.io.*;
import java.util.*;
public class lab
{
	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 c = sc.next();
		if (c.equals(s))
			a--;
		else
			b--;
		System.out.println(a + " " + b);
	} 
}


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

clude<iostream>
using namespace std;
int main(){
  int a,b;
  string s,t,u;
  cin >> s >> t >> a >> b >> u;
  if(s==u){
    a--;
  }
  else if(t==u){
    b--;
  }
  cout << a << " " << b << endl;
}

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude<iostream>
      | ^~~~~
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 >> b >> u;
      |   ^~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u;
      |          ^
a.cc:6:15: error: 't' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u;
      |               ^
a.cc:6:30: error: 'u' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u;
      |                              ^
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout << a << " " << b << endl;
      |   ^~~~
a.cc:13:28: error: 'endl' was not declared in this scope
   13 |   cout << a << " " << b << endl;
      |                            ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b;
  string s,t,u;
  cin >> s >> t >> a >> b >> u;
  if(s==u){
    a--;
  }
  else if(t==u){
    b--;
  }
  cout << a << " " << b << endl;
}
#include<iostream>
using namespace std;
int main(){
  int a,b;
  string s,t,u;
  cin >> s >> t >> a >> b >> u;
  if(s==u){
    a--;
  }
  else if(t==u){
    b--;
  }
  cout << a << " " << b << endl;
}

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

#incude<iostream>
#include<string>
using namespace std;
int main(){
  string s,t,d;
  int a,b;
  cin >> s >> t >> a >> b >> u;
  if(s==u){
    a--;
  }
  else if(t==u){
      b--;
  }
  cout << a << b;

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> s >> t >> a >> b >> u;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<string>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:7:30: error: 'u' was not declared in this scope
    7 |   cin >> s >> t >> a >> b >> u;
      |                              ^
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << a << b;
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:18: error: expected '}' at end of input
   14 |   cout << a << b;
      |                  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#incude<iostream>
using namespace std;
int main(){
  string s,t,d;
  int a,b;
  cin >> s >> t >> a >> b >> u ;
  if(s==u){
    a--;
  }
  else if(t==u){
      b--;
  }
  cout << a << b;

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s,t,d;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #incude<iostream>
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u ;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incude<iostream>
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u ;
      |          ^
a.cc:6:15: error: 't' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u ;
      |               ^
a.cc:6:30: error: 'u' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u ;
      |                              ^
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout << a << b;
      |   ^~~~
a.cc:13:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:18: error: expected '}' at end of input
   13 |   cout << a << b;
      |                  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#incude<iostream>
using namespace std;
int main(){
  string s,t,d;
  int a,b;
  cin >> s >> t >> a >> b >> u;
  if(s==u){
    a--;
  }
  else if(t==u){
      b--;
  }

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s,t,d;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #incude<iostream>
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incude<iostream>
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u;
      |          ^
a.cc:6:15: error: 't' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u;
      |               ^
a.cc:6:30: error: 'u' was not declared in this scope
    6 |   cin >> s >> t >> a >> b >> u;
      |                              ^
a.cc:12:4: error: expected '}' at end of input
   12 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#incude<iostream>
#include<string>
using namespace std;
int main(){
  string s,t,d;
  int a,b;
  cin >> s >> t >> a >> b >> u;
  if(s==u){
    a--;
  }
  else if(t==u){
      b--;
  }
  

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> s >> t >> a >> b >> u;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<string>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:7:30: error: 'u' was not declared in this scope
    7 |   cin >> s >> t >> a >> b >> u;
      |                              ^
a.cc:13:4: error: expected '}' at end of input
   13 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
string s,t,u;
  int a,b;
  cin >> s >> t >> a >> b >> u;
  if(s==u){
  a--;
  }else if(t==u){
  b--
  }
  cout << a << b << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: expected ';' before '}' token
   10 |   b--
      |      ^
      |      ;
   11 |   }
      |   ~
Language: C

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

struct ball {
	char name[11];
  	int n;
};
int main(void){
  	char u[11];
	ball S,T;
  	scanf("%s%s",&S.name,&T.name);
  	scanf("%d%d",&S.n,&T.n);
  	scanf("%s",&u);
  	if(strcmp(u,S.name)==0){
    	S.n--;
    }else{
    	T.n--;
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: unknown type name 'ball'; use 'struct' keyword to refer to the type
   10 |         ball S,T;
      |         ^~~~
      |         struct 
main.c:11:24: error: request for member 'name' in something not a structure or union
   11 |         scanf("%s%s",&S.name,&T.name);
      |                        ^
main.c:11:32: error: request for member 'name' in something not a structure or union
   11 |         scanf("%s%s",&S.name,&T.name);
      |                                ^
main.c:12:24: error: request for member 'n' in something not a structure or union
   12 |         scanf("%d%d",&S.n,&T.n);
      |                        ^
main.c:12:29: error: request for member 'n' in something not a structure or union
   12 |         scanf("%d%d",&S.n,&T.n);
      |                             ^
main.c:14:22: error: request for member 'name' in something not a structure or union
   14 |         if(strcmp(u,S.name)==0){
      |                      ^
main.c:15:10: error: request for member 'n' in something not a structure or union
   15 |         S.n--;
      |          ^
main.c:17:10: error: request for member 'n' in something not a structure or union
   17 |         T.n--;
      |          ^
Language: C

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#define rep(i,n) for(int (i) = 0; (i) < (n); ++(i))
using namespace std;
typedef long long ll;

int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    sort(a.begin(), a.end());

    for(int i = 0; i < n-1; ++i){
        if(a[i] == a[i+1]){
            cout << "NO" << endl;
            return 0;
        }
    }

    cout << "YES" << endl;
    return 0;
}


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

package main

import "fmt"

/**
Problem Statement
文字列Sの書かれたボールがA個、文字列Tの書かれたボールがB個あります。
高橋君は、文字列Uの書かれたボールを1個選んで捨てました。
文字列S,Tの書かれたボールがそれぞれ何個残っているか求めてください

Sample input1
red blue
3 4
red
*/
func main() {

	var s, t, u string
	var sCnt, tCnt int

	fmt.Scan(&s, &t)
	fmt.Scan(&sCnt, &tCnt)
	fmt.Scan(&u)

	if s == u {
		sCnt -= 1
	}
	if t == u {
		tCnt -= 1
	}

	fmt.Println(sCnt, tCnt)
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

#include <bits/std++.h>

using namespace std;

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

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

#include <bits/stdc++.h>
using namespace std;
int main() {
  string a,b,c;
  int n,m;
  cin >> a >> b >> n >> m >> c;
  if (c == a){
    cout << n-1 << " " << m << endl;
  }
  else{
    cout << n << " " << m-1 << endl;
  }


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

#include <stdio.h>
#include <malloc.h>

int main()
{
	int* A = 0;
	int N = 0;
	int c = 0;
	scanf_s("%d",&N);
	A = (int*)malloc(sizeof(int) * N);
for (int i=0 ; i < N; i++)
	{
		scanf_s("%d", &A[i]);
	}
for (int j=0 ; j < N-1; j++)
{
	for (int k = j+1; k < N; k++)
	{
		if (A[j] == A[k]) c++;
	}
}

if(c>0)printf("YES");
else printf("NO");

    return 0;
}

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

#include<stdio.h>
int main(void){
	char S[],T[],U[];
    int A,B;
    
scanf("%s", &S);
scanf(" %s\n", &T);
scanf("%d", &A);
scanf(" %d\n", &B);
scanf("%s", &U);

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

printf("%d", A);
printf(" %d", B);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:14: error: array size missing in 'S'
    3 |         char S[],T[],U[];
      |              ^
main.c:3:18: error: array size missing in 'T'
    3 |         char S[],T[],U[];
      |                  ^
main.c:3:22: error: array size missing in 'U'
    3 |         char S[],T[],U[];
      |                      ^
Language: C++

#include <iostream>

using namespace std;

int main(int argc, char **argv)
{
    char S[10], T[10], U[10];
    int A, B;

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

    if (strcmp(S, U) == 0) cout << A - 1;
    else cout << B - 1;

    return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:12:9: error: 'strcmp' was not declared in this scope
   12 |     if (strcmp(S, U) == 0) cout << A - 1;
      |         ^~~~~~
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 |
Language: Java

import java.util.*;

public class Main{
  public static void main(String[]$){
    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();
    sc.close();
    Solve s = new Solve(s, t, u, a, b);
  }
}

class Solve{
  public Solve(String s, String t, String u, int a, int b){
    System.out.println(s.equals(u)?--a+" "+b:a+" "+--b);
  }
}

Compiler output:
Main.java:12: error: variable s is already defined in method main(String[])
    Solve s = new Solve(s, t, u, a, b);
          ^
Main.java:12: error: incompatible types: Solve cannot be converted to String
    Solve s = new Solve(s, t, u, a, b);
                        ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: C++

#include <vector>
#include <algorithm>
#include <math.h>
#include <functional>
#include <iomanip>
#include <bitset>
#include <numeric>
#include <queue>
#include <map>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
const long long mod = 1000000007;
typedef long long ll;
typedef pair<int, double> P;
const vector<int> di = {-1, 0, 1, 0};
const vector<int> dj = { 0, 1, 0, -1 };

int main() {
	
	string s, t, u;
	cin >> s >> t;
	int a, b;
	cin >> a >> b;
	cin >> u;

	if (u == s) a--;
	if (u == t) b--;

	cout << a << ' ' << b << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'cin' was not declared in this scope
   21 |         cin >> s >> t;
      |         ^~~
a.cc:10:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    9 | #include <map>
  +++ |+#include <iostream>
   10 | using namespace std;
a.cc:29:9: error: 'cout' was not declared in this scope
   29 |         cout << a << ' ' << b << endl;
      |         ^~~~
a.cc:29:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include<string>

int main(){
  std::string s;cin>>s;
  std::string ans="";
  
  for(int i=0;i<s.length();i++){
    ans=ans+"x";
  }
  std::cout<<ans<<std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   std::string s;cin>>s;
      |                 ^~~
      |                 std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>
#include<string>

int main(){
  std::string s;cin>>s;
  std::string ans="";
  
  for(int i=0;i<len(s);i++){
    ans=ans+"x";
  }
  std::cout<<ans<<std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   std::string s;cin>>s;
      |                 ^~~
      |                 std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:17: error: 'len' was not declared in this scope; did you mean 'mblen'?
    8 |   for(int i=0;i<len(s);i++){
      |                 ^~~
      |                 mblen
Language: C++

#include<iostream>
#include<string>

int main(){
  string s,t;
  int a,b;
  string u;
  
  std::cin>>s>>t;
  std::cin>>a>>b;
  std::cin>>u;
  
  if(s==u){
    --a;
  }else{
    --b;
  }
  
  std::cout<<a<<" "<<b<<std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s,t;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:9: error: expected ';' before 'u'
    7 |   string u;
      |         ^~
      |         ;
a.cc:9:13: error: 's' was not declared in this scope
    9 |   std::cin>>s>>t;
      |             ^
a.cc:9:16: error: 't' was not declared in this scope
    9 |   std::cin>>s>>t;
      |                ^
a.cc:11:13: error: 'u' was not declared in this scope
   11 |   std::cin>>u;
      |             ^
Language: C++

s,t = input().split()
a,b = map(int,input().split())
u = input()

if s==u:
    print(a-1,b)
else:
    print(a,b-1)

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

#include <bits/stdc++.h>
typedef long long ll;
#define rep(i,n) for(ll i = 0; i < (n); ++i )
#define rep_rev(n,i) for(ll i = n; i >= 0; --i )
using namespace std;
using P = pair<int, int>;
const long long INF = 1LL << 60;

int main(){
  int N,K; cin >> N >> K;
  vector<int> p(N);
  int idx[2];
  int t = 0;
  ll sum = 0;
  double ans = 0;
  rep(i,N){
    cin >> p[i];
    if(i == K-1){
      for(int j = 0; j < K; ++j) sum += p[j];
      if(t < sum){
        t = sum;
        idx[0] = 0;
        idx[1] = K-1;
      }
      sum -= p[0];
    }
    else if(i > K-1){
      sum += p[i];
      if(t < sum){
        t = sum;
        idx[0] = i-K+1;
        idx[1] = i;
      }
      sum -= p[i-K+1];
    }
  }
  for(int i = idx[0]; i <= idx[1]; ++i){
    int tmp = 0;
    rep(j,p[i]) tmp += j+1;
    ans += (double)tmp/(double)p[i];
  }
  cout << fixed << setprection(10) << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:20: error: 'setprection' was not declared in this scope
   42 |   cout << fixed << setprection(10) << ans << endl;
      |                    ^~~~~~~~~~~
Language: C

#include<stdio.h>
long long n,a[1000000000]={0},p,i,j;
int main(void)
{
	int f=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&p);
		a[p]++;
		if(a[p]>1){
			f=1;
			break;
		}
	}
	if(f==1){
		printf("NO\n");
	}
	else{
		printf("YES\n");
	}
	return 0;
}

Compiler output:
/tmp/ccFyN2MA.o: in function `main':
main.c:(.text+0x30): relocation truncated to fit: R_X86_64_PC32 against symbol `i' defined in .bss section in /tmp/ccFyN2MA.o
main.c:(.text+0x40): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccFyN2MA.o
main.c:(.text+0x5e): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccFyN2MA.o
main.c:(.text+0x8f): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccFyN2MA.o
main.c:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `i' defined in .bss section in /tmp/ccFyN2MA.o
main.c:(.text+0xc3): relocation truncated to fit: R_X86_64_PC32 against symbol `i' defined in .bss section in /tmp/ccFyN2MA.o
main.c:(.text+0xca): relocation truncated to fit: R_X86_64_PC32 against symbol `i' defined in .bss section in /tmp/ccFyN2MA.o
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
2 using namespace std;
3
4 int main(){
5 string S,T,U;
6 int A,B;
7 cin>>S>>T>>A>>B>>U;
8 if(S==U)A--;
9 else B--;
10 cout<<A<<"␣"<<B<<endl;

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 using namespace std;
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3
      | ^
Language: C++

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

int main(){
    string l, r;
    cin >> l >> r;
    int li, ri;
    cin >> li >> ri;
    string d;
    cin >> d;
    
    if (l == d){
        cout << li - 1 << " " << ri << endl;
    }else{
        cout << li << " "  << ri - 1 << endl;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:46: error: expected '}' at end of input
   16 |         cout << li << " "  << ri - 1 << endl;
      |                                              ^
a.cc:15:10: note: to match this '{'
   15 |     }else{
      |          ^
a.cc:16:46: error: expected '}' at end of input
   16 |         cout << li << " "  << ri - 1 << endl;
      |                                              ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string a,b,c;
  cin >> a >> b;
  int x,y;
  cin >> x >> y;
  cin >> c;
  if(strcmp(a,c)==0)
    x--;
  else if (strcmp(b,c)==0)
    y--;
  cout << x << y;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   10 |   if(strcmp(a,c)==0)
      |             ^
      |             |
      |             std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:12:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   12 |   else if (strcmp(b,c)==0)
      |                   ^
      |                   |
      |                   std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~