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

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

signed main() {
	int n, a, b;
	cin >> n >> a >> b;
	cout << min(a, b) << " " << max(0, a + b - n) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: no matching function for call to 'max(int, long long int)'
    8 |         cout << min(a, b) << " " << max(0, a + b - n) << endl;
      |                                     ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:8:40: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    8 |         cout << min(a, b) << " " << max(0, a + b - n) << endl;
      |                                     ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:8:40: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    8 |         cout << min(a, b) << " " << max(0, a + b - n) << endl;
      |                                     ~~~^~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ll n,a,b;
cin>>n>>a>>b;
cout<<min(a,b)<<" "<<max(0,a+b-n);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: no matching function for call to 'max(int, long long int)'
    7 | cout<<min(a,b)<<" "<<max(0,a+b-n);
      |                      ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:7:25: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    7 | cout<<min(a,b)<<" "<<max(0,a+b-n);
      |                      ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:7:25: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    7 | cout<<min(a,b)<<" "<<max(0,a+b-n);
      |                      ~~~^~~~~~~~~
Language: C++

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

int main(){
  int N,A,B;
  cin>>N>>A>>B;
  cuot<<min(A,B)<<max(0,A+B-N)<<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cuot' was not declared in this scope
    7 |   cuot<<min(A,B)<<max(0,A+B-N)<<endl;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, a, n) for(ll i=a; i<n; i++)
#define RREP(i, a, n) for(ll i=n-1; i>=a; i--)
typedef long long ll;
const ll mod =1e9+7;
const ll inf =1e18;
using namespace std;

ll n, a, b;
int main(){
    cin>>n>>a>>b;

    cout<<min(a, b)<<" "<<min(a+b-n, 0)<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: no matching function for call to 'min(ll, int)'
   13 |     cout<<min(a, b)<<" "<<min(a+b-n, 0)<<endl;
      |                           ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:13:30: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   13 |     cout<<min(a, b)<<" "<<min(a+b-n, 0)<<endl;
      |                           ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:13:30: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   13 |     cout<<min(a, b)<<" "<<min(a+b-n, 0)<<endl;
      |                           ~~~^~~~~~~~~~
Language: C++

//**************************
//*** author  :  Alex Hu **
//************************

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

using namespace std;

#define CLEAN(a,b) memset(a,b,sizeof(a))
#define mkp make_pair
#define pb push_back
#define rept(i,a,b) for(int i=(int)(a);i<(int)(b);i++)

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
  
int main()
{
	int n,a,b;
	cin>>n>>a>>b;
	cout<<min(a,b)<<" "<<max(0,a+b-n)<<endl;
	return 0;
}

Compiler output:
a.cc:19:9: error: 'vector' does not name a type
   19 | typedef vector<int> vi;
      |         ^~~~~~
Language: C++

#include<bits/stdc++.h>
#define int long long
#define f(i,n) for(int i=0;i<n;i++)
#define F first
#define S second
#define mod 1000000007
#define P pair<int,int>
using namespace std;
signed main(){
	int a,b,c;
	cin>>c>>a>>b;
	cout<<min(a,b)<<" "<<min((int)(a+b-c))<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:33: error: no matching function for call to 'min(long long int)'
   12 |         cout<<min(a,b)<<" "<<min((int)(a+b-c))<<endl;
      |                              ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:12:33: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 |         cout<<min(a,b)<<" "<<min((int)(a+b-c))<<endl;
      |                              ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
Language: Java

import java.util.*;
import java.io.*;
import java.math.*;
public class Main1
{
    static class Reader 
    { 
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;} 
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];} 
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;} 
        public String s(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();} 
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;} 
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;} 
        public double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } 
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } 
        public int[] arr(int n){int[] ret = new int[n];for (int i = 0; i < n; i++) {ret[i] = i();}return ret;}
    }
    
    
 
           //       |----|       /\      |    |   -----   |
           //       |   /       /  \     |    |     |     |
           //       |--/       /----\    |----|     |     |
           //       |   \     /      \   |    |     |     |
           //       |    \   /        \  |    |   -----   -------

    public static void main(String[] args)throws IOException
    {
        PrintWriter out= new PrintWriter(System.out);
        Reader sc=new Reader();
        int n=sc.i();
        int a=sc.i();
        int b=sc.i();
        out.print(Math.min(a,b)+" ");
        out.print(Math.max(0,a+b-n));
        out.flush();
    }
}

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

