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

#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <list>
#include <algorithm>

using namespace std;

// Returns 1 if the i-th bit of x is set, 0 otherwise.
#define BIT_SET(x, i) (((x) & (1<<(i))) != 0)
// Sets the i-th bit of x to 1
#define SET_BIT(x, i) ((x) | (1<<(i)))
// Sets the i-th bit of x to 0
#define UNSET_BIT(x, i) ((x) & ~(1<<(i)))

class Task {
	private:
		int count;
	public:
		solve(istream& in, ostream& out) {
			int N, M;
			cin >> N >> M;
			vector<list<int>> L(N);
			vector<bool> visited(N);
			unordered_map<int, list<int>> spoken;
			for (int j = 0; j < N; j++) {
				int Kj;
				cin >> Kj;
				for (int k = 0; k < Kj; k++) {
					int Ljk;
					cin >> Ljk;
					L[j].emplace_back(Ljk);
					spoken[Ljk].emplace_back(j);
				}
			}
			dfs(0, visited, L, spoken);
			out << (count == N ? "YES" : "NO") << endl;
		}

		void dfs(int node, vector<bool>& visited, vector<list<int>>& L, unordered_map<int, list<int>>& spoken) {
			count++;
			visited[node] = true;
			for (list<int>::iterator i = L[node].begin(); i != L[node].end(); i++) {
				for (int v: spoken[*i])
					if (!visited[v])
						dfs(v, visited, L, spoken);
			}
		}
};

int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    std::istream& in(std::cin);
    std::ostream& out(std::cout);
    Task task;
    task.solve(in, out);
    return 0;
}


Compiler output:
a.cc:22:17: error: ISO C++ forbids declaration of 'solve' with no type [-fpermissive]
   22 |                 solve(istream& in, ostream& out) {
      |                 ^~~~~
a.cc: In member function 'int Task::solve(std::istream&, std::ostream&)':
a.cc:40:17: warning: no return statement in function returning non-void [-Wreturn-type]
   40 |                 }
      |                 ^
Language: C

#include<stdio.h>

int lang[1000][1000],inter[1000][1000],list[1000],num,n;

int search(int i){
	int f;
	num++;
	if(num==n) return 1;
	list[i]=1;
	f=0;
	while(f==0){
		for(j=0;j<n && f==0;j++){
			if(list[j]==0 && i!=j && k[i][j]==1){
				if(search(j)) return 1;
			}
		}
	}
	list[i]=0;
	return 0;
}

int main(){
	int m,k,i,j,l,f;
	scanf("%d %d",&n,&m);
	for(i=0;i<n;i++){
		scanf("%d",&k);
		for(j=0;j<k;j++){
			scanf("%d",&l);
			lang[i][l-1]=1;
			for(ii=0;ii<i;ii++){
				if(lang[ii][l-1]){
					k[i][ii]=1;
					k[ii][i]=1;
				}
			}
		}
	}
	
	num=0;
	if(search(0)) printf("YES\n");
	else printf("NO\n");
	return 0;
}

