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

# include < bits / stdc ++ . h >
 using namespase std ; 
# define int long long 
# define rep(i , n ) for ( int i = 0 ; i < n ; i + + ) 
# define all ( a ) a . begin ( ) . a . end )
 # define P pairint , int > 
# define F first 
# define s second 
# define mod 1e7 
# define INF 9000000000000000000 signed main ( void ) { 
string s . t ; cin > > s > > t ; int ans = 0 ; rep ( 1 , 3 ) { if ( s [ i ] = = t [ i ] ) ans + + ; 
cout < < ans < < endl ;
 }

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

# include < bits / stdc + + . h > using namespase std ; # define int long long # define repi , n ) for ( int i = 0 ; i < n ; i + + ) # define all ( a ) a . begin ( ) . a . end ) # define P pairint , int > # define F first # define s second # define mod le7 # define INF 9000000000000000000 signed main ( void ) { string s . t ; cin > > s > > t ; int ans = 0 ; rep ( 1 , 3 ) { if ( s [ i ] = = t [ i ] ) ans + + ; cout < < ans < < endl ;

Compiler output:
a.cc:1:35: warning: extra tokens at end of #include directive
    1 | # include < bits / stdc + + . h > using namespase std ; # define int long long # define repi , n ) for ( int i = 0 ; i < n ; i + + ) # define all ( a ) a . begin ( ) . a . end ) # define P pairint , int > # define F first # define s second # define mod le7 # define INF 9000000000000000000 signed main ( void ) { string s . t ; cin > > s > > t ; int ans = 0 ; rep ( 1 , 3 ) { if ( s [ i ] = = t [ i ] ) ans + + ; cout < < ans < < endl ;
      |                                   ^~~~~
a.cc:1:11: fatal error:  bits / stdc + + . h : No such file or directory
    1 | # include < bits / stdc + + . h > using namespase std ; # define int long long # define repi , n ) for ( int i = 0 ; i < n ; i + + ) # define all ( a ) a . begin ( ) . a . end ) # define P pairint , int > # define F first # define s second # define mod le7 # define INF 9000000000000000000 signed main ( void ) { string s . t ; cin > > s > > t ; int ans = 0 ; rep ( 1 , 3 ) { if ( s [ i ] = = t [ i ] ) ans + + ; cout < < ans < < endl ;
      |           ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

# -*- coding: utf-8 -*-
# @Author: WA_King
# @Date:   2019-04-03 19:35:31
# @Last Modified by:   lcw
# @Last Modified time: 2019-09-02 13:50:55
a=input()
b=input()
ans=0
for i in range(len(a)):
	if a[i]==b[i]:
		ans+=1
print(ans)

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:2:3: error: invalid preprocessing directive #@
    2 | # @Author: WA_King
      |   ^
a.cc:3:3: error: invalid preprocessing directive #@
    3 | # @Date:   2019-04-03 19:35:31
      |   ^
a.cc:4:3: error: invalid preprocessing directive #@
    4 | # @Last Modified by:   lcw
      |   ^
a.cc:5:3: error: invalid preprocessing directive #@
    5 | # @Last Modified time: 2019-09-02 13:50:55
      |   ^
a.cc:6:1: error: 'a' does not name a type
    6 | a=input()
      | ^
