criyle/codenet-compile-errors huggingface dataset:
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() {
	string a, b, c;
	cin >> a >> b >> c;
	int ans;
	if (a == b) ans = c;
	if (a == c) ans = b;
	if (c == b) ans = a;
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
   11 |         if (a == b) ans = c;
      |                           ^
      |                           |
      |                           std::string {aka std::__cxx11::basic_string<char>}
a.cc:12:27: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
   12 |         if (a == c) ans = b;
      |                           ^
      |                           |
      |                           std::string {aka std::__cxx11::basic_string<char>}
a.cc:13:27: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
   13 |         if (c == b) ans = a;
      |                           ^
      |                           |
      |                           std::string {aka std::__cxx11::basic_string<char>}
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int ans;
    if (a == b) ans = c;
    if (b == c) ans = a;
    if (c == a) ans = b;
    System.out.println(ans);
  }
}


Compiler output:
Main.java:13: error: variable ans might not have been initialized
    System.out.println(ans);
                       ^
1 error
Language: C++

#include <iostream>
#include <map>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <sstream>
#include <cmath>
#include <math.h>
#include <string>
#include <set>
using namespace std;
typedef long long ll;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    if( a == b && a != c ) cout << c;
    else if( a == c && a != b ) cout << b;
    else if( b == a && b != c ) cout << c;
    else if( b == c && b != a ) cout << a;
    else if( c == a && c != b ) cout << b;
    else if( c == b && c != a ) cout << a;
    else cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'a' was not declared in this scope
   17 |     if( a == b && a != c ) cout << c;
      |         ^
a.cc:17:14: error: 'b' was not declared in this scope
   17 |     if( a == b && a != c ) cout << c;
      |              ^
a.cc:17:24: error: 'c' was not declared in this scope
   17 |     if( a == b && a != c ) cout << c;
      |                        ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define per(i,n) for (int i = (n)-1; i >=0; --i)
using namespace std;
using ll = long long;
using vi = vector<int>;
using vv = vector<vi>;

