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

#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair
#define size(n) ( int( n.size() ) )
#define sqr(n) ( (n) * (n) )
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef long double ld;

const int N = 2e5 + 5;
char a[N];
int nxt[N][27], f[N], cur[27], curLen = 0;
char ans[N];


int main(){
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    gets(a+1);
    int n = strlen(a+1);
    for ( int i = 1; i <= 26; i++ ){
        cur[i] = n + 1;
    }
    f[n+1] = 0;
    for ( int i = n; i >= 1; i-- ){
        cur[ a[i] - 'a' + 1 ] = i;
        f[i] = 1e9;
        for ( int j = 1; j <= 26; j++ ){
            if ( cur[j] == n + 1 ){
                f[i] = -1;
            }
            else{
                f[i] = min( f[i], f[ cur[j] + 1 ] );
            }
            nxt[i][j] = cur[j];
        }
        f[i]++;
    }
    int cur = 1, len = f[1] + 1;
    for ( int i = 1; i <= len; i++ ){
        for ( int j = 1; j <= 26; j++ ){
            if ( nxt[cur][j] == n + 1 ){
                ans[++curLen] = 'a' + j - 1;
                break;
            }
            else
            if ( f[ nxt[cur][j] + 1 ] == len - 1 - i ){
                ans[++curLen] = 'a' + j - 1;
                cur = nxt[cur][j] + 1;
                break;
            }
        }
    }
    for ( int i = 1; i <= curLen; i++ ){
        printf("%c",ans[i]);
    }
    return 0;
}


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

#include<bits/stdc++.h>

using std::vector;
vector<int> index[26];

char str[200010];
std::string change(int i) {
	std::string str;
	while (i != 0) {
		str.push_back((i % 27)-1 + 'a');
		if (i % 27 == 0)return "";
		i /= 27;
		
	}
	std::reverse(str.begin(), str.end());
	return str;
}
int main() {
	scanf("%s", str);
	for (int i = 0; str[i]; i++) {
		index[str[i] - 'a'].push_back(i);
	}
	
	for (int i = 1;; i++) {
		std::string s = change(i);
		if (s.empty())continue;
		int idx = 0;
		for (char ch : s) {
			auto it = std::lower_bound(index[ch - 'a'].begin(), index[ch - 'a'].end(), idx);
			if (it == index[ch - 'a'].end()) {
				printf("%s", s.c_str());
				return 0;
			}
			idx = *it + 1;
		}
	}
}



Compiler output:
a.cc:4:21: error: 'std::vector<int> index [26]' redeclared as different kind of entity
    4 | vector<int> index[26];
      |                     ^
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'int main()':
a.cc:21:22: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   21 |                 index[str[i] - 'a'].push_back(i);
      |                      ^
a.cc:29:57: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   29 |                         auto it = std::lower_bound(index[ch - 'a'].begin(), index[ch - 'a'].end(), idx);
      |                                                         ^
a.cc:29:82: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   29 |                         auto it = std::lower_bound(index[ch - 'a'].begin(), index[ch - 'a'].end(), idx);
      |                                                                                  ^