#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
signed main(){
    int a,b,n;
  cin>>n>>a>>b;
  cout<<min(a,b)<<" "<<max(a+b-n,0)<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: no matching function for call to 'max(long long int, int)'
    8 |   cout<<min(a,b)<<" "<<max(a+b-n,0)<<endl;
      |                        ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:8:27: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
    8 |   cout<<min(a,b)<<" "<<max(a+b-n,0)<<endl;
      |                        ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:8:27: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
    8 |   cout<<min(a,b)<<" "<<max(a+b-n,0)<<endl;
      |                        ~~~^~~~~~~~~
Language: C++

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

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-10;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

int main(void){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int32 N, X, Y;
	cin >> N >> X >> Y;
	cout << min(X, Y) << " " << max(0, X+Y-N) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:40: error: no matching function for call to 'max(int, int32)'
   29 |         cout << min(X, Y) << " " << max(0, X+Y-N) << endl;
      |                                     ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:29:40: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'int32' {aka 'long int'})
   29 |         cout << min(X, Y) << " " << max(0, X+Y-N) << endl;
      |                                     ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:29:40: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   29 |         cout << min(X, Y) << " " << max(0, X+Y-N) << endl;
      |                                     ~~~^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<set>

int main(){
  int n;
  std::cin >> n;
  std::string a,b,c;
  std::cin >> a >> b >> c;
  int cnt = 0;
  for(int i = 0; i < n; i++){
    std::set<char> st;
    st.insert(a[i]);
    st.insert(b[i]);
    st.insert(c[i]);
    cnt += st.size() - 1:
  }
  std::cout << cnt << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before ':' token
   16 |     cnt += st.size() - 1:
      |                         ^
      |                         ;
Language: C++

import java.util.*;

public class Main {
    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);
        int ans = 0;
        int n = sc.nextInt();
        String a = sc.next();
        String b = sc.next();
        String c = sc.next();
        for (int i = 0; i < n; i++) {
            HashSet<Character> se = new HashSet<Character>();
            se.add(a.charAt(i));
            se.add(b.charAt(i));
            se.add(c.charAt(i));
            ans += (se.size() - 1);
        }
        System.out.println(ans);
        sc.close();
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main() {
    int n;
    cin >> n;
    strng a,b,c;
    cin >> a >> b >> c;
    int ans=0;
    rep(i,n){
        if(a.at(i)==b.at(i)&&b.at(i)==c.at(i)) break;
        else if((a.at(i)==b.at(i)&&b.at(i)!=c.at(i))||(a.at(i)!=b.at(i)&&b.at(i)==c.at(i))){
            ans++;
        }
        else ans+=2;
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'strng' was not declared in this scope
   11 |     strng a,b,c;
      |     ^~~~~
a.cc:12:12: error: 'a' was not declared in this scope
   12 |     cin >> a >> b >> c;
      |            ^
a.cc:12:17: error: 'b' was not declared in this scope
   12 |     cin >> a >> b >> c;
      |                 ^
a.cc:12:22: error: 'c' was not declared in this scope
   12 |     cin >> a >> b >> c;
      |                      ^
Language: C++

//#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const long long INF= 1e+18+1;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main(){
  ll n;cin>>n;
  string a,b,c;cin>>a>>b>>c;
  ans=n*2;
  rep(i,n){
    if(a[i]==b[i]&&b[i]==c[i])ans-=2;
    else if(a[i]==b[i]||b[i]==c[i]||a[i]==c[i])ans--;
  }
  cout<<ans<<endl;
}
      

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

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

int main() {
    int N; cin >> N;
    string A, B, C; cin >> A >> B >> C;
    int aa = 0, ba = 0, ca = 0;
    for (int i = 0; i < N; i++) {
        if (B[i] != A[i]) {
            aa++;
            ba++;
        }
        if (C[i] != A[i]) {
            aa++;
            ca++;
        if (B[i] != C[i]) {
            ba++;
            ca++;
        }
    }
    cout << min({aa, ba, ca}) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    char[] A = sc.next().toCharArray();
    char[] B = sc.next().toCharArray();
    char[] C = sc.next().toCharArray();
    int cnt = 0;
    for(int i=0; i<N; i++){
      if(A[i].equals(B[i]) && A[i].equals(C[i])){
        continue;
      }else if(!A[i].equals(B[i]) && !B[i].equals(C[i])){
        cnt += 2;
      }else{
        cnt++;
      }
    }
    System.out.print(cnt);
  }
}


Compiler output:
Main.java:11: error: char cannot be dereferenced
      if(A[i].equals(B[i]) && A[i].equals(C[i])){
             ^
Main.java:11: error: char cannot be dereferenced
      if(A[i].equals(B[i]) && A[i].equals(C[i])){
                                  ^
Main.java:13: error: char cannot be dereferenced
      }else if(!A[i].equals(B[i]) && !B[i].equals(C[i])){
                    ^
Main.java:13: error: char cannot be dereferenced
      }else if(!A[i].equals(B[i]) && !B[i].equals(C[i])){
                                          ^
4 errors
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    int N = sc.nextInt();
    char[] A = sc.next().toCharArray();
    char[] B = sc.next().toCharArray();
    char[] C = sc.next().toCharArray();
    int cnt = 0;
    for(int i=0; i<N; i++){
      if(A[i] == B[i] && A[i] == C[i]){
        continue;
      }else if(A[i] != B[i] && B[i] != C[i]){
        cnt += 2;
      }else{
        cnt++;
      }
    }
    System.out.print(cnt);
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    int N = sc.nextInt();
            ^
  symbol:   variable sc
  location: class Main
Main.java:5: error: cannot find symbol
    char[] A = sc.next().toCharArray();
               ^
  symbol:   variable sc
  location: class Main
Main.java:6: error: cannot find symbol
    char[] B = sc.next().toCharArray();
               ^
  symbol:   variable sc
  location: class Main
Main.java:7: error: cannot find symbol
    char[] C = sc.next().toCharArray();
               ^
  symbol:   variable sc
  location: class Main
4 errors
Language: C++

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

typedef long long ll;
typedef pair<int,int> P;

int main(){
        int n;
        cin>>n;
        string a,b,c;
        cin>>a>>b>>c;
        int ans=0;
        for(int i=0;i<n;i++){
                if(a[i]==b[i]&&b[i]==c[i])continue;
                else if(a[i]==b[i])ans++;
                else if(a[i]==c[i])ans++;
                else if(b[i]==c[i])ans++;
                else ans+=2;
        }
        cout<<ans<<endl;
}


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

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

int main() {
  int n, p = 0, q = 0, r = 0;
  string a, b, c;
  cin >> n >> a >> b >> c;
  rep(i, n){
    if(a[i] != b[i]){
      ++p;
      ++q;
    }
    if(a[i] != c[i]){
      ++p;
      ++r;
    }
    if(b[i] != c[i]){
      ++q;
      ++r;
    }
  }
  cout << min(p, min(q, r)) << endl;
  }
  return 0;
}

Compiler output:
a.cc:26:3: error: expected unqualified-id before 'return'
   26 |   return 0;
      |   ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

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

int main() {
  int n, p = 0. q = 0, r = 0;
  string a, b, c;
  cin >> n >> a >> b >> c;
  rep(i, n){
    if(a[i] != b[i]){
      ++p;
      ++q;
    }
    if(a[i] != c[i]){
      ++p;
      ++r;
    }
    if(b[i] != c[i]){
      ++q;
      ++r;
    }
  }
  cout << min(p, min(q, r)) << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ',' or ';' before 'q'
    7 |   int n, p = 0. q = 0, r = 0;
      |                 ^
a.cc:13:9: error: 'q' was not declared in this scope
   13 |       ++q;
      |         ^
a.cc:17:9: error: 'r' was not declared in this scope
   17 |       ++r;
      |         ^
a.cc:20:9: error: 'q' was not declared in this scope
   20 |       ++q;
      |         ^
a.cc:21:9: error: 'r' was not declared in this scope
   21 |       ++r;
      |         ^
a.cc:24:22: error: 'q' was not declared in this scope
   24 |   cout << min(p, min(q, r)) << endl;
      |                      ^
a.cc:24:25: error: 'r' was not declared in this scope
   24 |   cout << min(p, min(q, r)) << endl;
      |                         ^
a.cc: At global scope:
a.cc:26:3: error: expected unqualified-id before 'return'
   26 |   return 0;
      |   ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include<bits/stdc++.h>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  int n;cin>>n;
  vector<string> abc(n);
  rep(i,3)cin>>abc[i];
  int result=0;
  rep(i,n){
    set<char>s;
    rep(j,3)s.insert(abc[j][i]);
    result+=(s.size()-1)
  }

  cout<<result;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before '}' token
   16 |     result+=(s.size()-1)
      |                         ^
      |                         ;
   17 |   }
      |   ~
Language: C++

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

int main() {
  int n;
  cin >> n;
  string a, b, c;
  cin >> a >> b >> c;
  int m = 0;
  for (int i = 0; i < n; ++i) {
    string d = a[i] + b[i] + c[i];
    sort(d.begin(), d.end());
    if (d[0] == d[2])
      continue;
    else if (d[0] == d[1] || d[1] == d[2]) {
    	m++;
    }
	else
      m += 2;
  }
  
  cout << m << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |     string d = a[i] + b[i] + c[i];
Language: C++

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

int main() {
  int n;
  cin >> n;
  string a, b, c;
  cin >> a >> b >> c;
  int m = 0;
  for (int i = 0; i < n; ++i) {
    string d = a[i] + b[i] + c[i];
    sort(d.begin(), d.end());
    if (d[0] == d[2])
      continue;
    else if (d[0] == d[1] || d[1] == d[2]) {
    	m++;
    }
	else
      m += 2;
  }
  
  cout << m << endl;
  return 0;
}

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

import java.util*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    String A = sc.next();
    String B = sc.next();
    String C = sc.next();
    int ans = 0;
    for (int i = 0; i < N; i++) {
      char a = A.charAt(i);
      char b = B.charAt(i);
      char c = C.charAt(i);
      if (a == b && b == c) {
        ;
      } else if (a == b || b == c || c == a) {
        ans += 1;
      } else {
        ans += 2;
      }
    }
    System.out.println(ans);
  }
}

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

#include<bits/stdc++.h>
using namespace std;
signed main(){
  int a,b=0;
  string c[3];
  cin>>a;
  for(int i=0;i<3;i++) cin>>c[i];
  for(inr i=0;i<a;i++){
    if(c[0][i]==c[1][i]);
    else b++;
    if(c[0][i]==c[2][i]);
    else b++;
    if(c[1][i]==c[2][i]);
    else b++;
    }
  cout<<b<<"\n";
  }


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

#include<bits/stdc++.h>
using namespace std;
signed main(){
  int a,b=0;
  steing c[3];
  cin>>a;
  for(int i=0;i<3;i++) cin>>c[i];
  for(inr i=0;i<a;i++){
    if(c[0][i]==c[1][i]);
    else b++;
    if(c[0][i]==c[2][i]);
    else b++;
    if(c[1][i]==c[2][i]);
    else b++;
    }
  cout<<b<<"\n";
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'steing' was not declared in this scope; did you mean 'stdin'?
    5 |   steing c[3];
      |   ^~~~~~
      |   stdin
a.cc:7:29: error: 'c' was not declared in this scope
    7 |   for(int i=0;i<3;i++) cin>>c[i];
      |                             ^
a.cc:8:7: error: 'inr' was not declared in this scope; did you mean 'int'?
    8 |   for(inr i=0;i<a;i++){
      |       ^~~
      |       int
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(inr i=0;i<a;i++){
      |               ^
a.cc:9:8: error: 'c' was not declared in this scope
    9 |     if(c[0][i]==c[1][i]);
      |        ^
a.cc:11:8: error: 'c' was not declared in this scope
   11 |     if(c[0][i]==c[2][i]);
      |        ^
a.cc:13:8: error: 'c' was not declared in this scope
   13 |     if(c[1][i]==c[2][i]);
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  
  int N;
  string A;
  string B;
  stirng C;
  
  cin >> N;
  cin >> A;
  cin >> B;
  cin >> C;
  
  int num = 0;
 
  for(int i = 0;i < N;++i){
    num = num + 2;
    if(A[i] == B[i] && B[i] == C[i]){
      num = num - 2;
    }
    else if(A[i] == B[i] || B[i] == C[i] || A[i] == C[i]){
      num = num - 1;
    }
  }
  
  cout << num << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'stirng' was not declared in this scope
    8 |   stirng C;
      |   ^~~~~~
a.cc:13:10: error: 'C' was not declared in this scope
   13 |   cin >> C;
      |          ^
Language: Java

import java.util.*;
public class MAin{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      char[] a = sc.next().toCharArray();
      char[] b = sc.next().toCharArray();
      char[] c = sc.next().toCharArray();
      int cnt = n;
      for(int i = 0;i < n;i++)if(a[i]==b[i]&&b[i]==c[i])cnt--;
      System.out.println(cnt);
    }
}

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);
    int N = Integer.parseInt(sc.nextLine());
    String A = sc.nextLine();
    String B = sc.nextLine();
    String C = sc.nextLine();
    
    int ans = 0;
    for(int i = 0; i < N; i++){
      char a = A.charAt(i);
      char b = B.charAt(i);
      char c = C.charAt(i);
      if(a == b && a == c){
      }else if(a == b || b == c || a == c){
        ans++;
      }else{
        ans += 2;
      }
    }
    System.out.println(ans);
  }
}
    
    System.out.println(ans);
  }
}