int main(){
    map<int,int> m;
    int a;
    rep(i,n){
        cin>>a;
        m[a]++;
    }
    
    for(auto p: m){
        if(p.second%2==1){
            cout << p.first << endl;
        }
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'n' was not declared in this scope
   12 |     rep(i,n){
      |           ^
a.cc:2:39: note: in definition of macro 'rep'
    2 | #define rep(i,n) for (int i = 0; i < (n); ++i)
      |                                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c;
  cin>>a>>b>>C;
  if(a==b)cout<<c<<endl;
  else if(a==c)cout<<b<<endl;
  else cout<<a<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'C' was not declared in this scope
    6 |   cin>>a>>b>>C;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  cin>>a>>b>>C;
  if(a==b)cout<<c<<endl;
  else if(a==c)cout<<b<<endl;
  else cout<<a<<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'a' was not declared in this scope
    5 |   cin>>a>>b>>C;
      |        ^
a.cc:5:11: error: 'b' was not declared in this scope
    5 |   cin>>a>>b>>C;
      |           ^
a.cc:5:14: error: 'C' was not declared in this scope
    5 |   cin>>a>>b>>C;
      |              ^
a.cc:6:17: error: 'c' was not declared in this scope
    6 |   if(a==b)cout<<c<<endl;
      |                 ^
a.cc:7:14: error: 'c' was not declared in this scope
    7 |   else if(a==c)cout<<b<<endl;
      |              ^
Language: Java

import java.util.*;

public class Main{
    public static void main(String [] args){
        Scanner sc = new Scanner(System.in);
        int a[] = new int[3];
        for(int i=0;i<3;i++)a[i]=sc.nextInt();
        if(a[0]==a[1])System.out.println(a[2]);
        else if (a[0]==a[2])System.out.println(a[1]);
        else System.out.println(a[0]); 
}

Compiler output:
Main.java:11: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <bits/stdc++.h>
#define INF 2e9
#define MOD 1000000007
#define MOD9 998244353
#define intMAX 51000;
#define PI 3.14159265359
using namespace std;
typedef long long llong;
// typedef long double ldouble;

using Graph = vector<vector<int>>;

// int ctoi(const char c){
//   if('0' <= c && c <= '9') return (c-'0');
//   return -1;
// }

// int gcd(int a, int b){
//   int ma = max(a,b);
//   int mi = min(a,b);
//   if(mi == 0) return ma;

//   return gcd(mi, ma%mi);
// }

// llong POW(llong a, llong b){
//   if(b == 0) return 1;
//   else{
//     if(b%2 == 0) return POW(a * a % MOD, b / 2) % MOD;
//     else return a * POW(a * a % MOD, b / 2) % MOD;
//   }
// }

int main(){
  int A, B, C;
  cin >> A >> B >> C;
  if(A==B) cout << C << endl;
  else if(B==C) cout << A << endl;
  else cout << B << endl;
}v

Compiler output:
a.cc:40:2: error: 'v' does not name a type
   40 | }v
      |  ^
Language: C++

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

int main () {
  int h, w;
  cin >> h >> w;
  vector<vector<char>> graph(h,vector<char>(w));
  int dx[8] = {-1,-1,0,1,1,1,0,-1};
  int dy[8] = {0,1,1,1,0,-1,-1,-1};
  
  for (int i = 0; i < h; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < w; j++){
      graph.at[i].at[j] = s.at[j];
     }
  }
  
  for (int i = 0; i < h; i++){
    for (int j = 0; j < w; j++){
      if (graph.at[i].at[j] == '#' ){
        continue;
      }
        int count = 0;
        for (int k = 0; k < 8; k++){
          //「座標外」を取り除くために単なるintで考えた後場合分け、okならグラフに適用
          int grid_h = i + dy[k];
          int grid_w = i + dx[k];
          if(grid_h < 0 || grid_w < 0 || grid_h >= h || grid_w >= w){
          continue;
          }
          //周囲8マスに#があったらカウントを加える
          if graph.at[grid_h].at[grid_w] == '#' {
            count++;
          } 
          graph.at(i).at(j) = char(count + '0');
        }
    }
        
      }
  for (int i = 0; i < h; i++){
    for (int j = 0; j < w; j++){
     cout << graph.at(i).at(j) << endl;
    }
  
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   15 |       graph.at[i].at[j] = s.at[j];
      |               ^
a.cc:15:31: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   15 |       graph.at[i].at[j] = s.at[j];
      |                               ^
a.cc:21:19: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   21 |       if (graph.at[i].at[j] == '#' ){
      |                   ^
a.cc:33:14: error: expected '(' before 'graph'
   33 |           if graph.at[grid_h].at[grid_w] == '#' {
      |              ^~~~~
      |              (
Language: Java

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Arrays;
import java.util.Collections;
import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int A = scan.nextInt();
    int B = scan.nextInt();
    int C = scan.nextInt();
    if(A == B){
      System.out.println(C);
    }
    else if(B == C){
      System.out.println(A);
    }
    else{
      System.out.println(B);
  }
}

Compiler output:
Main.java:23: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
#include <cmath>
using namespace std;
typedef __int64 LL;
//typedef long long int LL;
typedef vector<int> ivec;
typedef vector<string> svec;
typedef pair<int,int> P;
//typedef pair<LL,LL> PL;

const int MOD=1000000007;
int INF=100100100;
double pi=4*atan(1);

int main(){
	int a,b,c;
	cin>>a>>b>>c;
	if(a==b)cout<<c<<"\n";
	else if(b==c)cout<<a<<"\n";
	else cout<<b<<"\n";
	return 0;
}

Compiler output:
a.cc:15:9: error: '__int64' does not name a type; did you mean '__int64_t'?
   15 | typedef __int64 LL;
      |         ^~~~~~~
      |         __int64_t
Language: C++

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

int main() {
  int a,b,c;
  cin >> a >> b >> c;
  
  if (a==b){
    cout << c << ednl;
  } else if (b==c){
    cout << a << endl;
  } else {
    cout << b << endl;
  }
  
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  
  if ( a == b ) {
    cout << c << endl; 
  }
  else ( a == c ) {
     cout << b << endl; 
  }
  else {
     cout << a << endl; 
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before '{' token
   11 |   else ( a == c ) {
      |                  ^~
      |                  ;
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else {
      |   ^~~~
Language: C++

//隣接行列でグラフを管理して、DEFで連結判定する
#include<bits/stdc++.h>
using namespace std;
const int limit = 50;
int n, m;//ノードの数、エッジの数
int a[limit] , b[limit];//連結するノードのペア
 
bool graph[limit][limit];//隣接行列
bool visited[limit];//訪問済みかどうか
//DFS
void dfs(int v){//あるノードに対して
  visited[v] = true;//訪問済みにする
  for (int v2 = 0; v2 < n ; ++v2){//全ノードに対して
    if (graph[v][v2] == false) continue;//非連結なら次のノードを調べる
    if (visited[v2] == true) continue;//訪問済みなら次のノードを調べる
    dfs(v2);//未探索のノードならそこからさらに調べる
  }
}
 
int main(){
  cin >> n >> m;
  for(int i = 0; i < m; ++i){
    cin >> a[i] >> b[i];
    a[i]--, b[i]--;
    graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;
  }//ノードのペアに値を代入すると同時に、隣接行列も作成
  
  int ans = 0;
  
  for( int i = 0; i < m; ++i){
    graph[a[i]][b[i]] = graph[b[i]][a[i]] = false; //i番目のペアのエッジを削除
    
    for( int j = 0; j < n; ++j) visited[j] = false; //全ノードを見探索にする
    
    dfs(0);//グラフが連結か調べる
    
    bool bridge = false;
    for ( int j = 0; j < n ; ++j) if (visited[j] == false ) bridge = true;//探索で全ノードを訪問できたら、消去したエッジはブリッジ
    if(bridge) ans += 1;
    graph[a[i]][b[i]] = graph[[b[i]][a[i]] = true;//消去したエッジを元に戻す
 	}
  cout << ans << endl;
  return 0;
}
     

Compiler output:
a.cc: In function 'int main()':
a.cc:40:30: error: two consecutive '[' shall only introduce an attribute before '[' token
   40 |     graph[a[i]][b[i]] = graph[[b[i]][a[i]] = true;//消去したエッジを元に戻す
      |                              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int H, W;
  cin >> H >> W;
  vector<string> map(H);
  for ( int i = 0; i < map.size() ; i++){
    cin >> map.at(i);
  }
  vector<int> row = { -1 , 0 , 1};
  vector<int> column = { -1 , 0 , 1};
  for ( int i = 0 ; i < map.size(); i++){
    for ( int j = 0 ; j < map.at(0).size(); j++){
      if ( map.at(i).at(j) == '.'){
      	int count = 0;
      	for ( int x : row ){
       	 for ( int y : column){
          	if ( map.at(i + x).at(j + y) == '#' ) count++;
       	 }
      	}
        map.at(i).at(j) = to_string(count);
      }
    }
  }
  
  for ( string x : map ){
    cout << x << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:36: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   21 |         map.at(i).at(j) = to_string(count);
      |                           ~~~~~~~~~^~~~~~~
      |                                    |
      |                                    std::string {aka std::__cxx11::basic_string<char>}
Language: C

#include <iostream>
using namespace std;
int main(){

int a,b,c;
  cin >>a>>b>>c;
  
  if(a==b){cout <<c<<endl;}
  if(a==c){cout <<b<<endl;}
  if(b==c){cout <<a<<endl;}

return 0;


}


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

#include <iostream>

int main(){

char a,b,c;
  cin >>a>>b>>c;
  
  if(a==b){cout <<c<<endl;}
  if(a==c){cout <<b<<endl;}
  if(b==c){cout <<a<<endl;}

return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >>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:8:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   if(a==b){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:8:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   if(a==b){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)
      |     ^~~~
a.cc:9:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   if(a==c){cout <<b<<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:9:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   if(a==c){cout <<b<<endl;}
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   if(b==c){cout <<a<<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:10:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   if(b==c){cout <<a<<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<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std;

int main() {
  
  int a,b,c,d,x;
  string s,ss,sss;
  
  int ans = 0;
  string anss = "";
  
  cin >> a >> b >> c;
  
  int ab [] = {0 , 1 , 3 , 1 , 2 , 1 , 2 , 1 , 1 , 2 , 1 , 2 , 1};
  int result3 = std::max({a, b, c});
//--------------------------------------------------------------------------------

  if(a==b) ans = c;
  else if(a==c) ans = b;
  else ans = a
  
  cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: expected ';' before 'cout'
   25 |   else ans = a
      |               ^
      |               ;
   26 | 
   27 |   cout << ans << endl;
      |   ~~~~
Language: C++

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

int main() {
  int h, w;
  cin >> h >> w;
  
  vector<string> s(w);
  for (int i = 0; i < h; i++) {
    cin >> s.at(i);
  }
  
  vector<int> dx = {1, 0, -1, 0, 1, -1, -1, 1};
  vector<int> dy = {0, 1, 0, -1, 1, 1, -1, -1};
  
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (s.at(i).at(j) == '#') {
        continue;
      }
      
      int num = 0;
      for (int d = 0; d < 8; d++) {
        int ni = i + dy.at(d);
        int nj = j + dx.at(d);
        
        if (ni < 0 or h <= ni) {
          continue;
        }
        if (nj < 0 or w <= nj) {
          continue;
        }
        if (s.at(ni).at(nj) == '#') {
          num++;
        }
      }
      
      s.at(i).at(j) =　char (num + ’0’);
      
    }
  }
  
  for (int i = 0; i < h; ++i) cout << s.at(i) << endl;

  return 0;
  
}


Compiler output:
a.cc:38:22: error: extended character 　 is not valid in an identifier
   38 |       s.at(i).at(j) =　char (num + ’0’);
      |                      ^
a.cc:38:36: error: extended character ’ is not valid in an identifier
   38 |       s.at(i).at(j) =　char (num + ’0’);
      |                                    ^
a.cc:38:36: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:38:36: error: '\U000020190\U00002019' was not declared in this scope
   38 |       s.at(i).at(j) =　char (num + ’0’);
      |                                    ^~~
a.cc:38:22: error: '\U00003000char' was not declared in this scope
   38 |       s.at(i).at(j) =　char (num + ’0’);
      |                      ^~~~~~
Language: C++


#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
using namespace std;

int main() {
int A, B, C;
cin >> A >> B >> C;
  if (A == B){
    cout << C << endl;
  }
  else if(B == C){
    cout << A << endl;
  }
  else{
    cout << B << endl;

}




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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;



int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int A[3];
    int sum=0;
    rep(i,3){
        cin >>A[i];
        sum+=A[i];
    }
    sort(A,A+N);
    cout << sum-A[1]*2<<endl;




}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: 'N' was not declared in this scope
   22 |     sort(A,A+N);
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;



int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int A[3];
    int sum=0;
    rep(i,3){
        cin >>A[i];
        sum+=A[i];
    }
    sort(A.begin(),A.end());
    cout << sum-A[1]*2<<endl;




}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: request for member 'begin' in 'A', which is of non-class type 'int [3]'
   22 |     sort(A.begin(),A.end());
      |            ^~~~~
a.cc:22:22: error: request for member 'end' in 'A', which is of non-class type 'int [3]'
   22 |     sort(A.begin(),A.end());
      |                      ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;



int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int A[3];
    sum=0;
    rep(i,3){
        cin >>A[i];
        sum+=A[i];
    }
    sort(A.begin(),A.end());
    cout << sum-A[1]*2<<endl;




}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'sum' was not declared in this scope
   17 |     sum=0;
      |     ^~~
a.cc:22:12: error: request for member 'begin' in 'A', which is of non-class type 'int [3]'
   22 |     sort(A.begin(),A.end());
      |            ^~~~~
a.cc:22:22: error: request for member 'end' in 'A', which is of non-class type 'int [3]'
   22 |     sort(A.begin(),A.end());
      |                      ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;



int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int A[3];
    sum=0;
    rep(i,3){
        cin >>A[i];
        sum+=A[i];
    }
    sort(A,A+3);
    cout << sum-A[1]*2<<endl;




}


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

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

int main(){
    const int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
    const int dy[8] = {0, -1, -1, -1, 0, 1, 1, 1};

    int h, w;
    string s[100], t[100];

    cin >> h, w;

    rep(i,h){
        cin >> s[i];
    }

    rep(i,h){
        rep(j,w){
            int a=0;

            if(s[i][j]=='#'){
                t[i][j] = '#';
                continue;
            }

            rep(k,8){
                int ii = i + dx[k];
                int jj = j + dy[k];

                if(ii<0||ii>w-1){
                    continue;
                }
                if(jj<0||jj>h-1){
                    continue;
                }

                if(s[i+dx[k]][j+dy[k]]=='#'){
                    a++;
                }
            }

            t[i][j] = to_string(a);
        }
    }

    rep(i,h){
        cout << t[i] << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:32: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   43 |             t[i][j] = to_string(a);
      |                       ~~~~~~~~~^~~
      |                                |
      |                                std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
 
int main(){
    int a, b, c;
    cin >> a >> b >> c;

    int ans 
    if (a == b) ans = a;
    if (b == c) ans = b;
 
    cout << ans << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'if'
   10 |     if (a == b) ans = a;
      |     ^~
a.cc:11:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     if (b == c) ans = b;
      |                 ^~~
      |                 abs
a.cc:13:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

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

int main(){
  int A,B,c;
  cin >> A >> B >> C;
  
  if(A=B){
    cout << C << endl;
  }
  else if(B=C) {
    cout << A << endl;
  }
  else if(C=A) {
    cout << B << endl;
  }
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'C' was not declared in this scope
    6 |   cin >> A >> B >> C;
      |                    ^
Language: C++

a, b, c = map (int, input (). split ())
if a == b:
    print (c)

elif b == c:
    print (a)

else:
    print (b)


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, c = map (int, input (). split ())
      | ^
Language: C++

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

int main() {
  vector<int> v(3);
  rep(i,3){
    cin >> v[i];
  }
  sort(v.begin(),v.end());
  if(s[0]<s[1]){
    cout << s[0] << endl;
  }else{
    cout << s[2] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 's' was not declared in this scope
   11 |   if(s[0]<s[1]){
      |      ^
Language: Java

public class main{
	public static void main(String[] args){
    
    	java.util.Scanner scan = new java.util.Scanner(System.in);
      	
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int c = scan.nextInt();
      
      if(a == b){
      	System.out.println(c);
      }
      else if(a == c){
      	System.out.println(b);
      }
      else{
        System.out.println(a);
    }
}
}

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

class main{
	public static void main(String[] args){
    
    	java.util.Scanner scan = new java.util.Scanner(System.in);
      	
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int c = scan.nextInt();
      
      if(a == b){
      	System.out.println(c);
      }
      else if(a == c){
      	System.out.println(b);
      }
      else{
        System.out.println(a);
    }
}


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

class One out of Three{
	public static void main(String[] args){
    
    	java.util.Scanner scan = new java.util.Scanner(System.in);
      	
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int c = scan.nextInt();
      
      if(a == b){
      	System.out.println(c);
      }
      else if(a == c){
      	System.out.println(b);
      }
      else{
        System.out.println(a);
    }
}

Compiler output:
Main.java:1: error: '{' expected
class One out of Three{
         ^
Main.java:19: error: reached end of file while parsing
}
 ^
2 errors
Language: C++

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

int main(void) {
  int a, b ,c;
  cin >> a >> b >>c;

  if(a == b) cout << c << endl;
  if(a == c) cout << b << endl;
  if(b == c) cout << a << endl;
  }
  return 0;
}

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

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

int main(){
  vector<int>(3);
  for(int i = 0;i<3;i++){
    cin >> a[i];
  }
  sort(a.begin(),a.end());
  cout << a[2] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'a' was not declared in this scope
    7 |     cin >> a[i];
      |            ^
a.cc:9:8: error: 'a' was not declared in this scope
    9 |   sort(a.begin(),a.end());
      |        ^
Language: C++

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

int main(){
  int a;
  cin>> a >> b >> c;;
  if(a==b) cout << c << endl;
  else if (b==c) cout << a << endl;
  else cout << b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'b' was not declared in this scope
    6 |   cin>> a >> b >> c;;
      |              ^
a.cc:6:19: error: 'c' was not declared in this scope
    6 |   cin>> a >> b >> c;;
      |                   ^
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class MainClass
{
	public const long Giri = 1000000007;
	public const long DpInf = 99999999999999;
	
	public static void Main(string[] args)
	{
		var p = Input().ToInt();
		if(p[0] == p[1])
		{
			Console.WriteLine(p[2]);
		}
		else if(p[1] == p[2])
		{
			Console.WriteLine(p[0]);
		}
		else
		{
			Console.WriteLine(p[1]);
		}
	}

	static long GCD(long a, long b)
	{
		var v = new[] { a, b };
		while (v[1] != 0) { v = new[] { v[1], v[0] % v[1] }; }
		return v[0];
	}
	public static string[] Input() { return Console.ReadLine().Split(); }
}

public static class Smarter
{
	public static int ToInt(this string str) { return int.Parse(str); }
	public static long ToLong(this string str) { return long.Parse(str); }
	public static int[] ToInt(this string[] str, int offset = 0)
	{
		var r = new int[str.Length];
		for(int i = 0; i < str.Length; i++) r[i] = str[i].ToInt() + offset;
		return r;
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class MainClass
      | ^~~~~~
a.cc:37:1: error: expected unqualified-id before 'public'
   37 | public static class Smarter
      | ^~~~~~
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<vector<char>> board(H, vector<char>(W));
  vector<vector<char>> diff(8, vector<char>(2)) = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}};
  
  for(int hi = 0; hi < H; hi++) {
    for(int wj = 0; wj < W; wj++) {
      cin >> board.at(hi).at(wj);
    }
  }
  
  for(int hi = 0; hi < H; hi++) {
    for(int wj = 0; wj < W; wj++) {
      if(board.at(hi).at(wj) == '.') {
      char result = 0;
        for(int di = 0; di < 8; di++){
          pointh = hi + diff.at(di).at(0);
          pointw = wj + diff.at(di).at(1);
          if(pointh < 0 || pointw < 0 || pointh >= H || pointw >= W) continue;
          else if(board.at(pointh).at(pointw) == "#") result++;
          board.at(hi).at(wj) = char('0' + result);
        }
        cout << board.at(hi).at(wj);
      }
      cout << endl;
    }
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:49: error: expected ',' or ';' before '=' token
    8 |   vector<vector<char>> diff(8, vector<char>(2)) = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}};
      |                                                 ^
a.cc:21:11: error: 'pointh' was not declared in this scope; did you mean 'printf'?
   21 |           pointh = hi + diff.at(di).at(0);
      |           ^~~~~~
      |           printf
a.cc:22:11: error: 'pointw' was not declared in this scope; did you mean 'printf'?
   22 |           pointw = wj + diff.at(di).at(1);
      |           ^~~~~~
      |           printf
Language: Java

#include <iostream>

using namespace std;

int main(){
    int a;
    int b;
    int c;
    cin >> a >> b >> c;
    if(a == b){
        cout << c << endl;
    }
    else if(a == c){
        cout << b << endl;
    }
    else{
        cout << a << endl;
    }
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
         ^
Main.java:9: error: not a statement
    cin >> a >> b >> c;
                  ^
Main.java:11: error: not a statement
        cout << c << endl;
                  ^
Main.java:14: error: not a statement
        cout << b << endl;
                  ^
Main.java:17: error: not a statement
        cout << a << endl;
                  ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
7 errors
Language: Java

    import java.util.*;
    public class Main {
     
    	public static void main(String[] args) {
    			
    		Scanner scan=new Scanner(System.in);
    		
    		int a=Integer.parseInt(scan.next());
    		int b=Integer.parseInt(scan.next());
    		int c=Integer.parseInt(scan.next());
    		
    		if (a==b) {
    			System.out.print(c);
    		}else if (a==c) {
    			System.out.print(b);
    		}else if (c==b) {
    			System.out.print(a);
    		}

Compiler output:
Main.java:18: error: reached end of file while parsing
    		}
    		 ^
1 error
Language: C++

#include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include <cassert>
#include <cmath>
#include<cstdint>

#define INF 1e9
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
#define ALL(a)  (a).begin(),(a).end()

using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int,int>;

vector<int>bitSearch(int bit,int n){
    vector<int>S;
    rep(i,n)if(bit&(1<<i))S.push_back(i);
    return S;
}



int main(){
   VEC(int,a,3);
   cout<<(v[1]==v[0]?v[2]:v[0]);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:43:11: error: 'v' was not declared in this scope
   43 |    cout<<(v[1]==v[0]?v[2]:v[0]);
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(void){
  int A,B,C;
  cin A >> B >> C;
  if(A == B){
    cout << C << endl;
  }else if(A == C){
    cout << B << endl;
  }else if(B == C){
    cout << A << endl;
  }
  
  return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected ';' before 'A'
    5 |   cin A >> B >> C;
      |      ^~
      |      ;
Language: C++

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

int main(){
  map<int, int> mp;
  int a;
  for(int i = 0; i < 3; i++){
    cin >> a;
    mp[a]++;
  }
  for(const auto& [key, value]; mp){
    if(value == 1) cout << key << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: expected initializer before ';' token
   11 |   for(const auto& [key, value]; mp){
      |                               ^
a.cc:11:33: error: could not convert 'mp' from 'std::map<int, int>' to 'bool'
   11 |   for(const auto& [key, value]; mp){
      |                                 ^~
      |                                 |
      |                                 std::map<int, int>
a.cc:11:35: error: expected ';' before ')' token
   11 |   for(const auto& [key, value]; mp){
      |                                   ^
      |                                   ;
Language: C++

#include<iostream>
using namespace std;
int main() {
	int a ,b,c;
	cin >> a >> b >> c;
	if (a == b)
		cout << c;
	else if (a == c)
		cout << b;
	else  
		cout << a;
	return 0;

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

#include <bits/stdc++.h>
using namespace std;
 
int main(){ 
    int a,b,c;
    cin>>a>>b>>c;
    if(a==b)cout<<c;
    else {
        if(b==c)cout<<a;
        else cout<<b
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before '}' token
   10 |         else cout<<b
      |                     ^
      |                     ;
   11 |     }
      |     ~
Language: C++

#include <iostream>

using namespace std;

int main()
{
int A , B, C ,tamp;
cin>>A>>B>>C;
if (A=b)
    cout<< C <<endl;
if (A=C)
    cout <<B <<endl;
if (B=C)
    cout<<A<< endl;
        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'b' was not declared in this scope
    9 | if (A=b)
      |       ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
    int A,B,C;
    cin>>A\n;
    cin>>B\n;
    cin>>C\n
    if (A==B)
        cout<<C;
    else if (A==C)
        cout<<B;
    else
        cout<<A;
    return 0;
}

Compiler output:
a.cc:6:11: error: stray '\' in program
    6 |     cin>>A\n;
      |           ^
a.cc:7:11: error: stray '\' in program
    7 |     cin>>B\n;
      |           ^
a.cc:8:11: error: stray '\' in program
    8 |     cin>>C\n
      |           ^
a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'n'
    6 |     cin>>A\n;
      |           ^~
      |           ;
a.cc:7:11: error: expected ';' before 'n'
    7 |     cin>>B\n;
      |           ^~
      |           ;
a.cc:8:11: error: expected ';' before 'n'
    8 |     cin>>C\n
      |           ^~
      |           ;
a.cc:11:5: error: 'else' without a previous 'if'
   11 |     else if (A==C)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define rrep(i,n) for(int i=1;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin,(a).rend()
#define dunk(a) cout << (a) << endl
using namespace std;
typedef long long ll;
const int inf = 1001001001;
const int mod = 1000000007;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int a, b, c;
	scanf_s("%d%d%d", &a, &b, &c);
	int ans = a == b ? c : a == c ? b : a;
	printf_s("%d", ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   16 |         scanf_s("%d%d%d", &a, &b, &c);
      |         ^~~~~~~
      |         scanf
a.cc:18:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   18 |         printf_s("%d", ans);
      |         ^~~~~~~~
      |         printf
Language: C++

int main () {
int a , b, ,c ;
cin >> a >> b >> c ;

if (b==c){
cout << a << endl;
} else if (a ==c){
cout<<b<< endl;
} else { cout << c << endl;
}
return 0 ; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:12: error: expected unqualified-id before ',' token
    2 | int a , b, ,c ;
      |            ^
a.cc:3:1: error: 'cin' was not declared in this scope
    3 | cin >> a >> b >> c ;
      | ^~~
a.cc:6:1: error: 'cout' was not declared in this scope
    6 | cout << a << endl;
      | ^~~~
a.cc:6:14: error: 'endl' was not declared in this scope
    6 | cout << a << endl;
      |              ^~~~
a.cc:8:1: error: 'cout' was not declared in this scope
    8 | cout<<b<< endl;
      | ^~~~
a.cc:8:11: error: 'endl' was not declared in this scope
    8 | cout<<b<< endl;
      |           ^~~~
a.cc:9:10: error: 'cout' was not declared in this scope
    9 | } else { cout << c << endl;
      |          ^~~~
a.cc:9:23: error: 'endl' was not declared in this scope
    9 | } else { cout << c << endl;
      |                       ^~~~
Language: C++

int main()
{ 
    int A,B,C;
    cin>>A>>B>>C;
    
    if(A==B &&A!=C) cout<<C;
    else if((A==C )&&( A!=B)) cout<<B;
    else cout<<A;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin>>A>>B>>C;
      |     ^~~
a.cc:6:21: error: 'cout' was not declared in this scope
    6 |     if(A==B &&A!=C) cout<<C;
      |                     ^~~~
a.cc:7:31: error: 'cout' was not declared in this scope
    7 |     else if((A==C )&&( A!=B)) cout<<B;
      |                               ^~~~
a.cc:8:10: error: 'cout' was not declared in this scope
    8 |     else cout<<A;
      |          ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
    int a , b , c  ;
    cin >> a >> b >> c ;
    if (a!=b && a!=c ){
        cout << a <<end1 ;
    }else if (b!=a && b!=c){
        cout << b <<end1 ;
    }else {
    cout << c << end1 ;
    }

return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: 'end1' was not declared in this scope
    8 |         cout << a <<end1 ;
      |                     ^~~~
a.cc:10:21: error: 'end1' was not declared in this scope
   10 |         cout << b <<end1 ;
      |                     ^~~~
a.cc:12:18: error: 'end1' was not declared in this scope
   12 |     cout << c << end1 ;
      |                  ^~~~
Language: C++

int main()
{
    int x, y,z;
    cin>>x>>y>>z;
    if (x==y){
        cout<< z;
    }
    else if (x==z){
             cout<<y;
    }
    else {
            cout<<x;
    }
	return 0;
}






Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin>>x>>y>>z;
      |     ^~~
a.cc:6:9: error: 'cout' was not declared in this scope
    6 |         cout<< z;
      |         ^~~~
a.cc:9:14: error: 'cout' was not declared in this scope
    9 |              cout<<y;
      |              ^~~~
a.cc:12:13: error: 'cout' was not declared in this scope
   12 |             cout<<x;
      |             ^~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int x, y,z;
    cin>>x>>y>>z;
    if (x==y)cout<<z;
    else if (y==z)cout x;
    else cout y;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before 'x'
   10 |     else if (y==z)cout x;
      |                       ^~
      |                       ;
a.cc:11:14: error: expected ';' before 'y'
   11 |     else cout y;
      |              ^~
      |              ;
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
const int maxn=10010;
int n,m,x,y,index_,dfn[maxn],low[maxn],ans,a;
vector<int>G[maxn];
struct Edge{int from,to;}edge[maxn];
bool cmp(const Edge a,const Edge b){if(a.from!=b.from)return a.from<b.from;return a.to<b.to;}
inline void add_edge(int x,int y){edge[ans].from=min(x,y);edge[ans].to=max(x,y);ans++;}
int ans-0;
void dfs(int cur,int fa)
{
    int child;
    dfn[cur]=++index_;
    low[cur]=dfn[cur];
    bool vis=false; 
    for(int i=0;i<G[cur].size();i++)
    {
        child=G[cur][i];
        if(dfn[child])
        {
            if(child==fa&&!vis)vis=true;
            else low[cur]=min(low[cur],dfn[child]);
        }
        if(!dfn[child])
        {
            dfs(child,cur);
            if(dfn[cur]<low[child])add_edge(cur,child);
            low[cur]=min(low[cur],low[child]);
        }
    }
}
int main()
{
    scanf("%d%d",&n,&m);
    for(int i=0;i<m;i++)scanf("%d%d",&x,&y),G[x].push_back(y),G[y].push_back(x);
    for(int i=1;i<=n;i++)if(!dfn[i])dfs(i,i);
    sort(edge,edge+ans,cmp);
    for(int i=0;i<ans;i++)ans++;
printf("%d",ans);
    return 0;
}

Compiler output:
a.cc:12:8: error: expected initializer before '-' token
   12 | int ans-0;
      |        ^
Language: C++

#include <iostream>


using namespace std;

int main()
{
 int a , b , c;
 cout<<"enter the three numbers   :  ";
 cin>>a>>b>>c;
 if(a>(-100) && a<100){
    if (b>(-100) && b<100){
        if(c>(-100) && c<100){
                if(a==b){cout<<c;}
 else if (a==c){cout<<b;}
 else{cout<<a;}
        }
    }
 }

    return 0;

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

#include <iostream>

using namespace std;

int main() {
  int a,b,c;
  cin >> a >> b >> c;
  cout << a ^ b ^ c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: no match for 'operator^' (operand types are 'std::basic_ostream<char>' and 'int')
    8 |   cout << a ^ b ^ c << endl;
      |   ~~~~~~~~~ ^ ~
      |        |      |
      |        |      int
      |        std::basic_ostream<char>
a.cc:8:13: note: candidate: 'operator^(int, int)' (built-in)
    8 |   cout << a ^ b ^ c << endl;
      |   ~~~~~~~~~~^~~
a.cc:8:13: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/cstddef:146:3: note: candidate: 'constexpr std::byte std::operator^(byte, byte)'
  146 |   operator^(byte __l, byte __r) noexcept
      |   ^~~~~~~~
/usr/include/c++/14/cstddef:146:18: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::byte'
  146 |   operator^(byte __l, byte __r) noexcept
      |             ~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:94:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator^(_Ios_Fmtflags, _Ios_Fmtflags)'
   94 |   operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:94:27: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Fmtflags'
   94 |   operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:144:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator^(_Ios_Openmode, _Ios_Openmode)'
  144 |   operator^(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:144:27: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Openmode'
  144 |   operator^(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:191:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator^(_Ios_Iostate, _Ios_Iostate)'
  191 |   operator^(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:191:26: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Iostate'
  191 |   operator^(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~^~~
a.cc:8:21: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 |   cout << a ^ b ^ c << endl;
      |                   ~~^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int a,b,c;
    cin >>a>>b>>c;
    if (a==b) {
        cout << c;
    }
    if (a==c){
       cout<< b;}
    if (c==b){
       cout<<a;}
    return 0;

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

include <iostream>
using namespace std ;
int main ()
{ 
int A,B,C ;
if (A==B)
cout << C ;
else if (A==C)
cout <<B ;
else 
cout << A ;

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cout' was not declared in this scope
    7 | cout << C ;
      | ^~~~
a.cc:9:1: error: 'cout' was not declared in this scope
    9 | cout <<B ;
      | ^~~~
a.cc:11:1: error: 'cout' was not declared in this scope
   11 | cout << A ;
      | ^~~~
a.cc:11:12: error: expected '}' at end of input
   11 | cout << A ;
      |            ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^