a.cc:30:40: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   30 |                         if (it == index[ch - 'a'].end()) {
      |                                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int  frecv[30];
void reset ()
{
  for (int i = 0; i < 30; ++i)
    frecv[i] = 0;
}
char s[200005];
void cauta (int start)
{
char last = "&";
int nr = 0;
int i;
for (i = start; i < strlen(s) && nr<26; ++i)
   if (frecv[s[i]-'a'] == 0)
   {
      ++nr;
      frecv[s[i]-'a'] = 1;
     last = s[i];
    }
if (nr == 26)
{
   cout << last;
   start = i;
   reset();
   cauta(start);
}
else
{
  for (int i = 0; i<26; ++i)
    if (frecv [i] == 0)
      {last = (char)(i+'a');
    break;
}
   cout << last;
}
}
int main ()
{
   cin >> s;
   int start = 0;
   cauta(start);
   return 0;
}

Compiler output:
a.cc: In function 'void cauta(int)':
a.cc:12:13: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   12 | char last = "&";
      |             ^~~
      |             |
      |             const char*
Language: C++

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

using namespace std;

const int MAXN = (int) (2e5 + 10);
char s[MAXN];
int n;
int nxt[26][MAXN];
int dp[MAXN];
string ans;

int main() {
    scanf("%s", s);
    n = (int) strlen(s);
    for (int i = 0; i < 26; i++) {
        nxt[i][n] = n;
    }
    for (int j = 0; j < 26; j++) {
        for (int i = n - 1; i >= 0; i--) {
            nxt[j][i] = nxt[j][i + 1];
            if (s[i] - 'a' == j) {
                nxt[j][i] = i;
            }
        }
    }

    for (int i = n - 1; i >= 0; i--) {
        int mx = -1;
        for (int j = 0; j < 26; j++) {
            mx = max(mx, nxt[j][i]);
        }
        if (mx == n) {
            dp[i] = 0;
        } else {
            dp[i] = dp[mx + 1] + 1;
        }
    }

    string ans = "";
    int len = dp[0];
    int ind = 0;
    while (true) {
        for (int c = 0; c < 26; c++) {
            if (nxt[c][ind] == n || dp[nxt[c][ind] + 1] == len - 1) {
                ans.push_back((char) ('a' + c));
                ind = nxt[c][ind] + 1;
                len--;
                break;
            }
        }
        if (ind >= n) {
            break;
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: 'strlen' was not declared in this scope
   16 |     n = (int) strlen(s);
      |               ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include <bits/stdc++.h>
using namespace std;
int  frecv[30];
void reset ()
{
  for (int i = 0; i < 30; ++i)
    frecv[i] = 0;
}
char s[200005];
void cauta (int start)
{
char last = "&";
int nr = 0;
for (int i = start; i < strlen(s) && nr<26; ++i)
   if (frecv[s[i]-'a'] == 0)
   {
      ++nr;
      frecv[s[i]-'a'] = 1;
     last = s[i];
    }
if (nr == 26)
{
   cout << last;
   start = i;
   reset();
   cauta(start);
}
else
{
  for (int i = 0; i<26; ++i)
    if (frecv [i] == 0)
      last = (char)(i+'a');
   cout << last;
}
}
int main ()
{
   cin >> s;
   int start = 0;
   cauta(start);
   return 0;
}

Compiler output:
a.cc: In function 'void cauta(int)':
a.cc:12:13: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   12 | char last = "&";
      |             ^~~
      |             |
      |             const char*
a.cc:24:12: error: 'i' was not declared in this scope
   24 |    start = i;
      |            ^
Language: C++

#include <iostream>
#include <unordered_map>
#include <algorithm>
#include <queue>
using namespace std;

struct Node {
    int h, v, ind;
    bool vis;
} a[200010];

struct Edge {
    int to, nex;
} e[2000010];

int n, ans, cnt = 0, no = 0;
string xs, nm, fa, tmp;
unordered_map<string, int> id;

void addedge(int u, int v) {
    e[++cnt] = (Edge){v, a[u].h};
    a[u].h = cnt;
    ++a[v].ind;
}

void topo() {
    queue<int > q;
    for(int i = 1; i <= no; ++i)
        if(!a[i].ind) q.push(i);
    while(!q.empty()) {
        int u = q.front();
        a[u].vis = 1;
        q.pop();
        for(int i = a[u].h; i; i = e[i].nex) {
            int v = e[i].to;
            --a[v].ind;
            a[v].v = max(a[v].v, a[u].v + 1);
            ans = max(ans, a[v].v);
            if(!a[v].ind) q.push(v);
        }
    }
}

void dfs(int u, int &val, int &dep) {
    a[u].vis = 1;
    val = max(val, a[u].v);
    ++dep;
    for(int i = a[u].h; i; i = e[i].nex)
        if(!a[e[i].to].vis)
            dfs(e[i].to, val, dep);
}

int main() {
    scanf("%d, &n);
    for(int i = 1; i <= n; ++i) {
        cin >> xs >> nm >> tmp >> tmp >> fa;
        nm = xs + ' ' + nm;
        fa = xs + ' ' + fa;
        if(!id[nm]) id[nm] = ++no;
        if(!id[fa]) id[fa] = ++no;
        addedge(id[nm], id[fa]);
    } topo();
    for(int i = 1; i <= no; ++i)
        if(!a[i].vis) {
            int val = 0, dep = 0;
            dfs(i, val, dep);
            ans = max(ans, val + dep);
        }
    cout << ans;
    return 0;
}

Compiler output:
a.cc:54:11: warning: missing terminating " character
   54 |     scanf("%d, &n);
      |           ^
a.cc:54:11: error: missing terminating " character
   54 |     scanf("%d, &n);
      |           ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:55:5: error: expected primary-expression before 'for'
   55 |     for(int i = 1; i <= n; ++i) {
      |     ^~~
a.cc:55:20: error: 'i' was not declared in this scope
   55 |     for(int i = 1; i <= n; ++i) {
      |                    ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;

const int N = 2010;
int l[N][N], r[N][N], f[N][N];
bool mp[N][N];
char str[N];

int main() {
	int n, m; cin >> n >> m;
	for (int i = 1; i <= n; i++) {
		scanf("%s", str + 1);
		for (int j = 1; j <= m; j++)mp[i][j] = str[j] == '#';
	}
	int ans = max(n, m);
	n--; m--;
	for (int i = 1; i <= n; i++)for (int j = 1; j <= m; j++)mp[i][j] = mp[i][j] ^ mp[i][j + 1] ^ mp[i + 1][j] ^ mp[i + 1][j + 1];

	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++)if (!mp[i][j])l[i][j] = l[i][j - 1] + 1;
		for (int j = m; j >= 1; j--)if (!mp[i][j])r[i][j] = r[i][j + 1] + 1;
	}
	for (int i = 1; i <= m; i++)l[0][i] = r[0][i] = 1e7;
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			if (mp[i][j]) {
				f[i][j] = 0;
				l[i][j] = r[i][j] + 1e7;
			}
			else {
				f[i][j] = f[i - 1][j] + 1;
				l[i][j] = min(l[i][j], l[i - 1][j]);
				r[i][j] = min(r[i][j], r[i - 1][j]);
				ans = max(ans, f[i][j] + 1) * (l[i][j] + r[i][j]));
			}
		}
	}
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:82: error: expected ';' before ')' token
   37 |                                 ans = max(ans, f[i][j] + 1) * (l[i][j] + r[i][j]));
      |                                                                                  ^
      |                                                                                  ;
Language: C++

#include<bits/stdc++.h>

using namespace std;
int n,m;
int s[2100][2100];
int a[2100][2100];
int change(int x,int y)
{
	return 1-a[x][y]^a[x+1][y]+a[x][y+1]^a[x+1][y+1];
}
int main()
{
	cin >>n >>m;
	char c;
	for(int i=1;i<=n;i++)
	  for(int j=1;j<=m;j++)
	  {
	  	cin >>c;
	  	if(c=='#')
	  	  s[i][j]=1;
	  }
	for(int i=1;i<=n-1;i++)
	  for(int j=1;j<=n-1;j++)
	    a[i][j]=change(i,j);
	for(int i=1;i<=n-1;i++)
	  for(int j=1;j<=m-1;j++)
	  {
	  	if(f[i][j])
	  	f[i][j]=max()
	  }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:20: error: 'f' was not declared in this scope
   28 |                 if(f[i][j])
      |                    ^
a.cc:29:28: error: no matching function for call to 'max()'
   29 |                 f[i][j]=max()
      |                         ~~~^~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 0 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 0 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using vi = vector<i64>;
using vvi = vector<vi>;

i64 largest_rectangle(vi& hist) {
    hist.push_back(0);
    using ii = pair<i64, int>;
    stack<ii> st;
    i64 ret = 0;
    for (int i = 0; i < hist.size(); i++) {
        if (st.empty() || st.top().first < hist[i]) {
            st.push(ii(hist[i], i));
        } else {
            int s;
            while (st.size() && st.top().first >= hist[i]) {
                if (st.top().first && (i - st.top().second)) {
                    ret = max(ret, (1 + st.top().first) * (1 + i - st.top().second));
                }                
                s = st.top().second;
                st.pop();
            }
            st.push(ii(hist[i], s));
        }
    }

    return ret;
}

i64 largest_rectangle2(int h, int w, vvi input) {
    vvi b(h, vi(w));
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            int c = input[i][j];
            if (c == 0) {
                if (i == 0) {
                    b[i][j] = 1;
                } else {
                    b[i][j] = b[i - 1][j] + 1;
                }
            } else {
                b[i][j] = 0;
            }
        }
    }

    i64 ret = 0;
    for (int i = 0; i < h; i++) {
        ret = max(ret, largest_rectangle(b[i]));
    }
    return ret;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    i64 h, w;
    cin >> h >> w;
    vector<string> b;
    for (int i = 0; i < h; i++) {
        string s;
        cin >> s;
        b.emplace_back(s);
    }

    vvi b2;
    for (int i = 0; i < h - 1; i++) {
        vi tmp;
        for (int j = 0; j < w - 1; j++) {
            int cnt = 0;
            for (int k = 0; k < 2; k++) {
                for (int l = 0; l < 2; l++) {
                    if (b[i + k][j + l] == '.') cnt++;
                }
            }
            tmp.push_back(cnt & 1);
        }
        b2.emplace_back(tmp);
    }

    cout << max({h, w, largest_rectangle2(h - 1, w - 1, b2)} << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:61: error: expected ')' before '<<' token
   83 |     cout << max({h, w, largest_rectangle2(h - 1, w - 1, b2)} << endl;
      |                ~                                            ^~~
      |                                                             )
Language: C++

#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using vi = vector<i64>;
using vvi = vector<vi>;

i64 largest_rectangle(vi& hist) {
    hist.push_back(0);
    using ii = pair<i64, int>;
    stack<ii> st;
    i64 ret = 0;
    for (int i = 0; i < hist.size(); i++) {
        if (st.empty() || st.top().first < hist[i]) {
            st.push(ii(hist[i], i));
        } else {
            int s;
            while (st.size() && st.top().first >= hist[i]) {
                if (st.top().first && (i - st.top().second)) {
                    ret = max(ret, (1 + st.top().first) * (1 + i - st.top().second));
                }                
                s = st.top().second;
                st.pop();
            }
            st.push(ii(hist[i], s));
        }
    }

    return ret;
}

i64 largest_rectangle2(int h, int w, vvi input) {
    vvi b(h, vi(w));
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            int c = input[i][j];
            if (c == 0) {
                if (i == 0) {
                    b[i][j] = 1;
                } else {
                    b[i][j] = b[i - 1][j] + 1;
                }
            } else {
                b[i][j] = 0;
            }
        }
    }

    i64 ret = 0;
    for (int i = 0; i < h; i++) {
        ret = max(ret, largest_rectangle(b[i]));
    }
    return ret;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int h, w;
    cin >> h >> w;
    vector<string> b;
    for (int i = 0; i < h; i++) {
        string s;
        cin >> s;
        b.emplace_back(s);
    }

    vvi b2;
    for (int i = 0; i < h - 1; i++) {
        vi tmp;
        for (int j = 0; j < w - 1; j++) {
            int cnt = 0;
            for (int k = 0; k < 2; k++) {
                for (int l = 0; l < 2; l++) {
                    if (b[i + k][j + l] == '.') cnt++;
                }
            }
            tmp.push_back(cnt & 1);
        }
        b2.emplace_back(tmp);
    }

    cout << max({h, w, largest_rectangle2(h - 1, w - 1, b2)} << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:61: error: expected ')' before '<<' token
   83 |     cout << max({h, w, largest_rectangle2(h - 1, w - 1, b2)} << endl;
      |                ~                                            ^~~
      |                                                             )
Language: C++

#!/usr/bin/env python3

def main():
    [H, W] = list(map(int, input().split()))
    S = []
    for i in range(H):
        S.append(input())

    pt, ut, dt = [], [], []
    for i in range(H - 1):
        pt.append([0] * W)
        ut.append([0] * W)
        dt.append([0] * W)

    for i in range(H - 1):
        r0 = S[i]
        r1 = S[i + 1]
        p = (r0[W - 1] == r1[W - 1])
        pti = pt[i]
        pti[W - 1] = 1
        c = 1
        for j in range(W - 2, -1, -1):
            if p == (r0[j] == r1[j]):
                c += 1
            else:
                p = not p
                c = 1
            pti[j] = c

    for j in range(W):
        ut[0][j] = 1
    for i in range(1, H - 1):
        for j in range(W):
            if pt[i][j] <= pt[i - 1][j]:
                ut[i][j] = ut[i - 1][j] + 1
            else:
                ut[i][j] = 1
    for j in range(W):
        dt[H - 2][j] = 1
    for i in range(H - 3, -1, -1):
        for j in range(W):
            if pt[i][j] <= pt[i + 1][j]:
                dt[i][j] = dt[i + 1][j] + 1
            else:
                dt[i][j] = 1

    max_a = max(H, W)

    for i in range(H - 1):
        pti = pt[i]
        uti = ut[i]
        dti = dt[i]
        for j in range(W):
            max_a = max(max_a, pti[j] * (uti[j] + dti[j]))


    print(max_a)


if __name__ == '__main__':
    main()



Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python3
      |  ^
a.cc:60:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   60 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:3:1: error: 'def' does not name a type
    3 | def main():
      | ^~~
Language: C++

;
        }
    }
    vector<vector<int>> height(h,vector<int>(w,0));
    for(int i=0;i<h-1;i++){
        for(int j=0;j<w-1;j++){
            if(!f[i][j]) height[i+1][j]=0;
            else height[i+1][j]=height[i][j]+1;
        }
    }
    /*
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cout<<height[i][j];
        }
        cout<<endl;
    }
    */
    int res=max(h,w);
    for(int i=0;i<h;i++){
        stack<pair<int,int>> st;
        st.push(make_pair(0,-1));
        for(int j=0;j<w;j++){
            pair<int,int> ret;
            while(ret=st.top(),height[i][j]<ret.first){
                res=max((j-ret.second+1)*(ret.first+1),res);
                st.pop();
            }
            if(ret.first<height[i][j]) st.push(make_pair(height[i][j],j));
        }
    }
    cout<<res<<endl;
    return 0;
}

Compiler output:
a.cc:2:9: error: expected declaration before '}' token
    2 |         }
      |         ^
a.cc:3:5: error: expected declaration before '}' token
    3 |     }
      |     ^
