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

#include<stdio.h>
int main(){
  char S[],T[];
  scanf("%s,%s",&S,&T);
  int ans=0;
  if (S[0]==T[0]){
    ans+1=ans;
  }
  if (S[1]==T[1]){
    ans+1=ans;
  }
  if (S[2]==T[2]){
    ans+1=ans;
  }
  printf("%d",ans);
  return 0
}
  

Compiler output:
main.c: In function 'main':
main.c:3:8: error: array size missing in 'S'
    3 |   char S[],T[];
      |        ^
main.c:3:12: error: array size missing in 'T'
    3 |   char S[],T[];
      |            ^
main.c:7:10: error: lvalue required as left operand of assignment
    7 |     ans+1=ans;
      |          ^
main.c:10:10: error: lvalue required as left operand of assignment
   10 |     ans+1=ans;
      |          ^
main.c:13:10: error: lvalue required as left operand of assignment
   13 |     ans+1=ans;
      |          ^
main.c:16:11: error: expected ';' before '}' token
   16 |   return 0
      |           ^
      |           ;
   17 | }
      | ~
Language: C++

#include <iostream?
using namespace std;

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

Compiler output:
a.cc:1:20: error: missing terminating > character
    1 | #include <iostream?
      |                    ^
a.cc:1:10: fatal error: iostream?: No such file or directory
    1 | #include <iostream?
      |          ^
compilation terminated.
Language: C++

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

using namespace std;

int main()
{
    int count=0;
    char S[3],T[3];
    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])
        {
            count++;
        }
    }
    cout<<count;

    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<3;i++)
      |         ^
a.cc:14:9: error: 'i' was not declared in this scope
   14 |     for(i=0;i<3;i++)
      |         ^
a.cc:18:9: error: 'i' was not declared in this scope
   18 |     for(i=0;i<3;i++)
      |         ^
Language: C

d;main(a,b,c){for(scanf("%s%s",&b,&c);d<3;)a+=b[d]==c[d++];printf("%d\n",--a);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | d;main(a,b,c){for(scanf("%s%s",&b,&c);d<3;)a+=b[d]==c[d++];printf("%d\n",--a);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
    1 | d;main(a,b,c){for(scanf("%s%s",&b,&c);d<3;)a+=b[d]==c[d++];printf("%d\n",--a);}
      |   ^~~~
main.c: In function 'main':
main.c:1:3: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:3: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:3: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | d;main(a,b,c){for(scanf("%s%s",&b,&c);d<3;)a+=b[d]==c[d++];printf("%d\n",--a);}
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | d;main(a,b,c){for(scanf("%s%s",&b,&c);d<3;)a+=b[d]==c[d++];printf("%d\n",--a);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | d;main(a,b,c){for(scanf("%s%s",&b,&c);d<3;)a+=b[d]==c[d++];printf("%d\n",--a);}
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:48: error: subscripted value is neither array nor pointer nor vector
    1 | d;main(a,b,c){for(scanf("%s%s",&b,&c);d<3;)a+=b[d]==c[d++];printf("%d\n",--a);}
      |                                                ^
main.c:1:54: error: subscripted value is neither array nor pointer nor vector
    1 | d;main(a,b,c){for(scanf("%s%s",&b,&c);d<3;)a+=b[d]==c[d++];printf("%d\n",--a);}
      |                                                      ^
main.c:1:60: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | d;main(a,b,c){for(scanf("%s%s",&b,&c);d<3;)a+=b[d]==c[d++];printf("%d\n",--a);}
      |                                                            ^~~~~~
main.c:1:60: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:60: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:60: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

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

import  java.util.Scanner;
//import jaava.util.InputMismatchException;
public class tenki{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s1 = sc.next();
    String s2 = sc.next();
    int count=0,i;
    for(i=0;i<3;i++){
      if(s1.charAt(i)==s2.charAt(i))count++;
    }
    System.out.println(count);
  }
}


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

import java.util.Scanner;
 
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
  String s1=sc.nextLine();
  String s2=sc.nextLine();
  int count=0;
  for(i=0;i<s1.length();i++){
    if(s1.charAt(i)==s2.charAt(i))
      count++;
}
}
  System.out.print(count);
}

