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

using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.IO;

class Program
{
    static void Main(string[] args)
    {
        var N = Console.ReadLine();
        var S = Console.ReadLine();

        int sum = 0;

        for (var i = 0; i < 3; i++)
        {
            if(N[i] == S[i])
            {
                sum++;
            }
        }

        Console.WriteLine(sum);
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Collections;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Linq;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.IO;
      |       ^~~~~~
a.cc:9:22: error: 'string' has not been declared
    9 |     static void Main(string[] args)
      |                      ^~~~~~
a.cc:9:31: error: expected ',' or '...' before 'args'
    9 |     static void Main(string[] args)
      |                               ^~~~
a.cc:26:2: error: expected ';' after class definition
   26 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:11:9: error: 'var' was not declared in this scope
   11 |         var N = Console.ReadLine();
      |         ^~~
a.cc:12:13: error: expected ';' before 'S'
   12 |         var S = Console.ReadLine();
      |             ^
a.cc:16:18: error: expected ';' before 'i'
   16 |         for (var i = 0; i < 3; i++)
      |                  ^
a.cc:16:25: error: 'i' was not declared in this scope
   16 |         for (var i = 0; i < 3; i++)
      |                         ^
a.cc:18:16: error: 'N' was not declared in this scope
   18 |             if(N[i] == S[i])
      |                ^
a.cc:18:24: error: 'S' was not declared in this scope
   18 |             if(N[i] == S[i])
      |                        ^
a.cc:24:9: error: 'Console' was not declared in this scope
   24 |         Console.WriteLine(sum);
      |         ^~~~~~~
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.at(i) == T.at(i)) {
            N++
        }
    }

    cout << N << endl;
}

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