a.cc:4:5: error: 'vector' does not name a type
    4 |     vector<vector<int>> height(h,vector<int>(w,0));
      |     ^~~~~~
a.cc:5:5: error: expected unqualified-id before 'for'
    5 |     for(int i=0;i<h-1;i++){
      |     ^~~
a.cc:5:17: error: 'i' does not name a type
    5 |     for(int i=0;i<h-1;i++){
      |                 ^
a.cc:5:23: error: 'i' does not name a type
    5 |     for(int i=0;i<h-1;i++){
      |                       ^
a.cc:19:17: error: 'h' was not declared in this scope
   19 |     int res=max(h,w);
      |                 ^
a.cc:19:19: error: 'w' was not declared in this scope
   19 |     int res=max(h,w);
      |                   ^
a.cc:19:13: error: 'max' was not declared in this scope
   19 |     int res=max(h,w);
      |             ^~~
a.cc:20:5: error: expected unqualified-id before 'for'
   20 |     for(int i=0;i<h;i++){
      |     ^~~
a.cc:20:17: error: 'i' does not name a type
   20 |     for(int i=0;i<h;i++){
      |                 ^
a.cc:20:21: error: 'i' does not name a type
   20 |     for(int i=0;i<h;i++){
      |                     ^
a.cc:32:5: error: 'cout' does not name a type
   32 |     cout<<res<<endl;
      |     ^~~~
a.cc:33:5: error: expected unqualified-id before 'return'
   33 |     return 0;
      |     ^~~~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

//2018年  3月 27日 火曜日 00:08:28 JST
#include <bits/stdc++.h>
#define ADD(a, b) a = (a + ll(b)) % mod
#define MUL(a, b) a = (a * ll(b)) % mod
#define MAX(a, b) a = max(a, b)
#define MIN(a, b) a = min(a, b)
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define rer(i, a, b) for(int i = int(a) - 1; i >= int(b); i--)
#define all(a) (a).begin(), (a).end()
#define sz(v) (int)(v).size()
#define pb push_back
#define sec second
#define fst first
#define debug(fmt, ...) Debug(__LINE__, ":", fmt, ##__VA_ARGS__)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<int, pi> ppi;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vl> mat;
typedef complex<double> comp;
void Debug() {cout << '\n'; }
template<class FIRST, class... REST>void Debug(FIRST arg, REST... rest){
	cout<<arg<<" ";Debug(rest...);}
template<class T>ostream& operator<<(ostream& out,const vector<T>& v) {
	out<<"[";if(!v.empty()){rep(i,0,sz(v)-1)out<<v[i]<<", ";out<<v.back();}out<<"]";return out;}
template<class S, class T>ostream& operator<<(ostream& out,const pair<S, T>& v){
	out<<"("<<v.first<<", "<<v.second<<")";return out;}
const int MAX_N = 200010;
const int MAX_V = 100010;
const double eps = 1e-6;
const ll mod = 1000000007;
const int inf = 1 << 29;
const ll linf = 1LL << 60;
const double PI = 3.14159265358979323846;
///////////////////////////////////////////////////////////////////////////////////////////////////

int N, M;
string str[2010];
bool used[2010][2010];
int B[2010][2010];
int L[2010], R[2010];

int find_rect(int D[2010]) {
	stack<int> S;
	rep(i, 0, M) {
		while(!S.empty() && D[S.top()] >= D[i]) S.pop();
		L[i] = S.empty() ? 0 : S.top() + 1;
		S.push(i);
	}
	S.clear();
	rer(i, M, 0) {
		while(!S.empty() && D[S.top()] >= D[i]) S.pop();
		R[i] = S.empty() ? M : S.top();
		S.push(i);
	}
	int res = 0;
	rep(i, 0, M) {
		MAX(res, (D[i] + 1) * (R[i] - L[i] + 1));
	}
	return res;
}

void solve() {
	cin >> N >> M;
	rep(i, 0, N) {
		cin >> str[i];
	}
	rep(i, 0, N - 1) {
		rep(j, 0, M - 1) {
			int tmp = 0;
			rep(k, 0, 2) {
				rep(l, 0, 2) {
					if(str[i + k][j + l] == '#') {
						tmp++;
					}
				}
			}
			if(tmp % 2) used[i][j] = 1;
		}
	}
	int ans = max(N, M);
	N--; M--;
	rep(j, 0, M) {
		if(used[0][j]) B[0][j] = 0;
		else B[0][j] = 1;
	}
	rep(i, 1, N) {
		rep(j, 0, M) {
			if(used[i][j]) B[i][j] = 0;
			else B[i][j] = B[i - 1][j] + 1;
		}
	}
	// rep(i, 0, N) {
	// 	debug(vi(B[i], B[i] + M));
	// }
	rep(i, 0, N) {
		MAX(ans, find_rect(B[i]));
	}
	cout << ans << "\n";
}

int main() {
#ifndef LOCAL
	ios::sync_with_stdio(false);
    cin.tie(0);
#endif
    cout << fixed;
	cout.precision(20);
	srand((unsigned int)time(NULL));
#ifdef LOCAL
	//freopen("in.txt", "wt", stdout); //for tester
    freopen("in.txt", "rt", stdin);
#endif	
	solve();
#ifdef LOCAL
    cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
	return 0;
}



Compiler output:
a.cc: In function 'int find_rect(int*)':
a.cc:54:11: error: 'class std::stack<int>' has no member named 'clear'
   54 |         S.clear();
      |           ^~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
const int maxn = 2020;
struct histogram_solver{
    static const int factor_h = 1;
    static const int factor_w = 1;
    static long long solve(vector<int> values){
        stack<int> s;
        int i = 0;
        long long ans = 0;
        while(i < values.size()){
            if(s.empty() || values[s.top()] <= values[i]) s.push(i++);
            else{
                int tp = s.top(); s.pop();
                long long area = 1ll * (values[tp] + factor_h) *
                    ((s.empty() ? i : i - s.top() - 1) + factor_w);
                ans = max(ans, area);
            }
        }
        while(!s.empty()){
            int tp = s.top(); s.pop();
            long long area = 1ll * (values[tp] + factor_h) *
                ((s.empty() ? i : i - s.top() - 1) + factor_w);.
            ans = max(ans, area);
        }
        return ans;
    }
};
char g[maxn][maxn];
int M(){
    int n, m;
    if(!(cin >> n >> m)) return 0;
    for(int e = 0; e < n; e++)
        scanf("%s", g[e]);
    int ans = max(n, m);
    vector<int> histo(m - 1, 0);
    for(int e = 0; e < n - 1; e++){
        for(int f = 0; f < m - 1; f++){
            int cnt = 0;
            cnt += (g[e][f] == '#');
            cnt += (g[e+1][f] == '#');
            cnt += (g[e][f+1] == '#');
            cnt += (g[e+1][f+1] == '#');
            if(cnt % 2 == 0) histo[f]++;
            else histo[f] = 0;
        }
        ans = max(ans, (int)histogram_solver::solve(histo));
    }
    cout << ans << endl;
    return 1;
}
int main(){
    while(M());
    return 0;
}


Compiler output:
a.cc: In static member function 'static long long int histogram_solver::solve(std::vector<int>)':
a.cc:23:64: error: expected primary-expression before '.' token
   23 |                 ((s.empty() ? i : i - s.top() - 1) + factor_w);.
      |                                                                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define e1 first
#define e2 second
#define pb push_back
#define mp make_pair
#define boost ios_base::sync_with_stdio(false)
#define eb emplace_back
#define OUT(x) {cout << x; exit(0); }
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define scanf(...) scanf(__VA_ARGS__)?:0
typedef long long int ll;
typedef unsigned long long ull;
typedef pair <int, int> PII;
typedef pair <ll, ll> PLL;
typedef pair <PLL, int> PLLI;
typedef pair <PLL, PLL> PP;
typedef pair <PII, int> PPI;
typedef pair <ll, int> PLI;
typedef unsigned int ui;
const int mod = 1e9+7;
const int inf = 1e9+9;
const ll MOD = 1e9+696969;
const long long INF = 1e18+3;
#define maxn 2010
int n, m;
string s[maxn];

int typ[maxn];
int tab[maxn][maxn];

int zliczaj[maxn];

set <int> gdzie[2][maxn];
int toerase[maxn][maxn], TODL[maxn];

set <int> zle;

inline void removePlace(int x)
{
	set <int> :: iterator it = zle.upper_bound(x);
	set <int> :: iterator sc = it;
	--sc;
	zliczaj[(*it) - (*sc)]--;
	zle.insert(x);
	zliczaj[*it - x]++;
	zliczaj[x - *sc]++;
}
int globalMax;

inline int getMax() {
	while (globalMax && !zliczaj[globalMax]) --globalMax;
	return globalMax;
}

int main()
{
	boost;
	cin.tie(0); cout.tie(0);
	//cin >> n >> m;
	//FOR(i, 1, n) cin >> s[i];
	n = 2000; m = 2000;
	FOR(i, 1, n) s[i].resize(m + 1);
	FOR(i, 1, n)
		FOR(j, 0, m-1) 
			if ((i + j) & 1) s[i][j] = '.';
			else s[i][j] = '#';
		
	FOR(i, 1, n)
		FOR(j, 1, m)
			if (s[i][j - 1] == '.') tab[i][j] = 0;
			else tab[i][j] = 1;
		
	FOR(i, 1, n)
		FOR(j, 1, m-1)
		{
			int tp = (tab[i][j] ^ tab[i][j + 1]);
			gdzie[tp][j].insert(i);
		}
		
	/*int wyn = max(n, m);
	FOR(i, 1, n)
	{
		zle.clear();
		FOR(j, 1, m-1)
			if (tab[i][j] == tab[i][j + 1]) typ[j] = 0;
			else typ[j] = 1;
		globalMax = m;
		FOR(j, 0, n) TODL[j] = 0;

		FOR(j, 1, m-1)
		{
			int w = (1 ^ typ[j]);
			set <int>::iterator it = gdzie[w][j].upper_bound(i);
			if (it == gdzie[w][j].end()) continue;
			else toerase[*it][++TODL[*it]] = j;
		}
		zle.insert(m);
		zle.insert(0);
	
		FOR(j, 0, m) zliczaj[j] = 0;
		zliczaj[m]++;
		
		FOR(j, i + 1, n)
		{
			//for (int k = 1; k <= TODL[j]; ++k) removePlace(toerase[j][k]);
			wyn = max(wyn, getMax() * (j - i + 1));
		}
	}	*/
	
	cout << wyn;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:111:17: error: 'wyn' was not declared in this scope; did you mean 'yn'?
  111 |         cout << wyn;
      |                 ^~~
      |                 yn
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int h = sc.nextInt();
    int w = sc.nextInt();
    String[] s = String[h];
    for(int i = 0; i < h; i++) {
      s[i] = sc.next();
    }
    int[][] diff = new int[h - 1][w];
    for(int i = 0; i < h - 1; i++) {
      for(int j = 0; j < w; j++) {
        if(s[i].charAt(j) != s[i + 1].charAt(j)) diff[i][j] = 1;
      }
    }
    int[][] len = new int[h - 1][w];
    for(int i = 0; i < h - 1; i++) {
      len[i][w - 1] = 1;
      for(int j = w - 2; j >= 0; j--) {
        if(diff[i][j] == diff[i][j + 1]) {
          len[i][j] = len[i][j + 1] + 1;
        } else {
          len[i][j] = 1;
        }
      }
    }
    int ans = 0;
    int[][] dp = new int[h - 1][w];
    int[][] lendp = new int[h - 1][w];
    for(int i = h - 2; i >= 0; i--) {
      for(int j = w - 1; j >= 0; j--) {
        if(i == h - 2) {
          if(j == w - 1) {
            dp[i][j] = 2;
            lendp[i][j] = 1;
          } else {
            
          }
        } else {
          if(len[i][j] ) {
          }
        }
        ans = Math.max(ans, dp[i][j]);
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    String[] s = String[h];
                 ^
  symbol:   variable String
  location: class Main
Main.java:42: error: incompatible types: int cannot be converted to boolean
          if(len[i][j] ) {
                   ^
2 errors
Language: C++

#include <bits/stdc++.h>

#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)

#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define rrep(...) _overload(__VA_ARGS__,_rrange,_rrep,)(__VA_ARGS__)

#define _all(arg) begin(arg),end(arg)
#define uniq(arg) sort(_all(arg)),(arg).erase(unique(_all(arg)),end(arg))
#define getidx(ary,key) lower_bound(_all(ary),key)-begin(ary)
#define clr(a,b) memset((a),(b),sizeof(a))
#define bit(n) (1LL<<(n))
#define popcount(n) (__builtin_popcountll(n))

using namespace std;

template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0;}

using ll=long long;
using R=long double;
const R EPS=1e-9L; // [-1000,1000]->EPS=1e-8 [-10000,10000]->EPS=1e-7
inline int sgn(const R& r){return(r > EPS)-(r < -EPS);}
inline R sq(R x){return sqrt(max(x,0.0L));}

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

// Problem Specific Parameter:

string s[2010];
int d1[2010][2010];
int d2[2010][2010];
int l[2010],r[2010];

int main(void){
	int h,w;
	cin >> h >> w;
	rep(i,h) cin >> s[i];

	const int ans = max(h,w);
	rep(i,h-1)rep(j,w) d1[i][j]=(s[i][j]!=s[i+1][j]);
	rep(i,h-1)rep(j,w-1) d2[i][j] = d1[i][j]^d1[i][j+1];

	
	vector<int> hist(w-1,1);
	rep(i,h-1){
		//scerr << i << endl;

		rep(j,w-1){
			if(d2[i][j]==0) 
				hist[j]++;
			else
				hist[j]=1;
		}

		//cerr << i << endl;
		stack<int> t;

		rep(k,w-1){
			while(!t.empty() and hist[t.top()]>= hist[k]) t.pop();
			l[k]=(!t.empty()?t.top()+1:0);
			t.push(k);
		}

		//cerr << i << endl;
		while(!t.empty()) t.pop();
		//cerr << "OK" << endl;
		
		rrep(k,w-1){
			while(!t.empty() and hist[t.top()]>= hist[k]) t.pop();
			r[k]=(!t.empty()?t.top():w-1);
			t.push(k);
		}

		rep(k,w-1){
			int cur = hist[k] * (r[k] - l[k]) + hist[k];
			chmax(ans,cur);
		}
	}

	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:82:30: error: no matching function for call to 'chmax(const int&, int&)'
   82 |                         chmax(ans,cur);
      |                         ~~~~~^~~~~~~~~
a.cc:21:23: note: candidate: 'template<class T> bool chmax(T&, const T&)'
   21 | template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
      |                       ^~~~~
a.cc:21:23: note:   template argument deduction/substitution failed:
a.cc:82:30: note:   deduced conflicting types for parameter 'const T' ('const int' and 'int')
   82 |                         chmax(ans,cur);
      |                         ~~~~~^~~~~~~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int ans, N, M, a[2017][2017], h[2017], lft[2017], rgt[2017];
char sir[2017][2017];

int main ()
{
//freopen ("input", "r", stdin);
//freopen ("output", "w", stdout);

scanf ("%d %d\n", &N, &M), ans = max (N, M);
for (int i=1; i<=N; i++)
    scanf ("%s", sir[i] + 1);
initAns ();
for (int i=1; i<N; i++)
    for (int j=1; j<M; j++)
        a[i][j] = ((sir[i][j] == sir[i + 1][j + 1]) == (sir[i + 1][j] == sir[i][j + 1]));
N --, M --;
/*for (int i=1; i<=N; i++, printf ("\n"))
    for (int j=1; j<=M; j++)
        printf ("%d", a[i][j]);*/
for (int i=1; i<=N; i++)
{
    for (int j=1; j<=M; j++)
        if (a[i][j]) h[j] ++;
        else h[j] = 0;
    if (i == N)
        i = N;
    int nr = 0, st[2017];
    st[0] = 0;
    for (int j=1; j<=M; j++)
    {
        while (nr > 0 && h[st[nr]] >= h[j]) nr --;
        lft[j] = st[nr] + 1;
        st[++nr] = j;
    }
    nr = 0, st[0] = M + 1;
    for (int j=M; j>=1; j--)
    {
        while (nr > 0 && h[st[nr]] >= h[j]) nr --;
        rgt[j] = st[nr] - 1;
        st[++nr] = j;
    }
    for (int j=1; j<=M; j++)
        if ((rgt[j] - lft[j] + 2) * (h[j] + 1) > ans && h[j] >= 1)
            ans = (rgt[j] - lft[j] + 2) * (h[j] + 1);//, printf ("%d (%d, %d) [%d, %d] -> %d\n", i, j, h[j], lft[j], rgt[j], ans);
}
printf ("%d\n", ans);
return 0;
}


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

#include<stdio.h>
using namespace std;
int main()
{
string s;
cin >> s;
if(s.at(0)==s.at(2)) cout << "Yes";
else cout << "No";
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string s;
      | ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include<stdio.h>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin >> s;
      | ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:6:8: error: 's' was not declared in this scope
    6 | cin >> s;
      |        ^
a.cc:7:22: error: 'cout' was not declared in this scope
    7 | if(s.at(0)==s.at(2)) cout << "Yes";
      |                      ^~~~
a.cc:7:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:6: error: 'cout' was not declared in this scope
    8 | else cout << "No";
      |      ^~~~
a.cc:8:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
#include <regex>
#include <locale>

#include <iomanip>

#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a),i##_Len=int(b);i<i##_Len;++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)

#define all(x) (x).begin(),(x).end()

using namespace std;
using ll = long long;

int main () {
  string s;
  cin >> s;
  string sorg = s;
  cout << (sorg == s.reverse() ? "Yes" : "No") << endl;;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
   24 |   cout << (sorg == s.reverse() ? "Yes" : "No") << endl;;
      |                      ^~~~~~~
      |                      reserve
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a;
  cin >> a;
  if((a%10)==(a/100))cout <<"Yes";
  cout << "No"
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before '}' token
    8 |   cout << "No"
      |               ^
      |               ;
    9 | }
      | ~
Language: C++

#include <iostream>
using namespace std;                                                                int main(){
  string n;                                                                           cin >> n;
  if(s[0]==s[2]) cout << "Yes" << "\n";                                               else cout << "No" << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:6: error: 's' was not declared in this scope
    4 |   if(s[0]==s[2]) cout << "Yes" << "\n";                                               else cout << "No" << "\n";
      |      ^
Language: C++

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

int main(){
  string s;
  cin >> s;
  if(s[0]==s[2])
    cout << "Yes";
  else
    cout << "No";
  }


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

#include <stdio.h>
int main(){
  char s[4]={0};
  scanf("%s",n);
  if(s[0]==s[2]){ printf("Yes\n"); }
  else			{ printf("No\n"); }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:14: error: 'n' undeclared (first use in this function)
    4 |   scanf("%s",n);
      |              ^
main.c:4:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
 
#include <string>
 
using namespace std;
 
int main(){
  char N;
  cin >> N;
  char a = N[0];
  char b = N[2];
  
  if (a = b) {
    cout << "Yes";
  }
  else {
    cout << "No";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid types 'char[int]' for array subscript
   10 |   char a = N[0];
      |             ^
a.cc:11:13: error: invalid types 'char[int]' for array subscript
   11 |   char b = N[2];
      |             ^
Language: C++

#include<iostream>

#include <string>
 
using namespace std;
 
int main(){
  int N;
  cin >> N;
  char a = N[0];
  char b = N[2];
  
  if (a = b) {
    cout << "Yes";
  }
  else {
    cout << "No";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid types 'int[int]' for array subscript
   10 |   char a = N[0];
      |             ^
a.cc:11:13: error: invalid types 'int[int]' for array subscript
   11 |   char b = N[2];
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
//#define f(i,a,n) for(ll i=a;i<n;i++)
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll isPrime(int n) 
{ 
	// Corner cases 
	if (n <= 1) 
		return 1; 
	if (n <= 3) 
		return 2; 

	// This is checked so that we can skip 
	// middle five numbers in below loop 
	if (n % 2 == 0 || n % 3 == 0) 
		return 1; 

	for (int i = 5; i * i <= n; i = i + 6) 
		if (n % i == 0 || n % (i + 2) == 0) 
			return 1; 

	return 2; 
} 

ll fact(ll n){ll res = 1;for (ll i = 2; i <= n; i++)res = res * i,res%=1000000007; 
    return res; } 
 
int main() 
{
    fast;
    ll t=1;
    //cin>>t;
    while(t--)
    {
        ll n;
        cin>>n;
        if((n/100==(n%10))
        cout<<"Yes";
        else
        cout<<"No";
    } 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:27: error: expected ';' before 'cout'
   38 |         if((n/100==(n%10))
      |                           ^
      |                           ;
   39 |         cout<<"Yes";
      |         ~~~~               
a.cc:40:9: error: expected primary-expression before 'else'
   40 |         else
      |         ^~~~
a.cc:39:21: error: expected ')' before 'else'
   39 |         cout<<"Yes";
      |                     ^
      |                     )
   40 |         else
      |         ~~~~         
a.cc:38:11: note: to match this '('
   38 |         if((n/100==(n%10))
      |           ^
Language: C

#include <stdio.h>

int main(void){
  int N;
  scanf ("%d", %N);
  int r = N/100;
  if (N%10 == r){
    printf("Yes");
  } else { 
    printf("No");
  }
  return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:5:16: error: expected expression before '%' token
    5 |   scanf ("%d", %N);
      |                ^
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <functional>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define DEBUG
#define PI 3.141592653589793238462643383279
 
#define _GLIBCXX_DEBUG
#ifdef DEBUG
#define s(...) show(__VA_ARGS__);
#define sl(...) show(__VA_ARGS__);cout<<endl;
#else
#define s(...)
#define sl(...)
#endif
void show() {}
template <class Head,class... Args>void show(Head t,Args... args){std::cout<<t<<" ";show(args...);}
#define REP(i, n) for(ll i = 0; i < n; i++)
#define REPR(i, n) for(ll i = n; i >= 0; i--)
#define FOR(i, m, n) for(ll i = m; i < n; i++)
#define REP1(i, n) for(ll i = 1; i <= n; i++)
#define REPR1(i, n) for(ll i = n; i >= 1; i--)
#define FOR1(i, m, n) for(ll i = m; i <= n; i++)
const ll INF = LLONG_MAX;
const ull MOD = 1000000007;
#define VEC(type,A,N) vector<type> A(N)
#define VECi(type,A,N,i) vector<type> A(N,i)
#define VEC2(type,A,N,M) vector<vector<type>> A(N,vector<type>(M))
#define VEC2i(type,A,N,M,i) vector<vector<type>> A(N,vector<type>(M,i))
#define ALL(v) v.begin(), v.end()
ll frac(ll k){
    int s = 1;
    for (ll i=1; i<=k; ++i)s *= i;
    return s;
}
ll gcd(ll a, ll b){
   if (a%b==0)return(b);
   else return(gcd(b, a%b));
}
ll lcm(ll a,ll b){
    return a*b/gcd(a,b);
}
ll antidiv(ll N,ll C,ll D){
    return N-floor(N/C)-floor(N/D)+floor(N/lcm(C,D));
}
vector<ll> yakusuu(ll N){
    vector<ll> ret;
    for (ll i = 1; i * i <= N; i++) {
        if (N % i == 0) {
            ret.push_back(i);
            if (i * i != N) ret.push_back(N / i);
        }
    }
    sort(ret.begin(), ret.end());
    return ret;
}
int main(){
    string N;
    cin>>N;
    
    cout<<(N[0]==N[2]?"Yes:"No");
    
    //cout<<fixed<<setprecision(32)<<m;
    //sort(ALL(C),[](auto& a, auto& b) {return a[2] < b[2];});
    //if(equal(D.begin(), D.end()-1, K.begin()))cout<<"Yes";else cout<<"No";
    cout<<endl;
    return 0;
}


Compiler output:
a.cc:64:31: warning: missing terminating " character
   64 |     cout<<(N[0]==N[2]?"Yes:"No");
      |                               ^
a.cc:64:31: error: missing terminating " character
   64 |     cout<<(N[0]==N[2]?"Yes:"No");
      |                               ^~~
a.cc: In function 'int main()':
a.cc:64:23: error: unable to find string literal operator 'operator""No' with 'const char [5]', 'long unsigned int' arguments
   64 |     cout<<(N[0]==N[2]?"Yes:"No");
      |                       ^~~~~~~~
a.cc:64:31: error: expected ':' before 'cout'
   64 |     cout<<(N[0]==N[2]?"Yes:"No");
      |                               ^
      |                               :
......
   69 |     cout<<endl;
      |     ~~~~                       
a.cc:69:15: error: expected ')' before ';' token
   69 |     cout<<endl;
      |               ^
      |               )
a.cc:64:11: note: to match this '('
   64 |     cout<<(N[0]==N[2]?"Yes:"No");
      |           ^
Language: C++

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main(){
	r := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	defer w.Flush()

	var S string
	fmt.Fscan(r, &S)
	N := len(S)
	ans := "Yes"
	for i:=0; i < N; i++{
		if(S[i] != S[N-i-1]){
			ans = "No"
		}
	}
	fmt.Println(ans)


}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

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

int main(){
  
  int a;
  cin >> a;
  
  if( a.at(0) == a.at(2) ){
    
    cout << "Yes" << endl;
    
  }
  
  else{
    
    cout << "No" << endl;
    
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: request for member 'at' in 'a', which is of non-class type 'int'
    9 |   if( a.at(0) == a.at(2) ){
      |         ^~
a.cc:9:20: error: request for member 'at' in 'a', which is of non-class type 'int'
    9 |   if( a.at(0) == a.at(2) ){
      |                    ^~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next().split("");
    System.out.println(a[0].equals(a[2]) ? "Yes" : "No");
  }
}


Compiler output:
Main.java:6: error: incompatible types: String[] cannot be converted to String
    String a = sc.next().split("");
                              ^
Main.java:7: error: array required, but String found
    System.out.println(a[0].equals(a[2]) ? "Yes" : "No");
                                    ^
Main.java:7: error: array required, but String found
    System.out.println(a[0].equals(a[2]) ? "Yes" : "No");
                        ^
3 errors
Language: C++

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

int main(){
  int A;
  cin >> A;
  if(A/100==A%10)){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected primary-expression before ')' token
    7 |   if(A/100==A%10)){
      |                  ^
Language: C++

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

int main(){
  int A;
  cin >> A;
  if(A.at(0)==A.at(2)){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: request for member 'at' in 'A', which is of non-class type 'int'
    7 |   if(A.at(0)==A.at(2)){
      |        ^~
a.cc:7:17: error: request for member 'at' in 'A', which is of non-class type 'int'
    7 |   if(A.at(0)==A.at(2)){
      |                 ^~
Language: C++

#include<iostream>
using namespace std;
int main(){
  string ss;
  cin >> ss;
  int len = ss.length();
  if (ss[0]==ss[len-1]) cout << "Yes" << endl;
  else cout << "N0" << ednl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'ednl' was not declared in this scope
    8 |   else cout << "N0" << ednl;
      |                        ^~~~
Language: C++

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

int main() {
  string N;
  cin>>N;
  if(N.at(0)==N.at(2)){
    cout<<"Yes"<<endl;
  }
  else{
    else cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'else' without a previous 'if'
   11 |     else cout<<"No"<<endl;
      |     ^~~~
Language: C++

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

int main() {
  string N;
  cin>>N;
  string rN=reverce(N.begin(),N.end());
  if(N==rN){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'reverce' was not declared in this scope
    7 |   string rN=reverce(N.begin(),N.end());
      |             ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
string s;
  int >>s;
  if(s[0]==s[2])cout <<"Yes"<<endl;
  else cout <<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected unqualified-id before '>>' token
    6 |   int >>s;
      |       ^~