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


{
    int a, b, c;
    cin>>a>>b>>c;
    if( a+b == c ) cout<<"Yes"<<endl;
    else if( a+c == b ) cout<<"Yes"<<endl;
    else if( b+c == a ) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    return 0;
}


Compiler output:
a.cc:2:1: error: expected unqualified-id before '{' token
    2 | {
      | ^
Language: C++

#include <cstdio>

using namespace std;

int main()
{
    int a, b, c;
    cin>>a>>b>>c;
    if( a+b == c ) cout>>"Yes">>endl;
    else if( a+c == b ) cout>>"Yes">>endl;
    else if( b+c == a ) cout>>"Yes">>endl;
    else cout>>"No">>endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin>>a>>b>>c;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstdio>
  +++ |+#include <iostream>
    2 | 
a.cc:9:20: error: 'cout' was not declared in this scope
    9 |     if( a+b == c ) cout>>"Yes">>endl;
      |                    ^~~~
a.cc:9:20: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:33: error: 'endl' was not declared in this scope
    9 |     if( a+b == c ) cout>>"Yes">>endl;
      |                                 ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cstdio>
  +++ |+#include <ostream>
    2 | 
a.cc:10:25: error: 'cout' was not declared in this scope
   10 |     else if( a+c == b ) cout>>"Yes">>endl;
      |                         ^~~~
a.cc:10:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:38: error: 'endl' was not declared in this scope
   10 |     else if( a+c == b ) cout>>"Yes">>endl;
      |                                      ^~~~
a.cc:10:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:11:25: error: 'cout' was not declared in this scope
   11 |     else if( b+c == a ) cout>>"Yes">>endl;
      |                         ^~~~
a.cc:11:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:38: error: 'endl' was not declared in this scope
   11 |     else if( b+c == a ) cout>>"Yes">>endl;
      |                                      ^~~~
a.cc:11:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:12:10: error: 'cout' was not declared in this scope
   12 |     else cout>>"No">>endl;
      |          ^~~~
a.cc:12:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:22: error: 'endl' was not declared in this scope
   12 |     else cout>>"No">>endl;
      |                      ^~~~
a.cc:12:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef  long long ll;
//double pi=3.1415926535898;
//double pi=acos(-1.0);
#define scarr(a,s,e) for(int i=s;i<=int(e);i++) scanf("%d ",&a[i]);
#define prarr(a,s,e) for(int i=s;i<=int(e);i++) printf("%d ",a[i]);
#define speed      ios::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL);
#define rng(i,a,b) for(int i=a;i>=int(b);i--)
#define rep(i,a,b) for(int i=a;i<=int(b);++i)
#define lop(i,n)   for(int i=0;i<int(n);i++)
#define ms(x,a)    memset(x,a,sizeof(x))
#define all(x)     (x).begin(),(x).end()
#define sz(x)      int(x.size())
#define pb         push_back
#define mkp        make_pair
#define sc(x)      scanf("%d",&x)
#define scl(x)     scanf("%lld",&x)
#define pr(x)      printf("%d ",x)
#define prl(x)     printf("%lld ",x)
#define prln(x)    printf("%d\n",x)
#define prlln(x)   printf("%lld\n",x)
#define r0         return 0;
#define CC         continue;
#define scd(x)     scanf("%lf",&x)
#define prd(x)     printf("%.10f\n",x)
#define bb(x)      cerr<< x <<endl;
#define pii        pair<int,int>
#define pis        pair<int,string>
#define vi         vector<int>
#define x         first
#define y         second
//#define max(a,b) a<b?b:a
//#define min(a,b) a<b?a:b
const ll M  = 1e9+7 ;
const ll linf = 1e18 ;
const int iinf = INT_MAX ;
const int N = 300300 ;
//////////////////////    Hi    ^_^  hack me if you can :P

int  main()
{
int a,b,c;
cin>>a>>b>>c;
if(a==b+c||
   b==a+c||
   c==a+b){
    cout<<"Yes
";
   }
   else
    cout<<"No";
}

/*

ll pwmod(ll a, ll n, ll mod) {
    ll ret = 1;
    while (n) {
        if (n & 1) ret = ret * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return ret;
}
Wj0944296025*
*/
/*
freopen("output.txt","w",stdout);
freopen("input.txt","r",stdin);
for (int i=0;i<n;i++)            Hi    ^_^  hack me if you can :P
int mx[]= {0,0,1,-1, 1,1,-1,-1};
int my[]= {1,-1,0,0, 1,-1,1,-1};
bool inside (int i,int j) {return (i>=0 && i<n && j>=0 && j<m);}

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

void gcd(LL n,LL m,LL &d,LL &xx,LL &yy){
    if(!m) {d=n; xx=1; yy=0;}
    else {gcd(m,n%m,d,yy,xx); yy-=xx*(n/m);}
}

int getm(int l,int r)
{
    if(l>r)
        return N;
    if(l==r)
        return 0;
    if(l==r-1)
        return s[l] != s[r];
    if(s[l]==s[r])
        return getm(l+1,r-1);
    else
        return 1+min(getm(l+1,r),getm(l,r-1));
}

int BIT[si], a[si], n;
void update(int x, int delta)
{
    for(; x <= N; x += x&-x)
        BIT[x] += delta;
}
int query(int x)
{
    int sum = 0;
    for(; x > 0; x -= x&-x)
        sum += BIT[x];
    return sum;
}

*/


Compiler output:
a.cc:48:11: warning: missing terminating " character
   48 |     cout<<"Yes
      |           ^
a.cc:48:11: error: missing terminating " character
   48 |     cout<<"Yes
      |           ^~~~
a.cc:49:1: warning: missing terminating " character
   49 | ";
      | ^
a.cc:49:1: error: missing terminating " character
   49 | ";
      | ^~
a.cc: In function 'int main()':
a.cc:50:4: error: expected primary-expression before '}' token
   50 |    }
      |    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int w,h,n,a,b,c,count=0;
 cin >> w >> h >> n;
 int maps[h][w];
 
 for(int i=0;i<h;i++){
  for(int j=0;j<w;j++){
   maps[i][j]=0;
  }
 }

 for(int cas=0;cas<n;cas++){
  cin >> a >> b >> c;
  if(c == 1){
   for(int i=0;i<a;i++){
    for(int j=0;j<h;j++){
     maps[j][i]=1;
    }
   }
  } else if( c == 2){
   for(int i=a;i<w;i++){
    for(int j=0;j<h;j++){
     maps[j][i]=1;
    }
   }
 } else if( c == 3){
  for(int i=0;i<b;i++){
   for(int j=0;j<w;j++){
    maps[i][j]=1;
   }
  }
 } else if(c == 4){
  for(int i=b;i<h;i++){
   for(int j=0;j<w;j++){
    maps[i][j]=1;
   }
  }
 }

 for(int i=0;i<h;i++){
  for(int j=0;j<w;j++){
   if( maps[i][j] == 0){
     count++;
   }
  }
 }

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

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

class probA{
static public void main(String[] args) 
{
int suji[] = new suji[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
suji[i] = Integer.parseInt(args[i]);
sum  += num[i];
}
 
for (i = 0; i < 3; i++){
if (sum - suji[i] == suji[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
}

Compiler output:
Main.java:4: error: cannot find symbol
int suji[] = new suji[3];
                 ^
  symbol:   class suji
  location: class probA
Main.java:8: error: cannot find symbol
sum  += num[i];
        ^
  symbol:   variable num
  location: class probA
2 errors
Language: Java

class probA{
static public void main(String[] args) 
{
int suji[] = new suji[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
suji[i] = Integer.parseInt(args[i]);
sum  += num[i];
}
 
for (i = 0; i < 3; i++){
if (sum - suji[i] == suji[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}

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

class probA{
static public void main(String[] args) 
{
int suji[] = new int[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
suji[i] = parseInt(args[i]);
sum  += suji[i];
}
 
for (i = 0; i < 3; i++){
if (sum - suji[i] == suji[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
}

Compiler output:
Main.java:7: error: cannot find symbol
suji[i] = parseInt(args[i]);
          ^
  symbol:   method parseInt(String)
  location: class probA
1 error
Language: Java

class probA{
static public void main(String[] args) 
{
int suji[] = new suji[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
suji[i] = parseInt(args[i]);
sum  += num[i];
}
 
for (i = 0; i < 3; i++){
if (sum - suji[i] == suji[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
}


Compiler output:
Main.java:4: error: cannot find symbol
int suji[] = new suji[3];
                 ^
  symbol:   class suji
  location: class probA
Main.java:7: error: cannot find symbol
suji[i] = parseInt(args[i]);
          ^
  symbol:   method parseInt(String)
  location: class probA
Main.java:8: error: cannot find symbol
sum  += num[i];
        ^
  symbol:   variable num
  location: class probA
3 errors
Language: Java

class probA{
static public void main(String[] args) 
{
int num[] = new num[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
num[i] = parseInt(args[i]);
sum  += num[i];
}

for (i = 0; i < 3; i++){
if (sum - num[i] == num[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}
}

Compiler output:
Main.java:4: error: cannot find symbol
int num[] = new num[3];
                ^
  symbol:   class num
  location: class probA
Main.java:7: error: cannot find symbol
num[i] = parseInt(args[i]);
         ^
  symbol:   method parseInt(String)
  location: class probA
2 errors
Language: Java

class probA{
static public void main(String[] args) 
{
int num[] = new num[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
int num[i] = parseInt(args[i]);
sum  += num[i]
}

for (i = 0; i < 3; i++){
if (sum - num[i] == num[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}


Compiler output:
Main.java:7: error: ']' expected
int num[i] = parseInt(args[i]);
        ^
Main.java:7: error: ';' expected
int num[i] = parseInt(args[i]);
         ^
Main.java:8: error: ';' expected
sum  += num[i]
              ^
Main.java:19: error: reached end of file while parsing
}
 ^
4 errors
Language: Java

class probA{
static public void main(String[] args) 
{
int num[3];
int i, sum = 0;
for (i = 0; i < 3; i++){
int num[i] = parseInt(args[i]);
sum  += num[i]
}

for (i = 0; i < 3; i++){
if (sum - num[i] == num[i]){
System.out.println("Yes");
System.exit(0);
}
}
System.out.println("No");
System.exit(0);
}


Compiler output:
Main.java:4: error: ']' expected
int num[3];
        ^
Main.java:7: error: ']' expected
int num[i] = parseInt(args[i]);
        ^
Main.java:7: error: ';' expected
int num[i] = parseInt(args[i]);
         ^
Main.java:8: error: ';' expected
sum  += num[i]
              ^
Main.java:19: error: reached end of file while parsing
}
 ^
5 errors
Language: C

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
if (argc == 3) {
int i;
int num[3];

for (i = 0; i < 3; i++) {
num[i] = atoi(argv[i]);
}

if (num[0]+num[1] == num[2] || num[1]+num[2] == num[0] || num[2]+num[0] == num[1])
printf("Yes\n");
else
printf("No\n");

} else
printf("No\n");
retrun 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:1: error: 'retrun' undeclared (first use in this function)
   21 | retrun 0;
      | ^~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:7: error: expected ';' before numeric constant
   21 | retrun 0;
      |       ^~
      |       ;
Language: C

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

int main(int argc, char *argv[])
{
if (argc == 3) {
int i;
int num[3];

for (i = 0; i < 3; i++) {
num[i] = atoi(argv[i]);
}

if (num[0]+num[1] == num[2] || num[1]+num[2] == num[0] || num[2]+num[0] == num[1])
printf("Yes\n");
else
printf("No\n");

} else
printf("No\n");
retrun 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:10: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   11 | num[i] = atoi(argv[i]);
      |          ^~~~
main.c:21:1: error: 'retrun' undeclared (first use in this function)
   21 | retrun 0;
      | ^~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:7: error: expected ';' before numeric constant
   21 | retrun 0;
      |       ^~
      |       ;
Language: C

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

int main(int *argc, char *argv[])
{
if (argc == 3) {
int i;
int num[3];

for (i = 0; i < 3; i++) {
num[i] = atoi(argv[i]);
}

if (num[0]+num[1] == num[2] || num[1]+num[2] == num[0] || num[2]+num[0] == num[1])
printf("Yes\n");
else
printf("No\n");

} else
printf("No\n");
retrun 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:10: warning: comparison between pointer and integer
    6 | if (argc == 3) {
      |          ^~
main.c:11:10: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   11 | num[i] = atoi(argv[i]);
      |          ^~~~
main.c:21:1: error: 'retrun' undeclared (first use in this function)
   21 | retrun 0;
      | ^~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:7: error: expected ';' before numeric constant
   21 | retrun 0;
      |       ^~
      |       ;
Language: C

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

int main(int *argc, char *argv[])
{
if (argc == 3) {
int i;
int num[3];

for (i = 0; i < 3; i++) {
num[i] = atoi(argv[i]);
}

if (num[0]+num[1] == num[2] || num[1]+num[2] == num[0] || num[2]+num[0] == num[1])
printf("Yes\n");
else
printf("No\n");

} else
printf("No\n");
retrun0;}

Compiler output:
main.c: In function 'main':
main.c:6:10: warning: comparison between pointer and integer
    6 | if (argc == 3) {
      |          ^~
main.c:11:10: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   11 | num[i] = atoi(argv[i]);
      |          ^~~~
main.c:21:1: error: 'retrun0' undeclared (first use in this function)
   21 | retrun0;}
      | ^~~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

package ARC063;
import java.util.*;
public class A {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		if(a+b==c||b+c==a||c+a==b){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
		sc.close();
	}
}


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

#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cassert>
#include <cstddef>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <sstream>
#include <fstream>

using namespace std;
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int (i) = (a); (i) < (b); (i)++)
#define RREP(i, a) for(int (i) = (a) - 1; (i) >= 0; (i)--)
#define FORR(i, a, b) for(int (i) = (a) - 1; (i) >= (b); (i)--)
#define DEBUG(C) cerr << #C << " = " << C << endl;
using LL = long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<LL>;
using VVL = vector<VL>;
using VD = vector<double>;
using VVD = vector<VD>;
using PII = pair<int, int>;
using PDD = pair<double, double>;
using PLL = pair<LL, LL>;
using VPII = vector<PII>;
#define ALL(a) begin((a)), end((a))
#define RALL(a) rbegin((a)), rend((a))
#define SORT(a) sort(ALL((a)))
#define RSORT(a) sort(RALL((a)))
#define REVERSE(a) reverse(ALL((a)))
#define MP make_pair
#define FORE(a, b) for (auto &&a : (b))
#define FIND(s, e) ((s).find(e) != (s).end())
#define EB emplace_back

const int INF = 1e9;
const int MOD = INF + 7;
const LL LLINF = 1e18;

int main(void) {
    int a, b, c;
    cin >> a >> b >> c;
    if (a == b || b == c || c == a) {
        f = true;
    }
    if (a + b == c || b + c == a || c + a == b) {
        f = true;
    }
    cout << (f ? "Yes" : "No") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:64:9: error: 'f' was not declared in this scope
   64 |         f = true;
      |         ^
a.cc:67:9: error: 'f' was not declared in this scope
   67 |         f = true;
      |         ^
a.cc:69:14: error: 'f' was not declared in this scope
   69 |     cout << (f ? "Yes" : "No") << endl;
      |              ^
Language: C

#include <stdio.h>

int main()
{
  int n[3], max, other;
  int i;
  scanf("%d%d%d", n+0, n+1, n+2);
  other = n[0] + n[1] + [2];
  max = n[0];
  if ( max < n[1] ) max = n[1];
  if ( max < n[2] ) max = n[2];
  other -= max;
  if ( max = other ) printf("Yes");
  else printf("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:25: error: expected expression before '[' token
    8 |   other = n[0] + n[1] + [2];
      |                         ^
Language: C

#include <stdio.h>

int main () {

  int W, H, N;

  scanf("%d %d %d", &W, &H, &N);

  int map[100][100] = {};

  int i, j;
  
  for (i=0; i<H; i++) {
    for (j=0; j<W; j++) {
      map[i][j] = 1;
    }
  }


  int w, h, a;

  int x, y;
  
  for (i=0; i<N; i++) {

    scanf("%d %d %d", &w, &h, &a);

    switch (a) {
    case 1:
      for (y=0; y<H; y++) {
	for (x=0; x<w; x++) {
	  map[y][x] = 0;
	}
      }
      break;

    case 2:
      for (y=0; y<H; y++) {
	for (x=W; x>=w; x--) {
	  map[y][x] = 0;
	}
      }
      break;
      
    case 3:
      for (y=0; y<h; y++) {
	for (x=0; x<W; x++) {
	  map[y][x] = 0;
	}
      }
      break;
      
    case 4:
      for (y=H; y>h; y--) {
	for (x=0; x=<W; x++) {
	  map[y][x] = 0;
	}
      }
      break;
    }

  }

  int result = 0;

  for(y=0; y<H; y++) {
    for(x=0; x<W; x++) {
      if (map[x][y] == 1) result++;
    }
  }

  printf("%d\n", result);

  return 0;
}

  

Compiler output:
main.c: In function 'main':
main.c:55:21: error: expected expression before '<' token
   55 |         for (x=0; x=<W; x++) {
      |                     ^
Language: C++

import Control.Applicative ((<$>))
distri :: Int -> Int -> int -> String
distri a b c = if (a + b + c) `mod` 2 == 0 then "Yes" else "No"

main :: IO()
main = do 
  [a, b, c] <- map read . words <$> getLine
  putStrLn . show $ distri a b c

Compiler output:
a.cc:3:31: error: stray '`' in program
    3 | distri a b c = if (a + b + c) `mod` 2 == 0 then "Yes" else "No"
      |                               ^
a.cc:3:35: error: stray '`' in program
    3 | distri a b c = if (a + b + c) `mod` 2 == 0 then "Yes" else "No"
      |                                   ^
a.cc:1:1: error: 'import' does not name a type
    1 | import Control.Applicative ((<$>))
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{

        int a;
        int b;
        int c;
        int sum1;
        int dai;


	// 個数のの入力
        sum1 = 0;
        scanf("%d %d %d",&a,&b,&c);

        if(a > b) {
          if (a > c) {
            sum1 = b + c ;
            dai = a;
          }
          else {
            sum1 = a + b ;
            dai = c;
          }
        else {
          if (b > c) {
            sum1 = a + c ;
            dai = b;
          }
          else {
            sum1 = a + b ;
            dai = c;
          }
        }
  
        if (dai = sum1) {
   
	   printf("YES");
        }
        else {
	   printf("NO");
        }
        
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:9: error: expected '}' before 'else'
   27 |         else {
      |         ^~~~
Language: C++

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

namespace ConsoleApplication20
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = Console.ReadLine().Split().Select(int.Parse).ToArray();
            if (a[0] + a[1] == a[2] || a[0] + a[2] == a[1] || a[1] + a[2] == a[0])
                Console.WriteLine("Yes");
            else Console.WriteLine("No");
        }
    }
}


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:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:18:6: error: expected ';' after class definition
   18 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ConsoleApplication20::Program::Main(int*)':
a.cc:13:13: error: 'var' was not declared in this scope
   13 |             var a = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |             ^~~
a.cc:14:17: error: 'a' was not declared in this scope
   14 |             if (a[0] + a[1] == a[2] || a[0] + a[2] == a[1] || a[1] + a[2] == a[0])
      |                 ^
a.cc:15:17: error: 'Console' was not declared in this scope
   15 |                 Console.WriteLine("Yes");
      |                 ^~~~~~~
a.cc:16:18: error: 'Console' was not declared in this scope
   16 |             else Console.WriteLine("No");
      |                  ^~~~~~~
Language: C

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{

        int a;
        int b;
        int c;
        int sum1;
        int dai;


	// 個数のの入力
        sum1 = 0;
        scanf("%d %d %d",&a,&b,&c);

        if(a > b) {
          if (a > c) {
            sum b + c ;
            dai = a;
          }
          else {
            sum a + b ;
            dai = c;
          }
        else {
          if (b > c) {
            sum a + c ;
            dai = b;
          }
          else {
            sum a + b ;
            dai = c;
          }
        }
  
        if (dai = sum1) {
   
	   printf("YES");
        }
        else {
	   printf("NO");
        }
        
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:13: error: unknown type name 'sum'
   20 |             sum b + c ;
      |             ^~~
main.c:20:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+' token
   20 |             sum b + c ;
      |                   ^
main.c:24:13: error: unknown type name 'sum'
   24 |             sum a + b ;
      |             ^~~
main.c:24:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+' token
   24 |             sum a + b ;
      |                   ^
main.c:27:9: error: expected '}' before 'else'
   27 |         else {
      |         ^~~~
main.c:29:13: error: unknown type name 'sum'
   29 |             sum a + c ;
      |             ^~~
main.c:29:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+' token
   29 |             sum a + c ;
      |                   ^
main.c:33:13: error: unknown type name 'sum'
   33 |             sum a + b ;
      |             ^~~
main.c:33:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+' token
   33 |             sum a + b ;
      |                   ^
Language: C

#include <stdio.h>
 
int main (void){
  int a,b,c;
  scanf("%d %d %d",&a,&b,&c);
    if (a+b == c || b+c == a || c+a == b){
        printf("Yes");
 
   else
        printf("No");
}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: expected '}' before 'else'
    9 |    else
      |    ^~~~
Language: C

#include <stdio.h>
#include <stdlib.h>

int main (int argc, char* argv[]) {

  if (argc != 4)  return 1;

  int buf1, buf2, buf3;

  buf1 = atoi(argv[1]) + atoi(argv[2]);
  buf2 = atoi(argv[2]) + atoi(argv[3]);
  buf3 = atoi(argv[1]) + atoi(argv[3]);

  if (buf1 == atoi(argv[3]) | buf2 == atoi(argv[1]) | buf3 == atoi(argv[2])) {
    printf("Yes\n");
  }
    
  else printf ("No\n");

  return 0;
}
#include <stdio.h>
#include <stdlib.h>

int main (int argc, char* argv[]) {

  if (argc != 4)  return 1;

  int buf1, buf2, buf3;

  buf1 = atoi(argv[1]) + atoi(argv[2]);
  buf2 = atoi(argv[2]) + atoi(argv[3]);
  buf3 = atoi(argv[1]) + atoi(argv[3]);

  if (buf1 == atoi(argv[3]) | buf2 == atoi(argv[1]) | buf3 == atoi(argv[2])) {
    printf("Yes\n");
  }
    
  else printf ("No\n");

  return 0;
}


Compiler output:
main.c:25:5: error: redefinition of 'main'
   25 | int main (int argc, char* argv[]) {
      |     ^~~~
main.c:4:5: note: previous definition of 'main' with type 'int(int,  char **)'
    4 | int main (int argc, char* argv[]) {
      |     ^~~~
Language: C

#include <stdio.h>
 
int main (void){
    int a,b,c;
    scanf("%d %d %d,&a,&b,&c);
    if (a+b == c || b+c == a || c+a == b){
        printf("Yes");
    else
        printf("No");
}

Compiler output:
main.c: In function 'main':
main.c:5:11: warning: missing terminating " character
    5 |     scanf("%d %d %d,&a,&b,&c);
      |           ^
main.c:5:11: error: missing terminating " character
    5 |     scanf("%d %d %d,&a,&b,&c);
      |           ^~~~~~~~~~~~~~~~~~~~
main.c:6:5: error: expected expression before 'if'
    6 |     if (a+b == c || b+c == a || c+a == b){
      |     ^~
main.c:10:1: error: expected declaration or statement at end of input
   10 | }
      | ^
Language: C

#include <stdio.h>

int main (void){
int a,b,c;
scanf("%d%d%d,&a,&b,&c)
if (a+b == c || b+c == a || c+a == b){
printf("Yes");
else
printf("No");
}


Compiler output:
main.c: In function 'main':
main.c:5:7: warning: missing terminating " character
    5 | scanf("%d%d%d,&a,&b,&c)
      |       ^
main.c:5:7: error: missing terminating " character
    5 | scanf("%d%d%d,&a,&b,&c)
      |       ^~~~~~~~~~~~~~~~~
main.c:6:1: error: expected expression before 'if'
    6 | if (a+b == c || b+c == a || c+a == b){
      | ^~
main.c:10:1: error: expected declaration or statement at end of input
   10 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
 
int main() {
    int a, b, c;
    std::cin >> a >> b >> c;
    int m = std::max({a, b, c});
    std::cout << (m == a + b + c - m ? "Yes" : "No") << std::endl;
}

Compiler output:
a.cc:3:1: error: extended character   is not valid in an identifier
    3 |  
      | ^
a.cc:3:1: error: '\U000000a0' does not name a type
    3 |  
      | ^
Language: C

#include <stdio.h>

int main (void){
  int a,b,c;
  scanf("%d %d %d",&a,&b,&c);
  if((a + b ==c)||(b+c==a)||(c+a==b){
    printf("yes\n");}
  else{
    printf("No\n");}

  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:37: error: expected ')' before '{' token
    6 |   if((a + b ==c)||(b+c==a)||(c+a==b){
      |     ~                               ^
      |                                     )
main.c:12:1: error: expected expression before '}' token
   12 | }
      | ^
Language: C++

    int a, b, c;
    cin >> a >> b >> c;
    if(a+b==c || b+c==a || c+a==b){
        cout << "YES";
    }else{
        cout << "NO";
    }


Compiler output:
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin >> a >> b >> c;
      |     ^~~
a.cc:3:5: error: expected unqualified-id before 'if'
    3 |     if(a+b==c || b+c==a || c+a==b){
      |     ^~
a.cc:5:6: error: expected unqualified-id before 'else'
    5 |     }else{
      |      ^~~~
Language: C

#include<stdio.h>
 
int main (void){
int a,b,c,d,e;
scanf("%d%d%d¥n",&a,&b,&c);
d = a/2 + b/2 + c/2 ;
e = [ a/2 +b/2 +c/2];
if (d == e){
printf("Yes");
elif{
printf("No");
}
return0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: expected expression before '[' token
    7 | e = [ a/2 +b/2 +c/2];
      |     ^
main.c:10:1: error: 'elif' undeclared (first use in this function)
   10 | elif{
      | ^~~~
main.c:10:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:5: error: expected ';' before '{' token
   10 | elif{
      |     ^
      |     ;
main.c:14:1: error: expected declaration or statement at end of input
   14 | }
      | ^
Language: Java

import java.util.Scanner;

public class MissionA {

	public static void main(String[] args) {
		
		//変数//
		int a;		//パックAの個数
		int b;		//パックBの個数
		int c;		//パックCの個数
		boolean ans = false;	//分けれるかどうか
		
		Scanner scan = new Scanner(System.in);
		
		//入力//
		a = scan.nextInt();
		b = scan.nextInt();
		c = scan.nextInt();
		
		scan.close();
		
		//処理//
		if( a == b + c ){
			ans = true;
		}else if( b == a + c ){
			ans = true;
		}else if( c == a + b ){
			ans = true;
		}
		
		//結果//
		if(ans){
			System.out.println( "Yes" );
		}else{
			System.out.println( "No" );
		}

	}

}


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

public class Main {
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		String arr[] = s.nextLine().split(" ");
		ArrayList<Integer> arrr = new ArrayList<Integer>();
		for(String str : arr){
			arrr.add(Integer.parseInt(str));
		}

		int a = Integer.parseInt(arr[0]);
		int b = Integer.parseInt(arr[1]);
		int c = Integer.parseInt(arr[2]);
		
		if((a+b) == c){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
		
		System.out.println("");
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner s = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner s = new Scanner(System.in);
		                ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		ArrayList<Integer> arrr = new ArrayList<Integer>();
		^
  symbol:   class ArrayList
  location: class Main
Main.java:5: error: cannot find symbol
		ArrayList<Integer> arrr = new ArrayList<Integer>();
		                              ^
  symbol:   class ArrayList
  location: class Main
4 errors
Language: C

#include<stdio.h>
 
int main (void){
int a,b,c,d,e;
scanf("%d%d%d",&a,&b,&c)
d =a/2 + b/2 + c/2 ;
e =[ a/2 +b/2 +c/2] ;
if (d == e){
printf("Yes");
elif{
printf("No");
}
}

Compiler output:
main.c: In function 'main':
main.c:5:25: error: expected ';' before 'd'
    5 | scanf("%d%d%d",&a,&b,&c)
      |                         ^
      |                         ;
    6 | d =a/2 + b/2 + c/2 ;
      | ~                        
main.c:7:4: error: expected expression before '[' token
    7 | e =[ a/2 +b/2 +c/2] ;
      |    ^
main.c:10:1: error: 'elif' undeclared (first use in this function)
   10 | elif{
      | ^~~~
main.c:10:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:5: error: expected ';' before '{' token
   10 | elif{
      |     ^
      |     ;
main.c:13:1: error: expected declaration or statement at end of input
   13 | }
      | ^
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 max = a;
		
		if(max < b){
			max = b;
		}
		if(max < c){
			max = c;
		}
		
		// 出力
		int total = a + b + c;
		if(max = total - max){
		System.out.println("Yes");
	}else{
		System.out.println("No");
	}
}
}

Compiler output:
Main.java:22: error: incompatible types: int cannot be converted to boolean
		if(max = total - max){
		       ^
1 error
Language: C

#include<stdio.h>
 
int main (void){
int a,b,c,d,e;
scanf("%d%d%d",&a,&b,&c);
d =a/2 + b/2 + c/2 ;
e =[ a/2 +b/2 +c/2];
if (d == e){
printf("Yes");
else{
printf("No");
}
return0;
}

Compiler output:
main.c: In function 'main':
main.c:7:4: error: expected expression before '[' token
    7 | e =[ a/2 +b/2 +c/2];
      |    ^
main.c:10:1: error: expected '}' before 'else'
   10 | else{
      | ^~~~
main.c:13:1: error: 'return0' undeclared (first use in this function)
   13 | return0;
      | ^~~~~~~
main.c:13:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#indlude <math.h>

int main (void){
  int a,b,c;
  scanf("%d %d %d",&a,&b,&c);
  if(a/2==0 && b/2==0 & c/2==0){
    printf("yes\n");}
  else{
    printf("No\n");}

  return 0;
}


Compiler output:
main.c:2:2: error: invalid preprocessing directive #indlude; did you mean #include?
    2 | #indlude <math.h>
      |  ^~~~~~~
      |  include
Language: C

#include<stdio.h>

int main (void){
int a,b,c,d,e;
scanf("%d%d%d",&a,&b,&c)
d =a/2 + b/2 + c/2 
e =[ a/2 +b/2 +c/2]
if (d == e){
printf("Yes")
else{
printf("No")
}
return0;
}

Compiler output:
main.c: In function 'main':
main.c:5:25: error: expected ';' before 'd'
    5 | scanf("%d%d%d",&a,&b,&c)
      |                         ^
      |                         ;
    6 | d =a/2 + b/2 + c/2
      | ~                        
main.c:14:1: error: expected declaration or statement at end of input
   14 | }
      | ^
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 max = a;
		
		if(max < b){
			max = b;
		}
		if(max < c){
			max = c
		}
		
		// 出力
		int total = a + b + c;
		if(max = total - max){
		System.out.println("Yes");
	}else{
		System.out.println("No");
	}
}
}

Compiler output:
Main.java:17: error: ';' expected
			max = c
			       ^
1 error
Language: C++

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

class Magatro
{
    static int a, b, c;
    static void Main()
    {
        Read();
        if (c == a + b)
        {
            Console.WriteLine("Yes");
        }
        else
        {
            Console.WriteLine("No");
        }
    }
    static void Read()
    {
        int[] q = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
        Array.Sort(q);
        a = q[0];
        b = q[1];
        c = q[2];
    }
}

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:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:30:2: error: expected ';' after class definition
   30 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Magatro::Main()':
a.cc:15:13: error: 'Console' was not declared in this scope
   15 |             Console.WriteLine("Yes");
      |             ^~~~~~~
a.cc:19:13: error: 'Console' was not declared in this scope
   19 |             Console.WriteLine("No");
      |             ^~~~~~~
a.cc: In static member function 'static void Magatro::Read()':
a.cc:24:12: error: structured binding declaration cannot have type 'int'
   24 |         int[] q = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
      |            ^~
a.cc:24:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:24:12: error: empty structured binding declaration
a.cc:24:15: error: expected initializer before 'q'
   24 |         int[] q = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
      |               ^
a.cc:25:9: error: 'Array' was not declared in this scope
   25 |         Array.Sort(q);
      |         ^~~~~
a.cc:25:20: error: 'q' was not declared in this scope
   25 |         Array.Sort(q);
      |                    ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int a, b, c, Max

int main() {
    cin >> a >> b >> c;
    Max = max(a, max(b, c));
    if(a + b + c - Max == Max) {
        cout << "YES\n";
    }
    else {
        cout << "NO\n";
    }
    return 0;
}


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

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

int main(){
int x,y,n;
  cin >> x >> y >> n;
  vector<vector<int>> data(n,vector<int>(3))
  for(int i=0;i<n;i++){
  for(int j=0;j<3;j++){
    cin >> data[i][j];
  }
  }
  set<int> a,b,c,d;
  for(int i=0;i<n;i++){
  if(data[i][2]==1) a.insert(data[i][0]);
  if(data[i][2]==2) b.insert(data[i][0]);
  if(data[i][2]==3) c.insert(data[i][1]);
  if(data[i][2]==4) d.insert(data[i][1]); 
  }
  int minx=*rbegin(a);
  int maxx=*begin(b);
  int miny=*rbegin(c);
  int maxy=*begin(d);
  int S;
  if(minx>=maxx) S=0;
  if(minx<maxx){
  if(miny>=maxy) S=0;
  if(miny<maxy)  S=(maxx-minx)*(maxy-miny);
  }
  
 
  cout << S << endl;
  return 0;
}

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

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

int main(){
int x,y,n;
  cin >> x >> y >> n;
  vector<vector<int>> data(n,vector<int>(3))
  for(int i=0;i<n;i++){
  for(int j=0;j<3;j++){
    cin >> data[i][j];
  }
  }
  set<int> a,b,c,d;
  for(int i=0;i<n;i++){
  if(data[i][2]==1) a.insert(data[i][0]);
  if(data[i][2]==2) b.insert(data[i][0]);
  if(data[i][2]==3) c.insert(data[i][1]);
  if(data[i][2]==4) d.insert(data[i][1]); 
  }
  int minx=*rbegin(a);
  int maxx=*begin(b);
  int miny=*rbegin(c);
  int maxy=*begin(d);
  int S;
  if(minx>=maxx) S=0;
  if(minx<maxx){
  if(miny>=maxy) S=0;
  if(miny<maxy)  S=x*y-(maxx-minx)*(maxy-miny);
  }
  
 
  cout << S << endl;
  return 0;
}

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

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

int main(){
int x,y,n;
  cin >> x >> y >> n;
  vector<vector<int>> data(n,vector<int>(3))
  for(int i=0;i<n;i++){
  for(int j=0;j<3;j++){
    cin >> data[i][j];
  }
  }
  set<int> a,b,c,d;
  for(int i=0;i<n;i++){
  if(data[i][2]==1) a.insert(data[i][0]);
  if(data[i][2]==2) b.insert(data[i][0]);
  if(data[i][2]==3) c.insert(data[i][1]);
  if(data[i][2]==4) d.insert(data[i][1]); 
  }
  int minx=*rbegin(a);
  int maxx=*begin(b);
  int miny=*rbegin(c);
  int maxy=*begin(d);
  int S;
  if(minx>=maxx) S=0;
  if(miny>=maxy) S=0;
  else S=x*y-(maxx-minx)*(maxy-miny);
  cout << S << endl;
  return 0;
}

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

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

int main(){
int x,y,n;
  cin >> x >> y >> n;
  vector<vector<int>> data(n,vector<int>(3))
  for(int i=0;i<n;i++){
  for(int j=0;j<3;j++){
    cin >> data[i][j];
  }
  }
  set<int> a,b,c,d;
  for(int i=0;i<n;i++){
  if(data[i][2]==1) a.insert(data[i][0]);
  if(data[i][2]==2) b.insert(data[i][0]);
  if(data[i][2]==3) c.insert(data[i][1]);
  if(data[i][2]==4) d.insert(data[i][1]); 
  }
  int minx=*rbegin(a);
  int maxx=*begin(b);
  int miny=*rbegin(c);
  int maxy=*begin(d);
  int S;
  if(minx>=maxx) S=0;
  if(miny>=maxy) S=0;
  else S=x*y-(maxx-minx)*(maxy-miny)
  cout << S << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i=0;i<n;i++){
      |   ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<n;i++){
      |               ^
a.cc:27:37: error: expected ';' before 'cout'
   27 |   else S=x*y-(maxx-minx)*(maxy-miny)
      |                                     ^
      |                                     ;
   28 |   cout << S << endl;
      |   ~~~~
Language: C++

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

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

int main(){
  int w,h,n;
  cin >> w >> h >> n;

  vector<vector<int>> black(4,vector<int>(0));
  rep(i,n){
    int x,y,a;
    cin >> x >> y >> a;

    a--;
    if(a==0||a==1) black.at(a).push_back(x);
    else black.at(a).push_back(y);
  }

  black.at(0).push_back(0);
  black.at(1).push_back(w);
  black.at(2).push_back(0);
  black.at(3).push_back(h);

  sort(black.at(0).rbegin(), black.at(0).rend());
  sort(black.at(1).begin(), black.at(1).end());
  sort(black.at(2).rbegin(), black.at(2).rend());
  sort(black.at(3).begin(), black.at(3).end());

  int max_x=black.at(0).at(0);
  int min_x=black.at(1).at(0);
  int max_y=black.at(2).at(0);
  int min_y=black.at(3).at(0);

  int whitex=max(0,min_x-max_x);
  int whitey=max(0,m_y-max_y);
  
  //cout << max_x << " " << min_x << " " << max_y << " " << min_y << endl;

  cout << whitex*whitey;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:20: error: 'm_y' was not declared in this scope; did you mean 'min_y'?
   38 |   int whitey=max(0,m_y-max_y);
      |                    ^~~
      |                    min_y
Language: C++

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

using ll = long long;

const int INF = 1001001001;
const ll INF_LL = 1001001001001001001LL;

int main(void){
  int w,h,n; cin >> w >> h >> n;
  vector<int> x(n),y(n),a(n); rep(i,n) cin >> x[i] >> y[i] >> a[i];
  vector<vector<bool>> white(h,vector<bool>(w,true));
  
  rep(i,n){
    switch(a[i]){
    case 1:
      rep(j,w){
	if(j<x[i])
	  rep(k,h) white[k][j] = false;
      }
      break;
    case 2:
      rep(j,w){
	if(j>x[i])
	  rep(k,h) white[k][j] = false;
      }
      break;
    case 3:
      rep(j,h){
	if(j<y[i])
	  rep(k,w) white[j][k] = false;
      }
      break;
    case 4:
      rep(j,h){
	if(j>y[i])
	  rep(k,w) white[j][k] = false;
      }
    }
  int ans;
  
  int wht = -1;
  rep(i,h+1){
    int tmp = 0;
    rep(j,w+1){
      if(white[i][j]){
	tmp++;
      }
    }
    wht = max(wht,tmp);
  }
  wht--;
  ans = wht>=0 ? wht*wht:0;
  
  cout << ans << endl;
  
  return 0;
}


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

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

const ll MOD = 1e9+7;

int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  
  int w, h, n;
  cin >> w >> h >> n;
  
  vector<pair<int, int>> xy(n);
  int left_x = 0;
  int right_x = w;
  int down_y = 0;
  int up_y = h;
  
  rep(i, n) {
    int x, y, a;
    cin >> x >> y >> a;
    xy[i].first = x;
    xy[i].second = y;
    if(a == 1) left_x = max(left_x, x);
    if(a == 2) right_x = min(right_x, x);
    if(a == 3) down_y = max(down_y, y);
    if(a == 4) up_y = min(up_y, y);
  }
  
  int ans = 0;
  ans = (right_x-left_x)*(up_y-down_y);
  
  if(ans < 0) ans = 0;
  if(ans > w*h) ans = w*h
  
  cout << ans << endl;
  return 0;
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:37:26: error: expected ';' before 'cout'
   37 |   if(ans > w*h) ans = w*h
      |                          ^
      |                          ;
   38 | 
   39 |   cout << ans << endl;
      |   ~~~~
Language: C++

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

int main() {
  int h,w , n;
  cin >> h >> w >> n;
  vector < tuple <int,int,int>> a(n);
  for (int i=0 ; i<n ; i++){
    int a,b,c;
    cin >> a >> b >> c;
    a.at(i) = make_tuple(a,b,c) ;
  }
  int ld_x =0, ld_y = h , ru_x = w , ru_y = h;
  for ( int i=0 ; i<n; i++){
    int a,b,c;
    tie(a,b,c) = a.at(i) ;
    if ( c==1){
      ld_x = max(ld_x , a) ;
    }else if ( c==2){
      ru_x = min(ru_x , a) ;
    }else if ( c==3){
      ld_y = max(ld_y , b) ;
    }else if ( c==1){
      ru_y = min(ru_y , b) ;
    }
  }
  cout << (ru_x - ld_x)*(ru_y - ld_y) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'at' in 'a', which is of non-class type 'int'
   11 |     a.at(i) = make_tuple(a,b,c) ;
      |       ^~
a.cc:16:20: error: request for member 'at' in 'a', which is of non-class type 'int'
   16 |     tie(a,b,c) = a.at(i) ;
      |                    ^~
Language: C++

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

int main() {
  int h,w , n;
  cin >> h >> w >> n;
  vector < tuple <int,int,int>> a(n);
  for (int i=0 ; i<n ; i++){
    int a,b,c;
    cin >> a >> b >> c;
    a.at(i) = make_tuple(a,b,c) ;
  }
  int ld_x =0, ld_y = h , ru_x = w , ru_y = h;
  for ( int i=0 ; i<n; i++){
    int a,b,c;
    tie(a,b,c) = a.at(i)
    if ( c==1){
      ld_x = max(ld_x , a)
    }else if ( c==2){
      ru_x = min(ru_x , a)
    }else if ( c==3){
      ld_y = max(ld_y , b)
    }else if ( c==1){
      ru_y = min(ru_y , b)
    }
  }
  cout << (ru_x - ld_x)*(ru_y - ld_y) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'at' in 'a', which is of non-class type 'int'
   11 |     a.at(i) = make_tuple(a,b,c) ;
      |       ^~
a.cc:16:20: error: request for member 'at' in 'a', which is of non-class type 'int'
   16 |     tie(a,b,c) = a.at(i)
      |                    ^~
a.cc:19:6: error: 'else' without a previous 'if'
   19 |     }else if ( c==2){
      |      ^~~~
a.cc:20:27: error: expected ';' before '}' token
   20 |       ru_x = min(ru_x , a)
      |                           ^
      |                           ;
   21 |     }else if ( c==3){
      |     ~                      
a.cc:22:27: error: expected ';' before '}' token
   22 |       ld_y = max(ld_y , b)
      |                           ^
      |                           ;
   23 |     }else if ( c==1){
      |     ~                      
a.cc:24:27: error: expected ';' before '}' token
   24 |       ru_y = min(ru_y , b)
      |                           ^
      |                           ;
   25 |     }
      |     ~