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

#include<iostream>
#include<algorithm>
#include<vector>
#define REP(i, N) for(ll i = 0; i < N; ++i)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;

int main(void) {
	int n, m;
	cin>>n>>m;
	vector<P> arm(m);
	REP(i, m) {
		cin>>arm[i].first>>arm[i].second;
		--arm[i].second;
	}
	sort(ALL(arm));
	vector<P> rng(n);
	REP(i, n) {
		rng[i].first = i;
		rng[i].second = i;
	}
	REP(i, m) {
		rng[arm[i].second].second = max(rng[arm[i].second].second, rng[arm[i].second + 1].second);
		rng[arm[i].second + 1].first = min(rng[arm[i].second + 1].first, rng[arm[i].second].first);
	}
	REP(i, n) {
		cout<<rng[i].second - rng[i].first + 1<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: 'ALL' was not declared in this scope
   17 |         sort(ALL(arm));
      |              ^~~
Language: C++

#include<iostream>
#include<cstdlib>
#include<algorithm>
#include<cstdio> 
#include<cstring>
using namespace std;
int m,n;
int ans[200100],len[200100][1]/*0?和上?1?和下?*/;
struct node
{
	int x,y;
}a[200100];
bool compare(node a,node b)
{
	return a.x<b.x;
}
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	scanf("%d%d",&a[i].x,&a[i].y);
	sort(a+1,a+1+m,compare);
	for(int i=1;i<=n;i++)
	ans[i]=1;
	
	for(int j=1;j<=m;j++)
    {    
      //   printf("%d %d\n",ans[a[j].y],ans[a[j].y+1]);
	     if(!len[a[j].y+1][0])ans[a[j].y]=ans[a[j].y+1]=ans[a[j].y]+ans[a[j].y+1];
	     else ans[a[j].y]=ans[a[j].y]+ans[a[j].y+1]-len[a[j].y][1];
	     len[a[j].y+1][0]=len[a[j].y][1]=ans[a[j].y];
	}
	for(int i=1;i<=n;i++)
    {
	if(i!=n)printf("%d ",ans[i]);
	else printf("%d",ans[i])
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:33: error: expected ';' before '}' token
   36 |         else printf("%d",ans[i])
      |                                 ^
      |                                 ;
   37 |         }
      |         ~
Language: C++

#include <iostream>
#include <vector>
#include <utility>
using namespace std;

int main(){
	int n,m;
	cin >> n >> m;
	
	vector<pair<int,int> > arm(m);
	for(int i=0; i<m; i++){
		int x,y;
		cin >> x >> y;
		arm[i]=make_pair(x,y);
	}
	sort(arm.begin(), arm.end());
	
	vector<int> ub(n+1), lb(n+1);
	for(int i=0; i<=n; i++){
		ub[i] = lb[i] = i;
	}
	for(int i=0; i<m; i++){
		int lane = arm[i].second;
		ub[lane] = ub[lane+1];
		lb[lane+1] = lb[lane];
	}
	
	for(int i=1; i<n; i++){
		cout << ub[i]-lb[i]+1 << " ";
	}
	cout << ub[n]-lb[n]+1 << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |         sort(arm.begin(), arm.end());
      |         ^~~~
      |         short
Language: C

#include <iostream>
#include <cstring>
#include <vector>
#include <map>
using namespace std;

string a, b;
vector<int> cnt;
int n, ans;
map<vector<int>, bool> c;

int main() {
	cin >> a >> b; n = a.size();
	a = '!' + a; b = '!' + b;
	cnt.assign(26, 0);
	for(int i = 1; i <= n; ++i) {
		for(int j = 0; j < 26; ++j) cnt[j] = 0;
		for(int j = i; j <= n; ++j) {
			cnt[a[j] - 'a']++;
			c[cnt] = true;
		}
	}
	for(int i = 1; i <= n; ++i) {
		for(int j = 0; j < 26; ++j) cnt[j] = 0;
		for(int j = i; j <= n; ++j) {
			cnt[b[j] - 'a']++;
			if(c[cnt]) ans = max(ans, j - i + 1);
		}
	}
	cout << ans;
}

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

/*input
anagram
grandmother
*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
#define rep(i,a,b) for(int (i) = (a); (i) < (b); ++(i))
#define mset(x, v) memset((x), (v), sizeof (x) )
#define buff() ios::sync_with_stdio(0);cin.tie(0)
#define sz(x) ( (int) (x).size() )

using vi  = vector<int>;
using ll  = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using vll = vector<ll>;
using pll = pair<ll, ll>;
using vvi = vector<vi>;

namespace std { 
    template<> struct hash<pair<int, int> > { 
        size_t operator() (const pair<int, int>& key) const {
            return hash<int>()(key.first) + hash<int>()(key.second);
        }
    };
}

constexpr int mod = 1000000007;
constexpr int inf = 0x3f3f3f3f;

inline ll powmod(ll a, ll b) {
    ll res = 1;
    a %= mod;
    assert(b >= 0);
    for(;b;b>>=1) {
        if(b&1) res = (res * a) % mod;
        a = (a*a) % mod;
    }
    return res;
}

int mul(int a, int b, int p) {
    ll x = a, y = b, z = p;
    return (x * y) % z;
}

array<int, 2> primes = {mod, mod + 16};
array<int, 4001> alphaSize[2];
array<int, 2> val = {0, 0};

struct rollingHash {
    int alpha;
    rollingHash(int alphaSz = 26) {
        alpha = alphaSz;
        rep(i,0,2) {
            alphaSize[i][0] = 1;
            rep(j,1,alpha) alphaSize[i][j] = mul(alphaSize[i][j-1], alpha, primes[i]);
        }
    }
    void addC(char& c) {
        int idx = c - 'a';
        rep(i,0,2) val[i] = ( val[i] + alphaSize[i][idx] ) % primes[i];
    }
    void clear() {
        val[0] = 0ll;
        val[1] = 0ll;
    }
};

string a, b;
unordered_set<pii> memo;
rollingHash rk(256);

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin >> a >> b;
    int lenA = sz(a), lenB = sz(b);
    rep(st, 0, lenA) {
        rk.clear();
        rep(x, st, lenA) {
            rk.addC(a[x]);
            memo.insert(make_pair(rk.val[0], rk.val[1]) );
        }
    }
    int ans = 0;
    rep(st, 0, lenB) {
        rk.clear();
        rep(x, st, lenB) {
            rk.addC(b[x]);
            if(memo.find(make_pair(rk.val[0], rk.val[1]) ) != memo.end() ) {
                ans = max(ans, x - st + 1);
            }
        }
    }
    cout << ans << endl;
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:88:38: error: 'struct rollingHash' has no member named 'val'
   88 |             memo.insert(make_pair(rk.val[0], rk.val[1]) );
      |                                      ^~~
a.cc:88:49: error: 'struct rollingHash' has no member named 'val'
   88 |             memo.insert(make_pair(rk.val[0], rk.val[1]) );
      |                                                 ^~~
a.cc:96:39: error: 'struct rollingHash' has no member named 'val'
   96 |             if(memo.find(make_pair(rk.val[0], rk.val[1]) ) != memo.end() ) {
      |                                       ^~~
a.cc:96:50: error: 'struct rollingHash' has no member named 'val'
   96 |             if(memo.find(make_pair(rk.val[0], rk.val[1]) ) != memo.end() ) {
      |                                                  ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long  ll;

map<vector<int>> memo;

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

    string s1, s2;

    cin >> s1 >> s2;
    const int n1 = s1.size(), n2 = s2.size();

    for (int i = 0; i < n1; ++i) {
        vector<int> cnt(26, 0);
        for (int j = i; j < n1; ++j) {
            ++cnt[(int)(s1[j] - 'a')];
            memo.insert(cnt);
        }
    }

    int ans = 0;
    for (int i = 0; i < n2; ++i) {
        vector<int> cnt(26, 0);
        for (int j = n2 - 1; i <= j; --j) {
            if (j - i + 1 <= ans)
                break;
            ++cnt[(int)(s2[j] - 'a')];
            if (memo.count(cnt) != 0) {
                ans = max(ans, j - i + 1);
                break;
            }
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc:7:15: error: wrong number of template arguments (1, should be at least 2)
    7 | map<vector<int>> memo;
      |               ^~
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: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc: In function 'int main()':
a.cc:23:18: error: request for member 'insert' in 'memo', which is of non-class type 'int'
   23 |             memo.insert(cnt);
      |                  ^~~~~~
a.cc:34:22: error: request for member 'count' in 'memo', which is of non-class type 'int'
   34 |             if (memo.count(cnt) != 0) {
      |                      ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <set>
using namespace std;

int main() {
  string s, t;
  cin>>s>>t;

  set<vector<uint16_t>> m;
  vector<uint16_t> v(26, 0);
  for (int i = 0; i < s.length(); ++i) {
    for (int k = 0; k < 26; ++k) v[k] = 0;
    for (int j = 1; j < s.length() - i + 1; ++j) {
      v[s[i + j - 1] - 'a']++;
      m.insert(v);
    }
  }

  int ans = 0;
  for (int i = 0; i < t.length(); ++i) {
    for (int k = 0; k < 26; ++k) v[k] = 0;
    for (int j = 1; j < t.length() - i + 1; ++j) {
      v[t[i + j - 1] - 'a']++;
      if (m.find(v) != m.end()) ans = max(ans, j);
    }
  }

  cout << ans << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'uint16_t' was not declared in this scope
   11 |   set<vector<uint16_t>> m;
      |              ^~~~~~~~
a.cc:5:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    4 | #include <set>
  +++ |+#include <cstdint>
    5 | using namespace std;
a.cc:11:14: error: template argument 1 is invalid
   11 |   set<vector<uint16_t>> m;
      |              ^~~~~~~~
a.cc:11:14: error: template argument 2 is invalid
a.cc:11:22: error: template argument 1 is invalid
   11 |   set<vector<uint16_t>> m;
      |                      ^~
a.cc:11:22: error: template argument 2 is invalid
a.cc:11:22: error: template argument 3 is invalid
a.cc:12:18: error: template argument 2 is invalid
   12 |   vector<uint16_t> v(26, 0);
      |                  ^
a.cc:12:27: error: expression list treated as compound expression in initializer [-fpermissive]
   12 |   vector<uint16_t> v(26, 0);
      |                           ^
a.cc:14:35: error: invalid types 'int[int]' for array subscript
   14 |     for (int k = 0; k < 26; ++k) v[k] = 0;
      |                                   ^
a.cc:16:8: error: invalid types 'int[int]' for array subscript
   16 |       v[s[i + j - 1] - 'a']++;
      |        ^
a.cc:17:9: error: request for member 'insert' in 'm', which is of non-class type 'int'
   17 |       m.insert(v);
      |         ^~~~~~
a.cc:23:35: error: invalid types 'int[int]' for array subscript
   23 |     for (int k = 0; k < 26; ++k) v[k] = 0;
      |                                   ^
a.cc:25:8: error: invalid types 'int[int]' for array subscript
   25 |       v[t[i + j - 1] - 'a']++;
      |        ^
a.cc:26:13: error: request for member 'find' in 'm', which is of non-class type 'int'
   26 |       if (m.find(v) != m.end()) ans = max(ans, j);
      |             ^~~~
a.cc:26:26: error: request for member 'end' in 'm', which is of non-class type 'int'
   26 |       if (m.find(v) != m.end()) ans = max(ans, j);
      |                          ^~~
Language: C++

#include <iostream>
#include <vector>
#include <set>

using namespace std;

using ull = unsigned long long;
constexpr int MAX = 4000;
constexpr ull B = 100000007ULL;

vector<vector<int>> make(const string& str)
{
    int N = str.size();
    vector<vector<int>> cnt(N + 1, vector<int>(26));
    for (int i = 0; i < N; i++) {
        cnt[i + 1][str[i] - 'a']++;
        for (int j = 0; j < 26; j++) {
            cnt[i + 1][j] += cnt[i][j];
        }  
    }
    return cnt;
}

ull get_hash(int len, int s,
             const vector<vector<int>>& cnt)
{
    auto l = cnt[s];
    auto r = cnt[s + len];
    
    ull res = 1;
    for (int i = 0; i < 26; i++) {
        res = res * B + (r[i] - l[i]);
    }
    return res;
}

int main()
{
    string S, T;
    cin >> S >> T;
    
    if (S.size() < T.size()) swap(S, T);

    int s = S.size(), t = T.size();
    
    auto sc = make(S);
    auto tc = make(T);
    
    vector<ull> vec[MAX + 1];
    for (int i = s; i >= 1; i--) {
        for (int j = 0; j <= s - i; j++) {
            vec[i].emplace_back(get_hash(i, j, sc));
        }
        sort(vec[i].begin(), vec[i].end());
        vec[i].erase(unique(vec[i].begin(), vec[i].end()), vec[i].end());
    }    
    
    int res = 0;
    for (int i = t; i >= 1; i--) {
        for (int j = 0; j <= t - i; j++) {
            if (binary_search(vec[i].begin(), vec[i].end(), get_hash(i, j, tc))) {
                res = max(res, i);
            }
        }
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   54 |         sort(vec[i].begin(), vec[i].end());
      |         ^~~~
      |         short
a.cc:55:22: error: 'unique' was not declared in this scope
   55 |         vec[i].erase(unique(vec[i].begin(), vec[i].end()), vec[i].end());
      |                      ^~~~~~
a.cc:61:17: error: 'binary_search' was not declared in this scope
   61 |             if (binary_search(vec[i].begin(), vec[i].end(), get_hash(i, j, tc))) {
      |                 ^~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <stdio.h>
#define ff(i,x,y)for(int i=x;i<y+1;i++)
#define fs(i,x,y)for(int i=x;i>y-1;i--)
#define all(x) x.begin(),x.end()
#define Ins(x) inserter(x,x.begin())
using namespace std;
char s1[4010],s2[4010];
int len1,len2,pre1[30][4010],pre2[30][4010];
unsigned long long now1,now2;
const unsigned long long mod1=1e9+7,seed1=772002,seed2=102929,mod2=1e9+9;
map<unsigned long long,int>hash1,hash2;
bool check(int len)
{
    //now=0;
    hash1.clear();
    hash2.clear();
    ff(i,1,len1)
    {
        now1=0;now2=0;
        if(i+len-1>len1)
        break;
        ff(j,1,26)
        {
            now1=((now1+pre1[j][i+len-1]-pre1[j][i-1])*seed1)%mod1;
            now2=((now2+pre1[j][i+len-1]-pre1[j][i-1])*seed2)%mod2;
        }
        hash1[now1]=1;
        hash2[now2]=1;
    }
    ff(i,1,len2)
    {
        now1=0;now2=0;
        if(i+len-1>len2)
        break;
        ff(j,1,26)
        {
            now1=((now1+pre2[j][i+len-1]-pre2[j][i-1])*seed1)%mod1;
            now2=((now2+pre1[j][i+len-1]-pre1[j][i-1])*seed2)%mod2;
        }
        if(hash1[now1]&&hash2[now2]=1)
        return true;
    }
    return false;
}
int main()
{
    scanf("%s%s",s1+1,s2+1);
    len1=strlen(s1+1);
    len2=strlen(s2+1);
    ff(i,1,len1)
    pre1[s1[i]-'a'+1][i]++;
    ff(i,1,len2)
    pre2[s2[i]-'a'+1][i]++;
    ff(i,1,26)
    {
        ff(j,2,len1)
        pre1[i][j]+=pre1[i][j-1];
        ff(j,2,len2)
        pre2[i][j]+=pre2[i][j-1];
    }
    int kk=min(len1,len2);
    fs(i,kk,1)
    {
        if(check(i))
        {
            printf("%d\n",i);
            break;
        }
        if(i==1)
        printf("0\n");
    }
    return 0;
}

Compiler output:
a.cc: In function 'bool check(int)':
a.cc:41:23: error: lvalue required as left operand of assignment
   41 |         if(hash1[now1]&&hash2[now2]=1)
Language: C++

#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp> // <-- add!!!
using namespace std;
using namespace boost::multiprecision; // <-- add!!!
const int dx[]={1,0,-1,0,1,-1,-1,1};
const int dy[]={0,1,0,-1,1,1,-1,-1};
const int INF = 1e9;
const long long LINF = 1e18;
const double EPS = 1e-8;
#define pb push_back
#define mk make_pair
#define fr first
#define sc second
#define reps(i,j,k) for(int i = (j); i < (k); ++i)
#define rep(i,j) reps(i,0,j)
#define all(a) (a).begin(),(a).end()
#define MOD 1000000007
typedef long long ll;
typedef pair<ll,ll> Pii;
typedef pair<Pii,int> P;
typedef vector<short> vi;

template<class T>
ostream& operator<<(ostream &out, const vector<T> &v){
	out << "{";
	rep(i,v.size()){
		out << v[i] <<", ";
	}
	return out << "}" << endl;
}
string s,q;
short sumS[27][4001];
short sumQ[27][4001];

cpp_int hash(const vi &v)
{
	cpp_int res = 0;
	cpp_int base = 1;
	rep(i,26){
		res += base * v[i];
		base *= 4000;
	}
	return res;
}

set<cpp_int> memo;



bool insertVi(){
	rep(l,s.size()+1){
		reps(r,l+1,s.size()+1){
			vi a(26);
			rep(k,27){
				a[k] = (sumS[k][r]-sumS[k][l]);
			}
			memo.insert(hash(a));
		}
	}
	return true;
}

int main(){
	
	cin >> s >> q;

	rep(i,s.size()){
		rep(j,26+1){
			sumS[j][i+1] = sumS[j][i] + (s[i]-'a'==j);
		}
	}

	rep(i,q.size()){
		rep(j,26+1){
			sumQ[j][i+1] = sumQ[j][i] + (q[i]-'a'==j);
		}
	}

	insertVi();
	int ans = 0;
	rep(l,q.size()+1){
		reps(r,l+1,q.size()+1){
			vi a(26);
			rep(k,27){
				a[k] = (sumQ[k][r]-sumQ[k][l]);
			}
			set<vi>::iterator it = memo.find(hash(a));
			if(it != memo.end()){
				ans = max(r-l,ans);
			}
		}
	}

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

Compiler output:
a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    2 | #include <boost/multiprecision/cpp_int.hpp> // <-- add!!!
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#!/usr/bin/env python

from collections import deque
import itertools as it
import sys

sys.setrecursionlimit(1000000)

S1 = raw_input()
S2 = raw_input()

m = {}

for i in range(len(S1)):
    lst = [0 for j in range(26)]
    for j in range(i, len(S1)):
        lst[(ord(S1[j]) - ord('a'))] += 1
        m[hash(tuple(lst))] = j - i + 1

ans = 0

for i in range(len(S2)):
    lst = [0 for j in range(26)]
    for j in range(i, len(S2)):
        lst[(ord(S2[j]) - ord('a'))] += 1
        t = hash(tuple(lst))
        if t in m:
            ans = max(ans, m[t])

print ans


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
a.cc:3:1: error: 'from' does not name a type
    3 | from collections import deque
      | ^~~~
a.cc:14:1: error: expected unqualified-id before 'for'
   14 | for i in range(len(S1)):
      | ^~~
Language: C++

#include <bits/stdc++.h>
#define int long long
#define N 310
using namespace std;
const int mod = (1e9)+7;
const double EPS = 1e-8;
const double PI = 6.0 * asin(0.5);
template<class T> T Max(T &a,T b){return a=max(a,b);}
template<class T> T Min(T &a,T b){return a=min(a,b);}

typedef pair<int,int> P;
vector<int> G[N];
int g[N][N],can[N][N];
unordered_set<int> childs[N];

void addChild(int pos,int start,int flag = 0){
  if((!flag && childs[pos].count(start))) return;
  if(pos != start) childs[pos].insert(start);
  can[pos][start] = 1;
  can[start][pos] = -1;
  for(int to:G[pos]) addChild(to,start);
}

void merge(vector<P> &A,vector<P> &B,vector<P> &C,int c){
  if(c == 1) {
    for(P c:C) G[c.second].push_back(c.first), g[c.second][c.first] = 1;
    vector<int> used(N,0);
    for(P c:C){
      if(used[c.seocond]++) continue;
      addChild(c.second,c.second,1);
      for(auto to:childs[c.second]){
        addChild(c.second,to,1);
      }
    }
  }
  
  if(c == -1){
    for(P c:C) B.push_back(c);
    for(P c:C) can[c.first][c.second] = -1;
  }
}

signed main(){
  string a,b;
  cin>>a>>b;
  map<string,int> idx;
  int num = 0; idx[a] = num++, idx[b] = num++;
  int n;
  cin>>n;

  map<P,unordered_set<int> > DB;
  vector<vector<P> > rule;
  for(int i=0;i<n;i++){
    int m;
    cin>>m;
    vector<P> g(m);
    for(int j=0;j<m;j++){
      string a,b;
      cin>>a>>b;
      if(!idx.count(a)) idx[a] = num++;
      if(!idx.count(b)) idx[b] = num++;
      int na = idx[a],nb = idx[b];
      g[j] = P(na,nb);
      DB[P(na,nb)].insert(i);
    }
    rule.push_back(g);
  }
  
  vector<P> A({P(idx[a],idx[b])}),B;
  G[idx[b]].push_back(idx[a]);
  childs[idx[a]].insert(idx[b]);
  
  int K = idx.size();
  vector<int> used(n,0);
  can[idx[a]][idx[b]] = 1;
  can[idx[b]][idx[a]] = -1;

  int update = 1;    
  while(update){
    update = 0;
    for(int i=0;i<K;i++)
      for(int j=0;j<K;j++){
        if(i == j || can[i][j] == 0 || !DB.count(P(i,j))) continue;
        unordered_set<int> &db = DB[P(i,j)];
        for(auto idx:db){
          if(used[idx]++) continue;
          update = 1;
          merge(A,B,rule[idx],can[i][j]);
        }
        DB.erase(P(i,j));
      }
  }
  int ans = 1;
  for(int k=0;k<K;k++)
    for(int i=0;i<K;i++)
      for(int j=0;j<K;j++) g[i][j] |= (g[i][k] && g[k][j]);
  
  for(int i=0;i<K;i++) ans &= (g[i][i] == 0);
  for(P b:B) ans &= !childs[b.first].count(b.second);
  cout<<(ans? "Yes":"No")<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'void merge(std::vector<std::pair<long long int, long long int> >&, std::vector<std::pair<long long int, long long int> >&, std::vector<std::pair<long long int, long long int> >&, long long int)':
a.cc:29:17: error: 'P' {aka 'struct std::pair<long long int, long long int>'} has no member named 'seocond'; did you mean 'second'?
   29 |       if(used[c.seocond]++) continue;
      |                 ^~~~~~~
      |                 second
Language: C

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main()
{
	int k;
	cin>>k;
	int a[500002];
	double tot=1;
	for(int i=1;i<=k;++i)
	{
		int o;
		cin>>o;
		double mm=1/pow(2,o);
		if(tot-mm>=0)
		{
			cout<<"Yes"<<endl;
			tot=tot-mm;
		}
		else cout<<"No"<<endl;
	}
}

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

#include <cmath>
#include <cstdio>
#include <cstring>
#include <bitset>
#define maxn 500300
using namespace std;

bitset<1000000006> S;

int n;
ll a[maxn];




char s[10000];

void read(int &x){
char ch=' ';
while ( ( ch>'9')||(ch<'0') )
    ch=getchar();
int tmp=0;
while ( ( ch<='9')&&(ch>='0') )
{
    tmp=tmp*10+ch-'0';
    ch=getchar();
}
x=tmp;
}

bool full=0;
int tot=0;

int T=0;

int main(){
    scanf("%d",&n);
    for (int i=1;i<=n;i++)
    {
        scanf("%lld",&a[i]);
        //read(a[i]);
        int x=a[i];
        if (full)
            {
                puts("No");
                continue;
            }
        while (S.test(a[i]))
            {
                a[i]--;
                if (a[i]==0)
                    break;
            }
        if (a[i]==0)
            if (tot==x)
                {
                    puts("Yes");
                    full=1;
                }
            else
                puts("No");
        else
            {
                while (x!=a[i])
                    {
                        T++;
                        if (T>i)
                            return 0;
                        S.set(x,0);
                        tot--;
                        x--;
                    }
                tot++;
                S.set(a[i],1);
                puts("Yes");
            }
    }
	return 0;
}

Compiler output:
a.cc:11:1: error: 'll' does not name a type
   11 | ll a[maxn];
      | ^~
a.cc: In function 'int main()':
a.cc:40:23: error: 'a' was not declared in this scope
   40 |         scanf("%lld",&a[i]);
      |                       ^
Language: C++

#include <cmath>
#include <cstdio>
#include <cstring>
#include <bitset>
#define maxn 500300
using namespace std;

bitset<1000000006> S;

int n;
int a[maxn];




char s[10000];

inline void read(int &x) {
    char ch;
    bool flag = false;
    for (ch = getchar(); !isdigit(ch); ch = getchar())if (ch == '-') flag = true;
    for (x = 0; isdigit(ch); x = x * 10 + ch - '0', ch = getchar());
    x = flag ? -x : x;
}

bool full=0;
int tot=0;
int pre=1;

int T=0;

int main(){
    scanf("%d",&n);
    for (int i=1;i<=n;i++)
    {
        //scanf("%d",&x);
        read(a[i]);
        int x=a[i];
        if (full)
            {
                puts("No");
                continue;
            }
        if (a[i]<pre)
            {
                puts("No");
                continue;
            }
        while (S.test(a[i]))
            {
                a[i]--;
                if (a[i]==0)
                    break;
            }
        if (a[i]==0)
            if (tot==x)
                {
                    puts("Yes");
                    full=1;
                }
            else
                puts("No");
        else
            {
                while (x!=a[i])
                    {
                        S.set(x,0);
                        tot--;
                        if (tot<0)
                            return 0;
                        x--;
                    }
                tot++;
                while (S.count(pre))pre++;
                S.set(a[i],1);
                puts("Yes");
            }
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:31: error: no matching function for call to 'std::bitset<1000000006>::count(int&)'
   74 |                 while (S.count(pre))pre++;
      |                        ~~~~~~~^~~~~
In file included from a.cc:4:
/usr/include/c++/14/bitset:1366:7: note: candidate: 'std::size_t std::bitset<_Nb>::count() const [with long unsigned int _Nb = 1000000006; std::size_t = long unsigned int]'
 1366 |       count() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
/usr/include/c++/14/bitset:1366:7: note:   candidate expects 0 arguments, 1 provided
Language: C++

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

using namespace std;
#define pb push_back
#define mk make_pair
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define fi first
#define se second
#define ALL(A) A.begin(), A.end()
#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define REP1(i, n) for(int (i)=1;(i)<=(int)(n);(i)++)
#define fastio ios::sync_with_stdio(0), cin.tie(0)
#define PI 3.1415926535897932
const ll mod = 1000000007;
const int INF = 2123456789;
const double eps = 1e-7;

template<class T> T gcd(T a, T b){if(!b)return a;return gcd(b,a%b);}
const int maxn = 5001000;
int now[maxn];

int main()
{
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    int n;
    scanf("%d", &n);
    int dep = 0, top = -1;
    bool flag = true;
    for(int i = 0; i < n; i++){
        int x;
        scanf("%d", &x);
        if(x >= maxn && flag){
            printf("Yes\n");
            continue;
        }
        if(!flag || x < top || (x == top && x != dep)){
            printf("No\n");
            continue;
        }
        dep = max(dep, x);
        now[x]++;
        bool ok = 1;
        while(now[x] >= 2){
            now[x] = 0;
            if(x == dep)dep--;
            x--;
            now[x]++;
            if(x == 0){
                flag = false;
                break;
            }
        }
        if(top == x - 1)top++, ok = 0;
        if(cnt){
            printf("Yes\n");
        }
        else printf("No\n");
        if(ok){
            for(int j = 1;; j++){
                if(now[j] == 0)break;
                top = j;
            }
        }
    }
    return 0;
}
        /*dep = max(dep, x);
        now[x]++;
        ll cnt = 0;
        for(int j = dep; j >= 0; j--){
            cnt += pow2[dep - j] * now[j];
        }
        //printf("cnt:%d\n", cnt);
        if(cnt > pow2[dep]){
            printf("No\n");
            now[x]--;
        }
        else if(cnt == pow2[dep]){
            flag = false;
            printf("Yes\n");
        }
        else{
            printf("Yes\n");
        }*/

Compiler output:
a.cc: In function 'int main()':
a.cc:72:12: error: 'cnt' was not declared in this scope; did you mean 'int'?
   72 |         if(cnt){
      |            ^~~
      |            int
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define MAX_N 100005
#define MAX_M 100005

int n,m;
int x[MAX_M],y[MAX_M],w[MAX_M];

vector<int> G[MAX_N];
vector<int> g[MAX_N];

vector<int> group[MAX_N];
int id[MAX_N];
bool visited[MAX_N];
vector<int> vd;

int dp[MAX_N];

bool dfs(int pos,int prev,int root){
  id[pos]=root;
  visited[pos]=true;
  group[root].push_back(pos);
  for(int i=0;i<(int)G[pos].size();i++){
    int to=G[pos][i];
    if(to==prev)continue;
    if(i&&to==G[pos][i-1])return true;
    if(visited[to])return true;
    if(dfs(to,pos,root))return true;
  }
  return false;
}

bool check(){
  memset(visited,false,sizeof(visited));
  for(int i=0;i<n;i++){
    if(visited[i])continue;
    if( dfs(i,-1,i) )return true;
  }

  vector< int > deg(n);
  vector< vector<int> > graph(n);
  
  for(int i=0;i<m;i++){
    if(w[i]==1){
      int X=id[ x[i] ];
      int Y=id[ y[i] ];
      if(X==Y)return true;
      graph[X].push_back(Y);
      deg[Y]++;
    }
  }

  queue<int> Q;
  for(int i=0;i<n;i++)
    if(deg[i]==0&&id[i]==i)
      Q.push(i);

  while(!Q.empty()){
    int pos=Q.front();Q.pop();
    vd.push_back(pos);
    for(int to:graph[pos]){
      deg[to]--;
      if(deg[to]==0)Q.push(to);
    }
  }
  
  for(int i=0;i<n;i++)
    if(deg[i]>0)return true;
  
  return false;
}

int d[MAX_N];

void init(int root){
  root=id[root];
  for(int pos:group[root])
    d[pos]=-1;
}

void bfs(int S){
  init(S);
  queue<int> Q;
  Q.push(S);
  d[S]=0;
  while(!Q.empty()){
    int pos=Q.front();Q.pop();
    for(int to:G[pos]){
      if(d[to]!=-1)continue;
      d[to]=d[pos]+1;
      Q.push(to);
    }
  }
}

void update(int root,int dif){
  for(int pos:group[root])
    for(int to:g[pos])
      dp[to]=max(dp[to],d[pos]+dif+1);
}

int solve(int S,int &ans){
  bfs(S);
  update(id[S],dp[S]);
  
  int maxmid=S;
  for(int pos:group[root])
    if(d[pos]+dp[pos]>d[maxmid]+dp[maxmid])
      maxmid=pos;
  ans=max(ans,d[maxmid]+dp[maxmid]);
  return maxmid;
}

  /*
  int res=0;
  bfs(root);
  int maxm=-1,maxmid;
  for(int pos:group[root])
    if(d[pos]+dp[pos]>maxm)maxm=d[pos]+dp[pos],maxmid=pos;
  
  bfs(maxmid);
  update(root,dp[maxmid]);
  for(int pos:group[root])res=max(res,d[pos]+dp[maxmid]);
  
  maxm=-1;
  for(int pos:group[root])
    if(d[pos]+dp[pos]>maxm)maxm=d[pos]+dp[pos],maxmid=pos;

  bfs(maxmid);
  update(root,dp[maxmid]);
  for(int pos:group[root])res=max(res,d[pos]+dp[maxmid]);
  
  return res;
  */


int main(){
  scanf("%d %d",&n,&m);
  for(int i=0;i<m;i++){
    scanf("%d %d %d",&x[i],&y[i],&w[i]);
    x[i]--,y[i]--;
    if(w[i]==1){
      g[x[i]].push_back(y[i]);
    }
    if(w[i]==2){
      G[x[i]].push_back(y[i]);
      G[y[i]].push_back(x[i]);
    }
  }
  
  if( check() ){
    printf("Infinite\n");
    return 0;
  }

  int ans=0;
  for(int root : vd ){
    if(root!=id[root])continue;
    solve(solve(solve(root,ans),ans),ans);
  }
  printf("%d\n",ans);  
  return 0;
}

Compiler output:
a.cc: In function 'int solve(int, int&)':
a.cc:107:21: error: 'root' was not declared in this scope
  107 |   for(int pos:group[root])
      |                     ^~~~
Language: C

#include<iostream>
#include<cstdio>
using namespace std;
#define ll long long
ll a,b,c,d,e,q[1007]={0};
int main(){
	scanf("%lld%lld",&a,&b);
	q[1]=1;
	q[b]=1;
	for (int i=1;i<=a;i++){
		q[i]=q[i]+q[i-2]+q[i-b-1];
	}
	ll ans=0;
	for (int i=1;i<=a;i++) ans+=q[i];
	printf("%lld",ans);
	return 0;
}


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

#include <cstdio>
#include <cstring>

long long dp[111][3];
long long l,k,ans;

int main()
{
	scanf("%lld%lld",&l,&k);
	dp[0][0] = 1;
	ans = 0;
	for (int i = 1; i <= l; i++)
	{
		dp[i][0] = dp[i - 1][1];
		dp[i][1] = dp[i - 1][0];
		if (i >= k) {
			dp[i][1] += dp[i - k][0];
		}
		ans += dp[i][1];
	}
	printf("%lld\n", ans);
}



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

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

typedef long long ll;

using namespace std;

ll get(long m,long n){
  ll ans = 1;
  for(long i = 0; i < n; i++){
      ans*=m-i;
      ans/=(i+1);
  }
  return ans;
}

int main()
{
//    printf("%lld\n", get(1, 0));
    ll l, k;
    scanf("%lld%lld", &l, &k);
    {
        if(k > l) printf("%lld\n", (l+1)/2);
        else if(k == l) printf("%lld\n", (l+1)/2+1);
        else if(k < l)
        {
            ll sum = 0;
            //普通底
            ll le = l-1;//剩余长度
            ll thick = le/(k+1);//厚块个数

            for(ll i = 0; i <= thick; i++)
            {
                ll le_ = (le-i*(k+1))/2;//剩余普通块数
                for(ll j = 0; j <= le_; j++)
                {
                    sum += get((j+i), i);
                }
            }

            //厚底
            le = l-k;//剩余长度
            thick = le/(k+1);//厚块个数

            for(ll i = 0; i <= thick; i++)
            {
                ll le_ = (le-i*(k+1))/2;//剩余普通块数
                for(ll j = 0; j <= le_; j++)
                {
                    sum += get((j+i), i);
                }
            }
            printf("%lld\n", sum);
        }
    }



    return 0;
}



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

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

double C(LL n, LL m)
{
	if(m == 0 || m == n) return 1;
	double ans1 = 1, ans2 = 1;
	for(LL i = m + 1; i <= n; i++) ans1 *= i;
	for(LL i = 1; i <= n - m; i++) ans2 *= i;
	return ans1 / ans2;
}

int main()
{
	int l, k;
	scanf("%d%d", &l, &k);
	int ma;
	if(l & 1) ma = l / 2 + 1;
	else ma = l / 2;
	double sum = 0;
	for(int i = 1; i <= ma; i++){
		for(int j = 0; j <= i; j++){
			if(j * k + i - j + i - 1 > l) break;
			sum += C(i, j);
		}
	}
	printf("%.0lf\n", sum);
	return 0;
}


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


#include <iostream>
#include <cstring>
#include<cstdio>
using namespace std;
long long int c(long long m,long long n)
{
    long long ans=1;
    for(long long k=1; k<=n; k++)
    {
        ans=(ans*(m-n+k))/k;
    }
    return ans;
}
int main()
{
    long long  l, k;
    while(cin >> l >> k)
    {
        long long  i, j;
        long long sum = 0;
        for( i=1; i<=(l+1)/2; i++)
        {
            sum++;
            for( j=1; j<=i; j++ )
            {
                if( i-j+k*j + i-1 > l) break;
                sum += c(i,j);
            }
        }
        printf("%lld\n",sum);
    }
    return 0;



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

/**
* 　　　┏┓　　　┏┓
* 　　┏┛┻━━━┛┻┓
* 　　┃　　　　　　　 ┃
* 　　┃　　　━　　　 ┃
* 　　┃　┳┛　┗┳　┃
* 　　┃　　　　　　　 ┃
* 　　┃　　　┻　　　 ┃
* 　　┃　　　　　　　 ┃
* 　　┗━┓　　　┏━┛Codes are far away from bugs with the animal protecting
* 　　　　┃　　　┃    神兽保佑,代码无bug
* 　　　　┃　　　┃
* 　　　　┃　　　┗━━━┓
* 　　　　┃　　　　　 ┣┓
* 　　　　┃　　　　 ┏┛
* 　　　　┗┓┓┏━┳┓┏┛
* 　　　　　┃┫┫　┃┫┫
* 　　　　　┗┻┛　┗┻┛
**/

#include <bits/stdc++.h>
using namespace std;
const int maxn = 20;
struct Node
{
    int x, y;
    Node(int x=0, int y=0): x(x), y(y) {}
} pt[maxn];

Node vec[maxn*maxn];
int n;
int vis[maxn];
int ins;
int sum;

void dfs(int u)
{
    while(u<n&&vis[u]) u++;
    if(u==n) {
        int thisum=0;
        for(int i=0;i<ins;i++){
            for(int j=i+1;j<ins;j++) {
                if(vec[i].x*vec[j].y==vec[i].y*vec[j].x) {
                    thisum++;
                }
            }
        }
        sum=max(thisum, sum);
        return ;
    }
    vis[u]=1;
    for(int i=0;i<n;i++) {
        if(!vis[i]) {
            vis[i]=1;
            vec[ins++]=Node(pt[i].x-pt[u].x,pt[i].y-pt[u].y);
            dfs(u+1);
            ins--;
            vis[i]=0;
        }
    }
    vis[u]=0;
}

int main()
{
    ///////////freopen("input.txt", "r", stdin);
    while(~scanf("%d", &n)) {
        for(int i=0;i<n;i++) {
            scanf("%d%d", &pt[i].x, &pt[i].y);
        }
        ins=0;
        sum=0;
        memset(vis, 0, sizeof(vis));
        dfs(0);
        cout << sum << endl;
    }
    return 0;
}



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

#include <iostream>
#include <cstring>
#include <map>
#include <vector>
#include <cstdlib>

using namespace std;

struct Pos {
  int x, y;
};

int N;
Pos p[16];
vector<vector<int>> g;

int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x%y);
}

pair<int, int> grad(const Pos&a, const Pos& b) {
  int x = a.x - b.x;
  int y = a.y - b.y;
  int neg = x*y < 0 ? -1 : 1;
  int g = gcd(abs(x), abs(y));
  return make_pair((abs(x)/g), (abs(y)/g)*neg);
}

int cache[32][32][32][1<<16];

int Solve(int i, int j, int c, int used) {
  if (i == g.size()) return 0;
  if (cache[i][j][c][used] >= 0) return cache[i][j][c][used];
  if (j == g[i].size()) return Solve(i+1, 0, 0, used) + c * (c-1) / 2;
  int a = Solve(i, j+1, c, used);
  if ((used & g[i][j]) == 0) {
    a = max(a, Solve(i, j+1, c+1, used | g[i][j]));
  }
  return cache[i][j][c][used] = a;
}

int main() {
  while (cin >> N) {
    memset(cache, -1, sizeof(cache));
    for (int i = 0; i < N; ++i) {
      cin >> p[i].x >> p[i].y;
    }
    map<pair<int, int>, vector<int>> cnt;
    for (int i = 0; i < N; ++i) {
      for (int j = i+1; j < N; ++j) {
	cnt[grad(p[i], p[j])].push_back((1<<i) | (1<<j));
      }
    }
    g.clear();
    for (const auto& kv : cnt) {
      auto& c = kv.second;
      if (c.size() > 1)
	g.push_back(c);
    }
    sort(g.begin(), g.end(), [](const auto& a, const auto& b){ return a.size() > b.size();});
    cout << Solve(0, 0, 0, 0) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   61 |     sort(g.begin(), g.end(), [](const auto& a, const auto& b){ return a.size() > b.size();});
      |     ^~~~
      |     short
Language: C++

#include <iostream>
#include <cstring>
#include <map>
#include <vector>
#include <cstdlib>
#include <algorithm>h

using namespace std;

struct Pos {
  int x, y;
};

int N;
Pos p[16];
vector<vector<int>> g;

int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x%y);
}

pair<int, int> grad(const Pos&a, const Pos& b) {
  int x = a.x - b.x;
  int y = a.y - b.y;
  int neg = x*y < 0 ? -1 : 1;
  int g = gcd(abs(x), abs(y));
  return make_pair((abs(x)/g), (abs(y)/g)*neg);
}

int cache[32][32][32][1<<16];

int Solve(int i, int j, int c, int used) {
  if (i == g.size()) return 0;
  if (cache[i][j][c][used] >= 0) return cache[i][j][c][used];
  if (j == g[i].size()) return Solve(i+1, 0, 0, used) + c * (c-1) / 2;
  int a = Solve(i, j+1, c, used);
  if ((used & g[i][j]) == 0) {
    a = max(a, Solve(i, j+1, c+1, used | g[i][j]));
  }
  return cache[i][j][c][used] = a;
}

int main() {
  while (cin >> N) {
    memset(cache, -1, sizeof(cache));
    for (int i = 0; i < N; ++i) {
      cin >> p[i].x >> p[i].y;
    }
    map<pair<int, int>, vector<int>> cnt;
    for (int i = 0; i < N; ++i) {
      for (int j = i+1; j < N; ++j) {
	cnt[grad(p[i], p[j])].push_back((1<<i) | (1<<j));
      }
    }
    g.clear();
    for (const auto& kv : cnt) {
      auto& c = kv.second;
      if (c.size() > 1)
	g.push_back(c);
    }
    sort(g.begin(), g.end(), [](const auto& a, const auto& b){ return a.size() > b.size();});
    cout << Solve(0, 0, 0, 0) << endl;
  }
}

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

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <cmath>
#include <string>
using namespace std;

#define MAX 100005

int n, t;
int h[MAX];
int c[MAX];
int s[MAX];
int o[MAX];

int main() {
  scanf("%d %d", &n, &t);

  c[1] = 0;
  s[1] = 0;
  scanf("%d", &h[1]);
  for ( int i = 2; i <= n; i++ ) {
    scanf("%d", &h[i]);
    c[i] = h[i - 1] + h[i - 2];
    s[i] = h[i] > h[i - 1] ? 1 : 0;
  }

  // for ( int i = 1; i <= n; i++ ) {
  //   printf("h:%d, c:%d, s:%d\n", h[i], c[i], s[i]);
  // }

  int t; // ????????????
  int p; // ???
  int q; // ?????????
  int temp; // ???????????°
  t = l - c[1];
  p = l / h[1];
  q = l % h[1];
  if ( q == 0 ) {
    p += 1;
  }
  o[1] = p;
  printf("%d", o[1]);
  for ( int i = 2; i <= n; i++ ) {
    t = l - c[i];
    if (s[i] == 1 ) {
      temp = h[i] - h[i - 1];
    } else {
      temp = h[i];
    }
    p = l / temp;
    q = l % temp;
    if ( q == 0 ) {
      p += 1;
    }
    o[i] = p;
    printf("%d\n", o[i]);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:7: error: 'l' was not declared in this scope
   40 |   t = l - c[1];
      |       ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <numeric>
using namespace std;

int M;
vector<int> X, Y;

int nc2(int x){
    if(x < 2)
        return 0;
    return x * (x-1) / 2;
}

int get_counts(map<pair<int, int>, int> &counts){
    int res = 0;
    for(auto p: counts)
        res += nc2(p.second);
    return res;
}

pair<int, int> get_fraction(int i, int j){
    int dx = X[i] - X[j];
    int dy = Y[i] - Y[j];
    int g = __gcd(dx, dy);
    
    return {dx/g, dy/g};
}

int dfs(int idx, int used, map<pair<int, int>, int> &counts){
    if(idx == M){
        return get_counts(counts);
    }
    
    int res = -1;
    if((used >> idx) & 1){
        res = max(res, dfs(idx+1, used, counts));
    }else{
        for(int i=idx+1; i<M; i++) if(((used >> i) & 1) == 0){
            int nused = used;
            nused |= 1 << idx;
            nused |= 1 << i;
            
            pair<int, int> fr = get_fraction(idx, i);
            counts[fr]++;
            res = min(res, dfs(idx+1, nused, counts));
            counts[fr]--;
        }
    }
    return res;
}

int main(){
    cin >> M;
    X.resize(M), Y.resize(M);
    
    for(int i=0; i<M; i++)
        cin >> X[i] >> Y[i];
    
    map<pair<int, int>, int> counts;
    cout << dfs(0, 0, counts) << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'std::pair<int, int> get_fraction(int, int)':
a.cc:26:13: error: '__gcd' was not declared in this scope; did you mean 'std::__detail::__gcd'?
   26 |     int g = __gcd(dx, dy);
      |             ^~~~~
      |             std::__detail::__gcd
In file included from a.cc:4:
/usr/include/c++/14/numeric:134:5: note: 'std::__detail::__gcd' declared here
  134 |     __gcd(_Tp __m, _Tp __n)
      |     ^~~~~
Language: C

#include <cstdio>
#include <cstring>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <vector>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
const int MaxN = 1e5 + 5;

int main() {
    int n, t;
    while(~scanf("%d %d", &n, &t)) {
        LL sum = 0, maxx = 0;
        for(int i = 1; i <= n; i++) {
            LL x; scanf("%lld", &x);
            sum += x, maxx = max(maxx, x);
            LL ans = 1;
            if(sum <= t) ans = floor((t - sum) * 1.0 / maxx) + 2;
            printf("%lld\n", ans);
        }
    }
    return 0;
}


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

import sys
if locals()['__file__'][-2:] == 'py':
    sys.stdin = open('in.txt', 'r')
rd = lambda: map(int, input().split())
n, t = rd()
last = 0
lastsum = 0
ma = 0
lastans = 0x3f3f3f3f3f3f3f3f
for i in range(n):
    nowsb = int(input())
    lastsum += nowsb
    time = t - lastsum
    ma = max(ma, nowsb)
    lastans = time // ma + 2
    last = nowsb
    print(lastans)



Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import sys
      | ^~~~~~
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
    2 | if locals()['__file__'][-2:] == 'py':
      | ^~
main.c:2:13: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    2 | if locals()['__file__'][-2:] == 'py':
      |             ^~~~~~~~~~
main.c:2:33: warning: multi-character character constant [-Wmultichar]
    2 | if locals()['__file__'][-2:] == 'py':
      |                                 ^~~~
main.c:3:22: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    3 |     sys.stdin = open('in.txt', 'r')
      |                      ^~~~~~~~
Language: C++

#include <queue>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <cctype>
#include <list>
#include <map>
#define mem(a, what) memset(a,what,sizeof(a))
#define close_stdio std::ios::sync_with_stdio(false)
#define ULL unsigned long long
#define inf 0x3f3f3f3f
#define minf 0x3f
#define LL long long
#define mian main
#define fre
#define mod
//#define test
#define loc
using namespace std;

const int maxn = 1e5;
struct STUDENT
{
  LL begin, wait, check;
}student[maxn + 3];
LL time;

int main(int argc, char *argv[])
{
  int n, t;
  time = 0;
  scanf("%d%d", &n, &t);
  for(int i = 1; i <= n; ++i)
    {
      scanf("%lld", &student[i].check);
      time += student[i].check;
      student[i].begin = time;
      student[i].wait = student[i].check;
      if(student[i].check < student[i - 1].check)
        student[i].check = student[i - 1].check;

    }
#ifdef test
  for(int i = 1; i <= n; ++i)
    printf("begin = %lld, check = %lld, wait = %lld\n", student[i].begin,
           student[i].check, student[i].wait);
#endif
  for(int i = 1; i <= n; ++i)
    {
      LL temp = t - student[i].begin;
      if(temp <= 0)
        {
          puts("1");
          continue;
        }
      printf("%lld\n", temp / student[i].check + 2);
    }
  return 0;
}



Compiler output:
a.cc:28:4: error: 'long long int time' redeclared as different kind of entity
   28 | LL 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:5:
/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(int, char**)':
a.cc:33:8: error: assignment of function 'time_t time(time_t*)'
   33 |   time = 0;
      |   ~~~~~^~~
a.cc:38:12: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   38 |       time += student[i].check;
      |       ~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:38:12: error: assignment of read-only location 'time'
a.cc:39:26: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'long long int' [-fpermissive]
   39 |       student[i].begin = time;
      |                          ^~~~
      |                          |
      |                          time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}