Compiler output:
Main.java:27: error: class, interface, enum, or record expected
    System.out.println(ans);
    ^
Main.java:28: error: class, interface, enum, or record expected
  }
  ^
2 errors
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void){
  int N;
  cin >> N;
  
  string a,b,c;
  cin >> a >> b >> c;
  
  int ans = 0;
  
  for(int i=0;i<N;i++){
    if(a[i] == b[i] && a[i] == c[i]);
    else if(a[i] == b[i] || a[i] == c[i] || b[i] == c[i])
      ans++;
    else
      ans += 2;
  }
  
  cout << ans << endl;
  
  

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

#include<iostream>
#include<vector>
#define int long long
using namespace std;
const int N=1e5+2;
signed main(){
	int sum=0,n;
	string a,b,c;
	cin>>n>>a>>b>>c;
	for(int i=0;i<a.length();i++){
		if(a[i]==b[i]){
			if(b[i]!=c[i]){
				sum++
			}
		}
		else{
			if(b[i]==c[i]){
				sum++;
			}
			else{
				sum+=2;
			}
		}
	}
	cout<<sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:38: error: expected ';' before '}' token
   13 |                                 sum++
      |                                      ^
      |                                      ;
   14 |                         }
      |                         ~
Language: C++

#include<iostream>
#include<vector>
#define int long long
using namespace std;
signed main(){
	int sum=0;
	string a,b,c;
	cin>>a>>b>>c;
	for(int i=0;i<a.length();i++){
		if(a[i]==b[i]){
			if(b[i]!=c[i]){
				sum++
			}
		}
		else{
			if(b[i]==c[i]){
				sum++;
			}
			else{
				sum+=2;
			}
		}
	}
	cout<<sum;
}

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

#include<iostream>
#include<string>
using namespace std;
int main () {
  int N;
  cin >> N;
  string A, B, C;
  cin >> A >> B >> C;
  int ans = 0;
  for (int i = 0; i < N; i ++) {
    int p = 2;
    if (A[i] == B[i]) p --;
    if (B[i] == C[i]) p --;
    if (p && A[i] == C[i]) p --;
    ans += p;
  }
  cout << ans << endl;

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

#include<iostream>
int main(){
  int N,i,c;
  char A[],B[],C[];
  
  cin >> N >> A >> B >> C;
  
  for(i=0;i<N;i++){
    if(A[i]!=B[i] || A[i]!=C[i] || B[i]!=C[i]){
      c++;
      if(A[i]!=B[i] && A[i]!=C[i] && B[i]!=C[i]) c++;
    }
  }
  
  cout << c << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: storage size of 'A' isn't known
    4 |   char A[],B[],C[];
      |        ^
a.cc:4:12: error: storage size of 'B' isn't known
    4 |   char A[],B[],C[];
      |            ^
a.cc:4:16: error: storage size of 'C' isn't known
    4 |   char A[],B[],C[];
      |                ^
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> N >> A >> B >> C;
      |   ^~~
      |   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:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   cout << c << 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:15:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |   cout << c << 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 N;
  string A,B,C;
  cin >>N>>A>>B>>C;
  int x=0;
  for (int i=0;i<N;i++){
    if(A[i]==B[i]&&B[i]==C[i])continue;
    if(A[i]==B[i]||B[i]==C[i]||C[i]==A[i])ret++;
    else x+=2;
  }
  cout<<x<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:43: error: 'ret' was not declared in this scope
   11 |     if(A[i]==B[i]||B[i]==C[i]||C[i]==A[i])ret++;
      |                                           ^~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main() {
  int N;
  string A,B,C;
  cin >>N>>A>>B>>C;
  int x=0;
  for (int i=0;i<N;i++){
    if(s[i]==t[i]&&t[i]==u[i])continue;
    if(s[i]==t[i]||t[i]==u[i]||u[i]==s[i])ret++;
    else x+=2;
  }
  cout<<x<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 's' was not declared in this scope
   10 |     if(s[i]==t[i]&&t[i]==u[i])continue;
      |        ^
a.cc:10:14: error: 't' was not declared in this scope
   10 |     if(s[i]==t[i]&&t[i]==u[i])continue;
      |              ^
a.cc:10:26: error: 'u' was not declared in this scope
   10 |     if(s[i]==t[i]&&t[i]==u[i])continue;
      |                          ^
a.cc:11:8: error: 's' was not declared in this scope
   11 |     if(s[i]==t[i]||t[i]==u[i]||u[i]==s[i])ret++;
      |        ^
a.cc:11:14: error: 't' was not declared in this scope
   11 |     if(s[i]==t[i]||t[i]==u[i]||u[i]==s[i])ret++;
      |              ^
a.cc:11:26: error: 'u' was not declared in this scope
   11 |     if(s[i]==t[i]||t[i]==u[i]||u[i]==s[i])ret++;
      |                          ^
a.cc:11:43: error: 'ret' was not declared in this scope
   11 |     if(s[i]==t[i]||t[i]==u[i]||u[i]==s[i])ret++;
      |                                           ^~~
Language: C++


#include <iostream>
using namespace std;

int main() {
	int N;

	char A[100];
	char B[100];
	char C[100];

	cin >> N;
	cin >> A;
	cin >> B;
	cin >> C;

	int sum = 0;
	for (int i = 0; i < N; i++) {
		if (A[i] == B[i] && A[i] == C[i]) {
			sum += 0;
		}else if (A[i] == B[i] && A[i] != C[i]) {
			sum += 1;
		} else if (A[i] == C[i] && A[i] != B[i]) {
			sum += 1;
		} else if (B[i] == C[i] && A[i] != B[i]) {
			sum += 1;
		} else if (A[i] != B[i] && A[i] != C[i] && B[i] != C[i]) {
			sum += 2;
		}

		cout << A[i] << " " << B[i] << " " << C[i] << " " << sum << endl;
	}
	cout << sum << endl;
	return 0;

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

int N;
string A,B,C;
int cnt = 0;
void _main() {
	cin >> N >> A >> B >> C;
	for (int i = 0; i < N; i++) {
		if (A[i] == B[i] && A[i] != C[i]) {
			cnt++;//C[i] == A[i];
		}
		if (A[i] == C[i] && A[i] != B[i]) {
			cnt++;//B[i] == A[i];
		}
		if (B[i] == C[i] && A[i] != C[i]) {
			cnt++;//A[i] == C[i];
		}
		if (A[i] != B[i] && A[i] != C[i] && B[i] != C[i]) {
			cnt += 2;//A[i] == B[i];C[i] == A[i];
		}
	}cout << cnt << endl;
}

Compiler output:
a.cc:2:1: error: 'string' does not name a type
    2 | string A,B,C;
      | ^~~~~~
a.cc: In function 'void _main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> N >> A >> B >> C;
      |         ^~~
a.cc:5:21: error: 'A' was not declared in this scope
    5 |         cin >> N >> A >> B >> C;
      |                     ^
a.cc:5:26: error: 'B' was not declared in this scope
    5 |         cin >> N >> A >> B >> C;
      |                          ^
a.cc:5:31: error: 'C' was not declared in this scope
    5 |         cin >> N >> A >> B >> C;
      |                               ^
a.cc:19:10: error: 'cout' was not declared in this scope
   19 |         }cout << cnt << endl;
      |          ^~~~
a.cc:19:25: error: 'endl' was not declared in this scope
   19 |         }cout << cnt << endl;
      |                         ^~~~
Language: C

#include<stdlib.h>
int main()
{ 
  int n;
  scanf("%d",&n);
  string a,b,c;
  scanf("%s",a);
  scanf("%s",b);
  scanf("%s",c);
  int count=0;
  for(int i=0;i<n;i++)
  {
    if(a[i]==b[i] && b[i]==c[i])
      continue;
    else if(a[i]==b[i] ||b[i]==c[i] || a[i]==c[i])
      count++;
    else
      count=count+2;
  }
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |   scanf("%d",&n);
      |   ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include<stdlib.h>
  +++ |+#include <stdio.h>
    2 | int main()
main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |   scanf("%d",&n);
      |   ^~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:3: error: unknown type name 'string'
    6 |   string a,b,c;
      |   ^~~~~~
main.c:13:9: error: subscripted value is neither array nor pointer nor vector
   13 |     if(a[i]==b[i] && b[i]==c[i])
      |         ^
main.c:13:15: error: subscripted value is neither array nor pointer nor vector
   13 |     if(a[i]==b[i] && b[i]==c[i])
      |               ^
main.c:13:23: error: subscripted value is neither array nor pointer nor vector
   13 |     if(a[i]==b[i] && b[i]==c[i])
      |                       ^
main.c:13:29: error: subscripted value is neither array nor pointer nor vector
   13 |     if(a[i]==b[i] && b[i]==c[i])
      |                             ^
main.c:15:14: error: subscripted value is neither array nor pointer nor vector
   15 |     else if(a[i]==b[i] ||b[i]==c[i] || a[i]==c[i])
      |              ^
main.c:15:20: error: subscripted value is neither array nor pointer nor vector
   15 |     else if(a[i]==b[i] ||b[i]==c[i] || a[i]==c[i])
      |                    ^
main.c:15:27: error: subscripted value is neither array nor pointer nor vector
   15 |     else if(a[i]==b[i] ||b[i]==c[i] || a[i]==c[i])
      |                           ^
main.c:15:33: error: subscripted value is neither array nor pointer nor vector
   15 |     else if(a[i]==b[i] ||b[i]==c[i] || a[i]==c[i])
      |                                 ^
main.c:15:41: error: subscripted value is neither array nor pointer nor vector
   15 |     else if(a[i]==b[i] ||b[i]==c[i] || a[i]==c[i])
      |                                         ^
main.c:15:47: error: subscripted value is neither array nor pointer nor vector
   15 |     else if(a[i]==b[i] ||b[i]==c[i] || a[i]==c[i])
      |                                               ^
main.c:20:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |   printf("%d",count);
      |   ^~~~~~
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<stdio.h>
#include<string.h>
int hikaku(char *, char *, char *,int n);

int main()
{
	int n = 0;
	int cnt = 0;
	char *a;
	char *b;
	char *c;
	scanf("%d", &n);
	scanf("%c", &a);
	scanf("%c", &b);
	scanf("%c", &c);

	if ((a == b) && (b == c) && (a == c)) {
		cnt = 0;
	}
	else {
		cnt = hikaku(a, b, c, n);
	}
	printf("%d\n", cnt);
}
	int hikaku(char *m1,char *m2,char *m3,int n){
		int cnt = 0;
		int c = 0;
		for(int i = 0;i < n;i++){
			if (*m1 != *m2) {
				cnt += 1;
			}
			if (*m2 != *m3) {
				cnt += 1;
			}
			if (*m1 != *m3) {
				cnt += 1;
			}
			c++;
			m1++;
			m2++;
			m3++;

		}
		cnt = cnt - c;
		return cnt;

Compiler output:
a.cc: In function 'int hikaku(char*, char*, char*, int)':
a.cc:45:28: error: expected '}' at end of input
   45 |                 return cnt;
      |                            ^
a.cc:25:53: note: to match this '{'
   25 |         int hikaku(char *m1,char *m2,char *m3,int n){
      |                                                     ^
Language: C++

#include<stdio.h>
#include<string.h>
int hikaku(char *, char *, char *);

int main()
{
	int n = 0;
	int cnt = 0;
	char a;
	char b;
	char c;
	scanf("%d", &n);
	scanf("%c", &a);
	scanf("%c", &b);
	scanf("%c", &c);

	if ((a == b) && (b == c) && (a == c)) {
		cnt = 0;
	}
	else {
		cnt = hikaku(a, b, c);
	}
	printf("%d\n", cnt);
}
	int hikaku(char *m1,char *m2,char *m3){
		int cnt = 0;
		int c = 0;
		while (*m3 == '\0') {
			if (*m1 != *m2) {
				cnt += 1;
			}
			if (*m2 != *m3) {
				cnt += 1;
			}
			if (*m1 != *m3) {
				cnt += 1;
			}
			c++;
			m1++;
			m2++;
			m3++;

		}
		cnt = cnt - c;
		return cnt;
		
	

}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:30: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   21 |                 cnt = hikaku(a, b, c);
      |                              ^
      |                              |
      |                              char
a.cc:3:12: note:   initializing argument 1 of 'int hikaku(char*, char*, char*)'
    3 | int hikaku(char *, char *, char *);
      |            ^~~~~~
a.cc:21:33: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   21 |                 cnt = hikaku(a, b, c);
      |                                 ^
      |                                 |
      |                                 char
a.cc:3:20: note:   initializing argument 2 of 'int hikaku(char*, char*, char*)'
    3 | int hikaku(char *, char *, char *);
      |                    ^~~~~~
a.cc:21:36: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   21 |                 cnt = hikaku(a, b, c);
      |                                    ^
      |                                    |
      |                                    char
a.cc:3:28: note:   initializing argument 3 of 'int hikaku(char*, char*, char*)'
    3 | int hikaku(char *, char *, char *);
      |                            ^~~~~~