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

#include <bits/stdc++.h>
using namespace usd;
int main() {

  int a,b;
  string t,u;
  cin >> t >> u>>a>>b;
  string c;
  cin >> c;
  if(t==c)a--;
  if(u==c)b--;
  cin >> a >> ' ' >> b >> endl;
}


Compiler output:
a.cc:2:17: error: 'usd' is not a namespace-name
    2 | using namespace usd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string t,u;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> t >> u>>a>>b;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:10: error: 't' was not declared in this scope
    7 |   cin >> t >> u>>a>>b;
      |          ^
a.cc:7:15: error: 'u' was not declared in this scope
    7 |   cin >> t >> u>>a>>b;
      |               ^
a.cc:8:9: error: expected ';' before 'c'
    8 |   string c;
      |         ^~
      |         ;
a.cc:9:10: error: 'c' was not declared in this scope
    9 |   cin >> c;
      |          ^
a.cc:12:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |   cin >> a >> ' ' >> b >> endl;
      |                           ^~~~
      |                           std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string>
using namespace std;
int main() {

  int a,b;
  string t,u;
  cin >> t >> u>>a>>b;
  string c;
  cin >> c;
  if(t==c)a--;
  if(u==c)b--;
  cin >> a >> ' ' >> b >> endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> t >> u>>a>>b;
      |   ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <string>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:14:27: error: 'endl' was not declared in this scope
   14 |   cin >> a >> ' ' >> b >> endl;
      |                           ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include <string>
  +++ |+#include <ostream>
    4 | using namespace std;
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string>
using namespace usd;
int main() {

  int a,b;
  string t,u;
  cin >> t >> u>>a>>b;
  string c;
  cin >> c;
  if(t==c)a--;
  if(u==c)b--;
  cin >> a >> ' ' >> b >> endl;
}


Compiler output:
a.cc:4:17: error: 'usd' is not a namespace-name
    4 | using namespace usd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string t,u;
      |   ^~~~~~
a.cc:8:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from a.cc:3:
/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:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> t >> u>>a>>b;
      |   ^~~
a.cc:9:10: error: 't' was not declared in this scope
    9 |   cin >> t >> u>>a>>b;
      |          ^
a.cc:9:15: error: 'u' was not declared in this scope
    9 |   cin >> t >> u>>a>>b;
      |               ^
a.cc:10:9: error: expected ';' before 'c'
   10 |   string c;
      |         ^~
      |         ;
a.cc:11:10: error: 'c' was not declared in this scope
   11 |   cin >> c;
      |          ^
a.cc:14:27: error: 'endl' was not declared in this scope
   14 |   cin >> a >> ' ' >> b >> endl;
      |                           ^~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
using namespace usd;
int main() {

  int a,b:
  string t,u;
  cin >> t >> u>>a>>b;
  string c;
  cin >> c;
  if(t==c)a--;
  if(u==c)b--;
  cin >> a >> ' ' >> b >> endl;
}

Compiler output:
a.cc:3:17: error: 'usd' is not a namespace-name
    3 | using namespace usd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:6:10: error: found ':' in nested-name-specifier, expected '::'
    6 |   int a,b:
      |          ^
      |          ::
a.cc:6:9: error: 'b' has not been declared
    6 |   int a,b:
      |         ^
a.cc:7:10: error: qualified-id in declaration before 't'
    7 |   string t,u;
      |          ^
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> t >> u>>a>>b;
      |   ^~~
a.cc:8:10: error: 't' was not declared in this scope
    8 |   cin >> t >> u>>a>>b;
      |          ^
a.cc:8:15: error: 'u' was not declared in this scope
    8 |   cin >> t >> u>>a>>b;
      |               ^
a.cc:8:21: error: 'b' was not declared in this scope
    8 |   cin >> t >> u>>a>>b;
      |                     ^
a.cc:9:3: error: 'string' was not declared in this scope; did you mean 'stdin'?
    9 |   string c;
      |   ^~~~~~
      |   stdin
a.cc:10:10: error: 'c' was not declared in this scope
   10 |   cin >> c;
      |          ^
a.cc:13:27: error: 'endl' was not declared in this scope
   13 |   cin >> a >> ' ' >> b >> endl;
      |                           ^~~~
Language: C

include<stdio.h>

int main(void){

int a,b,i=0,j=0,flagone=0,flagtwo=0;

char s[10],t[10],u[10];

scanf("%s %s",&s,&t);

scanf("%d %d",&a,&b);

scanf("%s",&u);

while(s[i]!='\0'&&u[i]!='\0'){
  if(s[i]!=u[i]){
    flagone=1;
    break;
  }else{
    i++;
  }
}

while(t[j]!='\0'&&u[j]!='\0'){
  if(t[j]!=u[j]){
    flagtwo=1;
    break;
  }else{
    j++;
  }
}

if(flagone==0){printf("%d %d",a-1,b);}
if(flagtwo==0){printf("%d %d",a,b-1);}

return 0;

}


Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define mp make_pair
#define pb(x) push_back(x)
#define vi vector<int>
#define vs vector<string>
#define vll vector<long long>
#define vc vector<char>
#define vs vector<string>
#define pii pair<int, int>
#define pll pair<long long, long long>
#define pil pair<int, long long>
#define pli pair<long long, int>
#define pcc pair<char, char>
#define pdd pair<double, double>
#define mll map<long long, long long>
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
#define flsh fflush(stdout)
#define gcd __gcd
#define clr(x) memset(x, 0, sizeof(x))
#define mod 1000000007LL
#define mod2 998244353LL
#define INF 1000000000007
 

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> o_tree;


void solve()
{
    string s,t;
    ll a,b;
    cin>>s>>t>>a>>b;
    string ss;
    cin>>ss;
    a-=(ss==s);
    b-=(ss=t);
    cout<<a<<" "<<b<<"\n";
}


int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);