Compiler output:
Main.java:14: error: <identifier> expected
  System.out.print(count);
                  ^
Main.java:14: error: <identifier> expected
  System.out.print(count);
                        ^
2 errors
Language: Java

import java.util.Scanner;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
  String s1=sc.nextLine();
  String s2=sc.nextLine();
  int count=0;
  for(i=0;i<s1.length();i++){
    if(s1.charAt(i)==s2.charAt(i))
      count++:
}
}
  System.out.print(count);
}

Compiler output:
Main.java:11: error: ';' expected
      count++:
             ^
Main.java:14: error: <identifier> expected
  System.out.print(count);
                  ^
Main.java:14: error: <identifier> expected
  System.out.print(count);
                        ^
3 errors
Language: C++

#include<stdio.h>
int main()
{
    char s[4],t[4];
    int c=0;
    gets(s);
    gets(t);
    for(int i=0;i<3;i++)
    {
        if(s[i]==t[i])
        c++;

    }
    printf("%d\n",c);
    return 0;
}

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

#include<stdio.h>
#include<string.h>
 
int main(){
  char s[4];
  char t[4];
  
  s=gets();
  t=gets();
  
  int count = 0;
  int i=0;
  for(i=0;i<3;i++){
    count += (s[i]==t[i] ? 1:0);
  }
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |   s=gets();
      |     ^~~~
      |     fgets
main.c:8:4: error: assignment to expression with array type
    8 |   s=gets();
      |    ^
main.c:9:4: error: assignment to expression with array type
    9 |   t=gets();
      |    ^
Language: C

#include<stdio.h>
#include<string.h>
 
int main(){
  char s[4];
  char t[4];
  
  gets(s);
  gets(t);
  
  int count = 0;
  int i=0;
  for(i=0;i<3;i++){
    count += (s[i]==t[i] ? 1:0);
  }
  print("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |   gets(s);
      |   ^~~~
      |   fgets
main.c:16:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   16 |   print("%d",count);
      |   ^~~~~
      |   printf
Language: C

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

int main(){
  char s[4];
  char t[4];
  
  gets(s);
  gets(t);
  
  int count = 0;
  int i=0;
  for(i=0;i<3;i;;){
    count += (s[i]==t[i] ? 1:0);
  }
  puts(count);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |   gets(s);
      |   ^~~~
      |   fgets
main.c:13:16: error: expected ')' before ';' token
   13 |   for(i=0;i<3;i;;){
      |      ~         ^
      |                )
main.c:16:8: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion]
   16 |   puts(count);
      |        ^~~~~
      |        |
      |        int
In file included from main.c:1:
/usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

forecast = input()
actual = input()

i = 0
match = 0

while i < 3:
    if forecast[i] == actual[i]:
        match += 1  
    i += 1

print(match)
    

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

package app;

import java.util.Scanner;

public class App {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String T = sc.nextLine();
        sc.close();
        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:5: error: class App is public, should be declared in a file named App.java
public class App {
       ^
1 error
Language: Java

package app;

import java.util.Scanner;

public class App {
    public static void main(String[] args) throws Exception {
        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);
    }
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:2: error: 'string' was not declared in this scope
    3 |  string s,t;
      |  ^~~~~~
a.cc:4:2: error: 'cin' was not declared in this scope
    4 |  cin>>s>>t;
      |  ^~~
a.cc:4:7: error: 's' was not declared in this scope
    4 |  cin>>s>>t;
      |       ^
a.cc:4:10: error: 't' was not declared in this scope
    4 |  cin>>s>>t;
      |          ^
a.cc:11:2: error: 'cout' was not declared in this scope
   11 |  cout<<cnt<<endl;
      |  ^~~~
a.cc:11:13: error: 'endl' was not declared in this scope
   11 |  cout<<cnt<<endl;
      |             ^~~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:8:16: error: expected ')' before ';' token
    8 |   if(f[i]==a[i];
      |     ~          ^
      |                )
main.c:9:10: error: expected expression before '}' token
    9 |      c++;}
      |          ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:12: error: expected ')' before 's'
    4 |   scanf("%"s,&f);
      |        ~   ^
      |            )
main.c:8:16: error: expected ')' before ';' token
    8 |   if(f[i]==a[i];
      |     ~          ^
      |                )
main.c:9:10: error: expected expression before '}' token
    9 |      c++;}
      |          ^
Language: C++

#include<cstdio>
#include<algorithm>
#include<functional>
#include<queue>
using namespace std;
int box[300001]={0};
int main(void)
{
	priority_queue<box> qu;
	int cnt[300001]={0},sum,i,j,n,m,c; 
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&m);
		for(j=0;j<m;j++){
			scanf("%d",&c);
			if(box[1]<c&&cnt[i]<=i){
				box[1]=c;
				cnt[i]++;
			}
		}
	}
	sum=0;
	for(i=1;i<=n;i++){
		sum+=box[i];
	}
	printf("%d\n",sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Sequence, class _Compare> class std::priority_queue'
    9 |         priority_queue<box> qu;
      |                           ^
a.cc:9:27: note:   expected a type, got 'box'
a.cc:9:27: error: template argument 2 is invalid
a.cc:9:27: error: template argument 3 is invalid
Language: Java

import java.util.Scanner;

public class Solution {

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


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

#include <iostream>
#include <iomanip>
// std::cout << std::setprecision(2) << 3.141; // "3.1"
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <map>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;

static const int giga = pow(10,9);
// double pi = 3.141592653589793238463;

int main(void){
  string s,t;
  cin >> s >> t;
  int ans = 0;
  for(i = 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:27:7: error: 'i' was not declared in this scope
   27 |   for(i = 0; i < 3; i++){
      |       ^
Language: C++

#include <iostream>

using namespace std;

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


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

#include <iostream>

using namespace std;

int main(){

    string S,T;
    
    S = CSR;
    T = CSS;
    
    int i;
    int count=0;
    
    for(i=0;i<3;i++){
        if(S[i] == T[i]{
            count++;
        }
    }
    
    cout << count << endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'CSR' was not declared in this scope
    9 |     S = CSR;
      |         ^~~
a.cc:10:9: error: 'CSS' was not declared in this scope
   10 |     T = CSS;
      |         ^~~
a.cc:16:24: error: expected ')' before '{' token
   16 |         if(S[i] == T[i]{
      |           ~            ^
      |                        )
a.cc:19:5: error: expected primary-expression before '}' token
   19 |     }
      |     ^
Language: Java

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

Compiler output:
Main.java:11: error: incompatible types: char cannot be converted to boolean
 if(s[i]=t[i]){
        ^
1 error
Language: Java

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

Compiler output:
Main.java:10: error: cannot find symbol
for(i=1;i<=3;i++){
    ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
for(i=1;i<=3;i++){
        ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
for(i=1;i<=3;i++){
             ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
 if(s[i]=t[i]){
      ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
 if(s[i]=t[i]){
           ^
  symbol:   variable i
  location: class Main
Main.java:11: error: incompatible types: char cannot be converted to boolean
 if(s[i]=t[i]){
        ^
6 errors
Language: C++

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

int main() {
	str s,t;
	int cnt=0;
	cin>>s>>t;
	for(int i=0;i<3;i++){
		if(s.at(i)==t.at(i)){
			cnt++;
		}
	}
	cout<<cnt<<endl;
	return 0;
}

Compiler output:
a.cc:5:1: error: expected initializer before 'int'
    5 | int main() {
      | ^~~
Language: C++

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

int main() {
	str s,t;
	int cnt=0;
	cin>>s>>t;
	for(int i=0;i<3;i++){
		if(s.at(i)==t.at(i)){
			cnt++;
		}
	}
	cout<<cnt<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |         str s,t;
      |         ^~~
      |         std
a.cc:7:14: error: 's' was not declared in this scope
    7 |         cin>>s>>t;
      |              ^
a.cc:7:17: error: 't' was not declared in this scope; did you mean 'tm'?
    7 |         cin>>s>>t;
      |                 ^
      |                 tm
Language: C++

#include <iostream>
#include <string.h>
#include <algorithm>
typedef long long ll;
using namespace std;

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

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

#include <iostream>
using namespace std;
int main(void){
    string S;
    string 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;
  
  
    
}


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

#include <iostream>
#include <bits/stdc++.h
using namespace std;
int main()
{
  string x,y;
  for(int i=0;i<3;i++)
  { int c=0;
    cin>>x>>y;
    if(x==y)
      c++;
    else
      c=0;
  }

Compiler output:
a.cc:2:24: error: missing terminating > character
    2 | #include <bits/stdc++.h
      |                        ^
a.cc: In function 'int main()':
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <bits/stdc++.h>

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	string s,t; cin >> s >> t;
  	int ans = 0;
  	for(int i =0; i < s.size(); i++)
      if (s[i] == t[i]) ans++;
  	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'ios' has not been declared
    5 |         ios::sync_with_stdio(false);
      |         ^~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin.tie(NULL);
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string s,t; cin >> s >> t;
      |         ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:28: error: 's' was not declared in this scope
    7 |         string s,t; cin >> s >> t;
      |                            ^
a.cc:7:33: error: 't' was not declared in this scope; did you mean 'tm'?
    7 |         string s,t; cin >> s >> t;
      |                                 ^
      |                                 tm
a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |         cout << ans << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |         cout << ans << endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include <stdio.h>

int main(){
    char s1[4],s2[4];
    int i,count=0
	scanf("%s",s1);
    scanf("%s",s2);
    for(i=0;i<3;i++) if(s1[i] == s2[i]) count++;
    printf("%d\n",count);
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: expected ',' or ';' before 'scanf'
    6 |         scanf("%s",s1);
      |         ^~~~~
Language: C++

#include <iostream>
 
int main(){
  int a, b;
  int cnt = 1;
  int num = 0;
  cin >> a >> b;

  num = a * cnt;
 
  while(true){
    if(num => b){
      break;
    }else{
      ++cnt;
      num = num - 1 + cnt;
    }
  }
  
  cout << cnt << endl
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> a >> b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:13: error: expected primary-expression before '>' token
   12 |     if(num => b){
      |             ^
a.cc:20:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |   cout << cnt << endl
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |   cout << cnt << endl
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

  string s,t;
  cin >> s;
  cin >> t;
    
  if(s[0]==t[0]) ++cnt;
  if(s[1]==t[1]) ++cnt;
  if(s[2]==t[2]) ++cnt;
 
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: expected ')' before '{' token
   12 |   if(s{0}==t[0]) ++cnt;
      |     ~ ^
      |       )
a.cc:12:6: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
   12 |   if(s{0}==t[0]) ++cnt;
      |      ^
      |      |
      |      std::string {aka std::__cxx11::basic_string<char>}
a.cc:13:7: error: expected ')' before '{' token
   13 |   if(s{1}==t[1]) ++cnt;
      |     ~ ^
      |       )
a.cc:13:6: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
   13 |   if(s{1}==t[1]) ++cnt;
      |      ^
      |      |
      |      std::string {aka std::__cxx11::basic_string<char>}
a.cc:14:7: error: expected ')' before '{' token
   14 |   if(s{2}==t[2]) ++cnt;
      |     ~ ^
      |       )
a.cc:14:6: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
   14 |   if(s{2}==t[2]) ++cnt;
      |      ^
      |      |
      |      std::string {aka std::__cxx11::basic_string<char>}
a.cc: At global scope:
a.cc:22:5: error: redefinition of 'int main()'
   22 | int main(){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
 
int main(){
  int cnt=0;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: expected ')' before '{' token
   12 |   if(s{0}==t[0]) ++cnt;
      |     ~ ^
      |       )
a.cc:12:6: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
   12 |   if(s{0}==t[0]) ++cnt;
      |      ^
      |      |
      |      std::string {aka std::__cxx11::basic_string<char>}
a.cc:13:7: error: expected ')' before '{' token
   13 |   if(s{1}==t[1]) ++cnt;
      |     ~ ^
      |       )
a.cc:13:6: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
   13 |   if(s{1}==t[1]) ++cnt;
      |      ^
      |      |
      |      std::string {aka std::__cxx11::basic_string<char>}
a.cc:14:7: error: expected ')' before '{' token
   14 |   if(s{2}==t[2]) ++cnt;
      |     ~ ^
      |       )
a.cc:14:6: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
   14 |   if(s{2}==t[2]) ++cnt;
      |      ^
      |      |
      |      std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include <iostream>
#include <string>
using namspace std;
 
int main(){
  string s,t;
  cin >> s;
  cin >> t;
  
  int cnt=0;
  
  if(s{0}==t[0]) ++cnt;
  if(s{1}==t[1]) ++cnt;
  if(s{2}==t[2]) ++cnt;
 
  cout << cnt << endl;
}


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namspace'
    3 | using namspace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s,t;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> s;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:8:10: error: 't' was not declared in this scope; did you mean 'tm'?
    8 |   cin >> t;
      |          ^
      |          tm
a.cc:12:7: error: expected ')' before '{' token
   12 |   if(s{0}==t[0]) ++cnt;
      |     ~ ^
      |       )
a.cc:13:7: error: expected ')' before '{' token
   13 |   if(s{1}==t[1]) ++cnt;
      |     ~ ^
      |       )
a.cc:14:7: error: expected ')' before '{' token
   14 |   if(s{2}==t[2]) ++cnt;
      |     ~ ^
      |       )
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout << cnt << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout << cnt << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

include <iostream>
include <string>
using namspace std;

int main(){
  string s,t;
  cin >> s;
  cin >> t;
  
  int cnt=0;
  
  if(s{0}==t[0]) ++cnt;
  if(s{1}==t[1]) ++cnt;
  if(s{2}==t[2]) ++cnt;

  cout << cnt << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s,t;
      |   ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> s;
      |   ^~~
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:8:10: error: 't' was not declared in this scope
    8 |   cin >> t;
      |          ^
a.cc:12:7: error: expected ')' before '{' token
   12 |   if(s{0}==t[0]) ++cnt;
      |     ~ ^
      |       )
a.cc:13:7: error: expected ')' before '{' token
   13 |   if(s{1}==t[1]) ++cnt;
      |     ~ ^
      |       )
a.cc:14:7: error: expected ')' before '{' token
   14 |   if(s{2}==t[2]) ++cnt;
      |     ~ ^
      |       )
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << cnt << endl;
      |   ^~~~
a.cc:16:18: error: 'endl' was not declared in this scope
   16 |   cout << cnt << endl;
      |                  ^~~~
Language: Java

import java.util.*;

public class Solution1
{
  public static void main(String args[])
  {
    Scanner scan = new Scanner(System.in);
	int pair=0;
	String s1 = new String();
	String s2 = new String();
	s1=scan.nextLine();
	s2=scan.nextLine();
	char[] ch1 = s1.toCharArray();
	char[] ch2 = s2.toCharArray();
	for(int i=0;i<ch1.length;i++)
	{
		if(ch1[i]==ch2[i])
		{
			pair++;
		}
	}
	System.out.println(pair);
  }
}

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

import java.util.*;

public class Solution
{
  public static void main(String args[])
  {
    Scanner scan = new Scanner(System.in);
	int pair=0;
	String s1 = new String;
	String s2 = new String;
	s1=scan.nextLine();
	s2=scan.nextLine();
	char ch1 = s1.toCharArray();
	char ch2 = s2.toCharArray();
	for(int i=0;i<ch1.length;i++)
	{
		if(ch1[i]==ch2[i])
		{
			pair++;
		}
		else
		{
			return 0;
		}
	}
  }
}

Compiler output:
Main.java:9: error: '(' or '[' expected
	String s1 = new String;
	                      ^
Main.java:10: error: '(' or '[' expected
	String s2 = new String;
	                      ^
2 errors
Language: C

#include <stdio.h>
#include <string.h>
int N = 10;
char a[N], b[N];

int main(void) { 
	scanf("%s", a);
	scanf("%s", b);
	int len = strlen(a);
	int cnt = 0;
	for(int i=0;i<len;i++) {
	    if(a[i] == b[i])cnt ++;
	}
	printf("%d\n", cnt);
	return 0;
}

Compiler output:
main.c:4:6: error: variably modified 'a' at file scope
    4 | char a[N], b[N];
      |      ^
main.c:4:12: error: variably modified 'b' at file scope
    4 | char a[N], b[N];
      |            ^
Language: C

#include <stdio.h>
#include <string.h>
const int N = 10;
char a[N], b[N];

int main(void) { 
	scanf("%s", a);
	scanf("%s", b);
	int len = strlen(a);
	int cnt = 0;
	for(int i=0;i<len;i++) {
	    if(a[i] == b[i])cnt ++;
	}
	printf("%d\n", cnt);
	return 0;
}

Compiler output:
main.c:4:6: error: variably modified 'a' at file scope
    4 | char a[N], b[N];
      |      ^
main.c:4:12: error: variably modified 'b' at file scope
    4 | char a[N], b[N];
      |            ^
Language: C++

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

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

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

int main(void){

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


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

#include <iostream>
using namespace std;

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

 

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'len' was not declared in this scope; did you mean 'mblen'?
    8 |   for (int i ; i <len(S) ; i++) {
      |                   ^~~
      |                   mblen
Language: C

#include<stdio.h>
int main()
{
  char A[4],B[4];
  int i;
  int count=0;
    scanf("%s",A);
    scanf("%s",B);
  }
  for(i=0;i<=2;i++)
  {
    if(A[i]==B[i])
       { 
         count=count+1;
       }
       }
    printf("%d",count);
       }


Compiler output:
main.c:10:3: error: expected identifier or '(' before 'for'
   10 |   for(i=0;i<=2;i++)
      |   ^~~
main.c:10:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   10 |   for(i=0;i<=2;i++)
      |            ^~
main.c:10:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   10 |   for(i=0;i<=2;i++)
      |                 ^~
main.c:17:12: error: expected declaration specifiers or '...' before string constant
   17 |     printf("%d",count);
      |            ^~~~
main.c:17:17: error: unknown type name 'count'
   17 |     printf("%d",count);
      |                 ^~~~~
main.c:18:8: error: expected identifier or '(' before '}' token
   18 |        }
      |        ^
Language: Java


public static void main(String[] args){
  import java.util.Scanner;
  Scanner scan = new Scanner(System.in);
  String S = scan.nextLine();
  String T = scan.nextLine();

  int ans = 0;
  for(int i = 0; i < S.length(); i++){
    if(S.charAt(i) == T.charAt(i)){
      ans++;
    }
  }
  return ans;
}


Compiler output:
Main.java:3: error: not a statement
  import java.util.Scanner;
                  ^
Main.java:2: 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)
Main.java:3: error: illegal start of expression
  import java.util.Scanner;
  ^
3 errors
Language: Java

import java.util.Scanner;
Scanner scan = new Scanner(System.in);
String S = scan.nextLine();
String T = scan.nextLine();

int ans = 0;
for(int i = 0; i < S.length(); i++){
  if(S.charAt(i) == T.charAt(i)){
    ans++;
  }
}
return ans;

Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
Scanner scan = new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: class, interface, enum, or record expected
for(int i = 0; i < S.length(); i++){
^
Main.java:7: error: class, interface, enum, or record expected
for(int i = 0; i < S.length(); i++){
               ^
Main.java:7: error: class, interface, enum, or record expected
for(int i = 0; i < S.length(); i++){
                               ^
Main.java:10: error: class, interface, enum, or record expected
  }
  ^
5 errors
Language: C++

#include <iostream>
#include <string>

using namespace std;
 
int main(){
  string a,b;
  cin>>a>>b;
  int cnt=0;
  for(int i=0;i<a.size;i++){
    if(a.at(i)==b.at(i))cnt++;
  }
  cout<<cnt<<endl;
  return 0;
}

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

#include <iostream>
#include <string>

int main(){
  string a,b;
  cin>>a>>b;
  int cnt=0;
  for(int i=0;i<a.size;i++){
    if(a.at(i)==b.at(i)cnt++;
       }
  cout<<cnt<<endl;
       return 0;
       }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string a,b;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>a>>b;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 'a' was not declared in this scope
    6 |   cin>>a>>b;
      |        ^
a.cc:6:11: error: 'b' was not declared in this scope
    6 |   cin>>a>>b;
      |           ^
a.cc:10:8: error: expected primary-expression before '}' token
   10 |        }
      |        ^
a.cc:9:30: error: expected ')' before '}' token
    9 |     if(a.at(i)==b.at(i)cnt++;
      |       ~                      ^
      |                              )
   10 |        }
      |        ~                      
a.cc:10:8: error: expected primary-expression before '}' token
   10 |        }
      |        ^
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout<<cnt<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout<<cnt<<endl;
      |              ^~~~
      |              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include<stdio.h>

int main();

int main(){
  char str1[];
  char str2[];
  int cnt=0;
  int i;
  
  printf("３日分の天気を入力してください。s:晴れ　c:くもり R:雨\n");
  scanf("%s",&str1[]);
  
  printf("正解を入力してください。s:晴れ　c:くもり R:雨\n");
  scanf("%s",&str2[]);
  
  for(i=0;i<3;i++){
	if(str[i]==str[i]){
      cnt++;
    }
  }
  
  print("%d\n",cnt);
}

  

Compiler output:
main.c: In function 'main':
main.c:6:8: error: array size missing in 'str1'
    6 |   char str1[];
      |        ^~~~
main.c:7:8: error: array size missing in 'str2'
    7 |   char str2[];
      |        ^~~~
main.c:12:20: error: expected expression before ']' token
   12 |   scanf("%s",&str1[]);
      |                    ^
main.c:15:20: error: expected expression before ']' token
   15 |   scanf("%s",&str2[]);
      |                    ^
main.c:18:12: error: 'str' undeclared (first use in this function); did you mean 'str2'?
   18 |         if(str[i]==str[i]){
      |            ^~~
      |            str2
main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   23 |   print("%d\n",cnt);
      |   ^~~~~
      |   printf
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before ':' token
    8 |   cin>>a>>b:
      |            ^
      |            ;
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else if(a[1]==b[1])ans++;
      |   ^~~~
Language: C++

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

Compiler output:
a.cc:12:1: error: 'cin' does not name a type
   12 | cin >> s >> t ;
      | ^~~
a.cc:4:18: error: expected unqualified-id before 'for'
    4 | #define rep(i,n) for(int i = 0; i < n ; i++)
      |                  ^~~
a.cc:14:1: note: in expansion of macro 'rep'
   14 | rep(i,3) {
      | ^~~
a.cc:14:5: error: 'i' does not name a type
   14 | rep(i,3) {
      |     ^
a.cc:4:33: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i = 0; i < n ; i++)
      |                                 ^
a.cc:14:5: error: 'i' does not name a type
   14 | rep(i,3) {
      |     ^
a.cc:4:41: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i = 0; i < n ; i++)
      |                                         ^
a.cc:17:1: error: 'cout' does not name a type
   17 | cout << ans << endl ;
      | ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

Compiler output:
a.cc:12:1: error: 'cin' does not name a type
   12 | cin >> s >> t ;
      | ^~~
a.cc:4:18: error: expected unqualified-id before 'for'
    4 | #define rep(i,n) for ( int i = 0 ; i < n ; i++)
      |                  ^~~
a.cc:14:1: note: in expansion of macro 'rep'
   14 | rep(i,3) { if ( s[i] == t[i] ) ans++ ; }
      | ^~~
a.cc:14:5: error: 'i' does not name a type
   14 | rep(i,3) { if ( s[i] == t[i] ) ans++ ; }
      |     ^
a.cc:4:36: note: in definition of macro 'rep'
    4 | #define rep(i,n) for ( int i = 0 ; i < n ; i++)
      |                                    ^
a.cc:14:5: error: 'i' does not name a type
   14 | rep(i,3) { if ( s[i] == t[i] ) ans++ ; }
      |     ^
a.cc:4:44: note: in definition of macro 'rep'
    4 | #define rep(i,n) for ( int i = 0 ; i < n ; i++)
      |                                            ^
a.cc:15:1: error: 'cout' does not name a type
   15 | cout << ans << endl ;
      | ^~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

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

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

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

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

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

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

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

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