Language: C++

        #include<bits/stdc++.h>
        using namespace std;
        int main(){ 
          char *s;
          char *t;
          int ctr=0;
          cin >> s >> t;
          for(int i=0;i<3;i++){
          if(s[i]==c[i]) ctr++;
          }
          cout << ctr;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'c' was not declared in this scope
    9 |           if(s[i]==c[i]) ctr++;
      |                    ^
Language: C++

#include<iostream>
#include<cstring>
int main()
{string s;int k=0;
 string t;
 getline(cin,s);
 getline(cin,t);
 for (int i=0;i<3;i++)
 { if (s[i]==t[i])
   {k++;
   }
 
 }
cout<<k;
 return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:2: error: 'string' was not declared in this scope
    4 | {string s;int k=0;
      |  ^~~~~~
a.cc:4:2: 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:5:8: error: expected ';' before 't'
    5 |  string t;
      |        ^~
      |        ;
a.cc:6:10: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |  getline(cin,s);
      |          ^~~
      |          std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:14: error: 's' was not declared in this scope
    6 |  getline(cin,s);
      |              ^
a.cc:7:14: error: 't' was not declared in this scope
    7 |  getline(cin,t);
      |              ^
a.cc:14:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 | cout<<k;
      | ^~~~
      | 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<stdio.h>

int main(void){
  char s;
  char t;
  int a = 0;
  scanf("%s",&s);
  scanf("%s",&t);
  if(s[0] == t[0]) a++;
  if(s[1] == t[1]) a++;
  if(s[2] == t[2]) a++;
  printf("%d",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: subscripted value is neither array nor pointer nor vector
    9 |   if(s[0] == t[0]) a++;
      |       ^
main.c:9:15: error: subscripted value is neither array nor pointer nor vector
    9 |   if(s[0] == t[0]) a++;
      |               ^
main.c:10:7: error: subscripted value is neither array nor pointer nor vector
   10 |   if(s[1] == t[1]) a++;
      |       ^
main.c:10:15: error: subscripted value is neither array nor pointer nor vector
   10 |   if(s[1] == t[1]) a++;
      |               ^
main.c:11:7: error: subscripted value is neither array nor pointer nor vector
   11 |   if(s[2] == t[2]) a++;
      |       ^
main.c:11:15: error: subscripted value is neither array nor pointer nor vector
   11 |   if(s[2] == t[2]) a++;
      |               ^
Language: C++

#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define  st first
#define  nd second

/*DEBUGGER*/

void debug_out() { cerr << endl; }
template<class T> ostream& prnt(ostream& out, T v) { out << v.size() << '\n'; for(auto e : v) out << e << ' '; return out;}
template<class T> ostream& operator<<(ostream& out, vector <T> v) { return prnt(out, v); }
template<class T> ostream& operator<<(ostream& out, set <T> v) { return prnt(out, v); }
template<class T1, class T2> ostream& operator<<(ostream& out, map <T1, T2> v) { return prnt(out, v); }
template<class T1, class T2> ostream& operator<<(ostream& out, pair<T1, T2> p) { return out << '(' << p.st << ' ' << p.nd << ')'; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << H; debug_out(T...);}

#define dbg(...) cerr << #__VA_ARGS__ << " ->", debug_out(__VA_ARGS__)
#define dbg_v(x, n) do{cerr<<#x"[]: ";for(int _=0;_<n;++_)cerr<<x[_]<<" ";cerr<<'\n';}while(0)
#define dbg_ok cerr<<"OK!\n"

/*ENDOFDEBUGGER*/

#define maxn 1000001
#define MOD   1000000007
#define int long long

template <typename T> using ordered_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef gp_hash_table<int, int, hash<int > > ht;

vector<int> graph[maxn];

int to_map(pair<int,int> &p){
    return (min(p.st,p.nd)*1000 )+ max(p.st,p.nd);
}
int indeg[maxn];
int is_used[maxn];

//bool vis[maxn];
int32_t main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL); cout.tie(NULL);
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    int u;
    cin>>u;
    u--;
    for(int j=0;j<n-2;j++){
        int v;
        cin>>v;
        v--;
        pair<int,int> pu=make_pair(i,u);
        pair<int,int> pv=make_pair(i,v);
        int x=to_map(pu);
        int y=to_map(pv);
        //dbg(x,y);
        graph[x].push_back(y);

        indeg[y]++;
        is_used[x]=1;
        is_used[y]=1;

        u=v;

    }
  }

  vector<int> q;

  for(int i=0;i<maxn;i++){
    if(indeg[i]==0 and is_used[i]){
        q.push_back(i);
    }
  }
  int cnt=0;
  int days=0;
  while(q.size()){
    vector<int> p;
    cnt+=q.size();
    for(int i=0;i<q.size();i++){
        for(auto j : graph[q[i]]){
            indeg[j]--;
            if(!indeg[j] and !vis[j])
                p.push_back(j);
        }
    }
    q=p;
    days++;
  }
  //dbg(cnt,days);
  if(cnt!=n*(n-1)/2)
    cout<<"-1";
  else
    cout<<days;

}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:90:31: error: 'vis' was not declared in this scope
   90 |             if(!indeg[j] and !vis[j])
      |                               ^~~
Language: Java

import java.util.*;
public class MAin{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      char[] s = sc.next().toCharArray();
      char[] t = sc.next().toCharArray();
      int count = 0;
      for(int i = 0;i < 3;i++){
      	if(s[i]==t[i])count++;
      }
      System.out.println(count);
    }
}

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

#include <stdio.h>
int main(void){

  	int i=0, count=0;
  	char s[3],t[3];
	scanf("%s",s);
  	scanf("%s",t);
   	while (i<3){
    	if(s[i] == t[i]) count += 1;
      	i++
    }
  	printf("%d",count);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:12: error: expected ';' before '}' token
   10 |         i++
      |            ^
      |            ;
   11 |     }
      |     ~
Language: C++

#include <stdio.h>
#include <string>
#include <iostream>
using namespace  std;

int main()
{
   string st1 , st2;
  int count = 0; 
  cin>>st1 >> st2;
  for(int i = 0; i < st.length() ; i++)
  {
      if(st1[i] == st2[i]) count++;
  } 
  printf("%d",count);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: 'st' was not declared in this scope; did you mean 'st2'?
   11 |   for(int i = 0; i < st.length() ; i++)
      |                      ^~
      |                      st2
Language: C++

using namespace std;
int main(){
  char in[3];
  char in2[3];
  int correct;
  cin<<in<<in2;
  for(int i=0;i<3;i++){
    if(in[i] == in2[i]){
      correct++;
    }
  }
  cout>>correct;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin<<in<<in2;
      |   ^~~
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:12:3: error: 'cout' was not declared in this scope
   12 |   cout>>correct;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

int main(){
  char in[3];
  char in2[3];
  int correct;
  cin<<in<<in2;
  for(int i=0;i<3;i++){
    if(in[i] == in2[i]){
      correct++;
    }
  }
  cout>>correct;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'in'?
    5 |   cin<<in<<in2;
      |   ^~~
      |   in
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout>>correct;
      |   ^~~~
Language: C++

int main(){
  char in[];
  char in2[];
  int correct;
  cin<<in<<in2;
  for(int i=0;i<3;i++){
    if(in[i] == in2[i]){
      correct++;
    }
  }
  cout>>correct;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:8: error: storage size of 'in' isn't known
    2 |   char in[];
      |        ^~
a.cc:3:8: error: storage size of 'in2' isn't known
    3 |   char in2[];
      |        ^~~
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin<<in<<in2;
      |   ^~~
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout>>correct;
      |   ^~~~
Language: Java

import java.util.Scanner;

public class Tenki {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] arr1 = sc.next().toCharArray();
		char[] arr2 = sc.next().toCharArray();
		int count = 0;
		for(int i = 0;i<arr1.length;i++) {
			if(arr1[i] == arr2[i])count++;
		}
		System.out.println(count);
	}

}


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

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

int main() {
  string s, t;
  cin >> s >> t;
  int cnt = 0;
  for ( int i = 0; i < 3; ++i ) {
    if ( s[i] == T[i] ) ++cnt;
  }
  cout << cnt << '\n';
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: 'T' was not declared in this scope
    9 |     if ( s[i] == T[i] ) ++cnt;
      |                  ^
Language: C++

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

int main()
{
  string s,t;
  cin >> s;
  cin >> t;
  long long int count=0;
  for(long long int i=0;i<s.length();i++)
  {
    if(s[i]==t[i])
    {
      count++;
    }
  }
  cout << count << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: expected '}' at end of input
   17 |   cout << count << endl;
      |                         ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main(){ 
      string s,t;
      int ctr=0;
      cin >> s >> t;
      for(int i=0;i<3;i++){
      if(strcmp(*s[i]=*t[i])) ctr++;
      }
      cout << ctr;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
    8 |       if(strcmp(*s[i]=*t[i])) ctr++;
a.cc:8:23: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
    8 |       if(strcmp(*s[i]=*t[i])) ctr++;
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main(){ 
      string s,t;
      int ctr=0;
      cin >> s >> t;
      for(int i=0;i<3;i++){
      if(strcmp(*s[i]=*t[i]) ctr++;
      }
      cout << ctr;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
    8 |       if(strcmp(*s[i]=*t[i]) ctr++;
a.cc:8:23: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
    8 |       if(strcmp(*s[i]=*t[i]) ctr++;
a.cc:9:7: error: expected primary-expression before '}' token
    9 |       }
      |       ^
a.cc:8:36: error: expected ')' before '}' token
    8 |       if(strcmp(*s[i]=*t[i]) ctr++;
      |         ~                          ^
      |                                    )
    9 |       }
      |       ~                             
a.cc:9:7: error: expected primary-expression before '}' token
    9 |       }
      |       ^
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main(){ 
      string s,t,ctr=0;
      cin >> s >> t;
      for(int i=0;i<3;i++){
      if(strcmp(*s[i],*t[i])==0) ctr++;
      }
      cout << ctr;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
    7 |       if(strcmp(*s[i],*t[i])==0) ctr++;
a.cc:7:23: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
    7 |       if(strcmp(*s[i],*t[i])==0) ctr++;
a.cc:7:37: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
    7 |       if(strcmp(*s[i],*t[i])==0) ctr++;
      |                                  ~~~^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){ 
  string s,t,ctr=0;
  cin >> s >> t;
  for(int i=0;i<3;i++){
  if(strcmp(s[i],t[i])==0) ctr++;
  }
  cout << ctr;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    7 |   if(strcmp(s[i],t[i])==0) ctr++;
      |      ~~~~~~^~~~~~~~~~~
      |            |
      |            __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:7:12: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    7 |   if(strcmp(s[i],t[i])==0) ctr++;
      |      ~~~~~~^~~~~~~~~~~
      |            |
      |            __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:7:31: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
    7 |   if(strcmp(s[i],t[i])==0) ctr++;
      |                            ~~~^~
Language: C++

#include <bis/stdc++.h>
using namespace std;
 
int main(){
  string s,t;
  cin>>s>>t;
  int n=0;
  for(int i=0; i<3; i++){
    if(s[i]==t[i])
       n++;
  }
  cout<<n<<endl;
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  string s,t;
  cin>>s>>t;
  int n=0;
  for(int i=0; i<3; i++){
    if(s[i]==t[i]
       n++;
  }
  cout<<n<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'n'
    9 |     if(s[i]==t[i]
      |                  ^
      |                  ;
   10 |        n++;
      |        ~          
a.cc:11:3: error: expected primary-expression before '}' token
   11 |   }
      |   ^
a.cc:10:12: error: expected ')' before '}' token
   10 |        n++;
      |            ^
      |            )
   11 |   }
      |   ~         
a.cc:9:7: note: to match this '('
    9 |     if(s[i]==t[i]
      |       ^
a.cc:11:3: error: expected primary-expression before '}' token
   11 |   }
      |   ^
Language: C++

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

int main(){
  string s,t;
  cin>>s>>t;
  int n=0;
  for(int i=0; i<3; i++){
    if(s[i]==t[i]
       n++;
  }
  cout<<n<<endl;
  return 0;
}

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

import java.io.*;
import java.util.*;
 
public class Main {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        
        String str1 = sc.next();
      String str2 = sc.next();
      String str3 = str1 + str2;
      for (int i = 0; i < str1.length(); i++) {
        if (str3.substring(i, i+1).equals(str3.substring(str1.length()+i, str1.length()+i+1))) {
          count++;
        }
      }
      pw.println(count);
        
      sc.close();
        pw.close();
    }
    static class FastScanner {
    	private InputStream stream;
    	private byte[] buf = new byte[1024];
    	private int curChar;
    	private int numChars;
    	private FastScanner.SpaceCharFilter filter;
    	
    	public FastScanner(InputStream stream) {
    		this.stream = stream;
    	}
    	
    	public int read() {
    		if (numChars == -1) {
    			throw new InputMismatchException();
    		}
    		if (curChar >= numChars) {
    			curChar = 0;
    			try {
    				numChars = stream.read(buf);
    			} catch (IOException e) {
    				throw new InputMismatchException();
    			}
    			if (numChars <= 0) {
    				return -1;
    			}
    		}
    	return buf[curChar++];
    	}
    	
    	public int nextInt() {
    		int c = read();
    		while (isSpaceChar(c)) {
    			c = read();
    		}
    		int sgn = 1;
    		if (c == '-') {
    			sgn = -1;
    			c = read();
    		}
    		int res = 0;
    		do {
    			if (c < '0' || c > '9') {
    				throw new InputMismatchException();
    			}
    			res *= 10;
    			res += c - '0';
    			c = read();
    		} while (!isSpaceChar(c));
    		return res * sgn;
    	}
    	
    	public String nextString() {
    		int c = read();
    		while (isSpaceChar(c)) {
    			c = read();
    		}
    		StringBuilder res = new StringBuilder();
    		do {
    			if (Character.isValidCodePoint(c)) {
    				res.appendCodePoint(c);
    			}
    			c = read();
    		} while (!isSpaceChar(c));
    			return res.toString();
    	}
    	
    	public boolean isSpaceChar(int c) {
    		if (filter != null) {
    			return filter.isSpaceChar(c);
    		}
    		return isWhitespace(c);
    	}
    	
    	public static boolean isWhitespace(int c) {
    		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    	}
    	
    	public int[] nextIntArray(int n) {
    		int[] array = new int[n];
    		for (int i = 0; i < n; ++i) array[i] = nextInt();
    		return array;
    	}
    	
    	public interface SpaceCharFilter {
    	public boolean isSpaceChar(int ch);
    	
    	}
    }
}

Compiler output:
Main.java:14: error: cannot find symbol
          count++;
          ^
  symbol:   variable count
  location: class Main
Main.java:17: error: cannot find symbol
      pw.println(count);
                 ^
  symbol:   variable count
  location: class Main
2 errors
Language: Java

import java.util.*;
class Engine implements Comparable<Engine>
{
  int X,Y;
  double atan2;
  Engine(int X,int Y)
  {
    this.X =X;
    this.Y=Y;
    atan2 = Math.atan2(Y,X);
  }
  public int compare(Engine x)
  {
    return Double.compareTo(this.atan2,x.atan2);
  }
}
class Main
{
  public static void main(String Args[])
  {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    List <Engine> engines = new ArrayList<>(n);
    for(int i = 0;i< n;i++)
    {
      int x = in.nextInt();
      int y = in.nextInt();
      if(x==0&&y==0)
        continue;
      engines.add(new Engine(x,y));
    }
    Collections.sort(engines);
    int m = engines.size();
    double max = 0.0;
    for(int i = 0;i< m;i++)
    {
      double y = 0.0;
      double x = 0.0;
      for(int j = 0;j<m;j++)
      {
        int index = (i+j)%m;
        Engine engine  = engines.get(index);
        y += engine.Y;
        x += engine.X;
        max = Math.max(max , Math.hypot(x,y));
      }
    }
    System.out.printf("%.20f/n",max);
  }
}


Compiler output:
Main.java:2: error: Engine is not abstract and does not override abstract method compareTo(Engine) in Comparable
class Engine implements Comparable<Engine>
^
Main.java:14: error: method compareTo in class Double cannot be applied to given types;
    return Double.compareTo(this.atan2,x.atan2);
                 ^
  required: Double
  found:    double,double
  reason: actual and formal argument lists differ in length
2 errors
Language: Java

import java.util.*;
class Engine implements Comparable<Engine>
{
  int X,Y;
  double atan2;
  Engine(int X,int Y)
  {
    this.X =X;
    this.Y=Y;
    atan2 = Math.atan2(Y,X);
  }
  public int compareTo(Engine x)
  {
    return Double.compare(this.atan2,x.atan2);
  }
}
class Main
{
  public static void main(String Args[])
  {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    List <Engine> engines = new ArrayList<>(n);
    for(int i = 0;i< n;i++)
    {
      int x = in.nextInt();
      int y = in.nextInt();
      if(x==0&&y==0)
        continue;
      engines.add(new Engine(x,y));
    }
    Collections.sort(engines);
    int m = engines.size();
    double max = 0.0;
    for(int i = 0;i< m;i++)
    {
      double y = 0.0;
      double x = 0.0;
      for(int j = 0;j<m;j++)
      {
        int index = (i+j)%m;
        Engine engine  = engines.get(index);
        y += engine.y;
        x += engine.x;
        max = Math.max(max , Math.hypot(x,y));
      }
    }
    System.out.printf("%.20f/n",max);
  }
}


Compiler output:
Main.java:43: error: cannot find symbol
        y += engine.y;
                   ^
  symbol:   variable y
  location: variable engine of type Engine
Main.java:44: error: cannot find symbol
        x += engine.x;
                   ^
  symbol:   variable x
  location: variable engine of type Engine
2 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;

cin.tie(nullptr);
ios_base::sync_with_stdio(false);

int main(){
  
  int N;
  cin >> N;
  
  int tmp;
  vector<deque<int>> A(N, deque<int>());
  
  for (int i = 0; i < N; i++){
    for (int j = 0; j < N-1; j++){
      cin >> tmp;
      A.at(i).push_back(tmp);
    }
  }
  
  int ans = 0, cnt = 0, wrong = 0;
  vector<int> check;
  vector<int>::iterator itr_1, itr_2;
  size_t index_1, index_2;
  
  while (true){
    
  	for (int i = 0; i < N; i++){
      
      if (A.at(i).front()-1 == A.at(A.at(i).front()-1).front()-1) {
        cout << -1;
        return 0;
      }
      
      if (A.at(i).size() == 0) {
        cnt++;
        wrong++;
        continue;
      }
      
      if (check.size() != 0){
        itr_1 = find(check.begin(), check.end(), i);
        index_1 = distance(check.begin(), itr_1);
        itr_2 = find(check.begin(), check.end(), A.at(i).front()-1);
        index_2 = distance(check.begin(), itr_2);
        
        if (index_1 != check.size() || index_2 != check.size()) continue;
      }
      
      if (i == A.at(A.at(i).front()-1).front()-1){
        check.push_back(i);
        check.push_back(A.at(i).front()-1);
        A.at(A.at(i).front()-1).pop_front();
        A.at(i).pop_front();
      } else wrong++;

  	}
    
    if (cnt == N){
      cout << ans;
      return 0;
    } else if (wrong == N){
      cout << -1;
      return 0;
    }
    
    check.clear();
    ans++;
    cnt = 0;
    wrong = 0;
  }
  
  return 0;
}


Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin.tie(nullptr);
      | ^~~
a.cc:6:26: error: expected constructor, destructor, or type conversion before '(' token
    6 | ios_base::sync_with_stdio(false);
      |                          ^
Language: C++

#import<cstdio>
main(){string a,b;scanf("%s%s",a,b);printf("%d",(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]));}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<cstdio>
      |  ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){string a,b;scanf("%s%s",a,b);printf("%d",(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]));}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:8: error: 'string' was not declared in this scope; did you mean 'stdin'?
    2 | main(){string a,b;scanf("%s%s",a,b);printf("%d",(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]));}
      |        ^~~~~~
      |        stdin
a.cc:2:32: error: 'a' was not declared in this scope
    2 | main(){string a,b;scanf("%s%s",a,b);printf("%d",(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]));}
      |                                ^
a.cc:2:34: error: 'b' was not declared in this scope
    2 | main(){string a,b;scanf("%s%s",a,b);printf("%d",(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]));}
      |                                  ^
Language: C++

#import<bits/stdc++.h>
main(){string a,b;std::cin>>a>>b;std::cout<<(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<bits/stdc++.h>
      |  ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){string a,b;std::cin>>a>>b;std::cout<<(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:8: error: 'string' was not declared in this scope
    2 | main(){string a,b;std::cin>>a>>b;std::cout<<(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]);}
      |        ^~~~~~
a.cc:2:8: 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:2:29: error: 'a' was not declared in this scope
    2 | main(){string a,b;std::cin>>a>>b;std::cout<<(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]);}
      |                             ^
a.cc:2:32: error: 'b' was not declared in this scope
    2 | main(){string a,b;std::cin>>a>>b;std::cout<<(a[0]==b[0])+(a[1]==b[1])+(a[2]==b[2]);}
      |                                ^
Language: C++


#include<bits/stdc++.h>


using namespace std;

using ll   = long long;
using ii   = pair < int , int >;
using i3   = pair < int , ii >;
using li   = pair < ll , int >;
using lii  = pair <  ll,  ii >;
using vi   = vector < int >;
using vl   = vector < ll >;
using vli  = vector < li >;
using vii  = vector < ii >;
using vi3  = vector < i3 >;
using vlii = vector < lii >;

const int N;
const ll INF = 1e17;
const double eps = 1e-12 , PI = acos(-1);

string s1 , s2;

void solve(int cs){
    cin >> s1 >> s2;
    
    int ans = 0;
    for(int i = 0 ; i < 3 ; i ++)ans += (s1[i] != s2[i]);
    printf("%d\n" , ans);
}

main(){
    int t = 1;
    //scanf("%d" , &t);

    for(int cs = 1 ; t -- ; cs ++){
        solve(cs);
    }

    return 0;
}



Compiler output:
a.cc:19:11: error: uninitialized 'const N' [-fpermissive]
   19 | const int N;
      |           ^
a.cc:33:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   33 | main(){
      | ^~~~
Language: Java



import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;






public class Main {
	
	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
	

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
    //public static long mod = (long) (1e9+7);
    public final static int MAX = (int)1e5;
  // static Scanner sc = new Scanner(System.in);
   static List<Integer>[] edge;
   private static int N = (int) (2e5 + 11);
	public static void main(String[] args) {
	   
	 FastReader sc = new FastReader();

	 char[] s = sc.next().toCharArray();
	 char[] t = sc.next().toCharArray();
	 int ans = 0;
	 for(int i=0;i<3;++i) if(s[i] == t[i]) ++ans;
	 out.print(ans);
	 out.close();
	}
}v

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

import java.util.*;

public class Main {
	public static void main(String args[]) {
      Scanner scan = new Scanner(System.in);
      String s = scan.next();
      String t = scan.next();
      int count=0;
      for(int i=0 i<3; i++) {
        if(s.charAt(i)==t.charAt(i)){
          count++;
        }
      }
      System.out.println(count);
    }
}

Compiler output:
Main.java:9: error: ';' expected
      for(int i=0 i<3; i++) {
                 ^
1 error
Language: C++

#include<bits/stdc++.h>
#include<math.h>
using namespace std;
int main(){
 int n;
  cin >>n; 
  cout <<n*(n-1)//2<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'return'
    7 |   cout <<n*(n-1)//2<<endl;
      |                 ^
      |                 ;
    8 |   return 0;
      |   ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S, T;
  cin >> S, T;
 
int count = 0;
 
for (int i = 0; i < 2; i++) {
    if (S[i] == T[i]){
      count++;
    }
}
cout << count << endl;
return 0;
}
#include <bits/stdc++.h>
using namespace std;

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

int count = 0;

for (int i = 0; i < 2; i++) {
    if (S[i] == T[i]){
      count++;
    }
}
cout << count << endl;
return 0;
}


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

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

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

int count = 0;

for (int i = 0; i < 2; i++) {
    if (S[i] == T[i]){
      count++;
    }
}
cout << count << endl;
return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: expected ';' before '}' token
   16 | return 0
      |         ^
      |         ;
   17 | }
      | ~
Language: C++

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

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

int count = 0;

for (int i = 0; i < 2; i++) {
    if (S[i] == T[i]){
      count++;
    }
}
cout << count << endl;
return = 0;
}

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

#include <bits/sdc++.h>

using namespace std;

int main()
{
 	string a,b;
  cin>>a>>b;
  int res=0;
  if(a[0]==b[0])res++;
  if(a[1]==b[1])res++;
  if(a[2]==b[2])res++;
  cout<<res<<endl;
  return 0;
}

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


#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >>n;
  cout <<n(n-1)/2<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'n' cannot be used as a function
    7 |   cout <<n(n-1)/2<<endl;
      |          ~^~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
    
     string s;
     cin>>s;
     
     string t;
     cin>>t;
     
     if((s[0]==t[0])||(s[1]==t[1])||(s[2]==t[2])) {
         
         cout<<"1"<<endl;
     }
     
     else if((s[0]==t[0])&&(s[1]==t[1])||(s[1])==t[1])&&(s[2]==t[2])||(s[0]==t[0])&&(s[2]==t[2])) {
         
         cout<<"2"<<endl;
         
     }
     
     else if((s[0]==t[0])&&(s[1]==t[1])&&(s[2]==t[2])) 
         
         cout<<"3"<<endl;
         
     
     
     
     
     
     
     
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:57: error: expected identifier before '(' token
   18 |      else if((s[0]==t[0])&&(s[1]==t[1])||(s[1])==t[1])&&(s[2]==t[2])||(s[0]==t[0])&&(s[2]==t[2])) {
      |                                                         ^
Language: C++

#include <iostream>
#include <fstream>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define sz(x) int(x.size())

using namespace std;

static const int MAX = 1001;

int n;
queue<int> q[MAX];

int main(int argc, const char * argv[]) {
    // input from txt
    
    /////////
    //write//
    /////////
    
    cin >> n;
    rep(i, n){
        rep(j, n-1){
            int a;
            cin >> a;
            a--;
            q[i].push(a);
        }
    }
    
    int res = 0;
    bool end = false;
    int end_cnt = 0;
    bool ok = true;
    int itr = 0;
    while(1){
        while(!q[itr].empty()){
            if(q[q[itr].front()].empty()){
                ok = false;
                break;
            }
            if(!q[q[itr].front()].empty() && q[q[itr].front()].front() != itr){
                end_cnt++;
                break;
            }
            else end = true;
            int tmp = q[itr].front();
            q[itr].pop();
            q[tmp].pop();
            res++;
        }
        itr++;
        if(res >= n)break;
        if(itr >=n){
            itr = 0;
            end = false;
            if(end_cnt>=n)break;
            end_cnt=0;
                 }
    }
    
    if(!ok || end_cnt == n)cout << -1 << endl;
    else cout << res << endl;
    
    return 0;
}




Compiler output:
a.cc:63:13: error: extended character   is not valid in an identifier
   63 |                  }
      |             ^
