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

#include<bits/stdc++.h>
using namespace std;
int n,k,ans,p;
int map[12][6]={{4,2,0,9,7},{1,10,8,6,4},{9,7,5,3,1},{6,4,2,0,9},
    {3,1,10,8,6},{0,9,7,5,3},{8,6,4,2,0},{5,3,1,10,8},{2,0,9,7,5},
    {10,8,6,4,2},{7,5,3,1,10}};
int main()
{
    scanf("%d%d",&n,&k);n-=2;
    p=n%11;n/=11;
    ans=n*5;
    for(int i=0;i<p;i++)
     for(int j=0;j<5;j++)
      if(map[i][j]==k)ans++;
    printf("%d\n",ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: reference to 'map' is ambiguous
   14 |       if(map[i][j]==k)ans++;
      |          ^~~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:4:5: note:                 'int map [12][6]'
    4 | int map[12][6]={{4,2,0,9,7},{1,10,8,6,4},{9,7,5,3,1},{6,4,2,0,9},
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,m,ans;
int map[12][6]={{4,2,0,9,7},{1,10,8,6,4},{9,7,5,3,1},{6,4,2,0,9},{3,1,10,8,6},
{0,9,7,5,3},{8,6,4,2,0},{5,3,1,10,8},{2,0,9,7,5},{10,8,6,4,2},{7,5,3,1,10}};
int main(){
    cin>>n>>m;
    ans=((n-2)/11)*5;
    for(int i=0;i<(n-2)%11;i++)
        for(int j=0;j<5;j++)
            if(map[i][j]==m) ans++;
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: reference to 'map' is ambiguous
   11 |             if(map[i][j]==m) ans++;
      |                ^~~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:4:5: note:                 'int map [12][6]'
    4 | int map[12][6]={{4,2,0,9,7},{1,10,8,6,4},{9,7,5,3,1},{6,4,2,0,9},{3,1,10,8,6},
      |     ^~~
Language: C++

#include<bits/stdc++.h>
 using namespace std;
  int a[11,5]=
    {4,2,0,9,7},
    {1,10,8,6,4},
    {9,7,5,3,1},
    {6,4,2,0,9},
    {3,1,10,8,6},
    {0,9,7,5,3},
    {8,6,4,2,0},
    {5,3,1,10,8},
    {2,0,9,7,5},
    {10,8,6,4,2},
    {7,5,3,1,10};
  int n,s=0,i,j,k,a;
  int main()
  {
      cin>>n>>k;
      s+=(n/11)*5;a=n%11;
      for(i=0;i<a;i++)
       for(j=0;j<5;j++)
        if(a[i][j]=k)
        s++;
        cout<<s<<endl;
        return 0;
  }

Compiler output:
a.cc:3:11: error: expected ']' before ',' token
    3 |   int a[11,5]=
      |           ^
      |           ]
a.cc:3:12: error: expected unqualified-id before numeric constant
    3 |   int a[11,5]=
      |            ^
a.cc:4:16: error: expected unqualified-id before ',' token
    4 |     {4,2,0,9,7},
      |                ^
a.cc:5:5: error: expected unqualified-id before '{' token
    5 |     {1,10,8,6,4},
      |     ^
a.cc:5:17: error: expected unqualified-id before ',' token
    5 |     {1,10,8,6,4},
      |                 ^
a.cc:6:5: error: expected unqualified-id before '{' token
    6 |     {9,7,5,3,1},
      |     ^
a.cc:6:16: error: expected unqualified-id before ',' token
    6 |     {9,7,5,3,1},
      |                ^
a.cc:7:5: error: expected unqualified-id before '{' token
    7 |     {6,4,2,0,9},
      |     ^
a.cc:7:16: error: expected unqualified-id before ',' token
    7 |     {6,4,2,0,9},
      |                ^
a.cc:8:5: error: expected unqualified-id before '{' token
    8 |     {3,1,10,8,6},
      |     ^
a.cc:8:17: error: expected unqualified-id before ',' token
    8 |     {3,1,10,8,6},
      |                 ^
a.cc:9:5: error: expected unqualified-id before '{' token
    9 |     {0,9,7,5,3},
      |     ^
a.cc:9:16: error: expected unqualified-id before ',' token
    9 |     {0,9,7,5,3},
      |                ^
a.cc:10:5: error: expected unqualified-id before '{' token
   10 |     {8,6,4,2,0},
      |     ^
a.cc:10:16: error: expected unqualified-id before ',' token
   10 |     {8,6,4,2,0},
      |                ^
a.cc:11:5: error: expected unqualified-id before '{' token
   11 |     {5,3,1,10,8},
      |     ^
a.cc:11:17: error: expected unqualified-id before ',' token
   11 |     {5,3,1,10,8},
      |                 ^
a.cc:12:5: error: expected unqualified-id before '{' token
   12 |     {2,0,9,7,5},
      |     ^
a.cc:12:16: error: expected unqualified-id before ',' token
   12 |     {2,0,9,7,5},
      |                ^
a.cc:13:5: error: expected unqualified-id before '{' token
   13 |     {10,8,6,4,2},
      |     ^
a.cc:13:17: error: expected unqualified-id before ',' token
   13 |     {10,8,6,4,2},
      |                 ^
a.cc:14:5: error: expected unqualified-id before '{' token
   14 |     {7,5,3,1,10};
      |     ^
a.cc: In function 'int main()':
a.cc:22:13: error: invalid types 'int[int]' for array subscript
   22 |         if(a[i][j]=k)
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n, l, a = 0;
	cin >> n >> k;
	if(k < 3){
		cout << 0 << endl;
		return 0;
	}
	vector<long long> vec;
	for(long long i = 0; i < n - 2; i++){
		for(int j = 0; j < k; j++){
			if((i * 3 + (i + 1) * 3 + (i + 2) * 3 + 18 + 3 * j) % 11 == 7){
				a++;
			}
		}
	}
	cout << a << endl;
	
	
	
	
	
	return 0;
}

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

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
using ll = int long long;
map <int ,int> mpa,mpb;

int main(){
  int n,k;
  cin >> n >>k;
  int A[n+1][8]={0};
  ll ans=0;
  for(int i=1;i<=n;i++){
    for(int j=1;j<=7;j++){
      A[i][j]=7*i+j-7;
    }
  }
  ll sum=0;
  for(int i=2;i<=n-1;i++){
    for(int j=2;j<=6;j++){
     sum=((A[i][j]%11)*9;
     if(sum%11==k){
       ans++;
     }
    }
  }  
  cout << ans<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:25: error: expected ')' before ';' token
   28 |      sum=((A[i][j]%11)*9;
      |          ~              ^
      |                         )
Language: C

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

int main()
{
  int n,k,i,j,i1,j1,c,b;
  scanf("%d %d",&n,&k);
  c = 0;
  i1 = j1 = -1;
  for(i=0;i<=n-3;i++){
    for(j=1;j<=5;j++){
      if( ( 9*( 7*i+j ) + 72 ) % 11 == k ){
        i1 = i;
        j1 = j;
        c++;
        break;
      }
    }
    if( i1>=0 ) break;
  }
  
  if(c==0){
    printf("0\n");
    return EXIT_SUCCESS;
  }
  
  b = ( n-3 - i1)/11;
  if(b>0){
    i1 += b*11;
    c += 5*b;
  }
  c--;
  for(i=i1;i<=n-3;i++){
    for(j=1;j<=5;j++){
      if( ( 9*( 7*i+j ) + 72 ) % 11 == k ){
        c++;
      }
    }
  }
  printf("%d\n",c);
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>

int main()
{
  int n,k,i,j,i1,j1,c,b;
  scanf("%d %d",&n,&k);
  c = 0;
  i1 = j1 = -1;
  for(i=0;i<=n-3;i++){
    for(j=1;j<=5;j++){
      if( ( 9*( 7*i+j ) + 72 ) % 11 == k ){
        i1 = i;
        j1 = j;
        c++;
        break;
      }
    }
    if( i1>=0 ) break;
  }
  
  if(c==0){
    printf("0\n");
    return EXIT_SUCCESS;
  }
  
  b = ( n-3 - i1)/11;
  if(b>0){
    i1 += b*11;
    c += 5*b;
  }
  c--;
  for(i=i1;i<=n-3;i++){
    for(j=1;j<=5;j++){
      if( ( 9*( 7*i+j ) + 72 ) % 11 == k ){
        c++;
      }
    }
  }
  printf("%d\n",c);
}


Compiler output:
main.c: In function 'main':
main.c:83:1: error: expected declaration or statement at end of input
   83 | }
      | ^
Language: C++

#include "stdio.h"
#define long long __int64;

__int64 a[11] = {3,8,2,7,1,6,0,5,10,4,9};
int main()
{
    __int64 n,k,sum,i;
    while (scanf ("%lld%lld",&n,&k) != EOF)
    {
        n = 7*n-16;
        sum = n/11 - n/77*2;
        if (a[k] <= n%11)
        {
            sum++;
        }
        for (i=a[k];i<=n%77;i+=11)
        {
            if (i%7 == 6 || i%7 == 0)
            {
                sum--;
            }
        }
        printf ("%lld\n",sum);
    }
    return 0;
}


Compiler output:
a.cc:4:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    4 | __int64 a[11] = {3,8,2,7,1,6,0,5,10,4,9};
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:7:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    7 |     __int64 n,k,sum,i;
      |     ^~~~~~~
      |     __int64_t
a.cc:8:31: error: 'n' was not declared in this scope
    8 |     while (scanf ("%lld%lld",&n,&k) != EOF)
      |                               ^
a.cc:8:34: error: 'k' was not declared in this scope
    8 |     while (scanf ("%lld%lld",&n,&k) != EOF)
      |                                  ^
a.cc:11:9: error: 'sum' was not declared in this scope
   11 |         sum = n/11 - n/77*2;
      |         ^~~
a.cc:12:13: error: 'a' was not declared in this scope
   12 |         if (a[k] <= n%11)
      |             ^
a.cc:16:14: error: 'i' was not declared in this scope
   16 |         for (i=a[k];i<=n%77;i+=11)
      |              ^
a.cc:16:16: error: 'a' was not declared in this scope
   16 |         for (i=a[k];i<=n%77;i+=11)
      |                ^
Language: C++

#include "stdio.h"
__int64 a[11] = {3,8,2,7,1,6,0,5,10,4,9};
int main()
{
    __int64 n,k,sum,i;
    while (scanf ("%I64d%I64d",&n,&k) != EOF)
    {
        n = 7*n-16;
        sum = n/11 - n/77*2;
        if (a[k] <= n%11)
        {
            sum++;
        }
        for (i=a[k];i<=n%77;i+=11)
        {
            if (i%7 == 6 || i%7 == 0)
            {
                sum--;
            }
        }
        printf ("%I64d\n",sum);
    }
    return 0;
}


Compiler output:
a.cc:2:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    2 | __int64 a[11] = {3,8,2,7,1,6,0,5,10,4,9};
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:5:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    5 |     __int64 n,k,sum,i;
      |     ^~~~~~~
      |     __int64_t
a.cc:6:33: error: 'n' was not declared in this scope
    6 |     while (scanf ("%I64d%I64d",&n,&k) != EOF)
      |                                 ^
a.cc:6:36: error: 'k' was not declared in this scope
    6 |     while (scanf ("%I64d%I64d",&n,&k) != EOF)
      |                                    ^
a.cc:9:9: error: 'sum' was not declared in this scope
    9 |         sum = n/11 - n/77*2;
      |         ^~~
a.cc:10:13: error: 'a' was not declared in this scope
   10 |         if (a[k] <= n%11)
      |             ^
a.cc:14:14: error: 'i' was not declared in this scope
   14 |         for (i=a[k];i<=n%77;i+=11)
      |              ^
a.cc:14:16: error: 'a' was not declared in this scope
   14 |         for (i=a[k];i<=n%77;i+=11)
      |                ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
#include <complex>
#include <vector>
#include <algorithm>
using namespace std;

typedef complex<double> Point;

int n, k;

Point to_point(int i) {
	double pai = 3.14159265358979;
	return exp(complex<double>(0, 2 * pai * i / n));
}

Point to_vector(int i, int j) {
	return to_point(j) - to_point(i);
}

double _cross(Point &u, Point &v) {
	return imag(conj(u) * v);
}

//i < j < k
double area(int i, int j, int k) {	//面積を返す
	double ret = _cross(to_vector(i, j), to_vector(i, k));
	return ret / 2;
}

signed main() {
	int i, j, l;
	
	scanf("%d%d", &n, &k);
	if (n > 100) return 0;
	k = k - 1;
	
	static vector<double> vec;
	
	for (i = 0; i < n; i++) {
		for (j = i + 1; j < n; j++) {
			for (l = j + 1; l < n; l++) {
				vec.push_back(area(i, j, l));
			}
		}
	}
	sort(vec.begin(), vec.end());
	
	printf("%.14f\n", vec[k]);
	return 0;
}

Compiler output:
a.cc: In function 'double area(int, int, int)':
a.cc:28:38: error: cannot bind non-const lvalue reference of type 'Point&' {aka 'std::complex<double>&'} to an rvalue of type 'Point' {aka 'std::complex<double>'}
   28 |         double ret = _cross(to_vector(i, j), to_vector(i, k));
      |                             ~~~~~~~~~^~~~~~
a.cc:22:22: note:   initializing argument 1 of 'double _cross(Point&, Point&)'
   22 | double _cross(Point &u, Point &v) {
      |               ~~~~~~~^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<climits>
#include<algorithm>
using namespace std;
int main()
{
  int n,k;
  long long sum;
  int cnt=0;
  scanf("%d%d",&n,&k);
  for(int i=1;i<=n-2;i++)
     for(int j=1;j<=5;j++)
  {
      sum=3*(7*(3*i+3)+3*j-21)+9;
      if( cnt++;

  }
  if(cnt==0) printf("0\n");
  else printf("%d\n",cnt);
            return 0;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: expected primary-expression before '}' token
   20 |   }
      |   ^
a.cc:18:17: error: expected ')' before '}' token
   18 |       if( cnt++;
      |         ~       ^
      |                 )
   19 | 
   20 |   }
      |   ~              
a.cc:20:3: error: expected primary-expression before '}' token
   20 |   }
      |   ^
Language: C++


#include <iostream>
using namespace std;
#define rep(i,n) for (int i=0;i<(n);i++)
#include <string>
#include <vector>
#include <algorithm>
#include <map>
int main() {
	int n, k,cnt=0,st=0;
	bool memo[10];
	memset(memo, false, 10);
	cin >> n >> k;
	rep(i, n) {
		st = (7 * i * 9 + 81) % 11;
		if (memo[st] == false)
			if (st == k || (st + 9) % 11 == k || (st + 7) % 11 == k || (st + 5) % 11 == k || (st + 3) % 11 == k) {
				cnt++;
				memo[st] = true;
			}
			else;
		else cnt++;
	}
	
	cout << cnt << endl;




}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
   12 |         memset(memo, false, 10);
      |         ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <map>
  +++ |+#include <cstring>
    9 | int main() {
Language: C++

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

struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef queue<int> qi;
typedef stack<int> si;
typedef deque<int> dqi;

#define reps(i, a, b) for (int i = a; i < b; ++i)
#define rep(i, n) reps(i, 0, n)
#define REPS(i, a, b) reps(i, a, b)
#define REP(i, n) rep(i, n)
#define deps(i, a, b) for (int i = a; i >= b; --i)
#define dep(i, n) deps(i, n, 0)
#define DEPS(i, a, b) deps(i, a, b)
#define DEP(i, n) dep(i, n)

#define pf push_front
#define pb push_back
#define mp make_pair
#define fst first
#define FST fst
#define sec second
#define SEC sec
#define sz(obj) ((int)(obj).size())
#define all(v) (v).begin(), (v).end()
#define ALL(v) all(v)

const int INF = 999999999;
const int MOD = 1e9 + 7;
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

inline bool inside(int y, int x, int H, int W) {return y >= 0 && x >= 0 && y < H && x < W;}
inline int in() {int x; std::cin >> x; return x;}
template <typename T>
void print(std::vector<T>& v, char c = ' ') {
  REP(i, v.size()) {
    if (i != 0) std::cout << c;
    std::cout << v[i];
  }
  std::cout << endl;
}
template <typename T> void print(T x) { std::cout << x << '\n'; }

signed main()
{
  int n = in(), k = in();
  print(n - 1) * 5 / 11;

  return (0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:16: error: invalid operands of types 'void' and 'int' to binary 'operator*'
   53 |   print(n - 1) * 5 / 11;
      |   ~~~~~~~~~~~~ ^ ~
      |        |         |
      |        void      int
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>

#define INF_LL 9000000000000000000
#define INF 2000000000

#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)

using namespace std;

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

class Union_find{
private:
	vector<int> par;
	vector<int> rank;
	int n;

public:
	Union_find(int a){
		n = a;
		for(int i = 0;i < n;i++){
			par.push_back(i);
			rank.push_back(0);
		}
	}

	int find(int x){
		if(par[x] == x){
			return x;
		}else{
			return par[x] = find(par[x]);
		}
	}

	void unite(int x, int y){
		x = find(x);
		y = find(y);
		if(x == y) return;

		if(rank[x] < rank[y]){
			par[x] = y;
		}else{
			par[y] = x;
			if(rank[x] == rank[y]) rank[x]++;
		}
	}

	bool same(int x, int y){
		return find(x) == find(y);
	}
};

int main(void){
	ll n, k;
	cin >> n >> k;
	ll ans[11] = {0};
	REP(i, 11){
		ll res = 0;
		REP(j, 5){
			if((63*(i+1)+9*(j+1)+9) % 11 == k){
				res++;
			}
		}
		ans[i] = res;
	}
	unsigned ll res = 0;
	if(n >= 11){
		REP(i, 11){
			res += ans[i];
		}
	}
	res = res*(n/11);
	REP(i, n%11-2){
		res += ans[i];
	}

	cout << res << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:75:21: error: expected initializer before 'res'
   75 |         unsigned ll res = 0;
      |                     ^~~
a.cc:78:25: error: 'res' was not declared in this scope
   78 |                         res += ans[i];
      |                         ^~~
a.cc:81:9: error: 'res' was not declared in this scope
   81 |         res = res*(n/11);
      |         ^~~
Language: C++


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
using namespace std;

const ll chart[11][5] = 
{
	{9,10,0,1,2},
	{5,6,7,8,9},
	{1,2,3,4,5},
	{8,9,10,0,1},
	{4,5,6,7,8},
	{0,1,2,3,4},
	{7,8,9,10,0},
	{3,4,5,6,7},
	{10,0,1,2,3},
	{6,7,8,9,10},
	{2,3,4,5,6},
};

using ll = long long;

ll n, k;

int main(void)
{
	scanf("%lld %lld", &n, &k);
	if (n <= 2)return 0 * printf("0\n");
	n -= 2;
	ll big = n / 11;
	ll small = n % 11;
	ll cnt[11] = {}; fill(cnt, cnt + 11, 0);
	for (ll i = 0; i < 11; ++i)
	{
		for (ll j = 0; j < 5; ++j)
		{
			++cnt[chart[i][j]];
		}
	}
	ll ans = cnt[k] * big;
	fill(cnt, cnt + 11, 0);
	for (ll i = 0; i < small; ++i)
	{
		for (ll j = 0; j < 5; ++j)
		{
			++cnt[chart[i][j]];
		}
	}
	ans += cnt[k];
	printf("%lld\n", ans);
	return 0;
}


Compiler output:
a.cc:23:7: error: 'll' does not name a type
   23 | const ll chart[11][5] =
      |       ^~
a.cc: In function 'int main()':
a.cc:54:31: error: 'chart' was not declared in this scope; did you mean 'char'?
   54 |                         ++cnt[chart[i][j]];
      |                               ^~~~~
      |                               char
a.cc:63:31: error: 'chart' was not declared in this scope; did you mean 'char'?
   63 |                         ++cnt[chart[i][j]];
      |                               ^~~~~
      |                               char
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long
#define all(v) v.begin(), v.end()
int main(){
  int h,w,k;cin>>h>>w>>k;vector<vector<int>> c(h,vector<int>(w));
  //int i,j,l,n,p;
  rep(i,h)rep(j,w){
    char ch;cin>>ch;
    c[i][j]=(ch-'0');
  }
  int ans=0;
  rep(i,h)rep(j,w){
    bool update=1;vector<vector<int>> m=c;
    m[i][j]=0;int score=0,timev=1;
    while(update) {
      update=0;
      rep(n,w){
        int to=h-1;
        for(l=h-1;l>=0;l--){
          if(m[l][n]!=0){
            swap(m[to][n],m[l][n]);to--;
          }
        }
      }
      int get=0;
      rep(l,h){
        int from=0,now=m[l][w-1];
        rep(n,w){
          if(now!=m[l][n]){
            int dis=(n-1)-from+1;
            if(dis>=k){
              for(p=from;p<n;p++) {
                get+=m[l][p];m[l][p]=0;
              }
            }from=n;now=m[l][n];
          }
        }
        int dis=(w-1)-from+1;
        if(dis>=k){
          for(p=from;p<n;p++){
            get+=m[l][p];m[l][p]=0;
          }
        }
      }
      if(get>0)update=1;
      else break;
      score+=timev*get; timev*=2;
    }ans=max(ans,score);
  }cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'l' was not declared in this scope
   21 |         for(l=h-1;l>=0;l--){
      |             ^
a.cc:34:19: error: 'p' was not declared in this scope
   34 |               for(p=from;p<n;p++) {
      |                   ^
a.cc:42:15: error: 'p' was not declared in this scope
   42 |           for(p=from;p<n;p++){
      |               ^
a.cc:42:24: error: 'n' was not declared in this scope
   42 |           for(p=from;p<n;p++){
      |                        ^
Language: C++

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

int H, W, K;

void fall(vector<vector<int>> &c) {
    rep(i,W) rep(j,H) {
        if (c[i][j] == 0) {
            for (int k = 1; k + j < H; ++k) {
                if (c[i][k+j] != 0) {
                    for (int l = j; l < H; ++l) {
                        if (l + k < H) c[i][l] = c[i][l+k];
                        else c[i][l] = 0;
                    }
                    break;
                }
            }
        }
    }
}

void sum(ll &ans, ll delete_cnt, vector<vector<int>> &c) {
    rep(i,H) {
        ll left = 0;
        rep(j,W) {
            if (c[j+1][i] != 0 && c[j+1][i] == c[j][i]) continue;
            if (c[j+1][i] != c[j][i]) {
                if (j - left + 1 > 1) {
                    ans += (1LL<<delete_cnt) * (j - left + 1) * c[j][i];
                    for (int k = left; k <= j; ++k) c[k][i] = 0;
                }
            }
            left = j + 1;
        }
    }
}



ll calc_ans(int x, int y, vector<vector<int>> c) {
    ll res = 0;
    ll pre_ans = -1;
    ll delete_cnt = 0;

    c[x][y] = 0;
    fall(c);
    while (res != pre_ans) {
        pre_ans = res;
        sum(res, delete_cnt, c);
        fall(c);
        ++delete_cnt;
    }
    return res;
}


int main() {
    cin >> H >> W >> K;
    vector<vector<ll>> c(W+1, vector<ll>(H));
    rep(i,H) {
        string S;
        cin >> S;
        rep(j,W) c[j][H-1-i] = S[j] - '0';
    }

    ll ans = 0;

    rep(i,W) rep(j,H) {
        if (i == 0) continue;
        ans = max(ans, calc_ans(i, j, c));
    }
    
    cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:73:39: error: could not convert 'c' from 'vector<vector<long long int>>' to 'vector<vector<int>>'
   73 |         ans = max(ans, calc_ans(i, j, c));
      |                                       ^
      |                                       |
      |                                       vector<vector<long long int>>
Language: C++

/*
    Problem 93
    https://atcoder.jp/contests/s8pc-3/tasks/s8pc_3_b
*/
#include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* class */
class pazzle {
    public:
    int H, W, K;
    ll ans = 0;
    vector<vector<int> > v;
    pazzle (int H, int W, int K, vector<vector<int> > v)
    : H(H), W(W), K(K), v(v) {}
    bool del() {
        int ret = false;
        for (int i = 0; i < H; i++) {
            int r = 0;
            for (int l = 0; l < W; l++) {
                int tmp = v[i][r];
                while (v[i][r] == -1) {
                    r++;
                    l++;
                }
                while (v[i][r] == v[i][r + 1]){
                    r++;
                    tmp += v[i][r];
                }
                if (r - l + 1>= K) {
                    for (int k = l; k <= r; k++) v[i][k] = -1;
                    ans += tmp;
                    ret = true;
                }
                l = r;
                r++;
            }
        }
        return ret;
    }
    void move() {
        for (int i = 0; i < W; i++) {
            for (int j = H - 1; j > 0; j--) {
                if (v[j][i] == -1) {
                    int k = j - 1;
                    while (v[k][i] == -1 && k > 0) k--;
                    if (v[k][i] != -1) swap(v[k][i], v[j][i]);
                }
            }
        }
    }
    void printPoint() {
        cout << ans << '\n';
    }
    ll gameStart() {
        ll ret = 0;
        move();
        for (int i = 0; del(); i++){
            move();
            ret += pow(2, i) * ans;
            ans = 0;
        }
        return ret;
    }
};
/* constant */
/* global variables */
/* function */
/* main */
int main(){
    int H, W, K;
    cin >> H >> W >> K;
    vector<string> vs(H);
    for (int i = 0; i < H; i++) cin >> vs[i];
    vector<vector<int> > v(H, vector<int> (W + 1, -2));
    for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) v[i][j] = vs[i][j] - '0';
    if (K == 1) {
        int ans = 0;
        int minValue = INF;
        for (auto vi : v) {
            ans += accumulate(vi.begin(), vi.end(), 0);
            minValue = min(*min_element(vi.begin(), vi.end()), minValue);
        }
        cout << ans  - minValue << '\n';
        return 0;
    }
    ll ans = 0;
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            int tmp = v[i][j];
            v[i][j] = -1;
            pazzle P = pazzle(H, W, K, v);
            ans = max(ans, P.gameStart());
            v[i][j] = tmp;
        }
    }
    cout << ans << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:81:24: error: 'INF' was not declared in this scope
   81 |         int minValue = INF;
      |                        ^~~
Language: C++

tifkukhj
kuyljhlikljk
lgykihlkjhivkhuijj
dtuuuuuuuuudhg
ghjfyudt
tukuyfyjkf
dtukyfkyfukyukfyhf
fghjuk
u

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

17 17 2
12345678912345678
23456789123456789
34567891234567891
45678912345678912
56789123456789123
67891234567891234
78912345678912345
89123456789123456
91234567891234567
12345678912345678
23456789123456789
34567891234567891
45678912345678912
56789123456789123
67891234567891234
78912345678912345
89123456789123456

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 17 17 2
      | ^~
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
const int MOD = 1e9 + 7;
using namespace std;
//-------------------------↓↓↓↓↓↓------------------------

int main(void){
       cin.tie(0);
    ios::sync_with_stdio(false);
      
    ll n, k, a[100 + 10], dp[100 + 10][100 + 10][255 + 100], add = 1, ans = 0;
    //こういうのはDP、とるか否かの2通りで
    //dp[i][j][k] := i番目まで、jが数列の長さ, kがxorしたやつの値
    cin >> n >> k;
    for(int i = 0; i < n ; i++){
        cin >> a[i];
    }

    for(int i = 0; i < n + 5; i++){
        for(int j = 1; j < n + 1 + 5; j++){
            for(int kk = 0; kk < k + 10; kk++){
                dp[i][j][kk] = 0;
            }
        }
    }
    dp[0][0][0] = 1;
    for(int i = 0; i < n; i++){
        for(int j = 0; j < n + 1; j++){
            for(int kk = 0; kk < k + 7; kk++){
                dp[i + 1][j][kk] += dp[i][j][kk];
                dp[i + 1][j][kk] %= MOD;
                if(j != 0){
                dp[i + 1][j][kk] += dp[i][j - 1][kk ^ a[i]];
                dp[i + 1][j][kk] %= MOD;
                }
            }
        }
    }
    for(int i = 1; i < n + 1; i++){
        add *= i;
        add %= MOD;
        (ans += ((dp[n][i][k] % MOD) * (add % MOD) % MOD);
        ans %= MOD;
    }
    cout << ans << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:58: error: expected ')' before ';' token
   42 |         (ans += ((dp[n][i][k] % MOD) * (add % MOD) % MOD);
      |         ~                                                ^
      |                                                          )
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define ull unsigned long long
#define M 1000000007
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define RFOR(i,m,n) for(int i=m;i>=n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0)
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};
#define PI 3.14159265

int n,k;
ll a[1000000];
ll c[1000000];
ll ans;
ll dp[300][300][300];

int main(){
  cin>>n>>k;

  rep(i,n){
    cin>>a[i+1];
  }

  c[1]=1;
  FOR(i,2,n+1){
    c[i]=c[i-1]*i%M;
  }

  dp[0][0][0]=1;

  FOR(i,1,n+1){
    rep(j,n+1){
      rep(l,300){
        int nk = l^a[i];
        dp[i][nk][j+1]+=dp[i-1][l][j];
        dp[i][l][j]+=dp[i-1][l][j];
      }
    }
  }

  FOR(i,1,n+1){
    ans+=(dp[n][k][i]*c[i]%M;
    ans%=M;
  }

  cout<<ans<<endl;

  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:29: error: expected ')' before ';' token
   48 |     ans+=(dp[n][k][i]*c[i]%M;
      |          ~                  ^
Language: C++

#include<algorithm>
#include<iostream>
#include<vector>
using namespace std;
typedef long long lint;
typedef vector<int>vi;
typedef pair<int,int>pii;
#define rep(i,n)for(int i=0;i<(int)(n);++i)

const lint mod=1e9+7;
const int N=100000;

lint fact[N];
lint invfact[N];
static long powerMod(long x, long exponent) {
  long prod = 1;
  for (int i = 63; i >= 0; --i) {
    prod = (prod * prod) % mod;
    if ((exponent & 1L << i) != 0) {
      prod = (prod * x) % mod;
    }
  }
  return prod;
}

static void initialize() {
  fact[0] = invfact[0] = 1;
  for (int i = 1; i < N; ++i)
    fact[i] = (i * fact[i - 1]) % mod;
  invfact[N-1]=powerMod(fact[N-1],mod-2);
  for(int i=N-2;i>=0;--i)
    invfact[i] = invfact[i+1]*(i+1)%mod;
}

void add(lint &x,lint y){
  x=(x+y)%mod;
}


int n,k;
int a[101];

lint dp[101][256];
lint dp2[101][256];


int main(){
  initialize();
  cin>>n>>k;
  rep(i,n)cin>>a[i];
  dp[0][0]=1;
  rep(i,n){
    memset(dp2,0,sizeof(dp2));
    rep(j,i+1){
      rep(b,256){
	add(dp2[j][b],dp[j][b]);
	add(dp2[j+1][b^a[i]],dp[j][b]);
      }
    }
    swap(dp,dp2);
  }
  lint ans=0;
  rep(i,n+1){
    add(ans,dp[i][k]*fact[i]);
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:5: error: 'memset' was not declared in this scope
   53 |     memset(dp2,0,sizeof(dp2));
      |     ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<vector>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>

#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define PB push_back
#define MP make_pair
#define FST first
#define SND second
#define SZ(a) (signed)((a).size())
#define EACH(i, c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort((c).begin(), (c).end())

using namespace std;

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;

const int MOD = 1000000007;

#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")"  << " " << __FILE__ << endl;

signed main(void) {
    ios::sync_with_stdio(false);
    cout.setf(ios::fixed, ios::floatfield);
    cout.precision(10);
    cin.tie(0);

    int n, k;
    cin >> n >> k;
    VI a(n);
    REP(i, n) {
        cin >> a[i];
    }

    VVI data(256, VI(0));
    REP(i, n) {
        VVI tdata = data;
        data[a[i]].PB(1);
        REP(j, 256) {
            REP(l, tdata[j].size()) {
                data[j ^ a[i]].PB(tdata[j][l] + 1);
            }
        }
        delete tdata;
    }

    VI factorial(101);
    factorial[1] = 1;
    FOR(i, 2, 101) {
        factorial[i] = (factorial[i - 1] * i) % MOD;
    }

    int ans = 0;
    REP(i, data[k].size()) {
        ans += factorial[data[k][i]];
        ans %= MOD;
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:16: error: type 'VVI' {aka 'class std::vector<std::vector<long long int> >'} argument given to 'delete', expected pointer
   72 |         delete tdata;
      |                ^~~~~
Language: C++

#include<iostream>
#include<vector>
#include<cassert>

using namespace std;
#define int long long
const int mod=1e9+7;

int fact(int x){

   int ret=1;
   for(int i=1; i<=x; i++){
      (ret*=i)%=mod;
   }
   return ret;
}

int main(){

   int n, k;
   cin>> n>> k;
   int a[n];
   for(int i=0; i<n; i++) cin>> a[i];
   
   assert(n<=20);

   int ans=0;
   for(int i=0; i<(1<<n); i++){
      vector<int> id;
      for(int j=0; j<n; j++){
         if((i>>j)&1){
            id.push_back(j);
         }
      }
      vector<int> b;
      for(int j: id){
         b.push_back(a[j]);
      }
      int s=0;
      for(int B: b){
         s^=B;
      }
      if(s==k){
         (ans+=fact(b.size()))%=mod;
      }
   }

   cout<< ans<< endl;

   return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <tuple>
using namespace std;
map<int, int> mp;
int f(vector<vector<int>> &A, int y1, int x1, int y2, int x2){
	int X = (y1 * 200 + x1) * 200 + y2;
	if (mp.count(X)){
		return mp[T];
	} else {
		int tmp = A[y1][x1] + A[y2][x2];
		if (y1 == y2 && x1 == x2){
			tmp /= 2;
		}
		int ans = 0;
		if (y1 > 0 && y2 > 0){
			ans = max(ans, f(A, y1 - 1, x1, y2 - 1, x2));
		}
		if (y1 > 0 && x2 > 0){
			ans = max(ans, f(A, y1 - 1, x1, y2, x2 - 1));
		}
		if (x1 > 0 && y2 > 0){
			ans = max(ans, f(A, y1, x1 - 1, y2 - 1, x2));
		}
		if (x1 > 0 && x2 > 0){
			ans = max(ans, f(A, y1, x1 - 1, y2, x2 - 1));
		}
		ans += tmp;
		mp[X] = ans;
		return ans;
	}
}
int main(){
	int H, W;
	cin >> H >> W;
	vector<vector<int>> A(H, vector<int>(W));
	for (int i = 0; i < H; i++){
		for (int j = 0; j < W; j++){
			cin >> A[i][j];
		}
	}
	cout << f(A, H - 1, W - 1, H - 1, W - 1) << endl;
}

Compiler output:
a.cc: In function 'int f(std::vector<std::vector<int> >&, int, int, int, int)':
a.cc:10:27: error: 'T' was not declared in this scope
   10 |                 return mp[T];
      |                           ^
Language: C++

//カタラン数を語らん!w

#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
#include <cctype>
#include <bitset>
using namespace std;
typedef string::const_iterator State;
#define Ma_PI 3.141592653589793
#define eps 1e-5
#define LONG_INF 2000000000000000000LL
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007LL
#define GYAKU 500000004LL
#define MOD 998244353LL
#define seg_size 262144*2
#define REP(a,b) for(long long a = 0;a < b;++a)
#define int long long
int dp[201][201][500];
int grid[201][201];
#undef int
int main() {
#define int long long
	int h, w;
	cin >> h >> w;
	int hoge = 0;
	REP(i, h) {
		REP(q, w) {
			cin >> grid[i][q];
			hoge += grid[i][q];
		}
	}
	dp[0][0][0] = 1;
	for (int i = 0; i < h + w-2; ++i) {
		for (int q = 0; q <= i; ++q) {
			for (int j = 0; j <= i; ++j) {
				int first_x = q;
				int first_y = i - q;
				int second_x = j;
				int second_y = i - j;
				REP(t, 2) {
					REP(p, 2) {
						int next_fx = first_x + t;
						int next_fy = first_y + 1 - t;
						int next_sx = second_x + p;
						int next_sy = second_y + 1 - p;
						if (next_fx >= h || next_sx >= h | next_fy >= w | next_sy >= w) {
							continue;
						}
						int winning = dp[q][j][i] + grid[next_fx][next_fy];
						if (next_fx != next_sx || next_fy != next_sy) {
							winning += grid[next_sx][next_sy];
						}
						dp[next_fx][next_sx][next_fx + next_fy] = max(dp[next_fx][next_sx][next_fx + next_fy], winning);
					}
				}
			}
		}
	}
	assert(hoge >= dp[i - 1][q - 1][h + w - 2]);
	cout << dp[h - 1][h - 1][h + w - 2] << endl;
}

Compiler output:
In file included from /usr/include/c++/14/cassert:44,
                 from a.cc:27:
a.cc: In function 'int main()':
a.cc:87:27: error: 'i' was not declared in this scope
   87 |         assert(hoge >= dp[i - 1][q - 1][h + w - 2]);
      |                           ^
a.cc:87:34: error: 'q' was not declared in this scope
   87 |         assert(hoge >= dp[i - 1][q - 1][h + w - 2]);
      |                                  ^
Language: C++

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

int dp[200][200][200];
int a, b;
int c[30][30];
int dx[2] = { -1,0 }, dy[2] = { 0,-1 };
int saiki(int d, int e, int f, int g) {
	if (dp[d][e][f] != -1)return dp[d][e][f];
	for (int h = 0; h < 2; h++) {
		for (int i = 0; i < 2; i++) {
			int n = d + dx[h], m = e + dy[h];
			if (n < 0 || m < 0)continue;
			int x = f + dx[i], y = g + dy[i];
			if (x < 0 || y < 0)continue;
			int S = saiki(n, m, x, y);
			S += c[d][e]; S += c[f][g];
			if (d == f&&e == g)S -= c[d][e];
			dp[d][e][f] = max(dp[d][e][f], S);
		}
	}
	return dp[d][e][f];
}
signed main() {
	memset(dp, -1, sizeof(dp));
	cin >> a >> b;
	for (int d = 0; d < a; d++) {
		for (int e = 0; e < b; e++) {
			cin >> c[d][e];
		}
	}
	dp[0][0][0] = c[0][0];
	cout << saiki(a - 1, b - 1, a - 1, b - 1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'memset' was not declared in this scope
   27 |         memset(dp, -1, sizeof(dp));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include<iostream>
#include<unordered_map>
#include<cstdio>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<map>
using namespace std;

int dp[30][30][30][30];
int a, b;
int c[30][30];
int dx[2] = { -1,0 }, dy[2] = { 0,-1 };
int saiki(int d, int e, int f, int g) {
	if (dp[d][e][f][g] != -1)return dp[d][e][f][g];
	for (int h = 0; h < 2; h++) {
		for (int i = 0; i < 2; i++) {
			int n = d + dx[h], m = e + dy[h];
			if (n < 0 || m < 0)continue;
			int x = f + dx[i], y = g + dy[i];
			if (x < 0 || y < 0)continue;
			int S = saiki(n, m, x, y);
			S += c[d][e]; S += c[f][g];
			if (d == f&&e == g)S -= c[d][e];
			dp[d][e][f][g] = max(dp[d][e][f][g], S);
		}
	}
	return dp[d][e][f][g];
}
signed main() {
	memset(dp, -1, sizeof(dp));
	cin >> a >> b;
	for (int d = 0; d < a; d++) {
		for (int e = 0; e < b; e++) {
			cin >> c[d][e];
		}
	}
	dp[0][0][0][0] = c[0][0];
	cout << saiki(a - 1, b - 1, a - 1, b - 1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:9: error: 'memset' was not declared in this scope
   32 |         memset(dp, -1, sizeof(dp));
      |         ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include<map>
  +++ |+#include <cstring>
    9 | using namespace std;
Language: C

#include<stdio.h>

int map[200][200],dp[200][200][400];
int h,w;

int search(int ax,int ay,int bx,int by){
  int i,c,max=0;
  if(ax==0 && ay==0){
    return map[0][0]+search(ax+1,ay,bx,by+1);
  }else if(ax==h-1 && ay==w-1){
    return map[h-1][w-1];
  }else{
    if(dp[ax][ay][ax+ay]==0){
    for(i=0;i<4;i++){
      if(ax+(i%2)<h && ay+(1-i%2)<w && bx+i/2<h && by+(1-i/2)<w){
        if((ax+(i%2)!=bx+(i/2)) || ax+ay==w+h-3){
        c=map[ax][ay]+map[bx][by]+search(ax+(i%2),ay+(1-i%2),bx+i/2,by+(1-i/2));
        if(c>max) max=c;
        }
      }
    }
    return dp[ax][ay][ax+ay]=max;
    }else{
      return dp[ax][ay][ax+ay];
    }
  }
}

int main(){
  int i,j;
  scanf("%d %d",&h,&w);
  for(i=0;i<h;i++){
    for(j=0;j<w;j++){
      scanf("%d",&map[i][j]);
      for (int k = 0; k < h+w; k++) {
        dp[i][j][]=0;
            }
    }
  }
  printf("%d\n",search(0,0,0,0));
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:36:18: error: expected expression before ']' token
   36 |         dp[i][j][]=0;
      |                  ^
Language: C

#include<stdio.h>

int map[200][200],dp[200][200][200][200];
int h,w,num;

int search(int ax,int ay,int bx,int by){
	int i;
	if(ax==0 && ay==0){
		return search(ax+1,ay,bx,by+1);
	}else if(ax==h && ay==w){
		return 0;
	}else{
		if(dp[ax][ay][bx][by]==0){
		for(i=0;i<4;i++){
			if(ax+(i%2)<h && ay+(1-i%2)<w && bx+i/2<h && by+(1-i/2)<w){
				if((ax+(i%2)!=bx+(i/2))) return dp[ax][ay][bx][by]=map[ax][ay]+map[bx][by]+search(ax+(i%2),ay+(1-i%2),bx+i/2,by+(1-i/2));
			}
		}
		}else{
			return dp[ax][ay][bx][by]
		}
	}
}

int main(){
	int i,j;
	scanf("%d %d",&h,&w);
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			scanf("%d",&map[i][j]);
		}
	}
	printf("%d\n",search(0,0,0,0));
	return 0;
}


Compiler output:
main.c: In function 'search':
main.c:20:50: error: expected ';' before '}' token
   20 |                         return dp[ax][ay][bx][by]
      |                                                  ^
      |                                                  ;
   21 |                 }
      |                 ~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int H,W,a,T1,T2;
    cin >> H >> W;
    int array1[W];
    int array2[W];
    for(int i=0;i<W;i++){
        cin >> array1[i];
        T1=T1+array1[i]; 
    }
    for(int i=0;i<W;i++){
        cin >> array2[i];
        T2=T2+array2[i];
    }
    a=T1+T2-array1[i]-array2[W];
    cout << a << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: 'i' was not declared in this scope
   19 |     a=T1+T2-array1[i]-array2[W];
      |                    ^
Language: C

#include<stdio.h>

int main(int argc, char const *argv[]) {
    int h,w,map[200][200],i,j,sum;
    
    scanf("%d %d",&h,&w);
    sum=0;
    for (i = 0; i < h; i++) {
        for (j = 0; j < w; j++) {
            scanf("%d",%map[i][j]);
            sum+=map[i][j];
        }
    }
    printf("%d",sum);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:24: error: expected expression before '%' token
   10 |             scanf("%d",%map[i][j]);
      |                        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: expected ';' before 'cout'
    6 | cin>>a>>b
      |          ^
      |          ;
    7 | cout<<a;
      | ~~~~
Language: C++

#include <iostream>
#include <math.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
using namespace std;

typedef long long ll;
const long double pi=3.1415926535897932;

int n;
ll kk;
long double len[200005],a[200005];

inline ll read() {
	ll X=0,w=0; char ch=0;
	while(!isdigit(ch)) {w|=ch=='-';ch=getchar();}
	while(isdigit(ch)) X=(X<<3)+(X<<1)+(ch^48),ch=getchar();
	return w?-X:X;
}

struct node{
	ll num;
	long double S;
}s[3333333334];

bool cmp(node a,node b) {
	return a.S<b.S;
}

int main() {
	//printf("%.12lf\n",sqrt(pi));
	n=read();kk=read();
	if(n==3) {
		printf("%.10lf\n",3*sqrt(3.0)/4);
		return 0;
	}
	int l=n/2;
	int c=n/3;
	len[1]=2*sin(pi/n);
	long double l2=len[1]*len[1];
	a[1]=pi-2*pi/n;
	for(ll i=2;i<=l-1;i++) {
		a[i]=a[i-1]-pi/n;
	}
	for(ll i=2;i<=l;i++) {
		len[i]=sqrt(l2+len[i-1]*len[i-1]-2*len[1]*len[i-1]*cos(a[i-1]));
	}
	ll cnt,id=2;
	s[1].num=n;
	//printf("%.12lf %.12lf\n",len[1],len[2]);
	s[1].S=sqrt((len[1]+len[2]/2)*(len[2]*len[2]/4)*(len[1]-len[2]/2));
	if(kk<=n) {
		printf("%.10Lf\n",s[1].S);
		return 0;
	}
	//printf("%.12lf\n",s[1]\.S);
	int k,tmp=0;
	for(int i=1;i<=c;++i) {
		for(int j=i;j<=(n-i)/2;++j) {
			k=n-i-j;
			if(i==1 && j==1) continue;	
			if(i==j && j==k) {
				tmp=n/3;
			} else if(k==j || i==j || i==k) {
				tmp=n;
			} else {
				tmp=n*2;
			}
			k=min(k,n-k);
			s[id].num=tmp;
			long double half=(len[i]+len[j]+len[k])/2;
			s[id].S=sqrt(half*(half-len[i])*(half-len[j])*(half-len[k]));
			id++;
			//res+=tmp;
		}
	}
	id--;
	cnt=0;
	sort(s+1,s+id+1,cmp);
	/*
	for(ll i=1;i<=l;i++) {
		printf("%.8lf ",len[i]);
	}
	cout<<endl;
	for(ll i=1;i<=id;i++) {
		printf("%d: %.8lf ",s[i].num,s[i].S);
	}
	cout<<endl<<id<<endl;
	*/
	//cout<<res<<endl;
	for(int i=1;i<=id;++i) {
		cnt+=s[i].num;
		//cout<<cnt<<endl;
		if(cnt>=kk) {
			printf("%.10Lf",s[i].S);
			return 0;
		}
	}
	
	//printf("%d\n",cnt);
	//printf("%.12lf\n",sin(pi/n));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   79 |         sort(s+1,s+id+1,cmp);
      |         ^~~~
      |         sqrt
Language: C++

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

typedef long long ll;
const long double pi=3.1415926535897932;

ll n,k;
long double len[5000005],a[5000005];

struct node{
	ll num;
	long double S;
}s[5000005];

bool cmp(node a,node b) {
	return a.S<b.S;
}

int main() {
	//printf("%.12lf\n",sqrt(pi));
	cin>>n>>k;
	if(n==3) {
		printf("%.10lf\n",3*sqrt(3)/4);
		return 0;
	}
	ll l=n/2;
	ll c=n/3;
	len[1]=2*sin(pi/n);
	long double l2=len[1]*len[1];
	a[1]=pi-2*pi/n;
	for(ll i=2;i<=l-1;i++) {
		a[i]=a[i-1]-pi/n;
	}
	for(ll i=2;i<=l;i++) {
		len[i]=sqrt(l2+len[i-1]*len[i-1]-2*len[1]*len[i-1]*cos(a[i-1]));
	}
	ll cnt,id=2;
	s[1].num=n;
	//printf("%.12lf %.12lf\n",len[1],len[2]);
	s[1].S=sqrt((len[1]+len[2]/2)*(len[2]*len[2]/4)*(len[1]-len[2]/2));
	//printf("%.12lf\n",s[1].S);
	for(ll i=1;i<=c;i++) {
		for(ll j=i;j<=(n-i)/2;j++) {
			ll k=n-i-j;
			if(i==1 && j==1) continue;
			ll tmp;
			if(i==j && j==k) {
				tmp=n/3;
			} else if(k==j || i==j || i==k) {
				tmp=n;
			} else {
				tmp=n*2;
			}
			s[id].num=tmp;
			long double half=(len[i]+len[j]+len[min(k,n-k)])/2;
			s[id].S=sqrt(half*(half-len[i])*(half-len[j])*(half-len[min(k,n-k)]));
			id++;
			//cnt+=tmp;
		}
	}
	id--;
	cnt=0;
	sort(s+1,s+id+1,cmp);
	/*
	for(ll i=1;i<=l;i++) {
		printf("%.8lf ",len[i]);
	}
	cout<<endl;
	for(ll i=1;i<=id;i++) {
		printf("%d: %.8lf ",s[i].num,s[i].S);
	}
	cout<<endl<<id<<endl;
	*/
	for(ll i=1;i<=id;i++) {
		cnt+=s[i].num;
		//cout<<cnt<<endl;
		if(cnt>=k) {
			printf("%.10Lf",s[i].S);
			return 0;
		}
	}
	//printf("%d\n",cnt);
	//printf("%.12lf\n",sin(pi/n));
	return 0;
}

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

#include <bits\stdc++.h>
#define db long double
#define S(A,B) 2*Sin[A]*Sin[B]*Sin[n-A-B]
#define m (l+r)/2
using namespace std;
db ms,ls=0,rs=1.299038105676658,pi=3.14159265358979323846;
db Sin[200050];
long long n,k,i,p,q,l,r;
int main() {
	//freopen("1.in","r",stdin);
	cin>>n>>k;
	cout<<setprecision(50);
	if (n%3==0&&k>1LL*n*(n-1)*(n-2)/6-n/3) {cout<<rs;return 0;}
	for (i=1;i<=n;i++) Sin[i]=sin(i*pi/n); k=k/n+(k%n>0);
	while (true) {
		db s=(ls+rs)/2;
		p=0,q=0,ms=0;
		for (i=1;i<=n/3;i++) {
			if (S(i,i)>s) break;
			l=i,r=(n-i)/2+1;
			while (r-l>1) if (S(i,m)<s) l=m;else r=m;
			if (ms<S(i,m)) ms=S(i,m),q=1+(m!=i&&m*2!=n-i);
			p+=2*(m-i)+1-(m*2==n-i);
		}
		if (k<=p&&p-q<k) break;
		if (p<k) ls=s;else rs=s;
	}
	cout<<ms;
	//fclose(stdin);
}

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