Compiler output:
main.c: In function 'search':
main.c:12:21: error: 'j' undeclared (first use in this function)
   12 |                 for(j=0;j<n && f==0;j++){
      |                     ^
main.c:12:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:50: error: 'k' undeclared (first use in this function)
   13 |                         if(list[j]==0 && i!=j && k[i][j]==1){
      |                                                  ^
main.c: In function 'main':
main.c:30:29: error: 'ii' undeclared (first use in this function); did you mean 'i'?
   30 |                         for(ii=0;ii<i;ii++){
      |                             ^~
      |                             i
main.c:32:42: error: subscripted value is neither array nor pointer nor vector
   32 |                                         k[i][ii]=1;
      |                                          ^
Language: C

#include<stdio.h>

int lang[1000][1000],inter[1000][1000]list[1000],num,n;

int search(int i){
	int f;
	num++;
	if(num==n) return 1;
	list[i]=1;
	f=0;
	while(f==0){
		for(j=0;j<n && f==0;j++){
			if(list[j]==0 && i!=j && k[i][j]==1){
				if(search(j)) return 1;
			}
		}
	}
	list[i]=0;
	return 0;
}

int main(){
	int m,k,i,j,l,f;
	scanf("%d %d",&n,&m);
	for(i=0;i<n;i++){
		scanf("%d",&k);
		for(j=0;j<k;j++){
			scanf("%d",&l);
			lang[i][l-1]=1;
			for(ii=0;ii<i;ii++){
				if(lang[ii][l-1]){
					k[i][ii]=1;
					k[ii][i]=1;
				}
			}
		}
	}
	
	num=0;
	if(search(0)) printf("YES\n");
	else printf("NO\n");
	return 0;
}

Compiler output:
main.c:3:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'list'
    3 | int lang[1000][1000],inter[1000][1000]list[1000],num,n;
      |                                       ^~~~
main.c: In function 'search':
main.c:7:9: error: 'num' undeclared (first use in this function)
    7 |         num++;
      |         ^~~
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:17: error: 'n' undeclared (first use in this function)
    8 |         if(num==n) return 1;
      |                 ^
main.c:9:9: error: 'list' undeclared (first use in this function)
    9 |         list[i]=1;
      |         ^~~~
main.c:12:21: error: 'j' undeclared (first use in this function)
   12 |                 for(j=0;j<n && f==0;j++){
      |                     ^
main.c:13:50: error: 'k' undeclared (first use in this function)
   13 |                         if(list[j]==0 && i!=j && k[i][j]==1){
      |                                                  ^
main.c: In function 'main':
main.c:24:24: error: 'n' undeclared (first use in this function)
   24 |         scanf("%d %d",&n,&m);
      |                        ^
main.c:30:29: error: 'ii' undeclared (first use in this function); did you mean 'i'?
   30 |                         for(ii=0;ii<i;ii++){
      |                             ^~
      |                             i
main.c:32:42: error: subscripted value is neither array nor pointer nor vector
   32 |                                         k[i][ii]=1;
      |                                          ^
main.c:39:9: error: 'num' undeclared (first use in this function)
   39 |         num=0;
      |         ^~~
Language: C

#include <stdio.h>
#include <stdbool.h>

int find(int x);
void f_union(int x, int y);

int G[1001];

typedef struct {
    int K;
    int O;
    unsigned char other[1001];
    unsigned char lang[1001];
}CODER;

CODER player[1001] = {0};

int main(void)
{
    int N, M, K, n;
    int i, j, k, l, m;
    CODER tmp;

    scanf("%d%d", &N, &M);

    for (i = 0; i < N; i++) {
        scanf("%d", &K);
        player[i].K = K;
        player[i].O = 0;
        G[i] = i;
        for (k = 0; k < K; k++) {
            scanf("%d", &n);
            player[i].lang[k] = n;
        }
    }

    for (i = 0; i < N; i++) {
        for (j = 0; j < player[i].K; j++) {
            for (k = 0; k < N; k++) {
                for (l = 0; l < player[k].K; l++) {
                    if (player[i].lang[j] == player[k].lang[l]) {
                        f_union(G[i], G[k]);
                    }
                }
            }
        }
    }

    for (i = 1; i < N; i++) {
        if (find(G[0]) != find(G[i])) {
            printf("NO");
            return 0;
        }
    }
    printf("YES");
    return 0;
}

int find(int x)
{
    return G[x]==x?x:G[x] = find(G[x]);
}

void f_union(int x, int y)
{
    x = find(x);
    y = find(y);
    if (x == y) return;
    G[x] = y;
}


Compiler output:
main.c: In function 'find':
main.c:61:27: error: lvalue required as left operand of assignment
   61 |     return G[x]==x?x:G[x] = find(G[x]);
      |                           ^
Language: Java

import java.io.*;
import java.lang.*;
import java.util.*;

public class Main {

	static int count = 0;
	static boolean[] m;
	static Map<Integer, List<Integer>> spoken;
	static int[][] L;

	public static void main(String[] args) throws IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(reader.readLine().split("\\s")[0]);
		L = new int[N][];
		m = new boolean[N];
		spoken = new HashMap();
		for (int j = 0; j < N; j++) {
			String[] raw = reader.readLine().split("\\s");
			L[j] = new int[Integer.parseInt(raw[0])];
			for (int k = 0; k < L[j].length; k++) {
				L[j][k] = Integer.parseInt(raw[k+1]);
				if (!spoken.containsKey(L[j][k]))
					spoken.put(L[j][k], new ArrayList());
				spoken.get(L[j][k]).add(j);
			}
		}
		dfs(0);
		System.out.println(count == N ? "YES" : "NO");
	}

	static void dfs(int current) {
		count++;
		if (count == N) return;
		m[current] = true;
		for (int k = 0; k < L[current].length; k++) {
			int lang = L[current][k];
			for (int v: spoken.get(lang))
				if (!m[v])
					dfs(v);
		}
	}
	
}


Compiler output:
Main.java:34: error: cannot find symbol
		if (count == N) return;
		             ^
  symbol:   variable N
  location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++


#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>

using namespace std;

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

const int NMAX = 100005;
const int MMAX = 100005;
bool adjMat[NMAX][NMAX];

int n, m;

void dfs(int s, bool* isV){
    isV[s] = true;
    REPCLS(i, n) if(adjMat[s][i] == true && s != i && isV[i] == false) {
        dfs(i, isV);
    }
}
bool isConnected() {
    bool isVisited[MMAX];
    fill (isVisited, isVisited + (n + 1), false);
    dfs(1, isVisited);
    return all_of(isVisited + 1, isVisited + (n + 1), [](bool b){return b;});
}
int main() {
    vector<int> speekMans[MMAX];
    cin >> n >> m;
    if (n > NMAX || m > MMAX) {
        return 0;
    }
    REPCLS(i, n){
        int k;
        cin >> k;
        REP(j, k){
            int l; cin >> l;
            speekMans[l].push_back(i);
        }
    }
    REPCLS(l, m){
        for(int x : speekMans[l]) for(int y : speekMans[l]){
            if (x == y) continue;
            adjMat[x][y] = true;
        }
    }

    string ans = isConnected()? "YES" : "NO";
    
    cout << ans << endl;
    
    return 0;
}


Compiler output:
/tmp/cc5HV29r.o: in function `dfs(int, bool*)':
a.cc:(.text+0x88): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc5HV29r.o
/tmp/cc5HV29r.o: in function `isConnected()':
a.cc:(.text+0xba): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc5HV29r.o
a.cc:(.text+0xfb): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc5HV29r.o
/tmp/cc5HV29r.o: in function `main':
a.cc:(.text+0x15e): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc5HV29r.o
a.cc:(.text+0x17a): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc5HV29r.o
a.cc:(.text+0x18b): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc5HV29r.o
a.cc:(.text+0x198): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc5HV29r.o
a.cc:(.text+0x251): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc5HV29r.o
a.cc:(.text+0x3b5): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc5HV29r.o
collect2: error: ld returned 1 exit status
Language: C++


#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>

using namespace std;

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

const int NMAX = 100005;
const int MMAX = 100005;
bool adjMat[NMAX][NMAX];

int n, m;

bool isDist2(int s){
    int v = s;
    bool reach[NMAX];
    fill(reach, reach+(n+1), false);
    
    vector<int> q;
    REPCLS(j, n) if(adjMat[v][j] == true) {
        q.push_back(j);
        reach[j] = true;
    }
    for(int x : q) {
        REPCLS(j, n) if(adjMat[x][j] == true){
            reach[j] = true;
        }
    }
    reach[v] = true;
    return all_of(reach + 1, reach + (n + 1), [](bool b){return b;});
}
int main() {
    vector<int> speekMans[MMAX];
    cin >> n >> m;
    REPCLS(i, n){
        int k;
        cin >> k;
        REP(j, k){
            int l; cin >> l;
            speekMans[l].push_back(i);
        }
    }
    REPCLS(l, m){
        for(int x : speekMans[l]) for(int y : speekMans[l]){
            if (x == y) continue;
            adjMat[x][y] = true;
        }
    }

    string ans = "YES";
    REPCLS(i, n){
        if (!isDist2(i)) {
            ans = "NO";
            break;
        }
    }
    
    cout << ans << endl;
    
    return 0;
}


Compiler output:
/tmp/ccIBFVEd.o: in function `isDist2(int)':
a.cc:(.text+0x34): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccIBFVEd.o
a.cc:(.text+0xe7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccIBFVEd.o
a.cc:(.text+0x17c): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccIBFVEd.o
a.cc:(.text+0x1c4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccIBFVEd.o
/tmp/ccIBFVEd.o: in function `main':
a.cc:(.text+0x25e): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccIBFVEd.o
a.cc:(.text+0x27a): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccIBFVEd.o
a.cc:(.text+0x32c): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccIBFVEd.o
a.cc:(.text+0x490): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccIBFVEd.o
a.cc:(.text+0x50c): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccIBFVEd.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>

#define mp       make_pair
#define mt  make_tuple
#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

const int INF=1<<29;
const double EPS=1e-9;
const ll MOD = 1000000007;

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

const int MAX_NM = 100100;
int N,M;

vector<int> learn_person[MAX_NM];
vector<int> edges[MAX_NM];

bool visited[MAX_NM];
int cnt_N;
void dfs(int pos){
  visited[pos] = true;
  cnt_N--;
  if (cnt_N <= 0)return ;

  for (const auto &lang : edges[pos]){
    for (const auto &next : learn_person[lang]){
      if (visited[next])continue;
      dfs(next);
    }
  }
}


int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N >> M;
  cnt_N = N;
  set<int> learn_lang;
  for (int i = 0; i < N; i++){
    int K;
    cin >> K;


    for (int j = 0; j < K; j++){
      int l;
      cin >> l;
      l--;
      learn_person[l].emplace_back(i);
      edges[i].emplace_back(l);
    }
  }
  dfs(0);
  bool ok = true;
  for (int i = 0; i < N; i++){
    if (not visited[i]){
      ok = false;
    }
  }
  if (ok){
    cout << "YES" << endl;
  }else{
    cout << "NO" << endl;
  }

  return 0;
  
|


Compiler output:
a.cc: In function 'int main()':
a.cc:75:1: error: expected primary-expression before '|' token
   75 | |
      | ^
a.cc:75:2: error: expected primary-expression at end of input
   75 | |
      |  ^
a.cc:75:2: error: expected '}' at end of input
a.cc:41:11: note: to match this '{'
   41 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>

#define mp       make_pair
#define mt  make_tuple
#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

const int INF=1<<29;
const double EPS=1e-9;
const ll MOD = 1000000007;

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

const int MAX_NM = 100100;
int N,M;

vector<int> learn_person[MAX_NM];
vector<int> edges[MAX_NM];

bool visited[MAX_NM];

void dfs(int pos){
  visited[pos] = true;
  M--;
  if (M == 0)return ;
  for (const auto &lang : edges[pos]){
    for (const auto &next : learn_person[lang]){
      if (visited[next])continue;
      dfs(next);
    }
  }
}


int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N >> M;
  set<int> learn_lang;
  for (int i = 0; i < N; i++){
    int K;
    cin >> K;


    for (int j = 0; j < K; j++){
      int l;
      cin >> l;
      l--;
      learn_person[l].emplace_back(i);
      edges[i].emplace_back(l);
    }
  }
  dfs(0);
  bool ok = true;
  for (int i = 0; i < N; i++){
    if (not visited[i]){
      ok = false;
    }
  }
  if (ok){
    cout << "YES" << endl;
  }else{
    cout << "NO" << endl;
  }

  return 0;
  


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

#include <bits/stdc++.h>

#define mp       make_pair
#define mt  make_tuple
#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

const int INF=1<<29;
const double EPS=1e-9;
const ll MOD = 1000000007;

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

#ifdef _MSC_VER
#include <Windows.h>
double get_ms() { return (double)GetTickCount64() / 1000; }
#else
#include <sys/time.h>
double get_ms() { struct timeval t; gettimeofday(&t, NULL); return (double)t.tv_sec * 1000 + (double)t.tv_usec / 1000; }
#endif

class Timer
{
private:
  double start_time;
  double elapsed;

    #ifdef USE_RDTSC
  double get_sec() { return get_absolute_sec(); }
    #else
  double get_sec() { return get_ms() / 1000; }
    #endif

public:
  Timer() {}

  void start() { start_time = get_sec(); }
  double get_elapsed() { return elapsed = get_sec() - start_time; }
};
const int MAX_NM = 100100;

int N,M;

vector<int> learn_person[MAX_NM];
vector<int> edges[MAX_NM];

bool visited[MAX_NM];
Timer timer;
bool timeout;
int cnt;
void dfs(int pos){
  visited[pos] = true;
  for (const auto &lang : edges[pos]){
    for (const auto &next : learn_person[lang]){
      cnt++;
u      if (cnt >= 600000000){
	timeout = true;
	return ;
      }
      if (visited[next])continue;
      dfs(next);
    }
  }
}


int main(){
  timeout = false;
  timer.start();
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N >> M;
  set<int> learn_lang;
  timer.start();
  for (int i = 0; i < N; i++){
    int K;
    cin >> K;


    for (int j = 0; j < K; j++){
      int l;
      cin >> l;
      l--;
      learn_person[l].emplace_back(i);
      edges[i].emplace_back(l);
    }
  }
  dfs(0);
  if (timeout){
    cout << "YES" << endl;
    return 0;
  }
  bool ok = true;
  for (int i = 0; i < N; i++){
    if (not visited[i]){
      ok = false;
    }
  }
  if (ok){
    cout << "YES" << endl;
  }else{
    cout << "NO" << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:61:1: error: 'u' was not declared in this scope
   61 | u      if (cnt >= 600000000){
      | ^
Language: C++

#include<bits/stdc++.h>
#define int long long
using namespace std;
const int INF = 1000000000000;
const int mod = 1000000007;
int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 };
int test[12345678], aa[12345678];
signed main() {
	int n, m, a, ans = 0; cin >> n >> m;
	for (int h = 0; h < n; h++) { cin >> a; test[a % m]++; aa[a]++; }
	ans += test[0] / 2; test[0] = 0;
	for (int h = 1; h < m; h++) {
		if (h != (m - h)) {
			int x = test[h], y = test[m - h];
			ans += min(x, y); test[h] -= min(x, y); test[m - h] -= min(x, y);
		}
		else { ans += test[h] / 2; test[h] = 0; }
	}
	for (int h = 1; h <= 100000; h++) { ans += min(test[h % m], aa[h]) / 2; test[h % m] -= aa[h]; 
	cout << ans << endl; return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int n,m,x,ans;
map<int,int>mp;
int cnt[100010][2];//[mod M] 1:pair
int main(){
	cin>>n>>m;
	rep(i,n){
		cin>>x;
		mp[x]++;
	}
	for(P p:mp){
		cnt[p.first%m][0]+=p.second%2;
		cnt[p.first%m][1]+=p.second/2;
	}
	for(int i=0;i<=m/2;i++){
		if(cnt[i][0]+cnt[i][1]>=cnt[m-i][0]+cnt[m-i][1]){
			ans+=cnt[m-i][0]+cnt[m-i][1];
			ans+=min(cnt[i][1],((cnt[i][0]+cnt[i][1])-(cnt[m-i][0]+cnt[m-i][1]))/2);
		}
		else{
			ans+=cnt[i][0]+cnt[i][1];
			ans+=min(cnt[i][1],((cnt[i][0]+cnt[i][1])-(cnt[m-i][0]+cnt[m-i][1]))/2);


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'P' was not declared in this scope
   13 |         for(P p:mp){
      |             ^
a.cc:17:9: error: expected primary-expression before 'for'
   17 |         for(int i=0;i<=m/2;i++){
      |         ^~~
a.cc:16:10: error: expected ';' before 'for'
   16 |         }
      |          ^
      |          ;
   17 |         for(int i=0;i<=m/2;i++){
      |         ~~~
a.cc:17:9: error: expected primary-expression before 'for'
   17 |         for(int i=0;i<=m/2;i++){
      |         ^~~
a.cc:16:10: error: expected ')' before 'for'
   16 |         }
      |          ^
      |          )
   17 |         for(int i=0;i<=m/2;i++){
      |         ~~~
a.cc:13:12: note: to match this '('
   13 |         for(P p:mp){
      |            ^
a.cc:24:97: error: expected '}' at end of input
   24 |                         ans+=min(cnt[i][1],((cnt[i][0]+cnt[i][1])-(cnt[m-i][0]+cnt[m-i][1]))/2);
      |                                                                                                 ^
a.cc:22:21: note: to match this '{'
   22 |                 else{
      |                     ^
a.cc:24:97: error: expected '}' at end of input
   24 |                         ans+=min(cnt[i][1],((cnt[i][0]+cnt[i][1])-(cnt[m-i][0]+cnt[m-i][1]))/2);
      |                                                                                                 ^
a.cc:17:32: note: to match this '{'
   17 |         for(int i=0;i<=m/2;i++){
      |                                ^
a.cc:24:97: error: expected '}' at end of input
   24 |                         ans+=min(cnt[i][1],((cnt[i][0]+cnt[i][1])-(cnt[m-i][0]+cnt[m-i][1]))/2);
      |                                                                                                 ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

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

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

template <class T = ll> T in() { T x; cin >> x; return (x); }

typedef long long ll;

signed main() {
	ll n,m;
	cin >> n >> m;

	ll res[m];//あまりごとの個数
	ll dis[m];//あまりごとの緩衝材
	ll yoo[100010];//緩衝材

	REP (i,m) {res[i] = 0;dis[i] = 0;}
	REP (i,100010) {yoo[i] = 0;}
	REP (i,n) {ll x = in();res[x%m]++;yoo[x]++;}
	REP (i,100010) {dis[i%m] += (yoo[i] / 2) * 2;}

	ll ans = 0;
	ans += res[0] / 2;

	FOR (i,1,(m-1)/2+1) {
		ll A = i,B = m - i;// res[A] < res[B];
		if (res[A] == res[B]) {ans += res[A];continue;}
		else if (res[A] > res[B]) swap(A,B);
		ans += res[A] + min((res[B] - res[A]),dis[B]) / 2;
	}

	if (m%2 == 0) ans += res[m/2] / 2;
	cout << ans << endl;
}

Compiler output:
a.cc:8:21: error: 'll' does not name a type
    8 | template <class T = ll> T in() { T x; cin >> x; return (x); }
      |                     ^~
a.cc: In function 'int main()':
a.cc:22:29: error: no matching function for call to 'in()'
   22 |         REP (i,n) {ll x = in();res[x%m]++;yoo[x]++;}
      |                           ~~^~
a.cc:8:27: note: candidate: 'template<class T> T in()'
    8 | template <class T = ll> T in() { T x; cin >> x; return (x); }
      |                           ^~
a.cc:8:27: note:   template argument deduction/substitution failed:
Language: C++

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

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

typedef long long ll;

signed main() {
	ll n,m;
	cin >> n >> m;

	ll res[m];//あまりごとの個数
	ll dis[m];//あまりごとの緩衝材
	ll yoo[100010];//緩衝材

	REP (i,m) {res[i] = 0;dis[i] = 0;}
	REP (i,100010) {yoo[i] = 0;}
	REP (i,n) {ll x = in();res[x%m]++;yoo[x]++;}
	REP (i,100010) {dis[i%m] += (yoo[i] / 2) * 2;}

	ll ans = 0;
	ans += res[0] / 2;

	FOR (i,1,(m-1)/2+1) {
		ll A = i,B = m - i;// res[A] < res[B];
		if (res[A] == res[B]) {ans += res[A];continue;}
		else if (res[A] > res[B]) swap(A,B);
		ans += res[A] + min((res[B] - res[A]),dis[B]) / 2;
	}
	
	if (m%2 == 0) ans += res[m/2] / 2;
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:27: error: 'in' was not declared in this scope; did you mean 'i'?
   20 |         REP (i,n) {ll x = in();res[x%m]++;yoo[x]++;}
      |                           ^~
      |                           i
Language: C++

#include<set>
#include<map>
#include<cmath>
#include<queue>
#include<bitset>
#include<string>
#include<cstdio>
#include<cctype>
#include<cassert>
#include<cstdlib>
#include<cstring>
#include<sstream>
#include<iostream>
#include<algorithm>

#define For(i,x,y) for (int i=x;i<y;i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second

#define dprintf(...) fprintf(stderr,__VA_ARGS__)
using namespace std;

int IN(){
	int c,f,x;
	while (!isdigit(c=getchar())&&c!='-');c=='-'?(f=1,x=0):(f=0,x=c-'0');
	while (isdigit(c=getchar())) x=(x<<1)+(x<<3)+c-'0';return !f?x:-x;
}

typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> Vi;

const int N=1e5+19;

int A[N],B[N],C[N];
int n,m,res;

void work(int &x,int &y){
	int tmp=min(x,y);
	x-=tmp,y-=tmp,res+=tmp;.
}

int main(){
	n=IN();m=IN();
	For(i,0,n) A[IN()]++;
	For(i,0,N){
		B[i%m]+=A[i]%2;
		C[i%m]+=A[i]-A[i]%2;
	}
	for (int i=1;2*i<m;i++){
		work(B[i],B[m-i]);
		work(B[i],C[m-i]);
		work(C[i],B[m-i]);
		res+=C[i]/2;
		res+=C[m-i]/2;
	}
	if (m%2==0) res+=C[m/2];
	res+=C[0];
	printf("%d\n",res);
}

Compiler output:
a.cc: In function 'void work(int&, int&)':
a.cc:43:32: error: expected primary-expression before '.' token
   43 |         x-=tmp,y-=tmp,res+=tmp;.
      |                                ^
a.cc:44:1: error: expected unqualified-id before '}' token
   44 | }
      | ^
Language: C

#include<math.h>
using namespace std;
long N,A;
main()
{
	scanf("%ld%ld",&N,&A);
	long ans=N;
	for(int k=1;k<40;k++)
	{
		long p=pow(N,1./(k+1));
		long now=1;
		for(int i=0;i<k;i++)now*=p;
		for(int i=0;i<=k;i++)
		{
			ans=fmin(ans,A*k+p*k+i+(N+now-1)/now);
			now=now/p*(p+1);
		}
	}
	printf("%ld\n",ans);
}

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |         scanf("%ld%ld",&N,&A);
      |         ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include<math.h>
  +++ |+#include <stdio.h>
    2 | using namespace std;
main.c:6:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |         scanf("%ld%ld",&N,&A);
      |         ^~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:19:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 |         printf("%ld\n",ans);
      |         ^~~~~~
main.c:19:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:19:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
def pow(a, b):
    if b == 1:return a
    if b%2 == 0: return pow(a*a, int(b/2))
    return a*pow(a*a, int(b/2))
 
def binaryOne(n, multi):
    l, r = 0, n
    mid = (l + r)/2    
    while r - l > 1:
        if pow(mid, multi) >= n:
            r = mid
        else:
            l = mid
        mid = (r + l)/2
    return r;
 
 
def binaryTwo(n, maxi, multi):
    l, r = 0, multi
    mid = (l + r)/2
    while r - l > 1:
        if pow(maxi, (multi - mid))*pow(maxi - 1, mid) >= n:
            l = mid
        else:
            r = mid
        mid = (r + l)/2;
    return l
 
n, a = map(int,raw_input().split(" "))
ans = 1e18
for i in xrange(0, 40):
    maxi = binaryOne(n, i + 1);
    subt = binaryTwo(n, maxi, i + 1)
    ans = min(ans, a*i + maxi*(i + 1) - subt)
    
print ans


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: utf-8 -*-
      |   ^
a.cc:4:1: error: 'def' does not name a type
    4 | def pow(a, b):
      | ^~~
a.cc:21:1: error: 'def' does not name a type
   21 | def binaryTwo(n, maxi, multi):
      | ^~~
a.cc:30:5: error: expected unqualified-id before 'return'
   30 |     return l
      |     ^~~~~~
a.cc:36:5: error: 'subt' does not name a type
   36 |     subt = binaryTwo(n, maxi, i + 1)
      |     ^~~~
Language: C++

int dp[1000001]; //dp[x] = minTime
int n, a;

int main() {
cin >> n >> a;
for (int i = 0; i <= n; i++) {
	dp[i] = 1145141919;
}

dp[1] = 0;
for (int i = 1; i < n; i++) {
	for (int j = i; j <= n; j += i) {
		dp[j] = min(dp[j], dp[i] + j / i + a);
	}
}
if (n == 1) { cout << 1 << endl; return 0; }
else { cout << dp[n] - a << endl; return 0; }

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin >> n >> a;
      | ^~~
a.cc:13:25: error: 'min' was not declared in this scope; did you mean 'main'?
   13 |                 dp[j] = min(dp[j], dp[i] + j / i + a);
      |                         ^~~
      |                         main
a.cc:16:15: error: 'cout' was not declared in this scope
   16 | if (n == 1) { cout << 1 << endl; return 0; }
      |               ^~~~
a.cc:16:28: error: 'endl' was not declared in this scope
   16 | if (n == 1) { cout << 1 << endl; return 0; }
      |                            ^~~~
a.cc:17:8: error: 'cout' was not declared in this scope
   17 | else { cout << dp[n] - a << endl; return 0; }
      |        ^~~~
a.cc:17:29: error: 'endl' was not declared in this scope
   17 | else { cout << dp[n] - a << endl; return 0; }
      |                             ^~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <sstream>
#include <string>
#define _repargs(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _repargs(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define all(x) (x).begin(),(x).end()
#define mod 1000000007
#define inf 2000000007
#define mp make_pair
#define pb push_back
typedef long long ll;
using namespace std;
template <typename T>
inline void output(T a, int p = 0) {
    if(p) cout << fixed << setprecision(p)  << a << "\n";
    else cout << a << "\n";
}
// end of template
ll N, A;
ll ok(ll K){
    ll per = 1;
    ll ret = LONG_LONG_MAX;
    ll time = 0;
    while(1){
        if(N <= per * (2 * K + A)){
            ret = min(ret, time + (N - 1) / per + 1);
        }
        if(N <= per * (K + A)){
            ret = min(ret, time + (N - 1) / per + 1);
//            time += (N - 1) / per + 1;
            break;
        }
        time += K + A;
        per *= K;
        if(time > N) return -1;
    }
    if(ret > N ) return -1;
    return ret;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    // source code
    
    
    cin >> N >> A;
    ll l = 2, r = N + 1;
    while(l + 2 < r){
        ll lb = (2 * l + r) / 3;
        ll rb = (l + 2 * r) / 3;
//        ll mid = (l + r) / 2;
        if(ok(rb) == -1){
            r = rb;
            continue;
        }
        if(ok(lb) == -1){
            l = lb;
            continue;
        }
        
        if(ok(lb) < ok(rb)) r = rb;
        else l = lb;
    }
//    cout << l <<  "," << r << endl;
    ll ret = ok(l);
    if(ok(l + 1) != -1){
        ret = min(ret, ok(l + 1));
    }
    
    
//    for(ll k = 2; k <= 100; k++){
//        ll n = N;
//        ll per = 1;
//        ll time = 0;
//        while(1){
//            if(n <= per * (k + A)){
//                time += (n - 1) / per + 1;
//                break;
//            }
//            time += k + A;
//            per *= k;
//        }
//        m = min(m, time);
//    }
    
    output(ret);
    
    
    return 0;
}

Compiler output:
a.cc: In function 'll ok(ll)':
a.cc:34:14: error: 'LONG_LONG_MAX' was not declared in this scope
   34 |     ll ret = LONG_LONG_MAX;
      |              ^~~~~~~~~~~~~
Language: C++

#include "iostream"

using namespace std;
long long int N,A;
long long int dis;
long long int time;
long long int num;
long long int gain = 1;

int main() {
	cin >> N >>A;
	if (A == 1)dis = 2;
	else dis = A;
	while (num < N) {
		if ((N - 1) / gain + 1 < (N - 1) / (gain*dis) + dis * 2) {
			time += (N - 1) / gain + 1;
			num = N;
		}
		else {
			time += dis * 2;
			gain *= dis;
		}
	}
	cout << time << "\n";
	return 0;
}

Compiler output:
a.cc:6:15: error: 'long long int time' redeclared as different kind of entity
    6 | long long int time;
      |               ^~~~
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:16:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   16 |                         time += (N - 1) / gain + 1;
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
a.cc:16:30: error: assignment of read-only location 'time'
a.cc:20:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   20 |                         time += dis * 2;
      |                         ~~~~~^~~~~~~~~~
a.cc:20:30: error: assignment of read-only location 'time'
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <string.h>
#include <stack>
#include <assert.h>
#include <bitset>
#define Endl endl
#define mp make_pair
#define ll long long 
#define ull unsinged long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define over(A) {cout<<A<<endl;exit(0);}
#define all(A) A.begin(),A.end()
#define ceil(a,b) ((a-1)/b+1)
#define srand() mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rand(l,r) uniform_int_distribution<int>(l,r)(rng)
template <typename T1,typename T2> inline void chmin(T1 &x,T2 b) {if(b<x) x=b;}
template <typename T1,typename T2> inline void chmax(T1 &x,T2 b) {if(b>x) x=b;}
const int inf=1039074182;
const int mod=1e9+7;
using namespace std;
int dp[305][305][305];
int n,m;

namespace combinatorics
{
	int *fac;
	int *ifac;
	int __Tmod;
	inline int add(int a,int b)
	{
		return (a+b)%__Tmod;
	}
	inline int sub(int a,int b)
	{
		return (a-b+__Tmod)%__Tmod;
	}
	inline int mult(int a,int b)
	{
		return (1LL*a*b)%__Tmod;
	}
	inline int fastpow(int basic,int x)
	{
		if(x==0) return 1;
		int res=1;
		while(x)
		{
			if(x&1)	res=mult(res,basic);
			basic=mult(basic,basic);
			x>>=1;
		}
		return res;
	}
	inline int inv(int x)
	{
		return fastpow(x,__Tmod-2);
	}
	void init(int n,int tmod)
	{
		__Tmod=tmod;
		fac=new int[n+5];
		ifac=new int[n+5];
		fac[0]=1;
		for(int i=1;i<=n;i++)
		{
			fac[i]=mult(fac[i-1],i);
		}
		ifac[n]=inv(fac[n]);
		for(int i=n-1;i>=0;i--)
		{
			ifac[i]=mult(ifac[i+1],i+1);
		}
	}
	inline int C(int n,int m)
	{
		return mult(mult(fac[n],ifac[m]),ifac[n-m]);
	}
	inline int Cat(int x)
	{
		return mult(C(x*2,x),inv(x+1));
	}
};
using namespace combinatorics;

template <typename T1,typename T2> upadd(T1 &a,T2 b) {a+=b;if(a>=mod) a-=mod;}

int main()
{
//	freopen("input.txt","r",stdin);
	cin>>n>>m;
	init(300,1e9+7);
	dp[0][1][1]=1;
	for(int i=0;i<m;i++)
	{
		for(int j=1;j<=min(i+1,n);j++)
		{
			for(int k=1;k<=j;k++)
			{
				int now=dp[i][j][k];
				upadd(dp[i+1][j][j],mult(now,k));
				upadd(dp[i+1][j][k],mult(now,j-k));
				upadd(dp[i+1][j+1][k],mult(now,n-j));
			}
		}
	}
	cout<<dp[m][n][n]<<endl;
	return 0;
}

Compiler output:
a.cc:94:36: error: ISO C++ forbids declaration of 'upadd' with no type [-fpermissive]
   94 | template <typename T1,typename T2> upadd(T1 &a,T2 b) {a+=b;if(a>=mod) a-=mod;}
      |                                    ^~~~~
a.cc: In function 'int upadd(T1&, T2)':
a.cc:94:78: warning: no return statement in function returning non-void [-Wreturn-type]
   94 | template <typename T1,typename T2> upadd(T1 &a,T2 b) {a+=b;if(a>=mod) a-=mod;}
      |                                                                              ^
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<functional>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
using namespace std;
#define MOD 1000000007
#define f(i,n) for(long long i=0;i<(long long)(n);i++)
#define N (long long)210000



int p[N];
int d[N];

void init(void) {
	f(i, N) {
		p[i] = i;
		d[i] = 1;
	}
	return;
}

long long pa(long long x) {
	if (p[x] == x)return x;
	else return p[x] = pa(p[x]);
}


void uni(long long x, long long y) {
	long long px = pa(x);
	long long py = pa(y);
	if (px == py)return;
	if (d[px] < d[py]) {
		p[px] = py;
		d[py] = max(d[py], d[px] + 1);
	}
	else {
		p[py] = px;
		d[px] = max(d[px], d[py] + 1);
	}
	return;
}

bool jud(long long x, long long y) {
	long long px = pa(x);
	long long py = pa(y);
	if (px == py)return true;
	else return false;
}



int main() {
	init();
	vector<pair<long long, pair<long long, long long> > >a;
	long long e[N];
	long long b[N];
	f(i, N) {
		e[i] = -1;
		b[i] = -1;
	}
	long long n, k, m;
	long long x, y, z;
	long long xx, yy, zz, nn, aa;
	long long s, ans;
	bool v = true;
	ans = 0;
	scanf_s("%lld %lld", &n, &m);
	f(i, m) {
		scanf_s("%lld %lld %lld", &x, &y, &z);
		a.push_back(make_pair(z, make_pair(x, y)));
		a.push_back(make_pair(z + 1, make_pair(x + 1, y)));
	}
	sort(a.begin(), a.end());
	xx = 0;
	yy = 1;
	zz = a[0].first;
	nn = 0;
	aa = 0;
	while (true) {

		if ((zz - a[0].first) % 2 == 0) {
			if (aa < a.size()) {
				while (a[aa].first == zz) {
					e[xx] = aa + 2;
					b[aa + 2] = xx;
					xx = aa + 2;
					aa++;
					if (aa >= a.size())break;
				}
			}
			k = 0;
			while (true) {
				k = e[k];
				if (k == -1)break;
				x = (a[k - 2].second.first + ((zz - a[k - 2].first) / 2)) % n;
				y = (a[k - 2].second.second + ((zz - a[k - 2].first) / 2)) % n;
				z = zz;
				v = jud(x, y);
				if (!v) {
					uni(x, y);
					ans += zz;
					nn++;
					if (nn + 1 == n)break;
				}
				else {
					e[b[k]] = e[k];
					if (e[k] == -1)xx = b[k];
					else b[e[k]] = b[k];

				}
			}
			if (nn + 1 == n)break;
		}
		else {
			if (aa < a.size()) {
				while (a[aa].first == zz) {
					e[yy] = aa + 2;
					b[aa + 2] = yy;
					yy = aa + 2;
					aa++;
					if (aa >= a.size())break;
				}
			}
			k = 1;
			while (true) {
				k = e[k];
				if (k == -1)break;
				x = (a[k - 2].second.first + ((zz - a[k - 2].first) / 2)) % n;
				y = (a[k - 2].second.second + ((zz - a[k - 2].first) / 2)) % n;
				z = zz;
				v = jud(x, y);
				if (!v) {
					uni(x, y);
					ans += zz;
					nn++;
					if (nn + 1 == n)break;
				}
				else {
					e[b[k]] = e[k];
					if (e[k] == -1)yy = b[k];
					else b[e[k]] = b[k];

				}
			}
			if (nn + 1 == n)break;
		}
		zz++;
		if (nn + 1 == n)break;
	}


	printf("%lld\n", ans);


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   75 |         scanf_s("%lld %lld", &n, &m);
      |         ^~~~~~~
      |         scanf
Language: C++

#pragma GCC optimize("O3")
#pragma GCC target("sse4");
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
using namespace std;
using llong = long long;

llong n, k;

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

    llong ans = 0;
    for (int i = 1; i <= n - 2; i++) {
        for (int j = 1; j <= 5; j++) {
            if ((63 * i + 9 * j + 9) % 11 == k) ans++;
        }
    }

    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc:2:27: error: '#pragma GCC target' string is badly formed
    2 | #pragma GCC target("sse4");
      |                           ^
a.cc:2:27: error: '#pragma GCC target' string is badly formed
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int n,f,s[14][8],t,h,ans;
int main()
{
  scanf("%d%d",&n,&f);
  for(int i=1;i<=11;i++)
    for(int j=1;j<=7;j++)
    {
      t++;
      s[i][j]=t;
    }
  for(int i=1;i<=11;i++)
    for(int j=1;j<=7-3+1;j++)
    {
      t=0;
      for(int k=0;k<3;k++)
        for(int l=0;l<3;l++)
          t+=s[(i+k-1)%11+1][j+l];
      if(t%11==f)h++;
    }
  ans+=max(0,(n/11-1))*h;
  if(n/11>0)n-=(n/11-1)*11;
  for(int i=1;i<=n-3+1;i+=)
    for(int j=1;j<=7-3+1;j++)
    {
      t=0;
      for(int k=0;k<3;k++)
        for(int l=0;l<3;l++)
          t+=s[(i+k-1)%11+1][j+l];
      if(t%11==f)ans++;
    }
  printf("%d\n",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:27: error: expected primary-expression before ')' token
   26 |   for(int i=1;i<=n-3+1;i+=)
      |                           ^
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:15:8: error: reference to 'map' is ambiguous
   15 |     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]={
      |     ^~~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int ca[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(ca[i][j]==k) ans++;
    printf("%d\n",ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |     scanf("%d%d",&n,&k);
      |                   ^
      |                   yn
a.cc:9:22: error: 'k' was not declared in this scope
    9 |     scanf("%d%d",&n,&k);
      |                      ^
a.cc:10:14: error: 'p' was not declared in this scope
   10 |         n-=2,p=n%11,n/=11;
      |              ^
a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     ans=n*5;
      |     ^~~
      |     abs
Language: C++

[1 input]:
7 7
[1 output]:
2
[2 input]:
6 0
[2 output]:
2
[3 input]:
18 10
[3 output]:
7
[4 input]:
45
[4 output]:
7 7
[5 input]:
2
[5 output]:
6 0
[6 input]:
2
[6 output]:
18 10
[7 input]:
7
[7 output]:
45


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

#include<bits/stdc++.h>
using namespace std;
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()
{
	int n,k,ans=0;
	cin>>n>>k;
	for(int i=2;i<n;i++)
		for(int j=2;j<7;j++)
		{
			if(map[i][j]==k)ans++;
		}
	cout<<ans<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: reference to 'map' is ambiguous
   22 |                         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:3:5: note:                 'int map [12][6]'
    3 | int map[12][6]={
      |     ^~~
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:12:10: error: reference to 'map' is ambiguous
   12 |       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},{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}};
      |     ^~~
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:23:10: error: reference to 'map' is ambiguous
   23 |       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]={
      |     ^~~