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

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:3:1: error: 'string' does not name a type
    3 | string s,t,u;
      | ^~~~~~
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:7:8: error: 's' was not declared in this scope
    7 |   cin>>s>>t>>a>>b>>u;
      |        ^
a.cc:7:11: error: 't' was not declared in this scope
    7 |   cin>>s>>t>>a>>b>>u;
      |           ^
a.cc:7:20: error: 'u' was not declared in this scope
    7 |   cin>>s>>t>>a>>b>>u;
      |                    ^
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout<<a<<' '<<b;
      |   ^~~~
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((strcmp(a,u))==0)
  {a=a-1;}
  if((strcmp(b,u)==0)
     {b=b-1;}
     printf("%d %d",&a,&b);
     
     }
     


Compiler output:
main.c: In function 'main':
main.c:14:14: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   14 |   if((strcmp(a,u))==0)
      |              ^
      |              |
      |              int
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:16:14: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   16 |   if((strcmp(b,u)==0)
      |              ^
      |              |
      |              int
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:16:22: error: expected ')' before '{' token
   16 |   if((strcmp(b,u)==0)
      |     ~                ^
      |                      )
   17 |      {b=b-1;}
      |      ~                
main.c:20:6: error: expected expression before '}' token
   20 |      }
      |      ^
Language: C

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

Compiler output:
main.c:4:11: error: expected ')' before '&' token
    4 | scanf(s,t,&s[],&t[]);
      |           ^
      |           )
main.c:5:13: error: expected ')' before '&' token
    5 | scanf(ss,tt,&ss,&tt);
      |             ^
      |             )
main.c:6:9: error: expected ')' before '&' token
    6 | scanf(u,&u[]);
      |         ^
      |         )