if (fopen("input.txt","r" ))
  {
     freopen("input.txt", "r", stdin);
     freopen("output.txt", "w", stdout);
  }
cout<<setprecision(20);


ll t=1;


// cin>>t;


while(t--)
{
solve();
} 


return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:44:6: error: no match for 'operator-=' (operand types are 'll' {aka 'long long int'} and 'std::__cxx11::basic_string<char>')
   44 |     b-=(ss=t);
      |     ~^~~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:13:6: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   13 |   if(strcmp(s,u)==0)
      |      ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(void)
main.c:15:23: error: expected ';' before 'b'
   15 |   else(strcmp(t,u)==0)
      |                       ^
      |                       ;
   16 |     b--;
      |     ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:6: error: 'strcmp' was not declared in this scope
   13 |   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<stdio.h>
  +++ |+#include <cstring>
    2 | int main(void)
Language: C

#include<stdio.h>
int main()
{
	int a,b;
	cher x[11];
	scanf("%d %d",&a,&b);
	scanf("%s",x);
	if(x[0]=='r') printf("%d %d",a-1,b);
	else printf("%d %d",a,b-1);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name 'cher'; did you mean 'char'?
    5 |         cher x[11];
      |         ^~~~
      |         char
Language: C++

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


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclucde; did you mean #include?
    1 | #inclucde<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string S,T,U;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inclucde<bits/stdc++.h>
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 | #inclucde<bits/stdc++.h>
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:9:3: error: 'cout' was not declared in this scope
    9 |   cout << A << " " << B << endl;
      |   ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:28: error: 'endl' was not declared in this scope
    9 |   cout << A << " " << 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 | #inclucde<bits/stdc++.h>
Language: C++

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclucde; did you mean #include?
    1 | #inclucde<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string S,T,U;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inclucde<bits/stdc++.h>
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 | #inclucde<bits/stdc++.h>
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:9:3: error: 'cout' was not declared in this scope
    9 |   cout << A << " " << B << end;
      |   ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:28: error: 'end' was not declared in this scope
    9 |   cout << A << " " << B << end;
      |                            ^~~
a.cc:1:1: note: 'std::end' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
  +++ |+#include <iterator>
    1 | #inclucde<bits/stdc++.h>
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string a,b,c;
  int d,e;
  cin>>a>>b>>d>>e>>c;
  cout<<(a==c? d-1 e : d e-1)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ':' before 'e'
    7 |   cout<<(a==c? d-1 e : d e-1)<<endl;
      |                   ^~
      |                   :
a.cc:7:22: error: found ':' in nested-name-specifier, expected '::'
    7 |   cout<<(a==c? d-1 e : d e-1)<<endl;
      |                      ^
      |                      ::
a.cc:7:20: error: 'e' is not a class, namespace, or enumeration
    7 |   cout<<(a==c? d-1 e : d e-1)<<endl;
      |                    ^
a.cc:7:25: error: expected ')' before 'e'
    7 |   cout<<(a==c? d-1 e : d e-1)<<endl;
      |         ~               ^~
      |                         )
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string a,b,c;
  int d,e;
  cin>>a>>b>>d>>e>>c;
  cout<<(a==c? d-1 e:d e-1)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ':' before 'e'
    7 |   cout<<(a==c? d-1 e:d e-1)<<endl;
      |                   ^~
      |                   :
