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

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  string s,t;
  cin>>s>>t;
  int cnt=0;
  rep(i,3){
   if( s[i]==t[i]) ++cnt;
  cott<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'cott' was not declared in this scope
   12 |   cott<<cnt<<endl;
      |   ^~~~
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before 'if'
    8 |   if(S[0] == T[0])A++
      |                      ^
      |                      ;
    9 |   if(S[1] == T[1])A++
      |   ~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> S >> T;
      |     ^~~
a.cc:8:14: error: 'T' was not declared in this scope
    8 |   if(S[0] == T[0])A++
      |              ^
a.cc:8:22: error: expected ';' before 'if'
    8 |   if(S[0] == T[0])A++
      |                      ^
      |                      ;
    9 |   if(S[1] == T[1])A++
      |   ~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected unqualified-id before '=' token
    8 |   for(int = 0; i < 3; i++){
      |           ^
a.cc:8:10: error: expected ';' before '=' token
    8 |   for(int = 0; i < 3; i++){
      |          ^~
      |          ;
a.cc:8:11: error: expected primary-expression before '=' token
    8 |   for(int = 0; i < 3; i++){
      |           ^
a.cc:8:16: error: 'i' was not declared in this scope
    8 |   for(int = 0; i < 3; i++){
      |                ^
a.cc:8:21: error: expected ')' before ';' token
    8 |   for(int = 0; i < 3; i++){
      |      ~              ^
      |                     )
a.cc:8:23: error: 'i' was not declared in this scope
    8 |   for(int = 0; i < 3; i++){
      |                       ^
Language: C++

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

int main() {
  string S,T;
  cin>>S>>T;
  int A=0;
  if(S.at(0)==T.at(0)){
    A=A+1;
  }
  if(S.at(1)==T.(1)){
    A=A+1;
  }
  if(S.at(2)==T.(2)){
    A=A+1;
  }
  cout<<A<< endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected unqualified-id before '(' token
   11 |   if(S.at(1)==T.(1)){
      |                 ^
a.cc:14:17: error: expected unqualified-id before '(' token
   14 |   if(S.at(2)==T.(2)){
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a; i< (int)(b); ++i)
using ll=long long;
using namespace std;
const auto mod=1e9+7;

template <typename T>
using GPQ=priority_queue<T,vector<T>,greater<T>>;


int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  
  string s,t; cin  >> s >> t;
  rep(i,0,3) if(s[i]==t[i]) ans++;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:29: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |   rep(i,0,3) if(s[i]==t[i]) ans++;
      |                             ^~~
      |                             abs
a.cc:18:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <iostream>
#include <string>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'retrun' was not declared in this scope
   15 |   retrun 0;
      |   ^~~~~~
Language: C++

#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;
#define REP(i,n) for((i)=0;(i)<(int)(n);(i)++)
using ll = long long;
using P = pair<int,int>;

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

  int ans = 0
  if(s[0]==t[0]) ans++;
  if(s[1]==t[1]) ans++;
  if(s[2]==t[2]) ans++;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:3: error: expected ',' or ';' before 'if'
   29 |   if(s[0]==t[0]) ans++;
      |   ^~
Language: C++

#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;
#define REP(i,n) for((i)=0;(i)<(int)(n);(i)++)
using ll = long long;
using P = pair<int,int>;

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

  int ans = 0
  if(s[i]=="S" && t[i]=="S") ans++;
  if(s[i]=="C" && t[i]=="C") ans++;
  if(s[i]=="R" && t[i]=="R") ans++;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:3: error: expected ',' or ';' before 'if'
   29 |   if(s[i]=="S" && t[i]=="S") ans++;
      |   ^~
a.cc:30:8: error: 'i' was not declared in this scope
   30 |   if(s[i]=="C" && t[i]=="C") ans++;
      |        ^
a.cc:31:8: error: 'i' was not declared in this scope
   31 |   if(s[i]=="R" && t[i]=="R") ans++;
      |        ^
Language: C++

#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;
#define REP(i,n) for((i)=0;(i)<(int)(n);(i)++)
using ll = long long;
using P = pair<int,int>;

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

  int ans = 0
  if(s[i]=="S" && t[i]=="T") ans++;
  if(s[i]=="C" && t[i]=="C") ans++;
  if(s[i]=="R" && t[i]=="R") ans++;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:3: error: expected ',' or ';' before 'if'
   29 |   if(s[i]=="S" && t[i]=="T") ans++;
      |   ^~
a.cc:30:8: error: 'i' was not declared in this scope
   30 |   if(s[i]=="C" && t[i]=="C") ans++;
      |        ^
a.cc:31:8: error: 'i' was not declared in this scope
   31 |   if(s[i]=="R" && t[i]=="R") ans++;
      |        ^
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<3;i++){
    if(S[i]==R[i]){
      count++;
    }
  }
  cout<<count<<endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'R' was not declared in this scope
    9 |     if(S[i]==R[i]){
      |              ^
Language: C++

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

int main(){
  string S,T;
  cin>>S>>T;
  int count=0;
  for(i=0;i<3;i++){
    if(S[i]==R[i]){
      count++;
    }
  }
  cout<<count<<endl;
}
  

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++){
      |       ^
a.cc:9:14: error: 'R' was not declared in this scope
    9 |     if(S[i]==R[i]){
      |              ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before '}' token
    9 |     if (s[i] == t[i]) a++
      |                          ^
      |                          ;
   10 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

int max(int a, int b)
{
   if(a > b) return a;
  return b;
}

int main()
{
  int n; cin>>n;
  int arr[n];
  for(int i = 0; i < n; i++)
    cin>>arr[i];
  int ans = 0;
  int cnt = 0;
  for(int i = 0; i < n; i++)
  {
    if(arr[i] >= arr[j]) cnt++;
    else
    {
      ans = max(ans,cnt);
      cnt = 0;
    }
  }
  cout<<max(ans,cnt);
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: 'j' was not declared in this scope
   20 |     if(arr[i] >= arr[j]) cnt++;
      |                      ^
Language: C++

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

int main(){
  string str;
  srting sts;
  cin >> str >> sts;
  int ans=0;
  for(int i=0; i<3; i++){
    if(str[i]==sts[i]) ans++;
  }
  cout << ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'srting' was not declared in this scope
    6 |   srting sts;
      |   ^~~~~~
a.cc:7:17: error: 'sts' was not declared in this scope; did you mean 'str'?
    7 |   cin >> str >> sts;
      |                 ^~~
      |                 str
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	cin.tie(0);
	cout.tie(0);
	int ans = 0;
	string pron;string cad;
	cin >> cad >> pron;
	for (int i = 0; i < 3; ++i)
	{
		if(cad[i] == pron[i]){ans++;
	}
     cout << ans;
}


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

#include <bits/stdc++.h>
using namespace std;
#define f first
#define s second
#define ll long long
#define ld long double
#define pii pair <int,int>
#define pll pair <ll,ll>
#define pil pair <int,ll>
#define pli pair <ll,int>
#define ull unsigned long long
#define pdd pair <double,double>
#define pb push_back
#define mp make_pair
#define puu pair<ull,ull>
#define pvv pair<vector<int>, vector<int> >
#define _bp __builtin_popcount
#define ptt pair <Tree*,Tree*>
#define all(v) v.begin(),v.end()
#define en "\n"
#define int ll
//const long double pi = acos(-1);
void boos()
{
     ios_base :: sync_with_stdio(false);
     cin.tie(0);
     cout.tie(0);
}
void file()
{
   freopen("max.in","r",stdin);
   freopen("max.out","w",stdout);
}
const ll INF = 1e9 + 7;
const ll INF1 = 998244353;
const ll LLINF = (ll)1e18;
const ll INTmx = (int)1e9;
const ld EPS = (ld)1e-9;
const int N = 3e5 + 100;
int main()
{
    //file();
    boos();
    string s,t;
    cin >> s >> t;
    int ans = 0;
    for(int i = 0;i <= 2;i++)
    {
    	if(s[i] == t[i])ans++;
	}
	cout << ans;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
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 d;
    for(int i = 0;i < 3; i++){
      if(s.charAt(i) == s.charAt(i)){
        d++;
      }
    }
    System.out.println(d);
  }
}

Compiler output:
Main.java:10: error: variable d might not have been initialized
        d++;
        ^
Main.java:13: error: variable d might not have been initialized
    System.out.println(d);
                       ^
2 errors
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 d;
    for(int i = 0;i < 3; i++){
      if(s.charAt(i) == s.charAt(i)){
        d++
      }
    }
    System.out.println(d);
  }
}

Compiler output:
Main.java:10: error: ';' expected
        d++
           ^
1 error
Language: C++

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

int main() {
  string s,t;cin>>s>>t;
  int ans=0;
  if (s[0]==t[0]) ans++;
  if (s[1]==t[1]) ans+;
  if (s[2]==t[2]) ans++;
  cout<<ans<<endl;
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
int main()
{
    string S, T;
    cin>> S>>T;

    int ans = 0;
    REP(i, 3){
        if(S[i] == T[i])  cnt++;
    }

    cout << ans << endl;


   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: 'cnt' was not declared in this scope; did you mean 'int'?
   12 |         if(S[i] == T[i])  cnt++;
      |                           ^~~
      |                           int
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected ';' before ')' token
    6 |   for(int i=0;i<3)if(S.at(i)==T.at(i))x++;
      |                  ^
      |                  ;
Language: C++

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

int main() {
	string s,t;
    getline(cin,s);
    getline(cin,t);
    int count=0;
    for(int i=0;i=<3;i++){
      if(s.at(i)==t.at(i)){
        count++;
      }      
    }
    cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected primary-expression before '<' token
    9 |     for(int i=0;i=<3;i++){
      |                   ^
Language: C++

S = input('S：')
T = input('T：')
count = 0
 
if S[0] == T[0]:
	count = count + 1
if S[1] == T[1]:
	count = count + 1
if S[2] == T[2]:
	count = count + 1
  
print(count)

Compiler output:
a.cc:1:11: warning: multi-character character constant [-Wmultichar]
    1 | S = input('S：')
      |           ^~~~~
a.cc:2:11: warning: multi-character character constant [-Wmultichar]
    2 | T = input('T：')
      |           ^~~~~
a.cc:1:1: error: 'S' does not name a type
    1 | S = input('S：')
      | ^
Language: C++

#include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
typedef long long ll;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:24:37: error: expected '}' at end of input
   24 |     } cout << ans << endl; return 0;
      |                                     ^
a.cc:20:11: note: to match this '{'
   20 | int main(){
      |           ^
Language: C

#include <stdio.h>
int main(void){
char a[3],b[3];
int count=0;
  
scanf("%s %s %s",a[0],a[1],a[2]);
scanf("%s %s %s",b[0],b[1],b[2]);

  for(int i=0;i<3;i++){
    if(a[i]==b[i]){
      count ++;
  }
    printf("%d",count);
  return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: expected '(' before '{' token
   15 |   } else if{
      |            ^
      |            (
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: expected '(' before '{' token
   15 |   } else if{
      |            ^
      |            (
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: expected '}' before 'else'
   15 |     else if{
      |     ^~~~
a.cc:13:48: note: to match this '{'
   13 |   } else if(S[1]==T[1]||S[3]==T[3]||S[2]==T[2]){
      |                                                ^
a.cc:15:12: error: expected '(' before '{' token
   15 |     else if{
      |            ^
      |            (
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string a,b;
  cin >> a >> b;
  int count = 0;
  for(int i=0;i < 3;i++){
  if(a.at(i) == b.at(i))
    count++
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before '}' token
    9 |     count++
      |            ^
      |            ;
   10 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string a,b;
  cin >> a >> b;
  int count = 0;
  for(i=0;i < 3;i++){
  if(a.at(i) == b.at(i))
    count++
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i < 3;i++){
      |       ^
a.cc:9:12: error: expected ';' before '}' token
    9 |     count++
      |            ^
      |            ;
   10 |   }
      |   ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: expected primary-expression before ')' token
   14 |   for()
      |       ^
a.cc:17:1: error: expected primary-expression before '}' token
   17 | }
      | ^
a.cc:16:12: error: expected ';' before '}' token
   16 |   return 0;
      |            ^
      |            ;
   17 | }
      | ~           
a.cc:17:1: error: expected primary-expression before '}' token
   17 | }
      | ^
a.cc:16:12: error: expected ')' before '}' token
   16 |   return 0;
      |            ^
      |            )
   17 | }
      | ~           
a.cc:14:6: note: to match this '('
   14 |   for()
      |      ^
a.cc:17:1: error: expected primary-expression before '}' token
   17 | }
      | ^
Language: C++

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

int main(){
  string s, t;
  cin >> s >> t;
  int ans = 0;
  if(s[0]) == t[0]) ans++;
  if(s[1]) == t[1]) ans++;
  if(s[2]) == t[2]) ans++;
  cout << ans <<endl;

	  
	  
  return 0;
}


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

#include <bits/stdc++.h>
#include <iostream>
#include <queue>

using namespace std;

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

struct Edge {
    long long to;
};

using Graph = vector<vector<Edge>>;

int swap(int i, int j) {
    if (i < j) swap(i, j);
    return i * (i - 1) / 2 + j + 1;
}

int abcd[2000000];  
int d[2000000];     
int a[1005][1005]
int dfs(const Graph &G, int n) {
  
    if (abcd[n] == 2) return d[n];
    abcd[n] = 1;
    for (auto e : G[n]) {
      
        if (abcd[e.to] == 1) {  
          
            cout << -1 << endl;
          
            exit(0);
        }
        chmax(d[n], dfs(G, e.to) + 1);
    }
    abcd[n] = 2;
  
    return d[n];
}
int main() {
    long long N;
  
    cin >> N;
    
    for(int i=0;i<N;i++){
     for(int j=0;j<N-1;j++)
     cin >> a[i][j];
     
     
  
    Graph G(N * (N - 1) / 2 + 1);
  
    for(int i=0; i<N; i++) {
        int n = 0;
       for(int j=0;j<N-1;j++) {
       
           a[i][j]--;
                    
            int ne = swap(i , a[i][j]);
          
            G[n].push_back({ne});
          
            n = ne;
        }
    }
  
    cout << dfs(G, 0) << endl;
  
    return 0;
}


Compiler output:
a.cc:30:1: error: expected initializer before 'int'
   30 | int dfs(const Graph &G, int n) {
      | ^~~
a.cc: In function 'int main()':
a.cc:55:13: error: 'a' was not declared in this scope
   55 |      cin >> a[i][j];
      |             ^
a.cc:65:12: error: 'a' was not declared in this scope
   65 |            a[i][j]--;
      |            ^
a.cc:75:13: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   75 |     cout << dfs(G, 0) << endl;
      |             ^~~
      |             ffs
a.cc:78:2: error: expected '}' at end of input
   78 | }
      |  ^
a.cc:48:12: note: to match this '{'
   48 | int main() {
      |            ^
Language: C++

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

int main(){
  char S,T;
  for (size_t i = 0; i < 3; i++) {
    cin >> S[i];
  }

  int res = 0;

  for (size_t i = 0; i < 3; i++) {
    cin >> T[i];
    if (S[i] == T[i]) {
      res++;
    }
  }
    cout << res << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: invalid types 'char[size_t {aka long unsigned int}]' for array subscript
    7 |     cin >> S[i];
      |             ^
a.cc:13:13: error: invalid types 'char[size_t {aka long unsigned int}]' for array subscript
   13 |     cin >> T[i];
      |             ^
a.cc:14:10: error: invalid types 'char[size_t {aka long unsigned int}]' for array subscript
   14 |     if (S[i] == T[i]) {
      |          ^
a.cc:14:18: error: invalid types 'char[size_t {aka long unsigned int}]' for array subscript
   14 |     if (S[i] == T[i]) {
      |                  ^
Language: C++

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

int main(){
  string S,T;
  for (size_t i = 0; i < 3; i++) {
    cin >> S[i];
  }
  int res = 0;
  for (size_t i = 0; i < ; i++) {
    cin >> T[i];
    if (S[i] == T[i]) {
      res++;
    }
  }
    cout << res << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected primary-expression before ';' token
   10 |   for (size_t i = 0; i < ; i++) {
      |                          ^
Language: Java

import java.util*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
  String str = sc.next();
  String str1 = sc.next();
  int cnt = 0;
  for(int i = 0; i<str.length(); i++) {
  char c = str.charAt(i);
    char c1 = str1.charAt(i);
    if(c==c1) cnt++;
  }
  System.out.println(cnt);
}
}

Compiler output:
Main.java:1: error: ';' expected
import java.util*;
                ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int idou = 0;
  int ans = 0;
  vector<int> H(N);
  for (int i = 0; i < N - 1; i++) {
    if (H.at(i) >= H.at(i + 1)) {
      idou++;
    }
    else (H.at(i) < H.at(i + 1)) {
      idou = 0;
    }
    if (ans < idou) {
      ans = idou;
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:33: error: expected ';' before '{' token
   13 |     else (H.at(i) < H.at(i + 1)) {
      |                                 ^~
      |                                 ;
Language: C++

#define CIN(a,b) cin >> a >> b
#define COUT(a,b) cout << a << b
#define COOUT(a) cout << a

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

int main () {
    string s, t;
    CIN(s, t);
    int count = 0;
    for (int i = 0; i < 3; i++){
        if (s.at(i) == t.at(i)){
            count++;
        }
    }
    COUT(count);
}

Compiler output:
a.cc:19:15: error: macro "COUT" requires 2 arguments, but only 1 given
   19 |     COUT(count);
      |               ^
a.cc:2:9: note: macro "COUT" defined here
    2 | #define COUT(a,b) cout << a << b
      |         ^~~~
a.cc: In function 'int main()':
a.cc:19:5: error: 'COUT' was not declared in this scope
   19 |     COUT(count);
      |     ^~~~
Language: C++

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

int main() {
	char c[4], d[4];
 	scanf("%s", c);
  	scanf("%s", c);
  int ans=0
    for(int i=0; i<3; i++) 
		if(c[i]==d[i]) ans++;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'for'
    9 |     for(int i=0; i<3; i++)
      |     ^~~
a.cc:9:18: error: 'i' was not declared in this scope
    9 |     for(int i=0; i<3; i++)
      |                  ^
Language: C

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

int main(void){
  char s[4];
  char t[4];
  int count = 0;
  scanf("%s", s);
  scanf("%s", t);
  for(int i=0; i<3; i++){
    if(strcmp(&(s+i), &(t+i))==0){
      count ++;
    }
  }
  printf("%d", count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: lvalue required as unary '&' operand
   11 |     if(strcmp(&(s+i), &(t+i))==0){
      |               ^
main.c:11:23: error: lvalue required as unary '&' operand
   11 |     if(strcmp(&(s+i), &(t+i))==0){
      |                       ^
Language: C++

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

int main(){
  	string s,t;
	cin >> s >> t;
    int ans = 0;
  	for(int i=0; i < s.size(); i++{
    	if (s.at(i) == t.at(i)){
        	ans++;
        }
    }
        
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:39: error: expected ')' before '{' token
    8 |         for(int i=0; i < s.size(); i++{
      |            ~                          ^
      |                                       )
Language: C++

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

int main() {
	string a,b;
	int c=0;
	cin >> a >> b;
	
	REP(i, 3) {
		if (a[i], b[i])
			c++;
	}
	cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'i' was not declared in this scope
   10 |         REP(i, 3) {
      |             ^
a.cc:10:9: error: 'REP' was not declared in this scope
   10 |         REP(i, 3) {
      |         ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  int a=0;
  for(i=0;i<3;i++)
  {if(s[0]==t[0])
      a++;
  else if (s[0]==t[0])
      a++;
    else
      a++;
  }
  cout<<a;
  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<stdio.h>
int main(){
  int n,i,k;
  scanf("%d",&n);
  int H[n],max[n];
  for(i=0;i<n;i++){
    scanf("%d",&H[i])
    }
  for(i=0;i<n;i++){
    for(k=i+1;H[i]>=H[k];k++){
      if(k==n-1) break;
      }
    max[i]=k-i;
    }
  int Ans=max[0];
  for(i=0;i<n;i++){
    if(Ans<max[i])Ans=max[i];
    }
  return 0;
  }


Compiler output:
main.c: In function 'main':
main.c:7:22: error: expected ';' before '}' token
    7 |     scanf("%d",&H[i])
      |                      ^
      |                      ;
    8 |     }
      |     ~
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String args[]){
    Scanner sc =new Scanner(System.in);
    Char[] a = sc.next().toCharArray();
    Char[] b = sc.next().toCharArray();
    int ans = 0;
    for(int i = 0;i < 3;i++){
      if(a[i] == b[i]) ans++;
    }
    System.out.println(ans);
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    Char[] a = sc.next().toCharArray();
    ^
  symbol:   class Char
  location: class Main
Main.java:7: error: cannot find symbol
    Char[] b = sc.next().toCharArray();
    ^
  symbol:   class Char
  location: class Main
2 errors
Language: Java

public java.util.Scanner;

public class Main{
  public static void main(String args[]){
    Scanner sc =new Scanner(System.in);
    Char[] a = sc.next().toCharArray();
    Char[] b = sc.next().toCharArray();
    int ans = 0;
    for(int i = 0;i < 3;i++){
      if(a[i] == b[i]) ans++;
    }
    System.out.println(ans);
  }
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
public java.util.Scanner;
       ^
1 error
Language: C++

/****************************
/////  Shubham Singhal
/////  LNMIIT
*****************************/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define eb emplace_back
#define lwr lower_bound
#define upr upper_bound
#define pq priority_queue
#define umap unordered_map
#define rep(i,n) for(i=0; i<n;i++)
#define repp(i,a,n) for(i=a; i<n;i++)
#define precise(x) cout<<fixed<<setprecision(x)
#define all(x) x.begin(),x.end()
#define lcm(a,b) (a*b)/__gcd(a,b)
#define prn(x) cout<<x<<"\n"
#define prn2(x, y) cout<<x<<" "<<y<<"\n"
#define prn3(x, y, z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define prn4(x, y, z, a) cout<<x<<" "<<y<<" "<<z<<" "<<a<<"\n"
#define prnv(x) for(auto i:x) cout<<i<<" "; cout<<"\n"
#define MOD 1000000007

using namespace std;
 
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd; 
typedef vector<int> vi;
typedef vector<long> vl;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pii> vpii;
typedef vector<pil> vpil;
typedef vector<pli> vpli;
typedef vector<pll> vpll;
const long long INF64 = 1'000'000'000'000'000'000ll;
clock_t time_p=clock();
void time()
{
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}
void doc()
{
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
}
void fast()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
}

int main()
{
	fast();
	string a,b;
	cin>>a>>b;
	ll ans=0;
	for(i=0;i<3;i++)
	{
		if(a[i]==b[i])
			ans++;
	}
	cout<<ans;
}

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

/****************************
/////  Shubham Singhal
/////  LNMIIT
*****************************/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define eb emplace_back
#define lwr lower_bound
#define upr upper_bound
#define pq priority_queue
#define umap unordered_map
#define rep(i,n) for(i=0; i<n;i++)
#define repp(i,a,n) for(i=a; i<n;i++)
#define precise(x) cout<<fixed<<setprecision(x)
#define all(x) x.begin(),x.end()
#define lcm(a,b) (a*b)/__gcd(a,b)
#define prn(x) cout<<x<<"\n"
#define prn2(x, y) cout<<x<<" "<<y<<"\n"
#define prn3(x, y, z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define prn4(x, y, z, a) cout<<x<<" "<<y<<" "<<z<<" "<<a<<"\n"
#define prnv(x) for(auto i:x) cout<<i<<" "; cout<<"\n"
#define MOD 1000000007

using namespace std;
 
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd; 
typedef vector<int> vi;
typedef vector<long> vl;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pii> vpii;
typedef vector<pil> vpil;
typedef vector<pli> vpli;
typedef vector<pll> vpll;
const long long INF64 = 1'000'000'000'000'000'000ll;
clock_t time_p=clock();
void time()
{
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}
void doc()
{
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
}
void fast()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
}

int main()
{
	fast();
	string a,b;
	cin>>a>>b;
	ll ans=0;
	for(i=0;i<3;i++)
	{
		if(a[i]!=b[i])
			ans++;
	}
	cout<<ans;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  string a,b;
  cin >> a >> b;
  int x;
  x = 0;
  for(i=0;i<3;i++){
    if(a.at(i)==b.at(i)){
      ++x;
    }
  }
  cout << x << endl;
}


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++

S = input()
T = input()
count=0
i=0
while(i<=2):
	if S[i:i+1]==T[i:i+1]:
		count+=1
	i+=1
print(count)

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

int main(void){
  
  char s[3], t[3];
  int ans = 1;
  
  for(i = 0 ; i <= 2 ; i++){
    if(s[i] == t[i]){
      ans++;
    }
    
  printf('%d', ans);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: 'i' undeclared (first use in this function)
    6 |   for(i = 0 ; i <= 2 ; i++){
      |       ^
main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   11 |   printf('%d', ans);
      |   ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:11:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   11 |   printf('%d', ans);
      |   ^~~~~~
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:10: warning: multi-character character constant [-Wmultichar]
   11 |   printf('%d', ans);
      |          ^~~~
main.c:11:10: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   11 |   printf('%d', ans);
      |          ^~~~
      |          |
      |          int
main.c:11:10: note: expected 'const char *' but argument is of type 'int'
main.c:14:1: error: expected declaration or statement at end of input
   14 | }
      | ^
Language: C

int main(void){
  
  char s[3], t[3];
  int ans = 1;
  
  for(i = 0 ; i <= 2 ; i++){
    if(s[i] == t[i]){
      ans++;
    }
    else{}
    
  printf('%d', ans);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: 'i' undeclared (first use in this function)
    6 |   for(i = 0 ; i <= 2 ; i++){
      |       ^
main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 |   printf('%d', ans);
      |   ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:12:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   12 |   printf('%d', ans);
      |   ^~~~~~
main.c:12:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:10: warning: multi-character character constant [-Wmultichar]
   12 |   printf('%d', ans);
      |          ^~~~
main.c:12:10: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   12 |   printf('%d', ans);
      |          ^~~~
      |          |
      |          int
main.c:12:10: note: expected 'const char *' but argument is of type 'int'
main.c:15:1: error: expected declaration or statement at end of input
   15 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
 
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long int
#define mod 1000000007
 
using namespace std;
 
signed main()
{
    fast;
    strind s1,s2;
    cin>>s1;

    cin>>s2;
    int count = 0;
    for ( int i = 0 ; i < s1.length() ; i++ )
    {
        if ( s1[i] == s2[i] )
        {
            count++;
        }
    }

    cout<<count<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'strind' was not declared in this scope; did you mean 'strtod'?
   16 |     strind s1,s2;
      |     ^~~~~~
      |     strtod
a.cc:17:10: error: 's1' was not declared in this scope; did you mean 'y1'?
   17 |     cin>>s1;
      |          ^~
      |          y1
a.cc:19:10: error: 's2' was not declared in this scope
   19 |     cin>>s2;
      |          ^~
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char s[10]
  char t[10];
  int i,a;
  scanf("%s",s);
  scanf("%s",t);
  a = 0;
for(i=0;i<3;i++){
  if(s[i] != t[i]) a++;
}
  printf("%d",a);
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: expected ';' before 'char'
    4 |   char s[10]
      |             ^
      |             ;
    5 |   char t[10];
      |   ~~~~       
main.c:7:14: error: 's' undeclared (first use in this function)
    7 |   scanf("%s",s);
      |              ^
main.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char s[10]
  char t[10];
  int i,a;
  scanf("%d",s);
  scanf("%d",t);
  a = 0;
for(i=0;i<3;i++){
  if(s[i] != t[i]) a++;
}
  printf("%d",a);
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: expected ';' before 'char'
    4 |   char s[10]
      |             ^
      |             ;
    5 |   char t[10];
      |   ~~~~       
main.c:7:14: error: 's' undeclared (first use in this function)
    7 |   scanf("%d",s);
      |              ^
main.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char s[10]
  char t[10];
  int i,a;
  scanf("%d",&s);
  scanf("%d",&t);
  a = 0;
for(i=0;i<3;i++){
  if(S[i] != T[i]) a++;
}
  printf("%d",a);
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: expected ';' before 'char'
    4 |   char s[10]
      |             ^
      |             ;
    5 |   char t[10];
      |   ~~~~       
main.c:7:15: error: 's' undeclared (first use in this function)
    7 |   scanf("%d",&s);
      |               ^
main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:6: error: 'S' undeclared (first use in this function)
   11 |   if(S[i] != T[i]) a++;
      |      ^
main.c:11:14: error: 'T' undeclared (first use in this function)
   11 |   if(S[i] != T[i]) a++;
      |              ^
Language: C

#include <stdio.h>
#include<string.h>
int main(){
  char *S[3],*T[3];
  int i,count;
  scanf("%s",S);
  scanf("%s",T);
  for (i=1;i<=3;i++){
    if(strcmp(S[i],T[i]) == 0){
      count = count+1;
    }
  }

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

#include <stdio.h>
#include<string.h>
int main(){
  char S[3],T[3];
  int i,count;
  scanf("%s",S);
  scanf("%s",T);
  for (i=1;i<=3;i++){
    if(strcmp(S[i],T[i]) == 0){
      count = count+1;
    }
  }

Compiler output:
main.c: In function 'main':
main.c:9:16: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    9 |     if(strcmp(S[i],T[i]) == 0){
      |               ~^~~
      |                |
      |                char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:9:21: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    9 |     if(strcmp(S[i],T[i]) == 0){
      |                    ~^~~
      |                     |
      |                     char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:12:3: error: expected declaration or statement at end of input
   12 |   }
      |   ^
Language: C

#include <stdio.h>
#include<string.h>
int main(){
  char S[3],T[3];
  int i,count;
  scanf("%s",S);
  scanf("%s",T)
  for (i=1;i<=3;i++){
    if(strcmp(S[i],T[i]) == 0){
      count = count+1;
    }
  }

Compiler output:
main.c: In function 'main':
main.c:7:16: error: expected ';' before 'for'
    7 |   scanf("%s",T)
      |                ^
      |                ;
    8 |   for (i=1;i<=3;i++){
      |   ~~~           
main.c:12:3: error: expected declaration or statement at end of input
   12 |   }
      |   ^
Language: C

#include <stdio.h>
#include<string.h>
int main(){
  char S[3],T[3];
  int i,count;
  for (i=1;i<=3;i++){
    if(strcmp(S[i],T[i]) == 0){
      count = count+1;
    }
  }

Compiler output:
main.c: In function 'main':
main.c:7:16: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    7 |     if(strcmp(S[i],T[i]) == 0){
      |               ~^~~
      |                |
      |                char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:7:21: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    7 |     if(strcmp(S[i],T[i]) == 0){
      |                    ~^~~
      |                     |
      |                     char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:10:3: error: expected declaration or statement at end of input
   10 |   }
      |   ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  char s[3], t[3];
  int ct=0;
  for(i=0; i<3; i++)
    cin >> s[i];
  for(i=0; i<3; i++)
    cin >> t[i];
  for(i=0; i<3; i++)
    if(s[i]==t[i]) ct++;
  cout << ct << endl;
  return 0;
}


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

int main(void) {
	int a=0;
	char s[3],rs[3];
	for (int i = 0; i < 3;i++) {
		scanf("%c",&s[i]);
	}
	getchar();
	for (int i = 0; i < 3; i++) {
		scanf("%c", &rs[i]);
	}
	for (int i = 0; i < 3; i++) {
		if (s[i]==rs[i]) {
			a += 1;
		}
	}
	printf("%d",a);

	//system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'scanf' was not declared in this scope
    5 |                 scanf("%c",&s[i]);
      |                 ^~~~~
a.cc:7:9: error: 'getchar' was not declared in this scope
    7 |         getchar();
      |         ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void) {
a.cc:9:17: error: 'scanf' was not declared in this scope
    9 |                 scanf("%c", &rs[i]);
      |                 ^~~~~
a.cc:16:9: error: 'printf' was not declared in this scope
   16 |         printf("%d",a);
      |         ^~~~~~
a.cc:16:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
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();
      
      	for(int i = 0; i < s.length(); i++){
        	char[] slist = new char[3];
          	slist[i] = s.charAt(i);
        }
      	
      	for(int i = 0; i < t.length(); i++){
        	char[] tlist = new char[3];
          	tlist[i] = t.charAt(i);
        }
      	
      	int result = 0;
      
      	for(int i = 0; i < slist.length; i++){
          	if(slist[i] == tlist[i]){
            	result += 1;
            }
        }
      
      System.out.println(result);
	}
}

Compiler output:
Main.java:21: error: cannot find symbol
      	for(int i = 0; i < slist.length; i++){
      	                   ^
  symbol:   variable slist
  location: class Main
Main.java:22: error: cannot find symbol
          	if(slist[i] == tlist[i]){
          	   ^
  symbol:   variable slist
  location: class Main
Main.java:22: error: cannot find symbol
          	if(slist[i] == tlist[i]){
          	               ^
  symbol:   variable tlist
  location: class Main
3 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int s = sc.nextInt();
      	int t = sc.nextInt();
      
      	for(int i = 0; i < s.length(); i++){
        	char[] slist = new char[3];
          	slist[i] = s.charAt(i);
        }
      	
      	for(int i = 0; i < t.length(); i++){
        	char[] tlist = new char[3];
          	tlist[i] = t.charAt(i);
        }
      	
      	int result = 0;
      
      	for(int i = 0; i < slist.length; i++){
          	if(slist[i] == tlist[i]){
            	result += 1;
            }
        }
      
      System.out.println(result);
	}
}

Compiler output:
Main.java:9: error: int cannot be dereferenced
      	for(int i = 0; i < s.length(); i++){
      	                    ^
Main.java:11: error: int cannot be dereferenced
          	slist[i] = s.charAt(i);
          	            ^
Main.java:14: error: int cannot be dereferenced
      	for(int i = 0; i < t.length(); i++){
      	                    ^
Main.java:16: error: int cannot be dereferenced
          	tlist[i] = t.charAt(i);
          	            ^
Main.java:21: error: cannot find symbol
      	for(int i = 0; i < slist.length; i++){
      	                   ^
  symbol:   variable slist
  location: class Main
Main.java:22: error: cannot find symbol
          	if(slist[i] == tlist[i]){
          	   ^
  symbol:   variable slist
  location: class Main
Main.java:22: error: cannot find symbol
          	if(slist[i] == tlist[i]){
          	               ^
  symbol:   variable tlist
  location: class Main
7 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int s = sc.nextInt();
      	int t = sc.nextInt();
      
      	for(int i = 0; i < s.length(); i++){
        	char slist[] = new char[];
          	slist[i] = s.charAt(i);
        }
      	
      	for(int i = 0; i < t.length(); i++){
        	char tlist[] = new char[];
          	tlist[i] = t.charAt(i);
        }
      	
      	int result = 0;
      
      	for(int i = 0; i < slist.length; i++){
          	if(slist[i] == tlist[i]){
            	result += 1;
            }
        }
      
      System.out.println(result);
	}
}

Compiler output:
Main.java:10: error: array dimension missing
        	char slist[] = new char[];
        	                         ^
Main.java:15: error: array dimension missing
        	char tlist[] = new char[];
        	                         ^
2 errors