#include<bits\stdc++.h>
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPS(i,n) for(int i=1, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
using ll = long long;
using namespace std;
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:1:9: fatal error: bits\stdc++.h: No such file or directory
    1 | #include<bits\stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>
int main(){
std::string S,T,ans=0;
std::cin>>S>>T;
for (int i=0;i<3;i++){
  if(S[i]==T[i]){
    ans++;
  }
}
std::cout<<ans<<std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
    8 |     ans++;
      |     ~~~^~
Language: C++

#include<iostream>
#include<string>
int main(){
std::string S,T,ans=0;
std::cin>>S>>T;
for (int i=0;i<3;i++){
  if(S[i]==T[i]){
    ans ++;
  }
}
std::cout<<ans<<std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
    8 |     ans ++;
      |     ~~~~^~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <unordered_map>

using namespace std;
using ll = long long;

void _cin(){} template <class Head, class... Tail> void _cin(Head&& head, Tail&&... tail){ cin >> head; _cin(forward<Tail>(tail)...); }
void _cout(){ cout << "\n"; } template <class Head, class... Tail> void _cout(Head&& head, Tail&&... tail){ cout << head; _cout(forward<Tail>(tail)...); }
int gcd(int a, int b){ return (b == 0) ? a : gcd(b, a % b); }
template<typename S, typename T> ostream& operator<<(ostream &os, const pair<S, T> &p){ cout << "[" << p.first << ", " << p.second << "]"; return os; }

#define Sq(x) (x)*(x)
#define For(i, n) for(int i = 0; i < (n); i ++)
#define For1(i, n) for(int i = 1; i <= (n); i ++)
#define Rep(n) For(_, n)
#define Range(c) c.begin(), c.end()
#define RevRange(c) c.rbegin(), c.rend()
#define Contains(c, x) (find(Range(c), x) != c.end())
#define Search(rb, re, x) distance(rb, find(rb, re, x))
#define Sort(a) sort(Range(a))
#define DeSort(a) sort(RevRange(a))
#define Reverse(c) reverse(Range(c))
#define Unique(a) a.erase(unique(Range(a)), a.end())
#define Cusum(T, xs, sxs) vector<T> sxs(xs.size()+1); For(i, (int)xs.size()) sxs[i+1] = sxs[i] + xs[i]
#define Cin(T, ...) T __VA_ARGS__; _cin(__VA_ARGS__)
#define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i]
#define Cins2(T, n, xs, ys) vector<T> xs(n), ys(n); For(i, n) cin >> xs[i] >> ys[i]
#define Cins3(T, n, xs, ys, zs) vector<T> xs(n), ys(n), zs(n); For(i, n) cin >> xs[i] >> ys[i] >> zs[i]
#define Cinss(T, n, m, xs) Vec2(T, n, m, xs); For(i, n) For(j, m) cin >> xs[i][j]
#define Cinm(T, n, map) unordered_map<T, int> map; Rep(n){ Cin(T, x); map[x] ++; }
#define Cout(...) _cout(__VA_ARGS__)
#define Couts(xs) { for(const auto &e : xs) cout << e << " "; cout << "\n"; }
#define Coutyn(cond) Cout((cond) ? "yes" : "no")
#define CoutYn(cond) Cout((cond) ? "Yes" : "No")
#define CoutYN(cond) Cout((cond) ? "YES" : "NO")
#define vc vector
#define Mini(a, x) a = min(a, x)
#define Maxi(a, x) a = max(a, x)

// constexpr int MOD = 1e9+7;

int main(void){
    Cins(string, s, t);
    Cout((s[0] == t[0]) + (s[1] == t[1]) + (s[2] == t[2]));
}




Compiler output:
a.cc: In function 'int main()':
a.cc:48:18: error: 's' was not declared in this scope
   48 |     Cins(string, s, t);
      |                  ^
a.cc:31:37: note: in definition of macro 'Cins'
   31 | #define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i]
      |                                     ^
Language: C++

#include<string>
#include<iostream>

using namespace std;
int main(){
  string S,T;
  int ans;
  cin>>S;
  cin>>T;
  for(int i=0;i!=3;i++){
    if(S[i] == T[i]) ans++;
  }
  return ans;

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
    7 |     if(S.at(i) == T.at(i)) count++;
      |                            ~~~~~^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
    7 |     if(S[i] == T[i]) count++;
      |                      ~~~~~^~
Language: C++

include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
ll gcd(ll a, ll b){
    if(b == 0) return a;
    return gcd(b,a%b);
}
/*文字列s=abbbccccをk回繰り返したものは、sの頭と
ケツが同じなので、連結部でk-1回同じものが隣り合う

s=abbbccccaaa 
sの頭からケツに向かって、また、ケツから頭に向かって、
頭=ケツとなる文字が何個連続するかカウントする
その合計が連結部での同じ文字の連続個数Cで、
C/2 * k-1が連結部での操作回数D
上の例では、連結部でk-1回aが4個連続する
頭=ケツとなっている文字以外の文字列部で下と
同じ操作をし、k倍したものがsの頭ケツ以外での
操作回数E
最後に頭とケツそれぞれの連結個数/2とDとEを
足したものが答え

頭=ケツでない場合は連続する文字毎に、連続回数/2
を足していったものがsだけでの最小操作回数で
これをk倍したものが答え

s = aaa

全部同じ場合、sの長さ*k/2が答え

*/
int main() {
 string S;
 cin >> S;
 ll K;
 cin >> K;
 ll ans = 0;
 ll c =1;
 ll d = 0;//sだけでの最小操作回数
 int l = S.size();
 S.push_back('#');
  
 if(S[0] != S[l-1]){
  for(int i = 0;i<l;i++){
   if(S[i] == S[i+1]){
     c++;
   }
   else{
    d += c/2;
    c = 1;
   }
  }
   ans = d*K;    
 }
  S.pop_back();
 
 int c2 =1;
 for(int i=0;i<l-1;i++){
  if(S[i] == S[i+1]) c2++;
  }
 cout<<c2 <<endl;
  
 if(c2 == l){
  ans = l*K/2;
 }
  
 if(c2 != l && S[0] == S[l-1]){//sが全て同じ文字でないが、ケツも頭は同じ
 char I = S[0];
 int ns = 0;//頭の同じ文字が終わる位置
 int nl = 0;//ケツの同じ文字が終わる位置
 int cs = 1;
 int cl = 1;
 int i = 0;
 while(true){
  if(S[i] == S[i+1]){
    cs++;
  }
  else{
  }
 }
 }
   
   
   cout << ans

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:3:9: error: 'pair' does not name a type
    3 | typedef pair<int,int> P;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:34:2: error: 'string' was not declared in this scope
   34 |  string S;
      |  ^~~~~~
a.cc:35:2: error: 'cin' was not declared in this scope
   35 |  cin >> S;
      |  ^~~
a.cc:35:9: error: 'S' was not declared in this scope
   35 |  cin >> S;
      |         ^
a.cc:62:2: error: 'cout' was not declared in this scope
   62 |  cout<<c2 <<endl;
      |  ^~~~
a.cc:62:13: error: 'endl' was not declared in this scope
   62 |  cout<<c2 <<endl;
      |             ^~~~
a.cc:85:15: error: expected '}' at end of input
   85 |    cout << ans
      |               ^
a.cc:33:12: note: to match this '{'
   33 | int main() {
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'enedl' was not declared in this scope
   11 |   cout << cnt << enedl;
      |                  ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
using namespace std;
int main (){
	string S,T;
    int c;

    cin >> S >> T;

    for(int i=0;i<S.length;i++){
        if(S[i]==T[i]){
            c++;
        }
    }

    cout << i << endl;

}

Compiler output:
a.cc:1:2: error: extended character   is not valid in an identifier
    1 | #include <iostream>
      |  ^
a.cc:1:2: error: invalid preprocessing directive #include\U000000a0
    1 | #include <iostream>
      |  ^~~~~~~~
a.cc:3:2: error: extended character   is not valid in an identifier
    3 | #include <utility>
      |  ^
a.cc:3:2: error: invalid preprocessing directive #include\U000000a0
    3 | #include <utility>
      |  ^~~~~~~~
a.cc:4:2: error: extended character   is not valid in an identifier
    4 | #include <algorithm>
      |  ^
a.cc:4:2: error: invalid preprocessing directive #include\U000000a0
    4 | #include <algorithm>
      |  ^~~~~~~~
a.cc:5:1: error: extended character   is not valid in an identifier
    5 | using namespace std;
      | ^
a.cc:5:1: error: extended character   is not valid in an identifier
a.cc:5:1: error: 'using\U000000a0namespace\U000000a0std' does not name a type
    5 | using namespace std;
      | ^~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string S,T;
      |         ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from a.cc:2:
/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:10:5: error: 'cin' was not declared in this scope
   10 |     cin >> S >> T;
      |     ^~~
a.cc:10:12: error: 'S' was not declared in this scope
   10 |     cin >> S >> T;
      |            ^
a.cc:10:17: error: 'T' was not declared in this scope
   10 |     cin >> S >> T;
      |                 ^
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << i << endl;
      |     ^~~~
a.cc:18:13: error: 'i' was not declared in this scope
   18 |     cout << i << endl;
      |             ^
a.cc:18:18: error: 'endl' was not declared in this scope
   18 |     cout << i << endl;
      |                  ^~~~
Language: Java

import java.util.*;

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


Compiler output:
Main.java:9: error: cannot find symbol
    for(i = 0; i < str_a.length(); i++) {
        ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    for(i = 0; i < str_a.length(); i++) {
               ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    for(i = 0; i < str_a.length(); i++) {
                                   ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
      if(str_a.charAt(i) == str_b.charAt(i)) count++;
                      ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
      if(str_a.charAt(i) == str_b.charAt(i)) count++;
                                         ^
  symbol:   variable i
  location: class Main
5 errors
Language: C++

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

#define ll long long int

int main(){
    string s,ss;
    cin >> s >> ss;
    int sum = 0;
    for(i=0;i<s.size();i++)
        sum += s[i] == ss[i];
    cout << sum << '\n';

    return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: conflicting declaration 'std::string s'
    5 |         string s,t;
      |                ^
a.cc:4:13: note: previous declaration as 'int s'
    4 |         int s=0;
      |             ^
a.cc:8:13: error: invalid types 'int[int]' for array subscript
    8 |         if(s[i]==t[i])
      |             ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:19: error: 'i' was not declared in this scope
    4 |   string s,t; rep(i,3) cin >> s.at(i); rep(i,3) cin >> t.at(i);
      |                   ^
a.cc:4:15: error: 'rep' was not declared in this scope
    4 |   string s,t; rep(i,3) cin >> s.at(i); rep(i,3) cin >> t.at(i);
      |               ^~~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
char a[10];
char b[10];
int sum;
int main()
{
	gets(a);
	gets(b);
	for(int i=1;i<=3;i++)
	{
		if(a[i]==b[i])
		{
			sum++;
		}
	}
	cout<<sum<<endl;
	return 0;
}

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

    int x;
    for(int i=1;i<=3;i++){
      	if(S[i] == T[i]){
          x++;
        }
    	printf("%d",x);
      return 0;
    }

Compiler output:
a.cc:2:5: error: expected unqualified-id before 'for'
    2 |     for(int i=1;i<=3;i++){
      |     ^~~
a.cc:2:17: error: 'i' does not name a type
    2 |     for(int i=1;i<=3;i++){
      |                 ^
a.cc:2:22: error: 'i' does not name a type
    2 |     for(int i=1;i<=3;i++){
      |                      ^
Language: C++

int x;
for(i=1;i<=3;i++){
  	if(S[i] == T[i]){
      x++;
    }
	printf("%d",x)
}

Compiler output:
a.cc:2:1: error: expected unqualified-id before 'for'
    2 | for(i=1;i<=3;i++){
      | ^~~
a.cc:2:9: error: 'i' does not name a type
    2 | for(i=1;i<=3;i++){
      |         ^
a.cc:2:14: error: 'i' does not name a type
    2 | for(i=1;i<=3;i++){
      |              ^
Language: C

#include <stdio.h>

int main(){
	char S[3];
	char T[3];
	int cnt = 0;
	printf("S\n");
	scanf("%s", S);
	printf("S\n");
	scanf("%s", T);

	for(int i = 0; i < 3; i++){
		if(S[i] == T[i]){
			cnt++;
		}
	}

	print("%d", cnt);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   18 |         print("%d", cnt);
      |         ^~~~~
      |         printf
Language: C++

#include <algorithm>
#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <vector>
#include <queue>
using namespace std;

int main(){
    int N;
    cin >> N;
    int sum;
    sum = N(N-1)/2;
    cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'N' cannot be used as a function
   13 |     sum = N(N-1)/2;
      |           ~^~~~~
Language: C++

#include <algorithm>
#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <vector>
#include <queue>
using namespace std;

int main(){
    int N;
    cin >> N;
    int sum;
    sum = N(N-1)/2
    cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'N' cannot be used as a function
   13 |     sum = N(N-1)/2
      |           ~^~~~~
Language: Java

import java.util.Scanner;

public class ABC139_A{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String t = sc.next();

    int ans = 0;
    for(int i=0; i<3; ++i)
      if( s.charAt(i) == t.charAt(i) ) ++ans;
    System.out.println(ans);
  }
}

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

#include <stdio.h>
char a[300];
char b[300];
int ans;
int main(){
	scanf("%s",a);
	scnaf("%s",b);
	for(int i=0;i<3;i++){
		if(a[i]==b[i])ans++;
	}
	printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scnaf' was not declared in this scope; did you mean 'scanf'?
    7 |         scnaf("%s",b);
      |         ^~~~~
      |         scanf
Language: C++

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

int main() {
  string S, T;
  int ans = 0;
  
  cin >> S;
  cin >> T;
  
  for (i = 0; i < 3; i++) {
    if (S.at(i) == T.at(i)) {
      ans++;
    }
  }
  
  cout << ans << endl;
}
  
  

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'cnt' was not declared in this scope; did you mean 'int'?
    9 |         if(s[i] == t[i]) cnt++;
      |                          ^~~
      |                          int
a.cc:11:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |         cout << cnt << endl;
      |                 ^~~
      |                 int
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main()
{
    string forcast, actual;
    cin >> forcast >> actual;
    int result = 0;

    for (size-t i = 0; i < 3; ++i){
        if (forcast[i] == actual[i])
            ++result;
    }

    cout << result << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 't' was not declared in this scope; did you mean 'tm'?
   12 |     for (size-t i = 0; i < 3; ++i){
      |               ^
      |               tm
a.cc:12:24: error: 'i' was not declared in this scope
   12 |     for (size-t i = 0; i < 3; ++i){
      |                        ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main()
{
    string forcast, actual;
    int result = 0;

    for (size-t i = 0; i < 3; ++i){
        if (forcast[i] == actual[i])
            ++result;
    }

    cout << result << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 't' was not declared in this scope; did you mean 'tm'?
   11 |     for (size-t i = 0; i < 3; ++i){
      |               ^
      |               tm
a.cc:11:24: error: 'i' was not declared in this scope
   11 |     for (size-t 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;
  for(int i = 0, i < 3; i++){
    if (s[i] == t[i]) counter++;
  }
  cout << counter << endl;
  return 0;
}

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

import java.util.*;
public class aaa {
	public static void Main(String args[]){
		Scanner sc=new Scanner(System.in);
		String a=sc.next();
		String b=sc.next();
		int n=0;
		for(int i=0;i<3;i++){
			if(a.charAt(i)==b.charAt(i)){
				n=n+1;
			}
		}
		System.out.print(n);
		
	}
}


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

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

int main(){
  string a;
  sring b;
  cin>>a;
  cin>>b;
  int count=0;
  int i;
  
  for(i=0;i<=2;i++){
  if(a[i]==b[i]){
    count++;
  }
  }
  cout<<count<<endl;
  return 0;
}
  

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'a' was not declared in this scope
    8 |         if(a[i] == b[i]) {
      |            ^
a.cc:8:20: error: 'b' was not declared in this scope
    8 |         if(a[i] == b[i]) {
      |                    ^
Language: Java

import java.util.*;
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 count=0;
      	for(int i=0;i<a.length;i++){
        	if(a[i]==b[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: Java

import java.util.*;
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 count=0;
      	for(int i=0;i<3;i++){
        	if(a[i]==b[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(){
	char a1[4],a2[4];
  scanf("%s%s",a1,a2);
  int t=0;
  for(int i=0;i<3;i++){
  	if(a1[i]==a2[i]) t++;
  }
  cout<<t<<endl;
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:3: error: 'cout' undeclared (first use in this function)
    9 |   cout<<t<<endl;
      |   ^~~~
main.c:9:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:12: error: 'endl' undeclared (first use in this function)
    9 |   cout<<t<<endl;
      |            ^~~~
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String ac1=sc.nextLine();
    String ac2=sc.nextLine();
    int same=0;
    for(int a=0;a<3;a++){
      if(ac1.charAt(a).equals(ac2.charAt(a)));
      same++;
    }
    System.out.println(same);
  }
}

Compiler output:
Main.java:9: error: char cannot be dereferenced
      if(ac1.charAt(a).equals(ac2.charAt(a)));
                      ^
1 error
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String ac1=sc.nextLine();
    String ac2=sc.nextLine();
    int same=0;
    for(int a=0;a<3+a++){
      if(ac1.charAt(a).equals(ac2.charAt(a)));
      same++;
    }
    System.out.println(same);
  }
}

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

#include<stdio.h>
int main(void){
int a,b,c,i;
scanf("%d %d".&a,&b);
for(i=1;c<b;i++)
{
 c=a*i-(i-1);
 }
 printf("%d",a);
 return 0;
 }
 

Compiler output:
main.c: In function 'main':
main.c:4:15: error: expected identifier before '&' token
    4 | scanf("%d %d".&a,&b);
      |               ^
Language: C

#include<stdio.h>
int main(void){
int a,b,i;
scanf("%d %d".&a,&b);
for(i=1;i<b;i++)
{
 a*i-(i-1);
 }
 printf("%d",a);
 return 0;
 }
 

Compiler output:
main.c: In function 'main':
main.c:4:15: error: expected identifier before '&' token
    4 | scanf("%d %d".&a,&b);
      |               ^
Language: Java

import java.util.Scanner;

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

        String S, T;
        S = sc.nextLine();
        T = sc.nextLine();

        int cnt = 0;

        char[] cS = S.toCharArray();
        char[] cT = T.toCharArray();

        for(int i = 0; i<3;i++){
            if(cS[i] == cT[i]){
                    cnt ++;
            }
        }
        System.out.println(cnt);
    }
}


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

#include <iostream>

#include <stdio.h>

using namespace std;

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


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

#include <iostream>
#include <stdio.h>

using namespace std;

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


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

#include <iostream>
#include <stdio.h>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets_s' was not declared in this scope
   10 |         gets_s(a);
      |         ^~~~~~
Language: C++

#include "stdafx.h"
#include <iostream>
#include <stdio.h>

using namespace std;

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


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

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
 
        String S, T;
        S = sc.nextLine();
        T = sc.nextLine();
 
        int cnt = 0;
 
        char[] cS = S.toCharArray();
        char[] cT = S.toCharArray();
 
        for(int i = 1; i<=3;i++){
            if(cS[i] == cT[i]){
                    cnt ++;
            }
        }
        System.out.println(cnt);
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String args[]){
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;

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

        String S, T;
        S = sc.nextLine();
        T = sc.nextLine();

        int cnt = 0;

        char[] cS = S.toCharArray();
        char[] cT = S.toCharArray();

        for(int i = 1; i<=3;i++){
            if(cS[i] == cT[i]){
                    cnt ++;
            }
        }
        System.out.println(cnt);
    }
}

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

#include "stdafx.h"
#include <iostream>
#include <stdio.h>

using namespace std;
char a[4];
char b[4];
int main() {

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:41: error: expected primary-expression before 'long'
    8 |     answer = ((long long int)N-1)*(1 + (long long int))N-1)/2;
      |                                         ^~~~
a.cc:8:41: error: expected ')' before 'long'
    8 |     answer = ((long long int)N-1)*(1 + (long long int))N-1)/2;
      |                                        ~^~~~
      |                                         )
a.cc:8:62: error: expected ')' before ';' token
    8 |     answer = ((long long int)N-1)*(1 + (long long int))N-1)/2;
      |                                   ~                          ^
      |                                                              )
Language: C

#include<stdio.h>

int main(){

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


Compiler output:
main.c: In function 'main':
main.c:17:17: error: 'i' undeclared (first use in this function)
   17 |     printf("%d",i);
      |                 ^
main.c:17:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:13: error: expected ';' before '}' token
   18 |     return 0
      |             ^
      |             ;
   19 | }
      | ~
Language: C

#include<stdio.h>

int main(){

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


Compiler output:
main.c: In function 'main':
main.c:17:17: error: 'i' undeclared (first use in this function)
   17 |     printf("%d",i);
      |                 ^
main.c:17:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:13: error: expected ';' before '}' token
   18 |     return 0
      |             ^
      |             ;
   19 | }
      | ~
Language: C++

#include<iostream>
#include<string>

int main()
{
	char predicted[3];
	char actual[3];
	int n;
	cout<<"Enter the predicted weather";
	cin>>predicted;
	cout<<"Enter the actual weather";
	cin<<actual;
	for (int i=0;i<3;i++)
	{
		if (predicted[i]==actual[i])
		n++;
	}
	cout<<n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         cout<<"Enter the predicted weather";
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |         cin>>predicted;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>
#include<string>

void main()
{
	char predicted[3];
	char actual[3];
	int n;
	cout<<"Enter the predicted weather";
	cin>>predicted;
	cout<<"Enter the actual weather";
	cin<<actual;
	for (int i=0;i<3;i++)
	{
		if (predicted[i]==actual[i])
		n++;
	}
	cout<<n;
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         cout<<"Enter the predicted weather";
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |         cin>>predicted;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>
#include<conio>
#include<string>

void main()
{
	char predicted[3];
	char actual[3];
	int n;
	cout<<"Enter the predicted weather";
	cin>>predicted;
	cout<<"Enter the actual weather";
	cin<<actual;
	for (int i=0;i<3;i++)
	{
		if (predicted[i]==actual[i])
		n++;
	}
	cout<<n;
}

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

import java.util.Scanner;
public class A_Tenki {

	public static void main(String[] args) {
		String S, T;
		int count= 0;
		Scanner scan = new Scanner(System.in);
		S=scan.nextLine();
		T=scan.nextLine();
		for (int i= 0; i<S.length();i++) {
			if(S.charAt(i)==T.charAt(i)) {
				++count;
			}
		}
		System.out.println(count);

	}

}

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

		String S, T;
		int count= 0;
		Scanner scan = new Scanner(System.in);
		S=scan.nextLine();
		T=scan.nextLine();
		for (int i= 0; i<S.length();i++) {
			if(S.charAt(i)==T.charAt(i)) {
				++count;
			}
		}
		System.out.println(count);

	

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
		String S, T;
		^
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
		int count= 0;
		^
  (use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
		S=scan.nextLine();
		^
Main.java:5: error: class, interface, enum, or record expected
		T=scan.nextLine();
		^
Main.java:6: error: class, interface, enum, or record expected
		for (int i= 0; i<S.length();i++) {
		^
Main.java:6: error: class, interface, enum, or record expected
		for (int i= 0; i<S.length();i++) {
		               ^
Main.java:6: error: class, interface, enum, or record expected
		for (int i= 0; i<S.length();i++) {
		                            ^
Main.java:9: error: class, interface, enum, or record expected
			}
			^
8 errors
Language: C

#include <stdio.h>

int main(void) {
	char s[4]; scanf("%s",s);
	char t[4]; scanf("%s",t);
	int cnt = 0;
	for (int i=0; i<3; i++) {
		if (S[i] == T[i]) cnt++;
	}
	printf("%d\n",cnt);
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:21: error: 'S' undeclared (first use in this function)
    8 |                 if (S[i] == T[i]) cnt++;
      |                     ^
main.c:8:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:29: error: 'T' undeclared (first use in this function)
    8 |                 if (S[i] == T[i]) cnt++;
      |                             ^
Language: C

include <stdio.h>

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

  

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

import java.io.*;
import java.util.*;


class Main {

    // Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
    public static void main(String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        String S;
        S = sc.next();
        String T;
        T = sc.next();
        solve(S, T);
    }

    static void solve(String S, String T){
        S.len
        int ans = 0;
        for (int i = 0; i<3; i++) {
            if(S.charAt(i) == T.charAt(i)) ans++;
        }

        System.out.println(ans);
    }
}


Compiler output:
Main.java:18: error: not a statement
        S.len
         ^
Main.java:18: error: ';' expected
        S.len
             ^
2 errors
Language: C++

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

int main(){
 string a,b;
  int ans=0;
  getline(cin,a);
  getline(cin,b);
  for(int i=0;i<a.size();i++){
    if(a[i]==b[i])ans++;
  }
  cout<<sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'sum' was not declared in this scope
   12 |   cout<<sum;
      |         ^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  char str1[3], str2[3];
  cin >> str1;
  cin >> str2;
  int ans=0;
  for(int i=0;i<3;i++){
    if(str1[i]==str2[i]){
      ans++;
    }
  }
  cot << ans;
  return 0;
}

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

#include <stdio.h>

int main() {
  char s[5], t[5];
  gets(s); gets(t);
  int ans = 0;
  for (size_t i = 0; i < 3; i++) {
    ans = (s[i] == t[i]) ? ans+1 : ans;
  }
  printf("%d\n", ans);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |   gets(s); gets(t);
      |   ^~~~
      |   getw
Language: C

nclude<stdio.h>
int main()
{
    char a[4],b[4];
    gets(a);
    gets(b);
    int x=0,i;
    for(i=0;i<=2;i++)
    {
        if(a[i]==b[i])
        {
            x++;
        }
    }
    printf("%d",x);
    return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  string s,t;
  int c=0;
  cin>>s;
  cin>>t;
  for(i=0;i<3;i++)
  {
    if(s.at(i)==t.at(i))
       c++;
   }
       cout<<c;
}

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

#include <iostream>
#include <math>
using namespace std;
 
int main() {
  int A, B;
  cin >> A >> B;
  
  int ans = ceil((B - 1) / (A - 1))
  cout << ans << endl;
}

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

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

int main(){
    string f;
    string w;
    int c = 0;
    cin>>f>>w;
    for(int i=0;i<3;i++){
        if(f.at(i)==w.at(i)){
            c++;
        }
    }
    cout<<c<<endl
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: expected ';' before '}' token
   15 |     cout<<c<<endl
      |                  ^
      |                  ;
   16 | }
      | ~
Language: C++

#include "pch.h"
#include <iostream>

int S[3];
int T[3];

int main()
{
	int i, j;

	j = 0;
	for (i = 0; i < 3; i++) {
		if (T[i] == S[i]) {
			j++;
		}
	}

    std::cout << j;
}


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

int main()
{
	int i, j;

	j = 0;
	for (i = 0; i < 3; i++) {
		if (T[i] == S[i]) {
			j++;
		}
	}

    std::cout << j;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'T' was not declared in this scope
    7 |                 if (T[i] == S[i]) {
      |                     ^
a.cc:7:29: error: 'S' was not declared in this scope
    7 |                 if (T[i] == S[i]) {
      |                             ^
a.cc:12:10: error: 'cout' is not a member of 'std'
   12 |     std::cout << j;
      |          ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:14: error: not a statement
    sc.close;
      ^
1 error
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:10: error: array required, but String found
      if (s[i] == t[i]) ans++;
           ^
Main.java:10: error: array required, but String found
      if (s[i] == t[i]) ans++;
                   ^
2 errors
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++;
  }
  count<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   11 |   count<<count<<endl;
      |   ~~~~~~~~~~~~^~~~~~
Language: C++

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

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

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

iosuaiouioa@j

Compiler output:
a.cc:1:12: error: stray '@' in program
    1 | iosuaiouioa@j
      |            ^
a.cc:1:1: error: 'iosuaiouioa' does not name a type
    1 | iosuaiouioa@j
      | ^~~~~~~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 's' was not declared in this scope
    8 |   cin >> s >> t;
      |          ^
a.cc:8:15: error: 't' was not declared in this scope
    8 |   cin >> s >> t;
      |               ^
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0;i<=s.size();i++){
      |       ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;
int main()
{
    string s, t;
  	cin >> s;
  	cin >> t;
  
  	cout << count_if(s.rbegin(), s.rend(), [&s, &t]() { return s.back() == t.back(); s.pop_back(); t.pop_back(); }) << endl;;
  
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
                 from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator = std::reverse_iterator<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> > >; _Predicate = main()::<lambda()>]':
/usr/include/c++/14/bits/stl_algobase.h:2163:12:   required from 'typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::__count_if(_InputIterator, _InputIterator, _Predicate) [with _InputIterator = reverse_iterator<__gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> > >; _Predicate = __gnu_cxx::__ops::_Iter_pred<main()::<lambda()> >; typename iterator_traits< <template-parameter-1-1> >::difference_type = long int]'
 2163 |         if (__pred(__first))
      |             ~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4057:29:   required from 'typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count_if(_IIter, _IIter, _Predicate) [with _IIter = reverse_iterator<__gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> > >; _Predicate = main()::<lambda()>; typename iterator_traits< <template-parameter-1-1> >::difference_type = long int]'
 4057 |       return std::__count_if(__first, __last,
      |              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
 4058 |                              __gnu_cxx::__ops::__pred_iter(__pred));
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:12:20:   required from here
   12 |         cout << count_if(s.rbegin(), s.rend(), [&s, &t]() { return s.back() == t.back(); s.pop_back(); t.pop_back(); }) << endl;;
      |                 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:318:30: error: no match for call to '(main()::<lambda()>) (char&)'
  318 |         { return bool(_M_pred(*__it)); }
      |                       ~~~~~~~^~~~~~~
a.cc:12:48: note: candidate: 'main()::<lambda()>'
   12 |         cout << count_if(s.rbegin(), s.rend(), [&s, &t]() { return s.back() == t.back(); s.pop_back(); t.pop_back(); }) << endl;;
      |                                                ^
a.cc:12:48: note:   candidate expects 0 arguments, 1 provided