main.c:8:1: error: expected identifier or '(' before 'if'
    8 | if(u[]=s[]){
      | ^~
main.c:12:1: error: expected identifier or '(' before 'if'
   12 | if(u[]=t[]){
      | ^~
Language: C++

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


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

#include<iostream>
#include <string>
char S[11], T[11], U[11];
int Count[2];
int main(){
    std::cin >> S >> T >> Count[0] >> Count[1] >> U;
    if(strcmp(S, U)==0){
        if(Count[0]>0) Count[0]--;
    }else if(strcmp(T, U)==0){
        if(Count[1]>0) Count[1]--;
    }
    std::cout << Count[0] << " " <<Count[1] << "\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'strcmp' was not declared in this scope
    7 |     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 | #include <string>
Language: C++

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

int main(){
    string S, T, U;
    int A, B;
    cin >> S >> T >> A >> B >> U;

    if(U == S && U == T){
        cout << A - 1 << " " << B - 1 << endl;
    }
    else if(U == S){
        cout << A - 1 << " " << B << endl;
    }
    else{
        cout << A << " " << B - 1 << endl;
    }
    return 0;
}
    return 0;
}

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

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

int main(void)
{
	string s, t, u;
	int a, b;
	cin >> s >> t >> a >> b >> u;
	if (s.find(u) != -1) a--;
	if (t.find(u) != -1) b--;
	cout << a << " " << b;
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: string : No such file or directory
    2 | #include <string >
      |          ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;

public class A {
  public static void main(String[] args) {
    Scanner sc = new java.util.Scanner(System.in);
    String[] st = sc.nextLine().split(" ");
    String S = st[0];
    String T = st[1];
    String[] times = sc.nextLine().split(" ");
    int A = Integer.parseInt(times[0]);
    int B = Integer.parseInt(times[1]);
    String U = sc.nextLine();
    if (S.equals(U)) {
      A -= 1;
    } else if (T.equals(U)) {
      B -= 1;
    }
    System.out.println(A + " " + B);
  }
}


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>
int main(){
  int a,b;
  char s[10],t[10],u[10];
  cin>>s;
  cin>>t;
  cin>>a>>b;
  cin>>u;
  if(strcmp(u,s)==0){
    a--;
  }
  if(strcmp(u,t)==0){
  	b--;
  }
  cout<<a<<" "<<b;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   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++

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


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

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

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

    system("pause");
    return 0;

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:28:14: error: expected '}' at end of input
   28 |     return 0;
      |              ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

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

int main() {
	cin >> S >> T;
	cin >> A >> B;
	cin >> U;

	if (S == U) {
		A--;
	}if (U == T) {
		B--;
	}
	cout << A << B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'S' was not declared in this scope
    5 |         cin >> S >> T;
      |                ^
a.cc:5:21: error: 'T' was not declared in this scope
    5 |         cin >> S >> T;
      |                     ^
a.cc:6:16: error: 'A' was not declared in this scope
    6 |         cin >> A >> B;
      |                ^
a.cc:6:21: error: 'B' was not declared in this scope
    6 |         cin >> A >> B;
      |                     ^
a.cc:7:16: error: 'U' was not declared in this scope
    7 |         cin >> U;
      |                ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |         for (int i=0;i<s.size;i++)
      |                        ~~^~~~
      |                              ()
Language: C++

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

int sum(int n) {
  string S, T, U;
  int s, t;
  cin >> S >> T >> s >> t >> U;
  
  if (U == S)
    cout << s-- << " " << t << endl;
  else
    cout << s << " " << t-- << endl;
}

Compiler output:
a.cc: In function 'int sum(int)':
a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
   13 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
	string s, t,u;
	int a, b;

	if (u == s) {
		a = a - 1;
	}
	else {
		b = b - 1;
	}
	cout << a, " ", b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |         cout << a, " ", b << endl;
      |                         ~~^~~~~~~
Language: C

#include <stdio.h>
#include <string.h>
int main()
{
	char str1[10];
	char str2[10];
	scanf("%s %s",str1,str2);
	int a,b;
	scanf("%d%d",&a,&b);
	char str[10];
	scanf("%s",str);
	if(strcmp(str,str1)==0) printf("%d %d",a-1,b);
	else printf("%d %d",a,b-1);re
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:36: error: 're' undeclared (first use in this function)
   13 |         else printf("%d %d",a,b-1);re
      |                                    ^~
main.c:13:36: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:38: error: expected ';' before 'return'
   13 |         else printf("%d %d",a,b-1);re
      |                                      ^
      |                                      ;
   14 |         return 0;
      |         ~~~~~~
Language: Java

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

  String s = scanner.next();
  String t = scanner.next();
  int a = scanner.nextInt();
  int b = scanner.nextInt();
  String u = scanner.next();

  if (u.equals(s)) {
    a--;
  }
  if (u.equals(t)) {
    b--;
  }

  System.out.println(a + " " + b);
}

Compiler output:
Main.java:1: 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: C++

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

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   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 | #include(iostream)
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout<< A-1 << " " << B <<endl;
      |     ^~~~
a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:30: error: 'endl' was not declared in this scope
    7 |     cout<< A-1 << " " << B <<endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(iostream)
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout<< A << " " << B-1 <<endl;
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:30: error: 'endl' was not declared in this scope
   10 |     cout<< A << " " << B-1 <<endl;
      |                              ^~~~
a.cc:10:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:12:11: error: expected ';' before '}' token
   12 |   return 0
      |           ^
      |           ;
   13 | }
      | ~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string.h>
int main(){
  int a,b;
  char s[10],t[10],u[10];
  cin>>s;
  cin>>t;
  cin>>a>>b;
  cin>>u;
  if(strcmp(u,s)==0){
    a--;
  }
  if(strcmp(u,t)==0){
  	b--;
  }
  cout<<a<<" "<<b;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   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:18:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |   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++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: expected primary-expression before '<<' token
   19 |   cout << A << << ' ' << B << endl;
      |                ^~
Language: Java

import java.util.Scanner;

public class HelloWorld {
    public static void main(String[] args) {
      Scanner scan = new Scanner(System.in);
	  String S = scan.next();
      String T = scan.next();
      int A = scan.nextInt();
      int B = scan.nextInt();
      String U = scan.next();
      
      if(U=S){
        A = A-1;
      }else if(U=T){
        B = B-1;
      }
      
      System.out.println(A+" "+B);
      
    }
}

Compiler output:
Main.java:3: error: class HelloWorld is public, should be declared in a file named HelloWorld.java
public class HelloWorld {
       ^
Main.java:12: error: incompatible types: String cannot be converted to boolean
      if(U=S){
          ^
Main.java:14: error: incompatible types: String cannot be converted to boolean
      }else if(U=T){
                ^
3 errors
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		String T = sc.nextLine();
		int A = sc.nextInt();
		int B = sc.nextInt();
		String U = sc.nextLine();
		
		if(U.equals(S)){
			A = A - 1;
		}
		elseif(U.equals(T)){
			B = B - 1;
		}
		
		System.out.println(A B);
	}
}


Compiler output:
Main.java:14: error: ';' expected
		elseif(U.equals(T)){
		                   ^
Main.java:18: error: ')' or ',' expected
		System.out.println(A B);
		                    ^
Main.java:18: error: not a statement
		System.out.println(A B);
		                     ^
Main.java:18: error: ';' expected
		System.out.println(A B);
		                      ^
4 errors
Language: Java

import java.util.*;


public class DiagonalDifference {
  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)) {
      A--;
    } else {
      B--;
      System.out.println(A + " " + B);
    }
  }
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> s >> t;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << a << " " << b << endl;
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:30: error: 'endl' was not declared in this scope
   15 |     cout << a << " " << b << endl;
      |                              ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <string>
  +++ |+#include <ostream>
    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("%d %d",&a,&b);
  gets(u);
  if((strcmp(a,u))==0)
  {a=a-1;}
  if((strcmp(b,u)==0)
     {b=b-1;}
     printf("%d %d",&a,&b);
     
     }
     

Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |   gets(s);
      |   ^~~~
      |   fgets
main.c:11:14: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   11 |   if((strcmp(a,u))==0)
      |              ^
      |              |
      |              int
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:13:14: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   13 |   if((strcmp(b,u)==0)
      |              ^
      |              |
      |              int
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:13:22: error: expected ')' before '{' token
   13 |   if((strcmp(b,u)==0)
      |     ~                ^
      |                      )
   14 |      {b=b-1;}
      |      ~                
main.c:17:6: error: expected expression before '}' token
   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 == str1){
    num[0]--;
  }
  else{
    num[1]--;
  }
  cout << num[0] << " " << num[1] << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:19:43: error: expected '}' at end of input
   19 |   cout << num[0] << " " << num[1] << endl;
      |                                           ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

int main(){
string S,T,X;
int a,b;
cin >> S>>T;
cin >> a >> b;
cin >> X;
if(S==X){
  cout << a-1 << ' ' << b << endl;
}else {
  cout << a << ' ' << b-1 << endl;
}
}

Compiler output:
a.cc:2:9: fatal error: strings: No such file or directory
    2 | #include<strings>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio>
#include <string>

using namespace std;

int main(void){
  int A,B;
  char S,T,U;
  cin >> S >> T >> A >> B >> U;
  if(S == U)
    cout << A-1 << " " << B << endl;
  else
    cout << A << " " << B-1 <<endl;
    
  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   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 | 
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << A-1 << " " << B << endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:32: error: 'endl' was not declared in this scope
   11 |     cout << A-1 << " " << B << endl;
      |                                ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 | 
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << A << " " << B-1 <<endl;
      |     ^~~~
a.cc:13:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:31: error: 'endl' was not declared in this scope
   13 |     cout << A << " " << B-1 <<endl;
      |                               ^~~~
a.cc:13:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <cstdio>

int main()
{
    char S[128];
    char T[128];
    scanf("%s %s", S, T);

    int A, B;
    scanf("%d %d", &A, &B);

    char U[128];
    scanf("%s", U);

    if (strcmp(S, U) == 0)
    {
        --A;
    }
    else {
        --B;
    }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'strcmp' was not declared in this scope
   15 |     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 <cstdio>
  +++ |+#include <cstring>
    2 |
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:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:12: error: expected primary-expression before 'S'
    5 |     string S, T;
      |            ^
a.cc:5:12: error: expected '}' before 'S'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin >> S >> T;
      |     ^~~
a.cc:8:5: error: 'cin' does not name a type
    8 |     cin >> A >> B;
      |     ^~~
a.cc:10:5: error: 'cin' does not name a type
   10 |     cin >> U;
      |     ^~~
a.cc:11:5: error: expected unqualified-id before 'if'
   11 |     if(U == S){
      |     ^~
a.cc:14:5: error: expected unqualified-id before 'else'
   14 |     else{
      |     ^~~~
a.cc:17:5: error: 'cout' does not name a type
   17 |     cout << A << " " << B << endl;
      |     ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

s, t = gets.chomp.split
a, b = gets.split.map(&:to_i)
u = gets.chomp

if u == s
  a = a - 1
else
  b = b - 1
end

puts [a, b].join(' ')


Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s, t = gets.chomp.split
      | ^
Language: C

#include <bits/stdc++.h>
char s[10],t[10],u[10];
int ss=0,tt=0;

scanf(s,t,&s[],&t[]);
scanf(ss,tt,&ss,&tt);
scanf(u,&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:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

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();
        int A = sc.nextInt();
        int B = sc.nextInt();
        String U = sc.next();
        
        if(U.equals(S)){
          A--;
        }else{
          B--;
        System.out.println(A + " " + B);
    }
}

Compiler output:
Main.java:20: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;

public class TEST_MAIN {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		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)) {
			a--;
		} else {
			b--;
		}

		System.out.println(a + " " + b);
	}
}


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

s,t=list(map(str,input().split()))
a,b=list(map(int,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=list(map(str,input().split()))
      | ^
Language: C++

#include <string>
#include <vector>

using namespace std;

int main(){
    
  vector<string> name(2);
  for(int i = 0; i < 2 ; i++){
    cin >> name[i];
  }
  
  
  vector<int> n(2);
  for(int i = 0; i < 2 ; i++){
    cin >> n[i];
  }

  string s;
  
  if(s == name[0]){
    n[0]--;
  } else {
    n[1]--;
  }
  
  cout << n[0] << " " << n[1] << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope
   10 |     cin >> name[i];
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <vector>
  +++ |+#include <iostream>
    3 | 
a.cc:16:5: error: 'cin' was not declared in this scope
   16 |     cin >> n[i];
      |     ^~~
a.cc:16:5: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:3: error: 'cout' was not declared in this scope
   27 |   cout << n[0] << " " << n[1] << endl;
      |   ^~~~
a.cc:27:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:34: error: 'endl' was not declared in this scope
   27 |   cout << n[0] << " " << n[1] << endl;
      |                                  ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <vector>
  +++ |+#include <ostream>
    3 |
Language: C++

S, T = map(str, input().split())
A, B = map(int, input().split())
U = input()

if S==U:
    A-=1
else:
    B-=1
    

print("{} {}".format(A, B))

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

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String Red=sc.next();
    String Blue=sc.next();
    int N=sc.nextInt();
    int M=sc.nextInt();
    String Ball=sc.next();
    
    if(Ball.equals(Red)) System.out.print(N-1+" "+M);
    if(Ball.equals(Blue)) System.out.print(N+" "+M-1);
  }
}


Compiler output:
Main.java:13: error: bad operand types for binary operator '-'
    if(Ball.equals(Blue)) System.out.print(N+" "+M-1);
                                                  ^
  first type:  String
  second type: int
1 error
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:6: error: cannot find symbol
    String s = sc.nextString();
                 ^
  symbol:   method nextString()
  location: variable sc of type Scanner
Main.java:7: error: cannot find symbol
    String t = sc.nextString();
                 ^
  symbol:   method nextString()
  location: variable sc of type Scanner
Main.java:10: error: cannot find symbol
    String u = sc.nextString();
                 ^
  symbol:   method nextString()
  location: variable sc of type Scanner
3 errors
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

long long INF=9999999999;
int main(void){
    int n,ans=0;
    string a[2];
    cin>>a[0],a[1];
    int b[2];
    cin>>b[0],b[1];
    string c;
    cin>>c;
    for(int i=0,i<2,i++){
        if(c.equal(a[i]))b[i]--;
    }


    cout<<b[0]<<" "<<b[1]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: expected ';' before '<' token
   15 |     for(int i=0,i<2,i++){
      |                  ^
      |                  ;
a.cc:15:18: error: expected primary-expression before '<' token
a.cc:15:24: error: expected ';' before ')' token
   15 |     for(int i=0,i<2,i++){
      |                        ^
      |                        ;
a.cc:16:14: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'equal'
   16 |         if(c.equal(a[i]))b[i]--;
      |              ^~~~~
Language: C++

import sys
input = sys.stdin.readline

color = input().split()
a = list(map(int, input().split()))
c = input().strip()
for i, color in enumerate(color):
    if color == c:
        a[i] -= 1

a = list(map(str, a))
print(' '.join(a))

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String a = sc.next();
			String b = sc.next();
			int na = sc.nextInt();
			int nb = sc.nextInt();
			String c = sc.next();
			if (a.equals(c)) {
				System.out.print(na - 1 + " " + nb);
			} else {
				nb = nb - 1;
				System.out.print(na + " " + nb);
			}
		}
	}

}


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

#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;


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

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

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

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: 'strcmp' was not declared in this scope
   18 |     if(strcmp(U, S) == 0){
      |        ^~~~~~
a.cc:4:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <vector>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include<iostream>
#include<cmath>

using namespace std;

int main(){
	char a[100],b[100],c[100];
	int n,m;
	cin >> a >> b;
	cin >> n >> m;
	cin >> c;
	if(strcmp(a,c)==0) n--;
	if(strcmp(b,c)==0) m--;
	cout << n << " " <<m <<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'strcmp' was not declared in this scope
   12 |         if(strcmp(a,c)==0) n--;
      |            ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<cmath>
  +++ |+#include <cstring>
    3 | 
a.cc:13:12: error: 'strcmp' was not declared in this scope
   13 |         if(strcmp(b,c)==0) m--;
      |            ^~~~~~
a.cc:13:12: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++


#include<bits/stdc++.h>


#define MOD 1000000007
#define debug(x) cout<<"x :"<<x<<endl;
//#define case(t,ans) cout<<"Case #"<<t<<": "<<ans<<endl;
#define REP(i,a,b) for (int i = a; i <= b; i++)
#define for_it(it,s) for (auto it = s.begin(); it != s.end(); it++)
#define for_each(r,s) for(auto r:s)

#define all(s) s.begin(),s.end()
#define rall(s) s.end(),s.begin()
#define F first
#define S second
#define PB push_back
#define pb pop_back
#define EB emplace_back
#define pf push_front

#define fill0(arr) memset(arr,0,sizeof(arr))
#define filln(arr) memset(arr,-1,sizeof(arr))
#define MP make_pair
#define vi vector<int>
#define vll vector<ll>
#define vf vector<float>
#define vd vector<ld>
#define precision(x) cout<<fixed<<setprecision((x));
 


#define pi pair<int,int> 
#define ll long long 
#define ld long double
#define endl "\n"
//typedef long long ll;
//typedef vector<int> vi;
//typedef pair<int,int> pi;
//sort(a, a+n);
//reverse(a, a+n);
//random_shuffle(a, a+n);

const ll mod=1e9 + 7;




# define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
# define trace1(x)                cerr << #x << ": " << x << "\n";
# define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << "\n";
# define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << "\n";
# define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << "\n";


#define case(i) cout<<"Case "<<i<<": ";
using namespace std;


template<typename T>
T gcd(T u, T v)
{
    return u%v==0?v:gcd(v,u%v);
}




void solve();
int main(){
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll t=1;
    //cin>>t;
    clock_t launch=clock();
    for(ll i=1;i<=t;i++)
    {
       // case(i);
        solve();
    }
  
  
     clog<<((long double)(clock()-launch)/CLOCKS_PER_SEC)<<"\n";
    // cerr<<"error is good"<<endl;
    return 0;
}

void solve()
{
   //code
	string s,t;
	cin>>s>>t;

	int a,b;
	cin>>a>>b;

	string u;
	cin>>u;

	if(strcmp(s,u)==0)
	{
		cout<<a-1<<" "<<b<<endl;
	}
	else
	{
		cout<<a<<" "<<b-1<<endl;
	}
}




Compiler output:
a.cc: In function 'void solve()':
a.cc:105:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
  105 |         if(strcmp(s,u)==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:2:
/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)
      |                    ~~~~~~~~~~~~^~~~
Language: C++

import java.util.Scanner;

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

		if (U.contentEquals(S)) {
			A -= 1;
		} else {
			B -= 1;
		}
		System.out.println(A + " " + B);
	}
}

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

#include "stdafx.h"
#include <bits/stdc++.h>
#define f(i,n) for(int i=0;i<n;i++)
#define P pair<int,int>
#define S second
using namespace std;
map<int, int> m;
signed main() {
	string s, t, u;
	int a, b;
	cin >> s >> t >> a >> b >> u;
	if (s == u)cout << a - 1 << " " << b << endl;
	else cout << a << " " << b - 1 << endl;
}

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

using namespace std;
int main(void) {
	
	string S, T;
	int A, B;
	string U;

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

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

	cout << A << " " << B;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
    4 |         string S, T;
      |         ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:6:15: error: expected ';' before 'U'
    6 |         string U;
      |               ^~
      |               ;
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         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 | using namespace std;
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: 'cout' was not declared in this scope
   13 |         cout << A << " " << B;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

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

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

}

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

#include<bits/stdc++.h>
using namespace std;
#defien ll long long int
char s1[10000000];
char s2[10000000];
char s3[10000000];
int main()
{
    ll test,n,i,j,ki,l,m,n;
    cin>>s1>>s2;
    cin>>m>>n;
    cin>>s3;
    if(strcmp(s1,s3)==0)
    {
        cout<<m-1<<" "<<n;
    }
    else cout<<m<<" "<<n-1;
    return 0;
}


Compiler output:
a.cc:3:2: error: invalid preprocessing directive #defien; did you mean #define?
    3 | #defien ll long long int
      |  ^~~~~~
      |  define
a.cc: In function 'int main()':
a.cc:9:5: error: 'll' was not declared in this scope
    9 |     ll test,n,i,j,ki,l,m,n;
      |     ^~
a.cc:11:10: error: 'm' was not declared in this scope; did you mean 'tm'?
   11 |     cin>>m>>n;
      |          ^
      |          tm
a.cc:11:13: error: 'n' was not declared in this scope; did you mean 'yn'?
   11 |     cin>>m>>n;
      |             ^
      |             yn
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m;
	map<string,int>mp;
	string s,ss,t;
	int a,b;
	cin>>s>>t>>a>>b;
	mp[s]=a;
	mp[t]=b;
	cin>>ss;
	mp[ss]--;
	cout<<mp[s]<<" "<<mp[t]<<endl;
 	return 0;
}
1

Compiler output:
a.cc:17:1: error: expected unqualified-id before numeric constant
   17 | 1
      | ^
Language: Java

import java.util.*;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s1 = sc.nextLine().split(" ");
        int a = sc.nextInt();
        int b = sc.nextInt();
        String next = sc.next();

        a = s1[0].equals(next) ? a - 1 : a;
        b = s1[1].equals(next) ? b - 1 : b;
        System.out.println(a + " " + b);
    }
}

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>
int main() {
    string s, t,u;
    int a, b;
    cin >> s >> t >> a >> b >> 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:3:5: error: 'string' was not declared in this scope
    3 |     string s, t,u;
      |     ^~~~~~
a.cc:3:5: 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:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> s >> t >> a >> b >> u;
      |     ^~~
      |     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:5:12: error: 's' was not declared in this scope
    5 |     cin >> s >> t >> a >> b >> u;
      |            ^
a.cc:5:17: error: 't' was not declared in this scope
    5 |     cin >> s >> t >> a >> b >> u;
      |                 ^
a.cc:5:32: error: 'u' was not declared in this scope
    5 |     cin >> s >> t >> a >> b >> u;
      |                                ^
a.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout << a - 1 << " " << b;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout << a << " " << b - 1;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'string' was not declared in this scope
    2 |     string s , t , u;
      |     ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> s >> t;
      |     ^~~
a.cc:4:12: error: 's' was not declared in this scope
    4 |     cin >> s >> t;
      |            ^
a.cc:4:17: error: 't' was not declared in this scope
    4 |     cin >> s >> t;
      |                 ^
a.cc:6:12: error: 'u' was not declared in this scope
    6 |     cin >> u;
      |            ^
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << a-1 << " " <<  b << endl;
      |         ^~~~
a.cc:8:37: error: 'endl' was not declared in this scope
    8 |         cout << a-1 << " " <<  b << endl;
      |                                     ^~~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << a << " " << b-1 << endl;
      |         ^~~~
a.cc:11:36: error: 'endl' was not declared in this scope
   11 |         cout << a << " " << b-1 << endl;
      |                                    ^~~~
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: expected ';' before ':' token
   16 |     B--:
      |        ^
      |        ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  	string a, b;
  	int na, ab;
  	string u;
	cin >> a >> b;
  	cin >> na >> nb;
  	cin >> u;
  	if(a == u){
		cout << na-1 << ' ' << nb;
    }else {
		cout << na << ' ' << nb;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'nb' was not declared in this scope; did you mean 'ab'?
    8 |         cin >> na >> nb;
      |                      ^~
      |                      ab
Language: C++

#include "pch.h"
#include <iostream>
#include <vector>
#include <string>
using namespace std;

int main()
{
  string s, t, u;
	int n, m;
	cin >> s >> t;
	cin >> n >> m;
  cin >> u;
  
  if(u == s){
    cout << n-1 << endl;
  }else{
    cout << m-1 << endl;
  }
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.