a.cc:7:21: error: found ':' in nested-name-specifier, expected '::'
    7 |   cout<<(a==c? d-1 e:d e-1)<<endl;
      |                     ^
      |                     ::
a.cc:7:20: error: 'e' is not a class, namespace, or enumeration
    7 |   cout<<(a==c? d-1 e:d e-1)<<endl;
      |                    ^
a.cc:7:23: error: expected ')' before 'e'
    7 |   cout<<(a==c? d-1 e:d e-1)<<endl;
      |         ~             ^~
      |                       )
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected ';' before 'b'
   16 |   else(t==u)
      |             ^
      |             ;
   17 |     b-=1;
      |     ~
Language: C++

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

int main() {
string S,T,U;
cin >> S>>T;
int a,b;cin>>a>>b>>U;
if(strcmp(S,U)==0) {cout<<a-1<<b<<endl;}else {cout<<a<<b-1<<endl;}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    8 | if(strcmp(S,U)==0) {cout<<a-1<<b<<endl;}else {cout<<a<<b-1<<endl;}
      |           ^
      |           |
      |           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)
      |                    ~~~~~~~~~~~~^~~~
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)){System.out.println(A-1 +" "+B);}
    else{System.out.println(A +" "+B-1);}
  }
}

Compiler output:
Main.java:11: error: bad operand types for binary operator '-'
    else{System.out.println(A +" "+B-1);}
                                    ^
  first type:  String
  second type: int
1 error
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 
  B--;
 cout<<A<<"␣"<<B<<endl;
 }

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

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'red' was not declared in this scope; did you mean 'read'?
    8 |     if(u==red) cout << a-1 <<endl;
      |           ^~~
      |           read
Language: C++

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