a.cc: In function 'int main(int, const char**)':
a.cc:63:13: error: '\U00002028' was not declared in this scope
   63 |                  }
      |             ^
Language: Java

import java.util.Scanner;

public class NewMain2 {

	public static void main(String[] args) {
		Scanner src = new Scanner(System.in);
		int A=src.nextInt();
		int B=src.nextInt();
		int i=1;
		if(A>=B) {
				System.out.println(1);
			}
		else
		{
			for(;;) {
				A=(A-1)+A;
				i++;
				if(A>=B) {
					System.out.println(i);
					break;
				}
			}
			
		}

	}

}

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

int  n;
    long s=0,ps=0;
    cin>>n;
    int h[n];
    for(int i=0;i<n;i++){
        cin>>h[i];
    }
    for(int i=0;i<n-1;i++){
        if(h[i]>=h[i+1]){
            s++;
        }
        else{
            s=0;
        }
        ps=s>ps?s:ps;

    }

    cout<<ps;
    return 0;
}

Compiler output:
a.cc:3:5: error: 'cin' does not name a type
    3 |     cin>>n;
      |     ^~~
a.cc:4:11: error: size of array 'h' is not an integral constant-expression
    4 |     int h[n];
      |           ^
a.cc:5:5: error: expected unqualified-id before 'for'
    5 |     for(int i=0;i<n;i++){
      |     ^~~
a.cc:5:17: error: 'i' does not name a type
    5 |     for(int i=0;i<n;i++){
      |                 ^
a.cc:5:21: error: 'i' does not name a type
    5 |     for(int i=0;i<n;i++){
      |                     ^
a.cc:8:5: error: expected unqualified-id before 'for'
    8 |     for(int i=0;i<n-1;i++){
      |     ^~~
a.cc:8:17: error: 'i' does not name a type
    8 |     for(int i=0;i<n-1;i++){
      |                 ^
a.cc:8:23: error: 'i' does not name a type
    8 |     for(int i=0;i<n-1;i++){
      |                       ^
a.cc:19:5: error: 'cout' does not name a type
   19 |     cout<<ps;
      |     ^~~~
a.cc:20:5: error: expected unqualified-id before 'return'
   20 |     return 0;
      |     ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: Java

import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
      StringBuilder sb1 = new StringBuilder();
      StringBuilder sb2 = new StringBuilder();
      sb1 = sc.next();
      sb2 = sc.next();
      int a = 0;
      
            for(int i = 0;i<s.length();i++){
          if(String.valueOf(sb1.charAt(i)).equals(String.valueOf(sb2.charAt(i)))){
              a++;
          }
      }
        System.out.println(a);
    }
}


Compiler output:
Main.java:12: error: incompatible types: String cannot be converted to StringBuilder
      sb1 = sc.next();
                   ^
Main.java:13: error: incompatible types: String cannot be converted to StringBuilder
      sb2 = sc.next();
                   ^
Main.java:16: error: cannot find symbol
            for(int i = 0;i<s.length();i++){
                            ^
  symbol:   variable s
  location: class Main
3 errors
Language: Java

import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
      StringBuilder sb1 = new StringBuilder();
      StringBuilder sb2 = new StringBuilder();
      sb1 = sc.netx();
      sb2 = sc.netx();
      int a = 0;
      
            for(int i = 0;i<s.length();i++){
          if(String.valueOf(sb1.charAt(i)).equals(String.valueOf(sb2.charAt(i)))){
              a++;
          }
      }
        System.out.println(a);
    }
}


Compiler output:
Main.java:12: error: cannot find symbol
      sb1 = sc.netx();
              ^
  symbol:   method netx()
  location: variable sc of type Scanner
Main.java:13: error: cannot find symbol
      sb2 = sc.netx();
              ^
  symbol:   method netx()
  location: variable sc of type Scanner
Main.java:16: error: cannot find symbol
            for(int i = 0;i<s.length();i++){
                            ^
  symbol:   variable s
  location: class Main
3 errors
Language: Java

import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
      StringBuilder sb1 = new StringBuilder();
      StringBuilder sb2 = new StringBuilder();
      sb1 = sc.netx();
      sb2 = sc.netx();
      int a = 0;
      
            for(int i = 0;i<s.length();i++){
          if(String.valueOf(sb1.charAt(i)).equals(String.valueOf(1b2.charAt(i)))){
              a++;
          }
      }
        System.out.println(a);
    }
}

Compiler output:
Main.java:17: error: ')' or ',' expected
          if(String.valueOf(sb1.charAt(i)).equals(String.valueOf(1b2.charAt(i)))){
                                                                  ^
Main.java:17: error: ';' expected
          if(String.valueOf(sb1.charAt(i)).equals(String.valueOf(1b2.charAt(i)))){
                                                                              ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s,t;
  cin>>s;
  cin>>t;
  int ans=0;
  if(s[0]==t[0])ans++;
  if(s[1]==t[1])ans++;
  if(s[2]===t[2])ans++;
  cout<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected primary-expression before '=' token
   10 |   if(s[2]===t[2])ans++;
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s1,s2;
  cin>>s1>>s2;
  int c=0;
  for(i=0;i<3;i++)
  {
    if(s1[i]==s2[i])
      c++;
  }
  cout<<c;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<3;i++)
      |       ^
Language: C++

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

int main() {
    string S, T;
    cin >> S >> T;
    int counter = 0;
    if (S[0] == T[0]) ++counter;
    if (s[1] == T[1]) ++counter;
    if (s[2] == T[3]) ++counter;
    cout << counter << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 's' was not declared in this scope
   10 |     if (s[1] == T[1]) ++counter;
      |         ^
a.cc:11:9: error: 's' was not declared in this scope
   11 |     if (s[2] == T[3]) ++counter;
      |         ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
  int n;
  scanf("%d", &n);
  
  char *str_h = (char *)malloc((2*n-1)*sizeof(char));
  scanf("%s", str_h);
  
  int max = -1, cnt = 0;
  int cell_now, cell_next;
  char *ptr;
  
  ptr = strtok(str_h, " ");
  cell_now = atoi(ptr);
  
  while(ptr = strtok(NULL, " ")){
    cell_next = atoi(ptr);
    if(cell_next <= cell_now){
      cnt++;
    }else{
      if(cnt > cnt_max){
        cnt_max = cnt;
      }
      cnt = 0;
    }
    cell_now = cell_next;
  }
  
  if(cnt > cnt_max){
    cnt_max = cnt;
  }
  
  printf("%d", cnt_max);
}


Compiler output:
main.c: In function 'main':
main.c:23:16: error: 'cnt_max' undeclared (first use in this function)
   23 |       if(cnt > cnt_max){
      |                ^~~~~~~
main.c:23:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b;
  cin>>a>>b;
  int c=a-1
  int res=0;
  while(true){
    if (b-a<=c)=false;
    for (int i=0; i<c; ++i){
      if (a-b>c) b-a=true;
    }
    
    if (b-a<=c) break;
    for(int i=0; i<c; ++i){
      a-b/=c;
    }
    ++res;
  }
  cout<<res<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int res=0;
      |   ^~~
a.cc:10:16: error: expected primary-expression before '=' token
   10 |     if (b-a<=c)=false;
      |                ^
a.cc:12:19: error: lvalue required as left operand of assignment
   12 |       if (a-b>c) b-a=true;
      |                  ~^~
a.cc:17:8: error: lvalue required as left operand of assignment
   17 |       a-b/=c;
      |       ~^~
a.cc:19:7: error: 'res' was not declared in this scope
   19 |     ++res;
      |       ^~~
a.cc:21:9: error: 'res' was not declared in this scope
   21 |   cout<<res<<endl;
      |         ^~~
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll          long long
#define pb          push_back
#define	endl		'\n'
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define hell        200001
#define rep(i,a,b)	for(int i=a;i<b;i++)
#define repr(i,a,b) for(int i=a;i>b;i--) 
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define MAXN		200001
#define ordered_set tree<ll int, null_type,less<ll int>, rb_tree_tag,tree1_order_statistics_node_update> 
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s1;
	string s2;
	cin >> s1;
	cin >> s2;
	ans=0;
	rep(i,0,3)
	{
		if (s1[i]==s2[i])ans++;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   33 |         ans=0;
      |         ^~~
      |         abs
Language: C++

int main() {
  string w1,w2;
  cin >> w1 >> w2;

  int count=0;
  
  rep(i,w1.length()){
    if (w1.at(i) == w2.at(i)){
      count++;
    }
  }
  cout << count<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string w1,w2;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> w1 >> w2;
      |   ^~~
a.cc:3:10: error: 'w1' was not declared in this scope
    3 |   cin >> w1 >> w2;
      |          ^~
a.cc:3:16: error: 'w2' was not declared in this scope
    3 |   cin >> w1 >> w2;
      |                ^~
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   rep(i,w1.length()){
      |       ^
a.cc:7:3: error: 'rep' was not declared in this scope
    7 |   rep(i,w1.length()){
      |   ^~~
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   12 |   cout << count<<endl;
      |   ^~~~
      |   count
a.cc:12:18: error: 'endl' was not declared in this scope
   12 |   cout << count<<endl;
      |                  ^~~~