int main () {
  string S, T;
  int s, t;
  string A;
  cin >> S >> T >> s >> t >> A

  if (S == A) {
    cout << s - 1 << endl;
  }
  else if (T == A) {
    cout << t - 1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: expected ';' before 'if'
    8 |   cin >> S >> T >> s >> t >> A
      |                               ^
      |                               ;
    9 | 
   10 |   if (S == A) {
      |   ~~                           
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else if (T == A) {
      |   ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: conflicting declaration 'int a'
    5 |   int a , b; cin>>a>>b;
      |       ^
a.cc:4:10: note: previous declaration as 'std::string a'
    4 |   string a , b , c;
      |          ^
a.cc:5:11: error: conflicting declaration 'int b'
    5 |   int a , b; cin>>a>>b;
      |           ^
a.cc:4:14: note: previous declaration as 'std::string b'
    4 |   string a , b , c;
      |              ^
a.cc:8:12: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
    8 |     cout<<a--<<" "<<b<<endl;
      |           ~^~
a.cc:9:23: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
    9 |   else cout<<a<<" "<<b--<<endl;
      |                      ~^~
Language: C

#include <stdio.h>

int main(void)
{
        int a,b;
        char s[11],[11],u[11];

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

        if(u==s) a--;
        else if(u==t) b--;
        printf("%d %d\n",a,b);
        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:20: error: expected identifier or '(' before '[' token
    6 |         char s[11],[11],u[11];
      |                    ^
main.c:8:24: error: 't' undeclared (first use in this function)
    8 |         scanf("%s%s",s,t);
      |                        ^
main.c:8:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:20: error: 'u' undeclared (first use in this function)
   10 |         scanf("%s",u);
      |                    ^
Language: C++

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




Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'string' was not declared in this scope
    3 |         string s;
      |         ^~~~~~
a.cc:4:15: error: expected ';' before 't'
    4 |         string t;
      |               ^~
      |               ;
a.cc:5:15: error: expected ';' before 'u'
    5 |         string u;
      |               ^~
      |               ;
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin >> s >> t;
      |         ^~~
a.cc:9:16: error: 's' was not declared in this scope
    9 |         cin >> s >> t;
      |                ^
a.cc:9:21: error: 't' was not declared in this scope
    9 |         cin >> s >> t;
      |                     ^
a.cc:11:16: error: 'u' was not declared in this scope
   11 |         cin >> u;
      |                ^
a.cc:18:9: error: 'cout' was not declared in this scope
   18 |         cout << a<<b;
      |         ^~~~
Language: C++

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


Compiler output:
a.cc:1:1: error: '::main' must return 'int'
    1 | void  main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:9: error: 'string' was not declared in this scope
    3 |         string s;
      |         ^~~~~~
a.cc:4:15: error: expected ';' before 't'
    4 |         string t;
      |               ^~
      |               ;
a.cc:5:15: error: expected ';' before 'u'
    5 |         string u;
      |               ^~
      |               ;
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin >> s >> t;
      |         ^~~
a.cc:9:16: error: 's' was not declared in this scope
    9 |         cin >> s >> t;
      |                ^
a.cc:9:21: error: 't' was not declared in this scope
    9 |         cin >> s >> t;
      |                     ^
a.cc:11:16: error: 'u' was not declared in this scope
   11 |         cin >> u;
      |                ^
a.cc:18:9: error: 'cout' was not declared in this scope
   18 |         cout << a<<b;
      |         ^~~~
Language: C++

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



Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void  main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
    4 |         string s;
      |         ^~~~~~
a.cc:4:9: 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:15: error: expected ';' before 't'
    5 |         string t;
      |               ^~
      |               ;
a.cc:6:15: error: expected ';' before 'u'
    6 |         string u;
      |               ^~
      |               ;
a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |         cin >> s >> t;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:16: error: 's' was not declared in this scope
   10 |         cin >> s >> t;
      |                ^
a.cc:10:21: error: 't' was not declared in this scope
   10 |         cin >> s >> t;
      |                     ^
a.cc:12:16: error: 'u' was not declared in this scope
   12 |         cin >> u;
      |                ^
a.cc:19:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |         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<algorithm>
void  main()
{
	string s;
  	string t;
  	string u;
  	int a;
  	int b;
  
	cin >> s >> t;
    	cin >> a >> b;
  	cin >> u;
  
 	if (s==u){
		a--;
	}else{
      		b--;
    	}
	cout << a<<b;
	return 0;
}


Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void  main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string s;
      |         ^~~~~~
a.cc:5:9: 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:15: error: expected ';' before 't'
    6 |         string t;
      |               ^~
      |               ;
a.cc:7:15: error: expected ';' before 'u'
    7 |         string u;
      |               ^~
      |               ;
a.cc:11:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |         cin >> s >> t;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:16: error: 's' was not declared in this scope
   11 |         cin >> s >> t;
      |                ^
a.cc:11:21: error: 't' was not declared in this scope
   11 |         cin >> s >> t;
      |                     ^
a.cc:13:16: error: 'u' was not declared in this scope
   13 |         cin >> u;
      |                ^
a.cc:20:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |         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++

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




Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'string' was not declared in this scope
    3 |         string s;
      |         ^~~~~~
a.cc:4:15: error: expected ';' before 't'
    4 |         string t;
      |               ^~
      |               ;
a.cc:5:15: error: expected ';' before 'u'
    5 |         string u;
      |               ^~
      |               ;
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin >> s >> t;
      |         ^~~
a.cc:9:16: error: 's' was not declared in this scope
    9 |         cin >> s >> t;
      |                ^
a.cc:9:21: error: 't' was not declared in this scope
    9 |         cin >> s >> t;
      |                     ^
a.cc:11:16: error: 'u' was not declared in this scope
   11 |         cin >> u;
      |                ^
a.cc:18:9: error: 'cout' was not declared in this scope
   18 |         cout << a<<b;
      |         ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string s;
      |         ^~~~~~
a.cc:5:9: 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:15: error: expected ';' before 't'
    6 |         string t;
      |               ^~
      |               ;
a.cc:7:15: error: expected ';' before 'u'
    7 |         string u;
      |               ^~
      |               ;
a.cc:11:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |         cin>>s>>t;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:14: error: 's' was not declared in this scope
   11 |         cin>>s>>t;
      |              ^
a.cc:11:17: error: 't' was not declared in this scope
   11 |         cin>>s>>t;
      |                 ^
a.cc:13:14: error: 'u' was not declared in this scope
   13 |         cin>>u;
      |              ^
a.cc:20:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |         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<algorithm>
int main()
{
	string s;
  	string t;
  	string u;
  	int a;
  	int b;
  
	cin>>s>>t;
    cin>>a>>b;
  	cin>>u;
  
 	if (s==u){
		a--;
    }else{
      b--;
    } 
	cout << a<<b;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string s;
      |         ^~~~~~
a.cc:5:9: 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:15: error: expected ';' before 't'
    6 |         string t;
      |               ^~
      |               ;
a.cc:7:15: error: expected ';' before 'u'
    7 |         string u;
      |               ^~
      |               ;
a.cc:11:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |         cin>>s>>t;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:14: error: 's' was not declared in this scope
   11 |         cin>>s>>t;
      |              ^
a.cc:11:17: error: 't' was not declared in this scope
   11 |         cin>>s>>t;
      |                 ^
a.cc:13:14: error: 'u' was not declared in this scope
   13 |         cin>>u;
      |              ^
a.cc:20:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |         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 <iomanip>
typedef long long ll;
using namespace std;
const  ll INF = 1e9;
const  ll MOD = 1e9 + 7;
#define repi(i,n,init) for(ll i=init;i<(n);i++)

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: expected ')' before ':' token
   14 |     cout << (s == u? --a : --b:) << endl;
      |             ~                 ^
      |                               )
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(s==u){
    s--;
  }else{
    t--;
  }
  cout << a <<  " " << b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
    8 |     s--;
      |     ~^~
a.cc:10:6: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
   10 |     t--;
      |     ~^~
Language: Java

import java.util.Scanner;

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(s.equals(u)){
     System.out.println(a-1+""+b);
   }
   else if(t.equals(u)){
     System.out.println(a+""+b-1);
   }
 
 }
}

Compiler output:
Main.java:16: error: bad operand types for binary operator '-'
     System.out.println(a+""+b-1);
                              ^
  first type:  String
  second type: int
1 error
Language: C++

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i ,n) for(int i = 0 ; i < (n) ; i ++ )
#define all(x) (x).begin(),(x).end()
using ll = long long;
using namespace std;


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




Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: expected ';' before 'b'
   17 |   else(t==u) b--;
      |             ^~
      |             ;
a.cc:17:9: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   17 |   else(t==u) b--;
      |       ~~^~~~
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:3755:5: note: declared here
 3755 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
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 -=1;
  else b -=1;
  cout << a +" "+b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: found ':' in nested-name-specifier, expected '::'
    6 |   int a, b:
      |           ^
      |           ::
a.cc:6:10: error: 'b' has not been declared
    6 |   int a, b:
      |          ^
a.cc:7:7: error: qualified-id in declaration before '>>' token
    7 |   cin >> s >> t >> a >> b >> u;
      |       ^~
a.cc:9:8: error: 'b' was not declared in this scope
    9 |   else b -=1;
      |        ^
a.cc:10:18: error: 'b' was not declared in this scope
   10 |   cout << a +" "+b << endl;
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin>>N;
    bool a=true;
    vector<int>wtf(N);
    for(int i=0; i<N; i++){
    cin>>wtf.at(i);
    }
    sort(wtf.begin(),wtf.end());
    for(int i=0; i<N; i++){
    if(wtf.at(i)==wtf.at(i+1)){
    a=false;
    break;
    }
    }
    }
    if(a==true){
    cout<<"YES"<<endl;
    }
    else
    cout<<"NO"<<endl;
}

Compiler output:
a.cc:19:5: error: expected unqualified-id before 'if'
   19 |     if(a==true){
      |     ^~
a.cc:22:5: error: expected unqualified-id before 'else'
   22 |     else
      |     ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: Java


public class Main {
    public static void main(String[] args) throws Exception {
        
        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)){
            System.out.print(A-1);
            System.out.print(" ");
            System.out.println(B);
        }else{
            System.out.print(A);
            System.out.print(" ");
            System.out.println(B-1);
        }
        
    }
}


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

#include<stdio.h>
#include<sstream>
int main()
{
  string S;
  string T;
  string U;
  int a,b;
  scanf("%s %s",S,T);
  scanf("%d %d",&a,&b);
  scanf("%s",U);
  if(U==S)
  {
    a--;
  }
  else if(U==T)
  {
    b--;
  }
  printf("%d %d",a,b);
  return 0;
}


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

#include<stdio.h>
#include<sstream.h>
int main()
{
  string S;
  string T;
  string U;
  int a,b;
  scanf("%s %s",S,T);
  scanf("%d %d",&a,&b);
  scanf("%s",U);
  if(U==S)
  {
    a--;
  }
  else if(U==T)
  {
    b--;
  }
  printf("%d %d",a,b);
  return 0;
}


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

#include<stdio.h>
#include<string.h>
int main()
{
  string S;
  string T;
  string U;
  int a,b;
  scanf("%s %s",S,T);
  scanf("%d %d",&a,&b);
  scanf("%s",U);
  if(U==S)
  {
    a--;
  }
  else if(U==T)
  {
    b--;
  }
  printf("%d %d",a,b);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:3: error: unknown type name 'string'; did you mean 'stdin'?
    5 |   string S;
      |   ^~~~~~
      |   stdin
main.c:6:3: error: unknown type name 'string'; did you mean 'stdin'?
    6 |   string T;
      |   ^~~~~~
      |   stdin
main.c:7:3: error: unknown type name 'string'; did you mean 'stdin'?
    7 |   string U;
      |   ^~~~~~
      |   stdin
Language: C

#include<stdio.h>
int main()
{
  string S;
  string T;
  string U;
  int a,b;
  scanf("%s %s",S,T);
  scanf("%d %d",&a,&b);
  scanf("%s",U);
  if(U==S)
  {
    a--;
  }
  else if(U==T)
  {
    b--;
  }
  printf("%d %d",a,b);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: unknown type name 'string'; did you mean 'stdin'?
    4 |   string S;
      |   ^~~~~~
      |   stdin
main.c:5:3: error: unknown type name 'string'; did you mean 'stdin'?
    5 |   string T;
      |   ^~~~~~
      |   stdin
main.c:6:3: error: unknown type name 'string'; did you mean 'stdin'?
    6 |   string U;
      |   ^~~~~~
      |   stdin
Language: C++

#include<stdio.h>
#include<stdlib.h>
#pragma warning(disable:4996)
int mycomp(const void* pt, const void* pt1);
int main()
{
	long int ar[200001] = { 0 };
	long int n;
	scanf("%ld", &n);
	for (int i = 1; i <= n; i++) {
		scanf("%ld", &ar[i]);
	}
	qsort(ar + 1, n, sizeof(long int), mycomp);
	for (int i = 1; i < n; i++) {
		if (ar[i] == ar[i + 1]) {
			printf("NO"); return;
		}
	}
	printf("YES");
}
int mycomp(const void* pt, const void* pt1)
{
	const long int* st = (const long int*)pt;
	const long int* st1 = (const long int*)pt1;
	return *st - *st1;
}

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: expected ';' before '}' token
   17 |         b--
      |            ^
      |            ;
   18 |     }
      |     ~
Language: C++

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

int main(){
  string S,T;
  int A,B;
  string U;
  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: bits.stdc++.h: No such file or directory
    1 | #include <bits.stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main(){
  string S,T;
  int A,B;
  string U;
  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:25: error: missing terminating > character
    1 | #include <bits.stdc+;.h.
      |                         ^
a.cc:1:10: fatal error: bits.stdc+;.h.: No such file or directory
    1 | #include <bits.stdc+;.h.
      |          ^
compilation terminated.
Language: C++

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

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

import java.util.*;

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


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

import java.util.*;

public class Main{
      public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            String str = sc.next();
            for(int i = 0; i < str.lenght(); i++){
              System.out.print("x");
            }
          }
}

Compiler output:
Main.java:7: error: cannot find symbol
            for(int i = 0; i < str.lenght(); i++){
                                  ^
  symbol:   method lenght()
  location: variable str of type String
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)n; i++)

int main() {
  string S T;cin >> S >> T;
  int A, B;cin >> A >> B;
  string U;cin >> U;
  
  map<string, int> Ball;
  Ball[S] = A;Ball[T] = B;
  Ball[U] -= 1;
  
  cout << Ball[S] << Ball[T] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected initializer before 'T'
    6 |   string S T;cin >> S >> T;
      |            ^
a.cc:6:21: error: 'S' was not declared in this scope
    6 |   string S T;cin >> S >> T;
      |                     ^
a.cc:6:26: error: 'T' was not declared in this scope
    6 |   string S T;cin >> S >> T;
      |                          ^
Language: C++

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

int main(){
  string A,B;
  cin>>A>>B;
  map<string int> ball;
  cin>>ball.at(A)>>ball.at(B);
  string U;
  cin>>U;
  if(A==U)ball.at(A)--;
  else ball.at(B)--;
  cout<<ball.at(A)<<ball.at(B)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: two or more data types in declaration of 'type name'
    9 |   map<string int> ball;
      |       ^~~~~~
a.cc:9:17: error: wrong number of template arguments (1, should be at least 2)
    9 |   map<string int> ball;
      |                 ^
In file included from /usr/include/c++/14/map:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:10:13: error: request for member 'at' in 'ball', which is of non-class type 'int'
   10 |   cin>>ball.at(A)>>ball.at(B);
      |             ^~
a.cc:10:25: error: request for member 'at' in 'ball', which is of non-class type 'int'
   10 |   cin>>ball.at(A)>>ball.at(B);
      |                         ^~
a.cc:13:16: error: request for member 'at' in 'ball', which is of non-class type 'int'
   13 |   if(A==U)ball.at(A)--;
      |                ^~
a.cc:14:13: error: request for member 'at' in 'ball', which is of non-class type 'int'
   14 |   else ball.at(B)--;
      |             ^~
a.cc:15:14: error: request for member 'at' in 'ball', which is of non-class type 'int'
   15 |   cout<<ball.at(A)<<ball.at(B)<<endl;
      |              ^~
a.cc:15:26: error: request for member 'at' in 'ball', which is of non-class type 'int'
   15 |   cout<<ball.at(A)<<ball.at(B)<<endl;
      |                          ^~
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 == T) {
    int a = A;
    int b = B - 1;
  }
  else {
    int a = A - 1;
    int b = B;
  }
  cin >> a >> b;
  cout << a << " " << b << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'a' was not declared in this scope
   15 |   cin >> a >> b;
      |          ^
a.cc:15:15: error: 'b' was not declared in this scope
   15 |   cin >> a >> b;
      |               ^
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 == T) {
    int a = A;
    int b = B - 1;
  }
  else {
    int a = A - 1;
    int b = B;
  }
  cout << a << " " << b << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: 'a' was not declared in this scope
   15 |   cout << a << " " << b << endl;
      |           ^
a.cc:15:23: error: 'b' was not declared in this scope
   15 |   cout << a << " " << b << endl;
      |                       ^