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

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#define MOD 1000000007
#define mkp make_pair
typedef long long ll;
using namespace std;


string S,T;


typedef pair<ll,ll> Hash;

struct RollingHash {

    ll base1,base2;
    ll mod1,mod2;
    vector<ll> hash1,hash2;
    vector<ll> pow1,pow2;

    RollingHash() : base1(1009), base2(1007), mod1(1000000007), mod2(1000000009) {}

    void init(const string &s) {
        int n = s.size();
        hash1.assign(n+1,0);
        hash2.assign(n+1,0);
        pow1.assign(n+1,1);
        pow2.assign(n+1,1);

        for(int i=0;i<n;i++) {
            hash1[i+1] = (hash1[i]+s[i]) * base1 % mod1;
            hash2[i+1] = (hash2[i]+s[i]) * base2 % mod2;
            pow1[i+1] = pow1[i] * base1 % mod1;
            pow2[i+1] = pow2[i] * base2 % mod2;
        }
    }

    Hash get(int l,int r) {//[l,r)
        ll t1 = ((hash1[r] - hash1[l] * pow1[r-l]) % mod1 + mod1) % mod1;
        ll t2 = ((hash2[r] - hash2[l] * pow2[r-l]) % mod2 + mod2) % mod2;
        return make_pair(t1, t2);
    }
};


bool ok[2000020];

int num[2000020];

int m;
vector<int> p;

int dfs(int now,int d){
    if(num[now]>0) return num[now];
    if(d>m){
        cout<<-1<<endl;
        exit(0);
    }
    if(ok[now]==false) return 0;

    p.push_back(now);
    int nex=(now+T.size())%m;
    int res=dfs(nex,d+1)+1;
    return num[now]=res;
}

int main(){
  cin>>S;
  cin>>T;

  string A=S;
  while(A.size()<T.size()) A+=S;


  m=A.size();
  A+=A;
  RollingHash p;
  RollingHash q;
  p.init(A);
  q.init(T);

  H targ=q.get(0,T.size());

  for(int i=0;i<m;i++){
      H a=p.get(i,i+T.size());
      if(a==targ){
          ok[i]=true;
      }
  }

  int ans=0;

  for(int i=0;i<m;i++){
      ans=max(ans,dfs(i,1));
  }

  cout<<ans<<endl;


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:89:3: error: 'H' was not declared in this scope
   89 |   H targ=q.get(0,T.size());
      |   ^
a.cc:92:8: error: expected ';' before 'a'
   92 |       H a=p.get(i,i+T.size());
      |        ^~
      |        ;
a.cc:93:10: error: 'a' was not declared in this scope
   93 |       if(a==targ){
      |          ^
a.cc:93:13: error: 'targ' was not declared in this scope
   93 |       if(a==targ){
      |             ^~~~
Language: C++

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

#define int long long
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REPS(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i)
#define REV(i, a, b) for (int i = (a); i >= (b); --i)
#define CLR(a, b) memset((a), (b), sizeof(a))
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define INF 1e18
#define fcout cout << fixed << setprecision(12)

using namespace std;

vector<int> makeTable(const string& s) {
    int n = s.size();
    vector<int> ret(n + 1);
    ret[0] = -1;
    int j = -1;
    for (int i = 0; i < n; i++) {
        while (j >= 0 && s[i] != s[j]) j = ret[j];
        j++;
        if (s[i + 1] == s[j]) {
            ret[i + 1] = ret[j];
        } else {
            ret[i + 1] = j;
        }
    }
    return ret;
}

vector<int> kmp(const string& str, const string& word) {
    vector<int> table = makeTable(word), ret;
    int m = 0, i = 0, n = str.size();
    while (m + i < n) {
        if (word[i] == str[m + i]) {
            if (++i == (int) (word.size())) {
                ret.push_back(m);
                m = m + i - table[i];
                i = table[i];
            }
        } else {
            m = m + i - table[i];
            if (i > 0) i = table[i];
        }
    }
    return ret;
}

class FStringsOfEternity {
public:
    static constexpr int kStressIterations = 0;

    static void generateTest(std::ostream& test) {
    }

    set<int> pos;
    vector<bool> used;
    vector<int> memo;
    string u;
    string s, t;

    int dfs(int v) {
        if (memo[v] != -1) return memo[v];

        if (used[v]) {
            return memo[v] = INF;
        }

        used[v] = true;

        if (pos.count(v)) {
            int to = (v + t.size()) % s.size();
            return memo[v] = dfs(to) + 1;
        } else {
            return memo[v] = 0;
        }
    }

    void solve(std::istream& cin, std::ostream& cout) {
        cin >> s >> t;

        u = s;
        while (u.size() < s.size() + t.size()) {
            u += s;
        }

        auto v = kmp(u, t);
        REP(i, v.size()) pos.insert(v[i] % s.size());

        used = vector<bool>(s.size());
        memo = vector<int>(s.size(), -1);

        for (auto i : pos) {
            dfs(i);
        }

        int ans = 0;
        REP(i, s.size()) {
            ans = max(ans, memo[i]);
        }
        if (ans >= INF) ans = -1;

        cout << ans << endl;
    }
};


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

//{{{
#include<algorithm>
#include<cmath>
#include<deque>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<random>
#include<set>
#include<sstream>
#include<sys/time.h>
#include<unordered_map>
#include<unordered_set>
#include<vector>
using ll = long long;
enum : int { M = (int)1e9 + 7 };
enum : ll { MLL = (ll)1e18L + 9 };
using namespace std;
#ifdef LOCAL
#include"rprint2.hpp"
#else
#define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
FUNC(printde) FUNC(printdbe) FUNC(printdwe) FUNC(printdu);
#endif
template <template <class T, class = std::allocator<T>> class V, class E>
istream& operator >> (istream& in, V<E>& v){ for(auto& e : v){ in >> e; } return in; }
//}}}

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    string s; cin >> s;
    string t; cin >> t;
    int n = t.size();
    auto find = [&](string& str){ 
        int ret = 0;
        auto ptr = strstr(str.c_str(), t.c_str());
        ret = ptr != nullptr;
        int cnt = ret;
        printde(str, t, ret);
        while(ptr && *(ptr + n) != 0){
            auto ptr2 = strstr(ptr + n, t.c_str());
            if(ptr2 == ptr + n){
                cnt++;
            }else{
                cnt = 1;
            }
            ret = max(ret, cnt);
            ptr = ptr2;
        }
        return ret;
    };
    s = s + s + s + s + s;
    while(s.size() <= t.size() * 10){
        s += s;
    }
    int a1 = find(s);
    s += s;
    s += s;
    s += s;
    int a2 = find(s);
    if(a1 == a2){
        cout << a1 << '\n';
    }else{
        cout << -1 << '\n';
    }
}


Compiler output:
a.cc: In lambda function:
a.cc:39:20: error: 'strstr' was not declared in this scope
   39 |         auto ptr = strstr(str.c_str(), t.c_str());
      |                    ^~~~~~
a.cc:17:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   16 | #include<unordered_set>
  +++ |+#include <cstring>
   17 | #include<vector>
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
#include <map>
#include <set>
#include <iomanip>
#include <math.h>
#include <stdlib.h>
#include <list>
#include <utility>
#include <memory>
#include <cstring>
#include <fstream>
#include <numeric>
#include <assert.h>
#include <bitset>
#include <ios>
using namespace std;
typedef long long ll;
int n;
const ll MOD1=1e9+7,MOD2=998244353,hasi1=257,hasi2=233;
string s,t;
void read(string &s){
	s="";char ch=getchar();
	for (;ch>'z' || ch<'a';ch=getchar());
	for (;ch>='a' && ch<='z';s+=ch,ch=getchar());
}
int ans=0;
ll h/ash1[32000004],hash2[32000004];
ll hst1[100004],hst2[100004];
ll num1[100004],num2[100004];
int wm[32000004];
int main(){
	read(s),read(t);
	n=s.size();
	while(s.size()<2*t.size())
		s=s+s;
	s=s+s;
	s=s+s;
	s=s+s; 
	hash1[0]=s[0],hash2[0]=s[0];
	for (int i=1;i<s.size();i++)
		hash1[i]=(hash1[i-1]*hasi1+s[i])%MOD1,hash2[i]=(hash2[i-1]*hasi2+s[i])%MOD2; 
	hst1[0]=t[0],hst2[0]=t[0];
	for (int i=1;i<t.size();i++)
		hst1[i]=(hst1[i-1]*hasi1+t[i])%MOD1,hst2[i]=(hst2[i-1]*hasi2+t[i])%MOD2;
	num1[0]=num2[0]=1;
	for (int i=1;i<=t.size();i++)
		num1[i]=num1[i-1]*hasi1%MOD1,num2[i]=num2[i-1]*hasi2%MOD2;
	for (int i=0;i<s.size();i++){
		wm[i]=0;
		if (i-t.size()>=0)if((hash1[i]-hash1[i-t.size()]*num1[t.size()]%MOD1+MOD1)%MOD1==hst1[t.size()-1] &&
							   (hash2[i]-hash2[i-t.size()]*num2[t.size()]%MOD2+MOD2)%MOD2==hst2[t.size()-1]){
									wm[i]=wm[i-t.size()]+1;
							   }
		if (i-t.size()+1==0)
			if(hash1[i]==hst1[t.size()-1] && hash2[i]==hst2[t.size()-1])wm[i]=1;
		ans=max(ans,wm[i]);
	}
	if (ans+1>=s.size()/t.size()){
		cout<<"-1";return 0;
	}
	cout<<ans;
}

Compiler output:
a.cc:40:5: error: expected initializer before '/' token
   40 | ll h/ash1[32000004],hash2[32000004];
      |     ^
a.cc: In function 'int main()':
a.cc:52:9: error: 'hash1' was not declared in this scope; did you mean 'hasi1'?
   52 |         hash1[0]=s[0],hash2[0]=s[0];
      |         ^~~~~
      |         hasi1
a.cc:52:23: error: 'hash2' was not declared in this scope; did you mean 'hasi2'?
   52 |         hash1[0]=s[0],hash2[0]=s[0];
      |                       ^~~~~
      |                       hasi2
Language: C++

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

template<typename T> vector<int> z_algorithm(const int len, const T& in) {
  vector<int> res(len, 0);
  int c = 0;
  for (int i = 1; i < len; ++i) {
    if (i + res[i - c] < c + res[c]) {
      res[i] = res[i - c];
    } else {
      int j = max(0, c + res[c] - i);
      while (i + j < len && in[j] == in[i + j]) j++;
      res[i] = j;
      c = i;
    }
  }
  res[0] = len;
  return res;
}

template<typename T> vector<int> z_algorithm(const T& in) {
  return z_algorithm((int) in.size(), in);
}

template<typename T> vector<int> z_algorithm(const T& in_first, const T& in_second) {
  T combined = T();
  combined.append(in_first);
  combined.append(in_second);
  int n = (int) in_first.size(), m = (int) in_second.size();
  vector<int> v = z_algorithm(n + m, combined);
  vector<int> res(m);
  for (int i = 0; i < m; i++) {
    res[i] = min(n, v[i + n]);
  }
  return res;
}

class UnionFind {
private:
  int siz;
  vector<int> a;

public:
  UnionFind(int x) : siz(x), a(x, -1) {}

  int root(int x) {
    return a[x] < 0 ? x : a[x] = root(a[x]);
  }

  bool unite(int x, int y) {
    x = root(x);
    y = root(y);
    if (x == y) return false;
    siz--;
    if (a[x] > a[y]) swap(x, y);
    a[x] += a[y];
    a[y] =x;
    return true;
  }

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

  int size(int x) {
    return -a[root(x)];
  }
  
  int conneted_component() {
  	return siz;
  }
};

signed main() { 
  ios::sync_with_stdio(false); cin.tie(0);
  string s, t;
  cin >> s >> t;
  int n = (int) s.size(), m = (int) t.size();
  s.append(s);
  s.append(s);
  s.appned(s);
  //while ((int) t.size() * 2 > (int) s.size()) s.append(s);
  vector<int> v = z_algorithm(t, s);
  UnionFind uf(n);
  for (int i = 0; i < n; i++) {
    if (v[i] == m && v[i + m] == m) {
      if (!uf.unite(i, (i + m) % n)) {
        cout << -1 << endl;
        return 0;
      }
    }
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (v[i] == m) ans = max(ans, uf.size(i));
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:82:5: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'appned'; did you mean 'append'?
   82 |   s.appned(s);
      |     ^~~~~~
      |     append
Language: C++

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

template<typename T> vector<int> z_algorithm(const int len, const T& in) {
  vector<int> res(len, 0);
  int c = 0;
  for (int i = 1; i < len; ++i) {
    if (i + res[i - c] < c + res[c]) {
      res[i] = res[i - c];
    } else {
      int j = max(0, c + res[c] - i);
      while (i + j < len && in[j] == in[i + j]) j++;
      res[i] = j;
      c = i;
    }
  }
  res[0] = len;
  return res;
}

template<typename T> vector<int> z_algorithm(const T& in) {
  return z_algorithm((int) in.size(), in);
}

template<typename T> vector<int> z_algorithm(const T& in_first, const T& in_second) {
  T combined = T();
  combined.append(in_first);
  combined.append(in_second);
  int n = (int) in_first.size(), m = (int) in_second.size();
  vector<int> v = z_algorithm(n + m, combined);
  vector<int> res(m);
  for (int i = 0; i < m; i++) {
    res[i] = min(n, v[i + n]);
  }
  return res;
}

class UnionFind {
private:
  int siz;
  vector<int> a;

public:
  UnionFind(int x) : siz(x), a(x, -1) {}

  int root(int x) {
    return a[x] < 0 ? x : a[x] = root(a[x]);
  }

  bool unite(int x, int y) {
    x = root(x);
    y = root(y);
    if (x == y) return false;
    siz--;
    if (a[x] > a[y]) swap(x, y);
    a[x] += a[y];
    a[y] =x;
    return true;
  }

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

  int size(int x) {
    return -a[root(x)];
  }
  
  int conneted_component() {
  	return siz;
  }
};

signed main() { 
  ios::sync_with_stdio(false); cin.tie(0);
  string s, t;
  cin >> s >> t;
  int n = (int) s.size(), m = (int) t.size();
  s.append(s);
  s.append(s);
  a.appned(s);
  //while ((int) t.size() * 2 > (int) s.size()) s.append(s);
  vector<int> v = z_algorithm(t, s);
  UnionFind uf(n);
  for (int i = 0; i < n; i++) {
    if (v[i] == m && v[i + m] == m) {
      if (!uf.unite(i, (i + m) % n)) {
        cout << -1 << endl;
        return 0;
      }
    }
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (v[i] == m) ans = max(ans, uf.size(i));
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:82:3: error: 'a' was not declared in this scope
   82 |   a.appned(s);
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int maxn=5e5+10;
char laz[maxn];
int pi[10*maxn];
bool prefix_function(const string &s,const string &t) {
    ///search t on s
    int m=(int)t.length();
    string ss=t+'#'+s;
    int n = (int)ss.length();
    pi[0]=0;
    for (int i = 1; i < n; i++) {
        int j = pi[i-1];
        while (j > 0 && ss[i] != ss[j])
            j = pi[j-1];
        if (ss[i] == ss[j])
            j++;
        pi[i] = j;
        if(pi[i]==m&&i>m){
            return true;
        }
    }
    return false;
}
string s,t,a,ss,tt;
/**
There exists a non-negative integer j
such that the concatenation of i copies of t
is a substring of the concatenation of j copies of s.
*/


int main(){
    scanf("%s",laz);
    ss=string(laz);
    scanf("%s",laz);
    t=string(laz);
    s=ss;
    while((int)s.length()<=(int)t.length()+(int)ss.length()){
        s+=ss;
    }
    s+=ss;
    pi.resize(2*((int)s.size()+(int)t.size()+1),0);
    int l=1,r=((int)s.length())/((int)t.length()),mid,c=-1;
    while(l<=r){
        mid=(l+r)>>1;
        a=t;
        for(int i=1;i<mid;i++){
            a+=t;
        }
        if(prefix_function(s,a)){
            c=mid;
            l=mid+1;
        }
        else{
            r=mid-1;
        }
    }
    if(c==-1){
       return !printf("0");
    }
    s+=s;
    l=1,r=((int)s.length())/((int)t.length());
    int cc=-1;
    while(l<=r){
        mid=(l+r)>>1;
        a=t;
        for(int i=1;i<mid;i++){
            a+=t;
        }
        if(prefix_function(s,a)){
            cc=mid;
            l=mid+1;
        }
        else{
            r=mid-1;
        }
    }
    if(cc==c){
        return !printf("%d\n",cc);
    }
    else{
        return !printf("-1");
    }
}
/*
    Good Luck
        -Lci70121
*/


Compiler output:
a.cc: In function 'int main()':
a.cc:43:8: error: request for member 'resize' in 'pi', which is of non-class type 'int [5000100]'
   43 |     pi.resize(2*((int)s.size()+(int)t.size()+1),0);
      |        ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int maxn=3e5+10;
bool prefix_function(string s,string t) {
    ///search t on s
    s=t+'#'+s;
    int n = (int)s.length();
    vector<int> pi(n);
    for (int i = 1; i < n; i++) {
        int j = pi[i-1];
        while (j > 0 && s[i] != s[j])
            j = pi[j-1];
        if (s[i] == s[j])
            j++;
        pi[i] = j;
        if(pi[i]==m&&i>m){
            return true;
        }
    }
    return false;
}
string s,t,a,ss,tt;
/**
There exists a non-negative integer j
such that the concatenation of i copies of t
is a substring of the concatenation of j copies of s.
*/


int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    cin>>ss>>t;
    s=ss;
    while((int)s.length()<=(int)t.length()){
        s+=ss;
    }
    s+=s;
    int l=1,r=((int)s.length())/((int)t.length()),mid,c=-1;
    while(l<=r){
        mid=(l+r)>>1;
        a=t;
        for(int i=1;i<mid;i++){
            a+=t;
        }
        if(prefix_function(s,a)){
            c=mid;
            l=mid+1;
        }
        else{
            r=mid-1;
        }
    }
    if(c==-1){
       cout<<"0"<<'\n';
       return 0;
    }
    s+=s;
    s+=s;
    l=1,r=((int)s.length())/((int)t.length());
    int cc=-1;
    while(l<=r){
        mid=(l+r)>>1;
        a=t;
        for(int i=1;i<mid;i++){
            a+=t;
        }
        if(prefix_function(s,a)){
            cc=mid;
            l=mid+1;
        }
        else{
            r=mid-1;
        }
    }
    if(cc==c){
        cout<<cc<<'\n';
    }
    else{
        cout<<-1<<'\n';
    }
}
/*
    Good Luck
        -Lci70121
*/


Compiler output:
a.cc: In function 'bool prefix_function(std::string, std::string)':
a.cc:16:19: error: 'm' was not declared in this scope
   16 |         if(pi[i]==m&&i>m){
      |                   ^
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String S = in.nextLine();
        String T = in.nextLine();
        String S2 = S.concat(S);
        if (!S2.contains(T)) {
            System.out.println(0);
        } else {
            S2.replace(T, "A");
            int count = 0;
            int max = 0;
            for (int i = 0; i < S2.length; i++) {
                if (S2.charAt(i) == 'A') {
                    count++;
                } else {
                    if (count > max) {
                        max = count;
                    }
                    count = 0;
                }
                if (count == S.length() / T.length() && S.length() % T.length() == 0) {
                    max = -1;
                    break;
                }
            }
            System.out.println(max);
        }
    }

Compiler output:
Main.java:31: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

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

using namespace std;

typedef long long ll;

#define sz size()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
#define rep(i,a,b) for(ll i=(a);i<(b);++i)
#define per(i,a,b) for(ll i=b-1LL;i>=(a);--i)
#define clr(a, b) memset((a), (b) ,sizeof(a))
#define ctos(c) string(1,c)
#define print(x) cout<<#x<<" = "<<x<<endl;

#define MOD 1000000007

long long mod[2] = {1000000007,1000000009};
ll hs[2][3000000], pw[2][3000000];

void rolling_hash(string &s){
  ll base = 257;
  memset(hs,0,sizeof(hs));
  memset(pw,0,sizeof(pw));
  rep(i,0,2){
    pw[i][0] = 1;
    hs[i][0] = 0;
    rep(j,0,s.sz){
      pw[i][j+1] = pw[i][j]*base%mod[i];
      hs[i][j+1] = (hs[i][j]*base+s[j])%mod[i];
    }
  }
}

long long hash_(ll l, ll r, ll i){
  return (hs[i][r+1]-(hs[i][l]*pw[i][r-l+1])%mod[i]+mod[i])%mod[i];
}

ll match(ll l1, ll r1, ll l2, ll r2) {
  ll ret = 1;
  rep(i,0,2){
    ret &= hash_(l1,r1,i)==hash_(l2,r2,i);
  }
  return ret;
}

int main(){
  string s1,s2;
  cin>>s1>>s2;
  string ss=s1;
  while(s1.sz<=2000000){
    s1 += ss;
  }
  string s3 = s1+"$"+s2;
  rolling_hash(s3);
  ll p0 = 0;
  ll p1 = s1.sz+1;
  ll p2 = s3.sz;
  ll mx = 0;
  for(int i = 0; i < s1.sz;){
    ll c = 0;
    ll index = i;
    while(match(index,index+s2.sz-1,p1,p2-1)==1){
      c++;
      index+=s2.sz;
      if(index>=s1.sz)break;
    }
    mx = max(mx,c);
    i += c*s2.sz+1;
  }
  if(mx>s1.sz+10){
    cout << -1 << endl;
  }
  else{
    cout << mx << endl;
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){//桁数
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){//最小公倍数
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){//最大公約数
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
signed main(){
  string a,b,c,d;
  int e=0,f=0;
  cin>>b>>a;
  while(a.size()>b.size())
    b+=b;
  c+=b;
  c+=b;
  if(a.size()<=b.size()){
    for(int i=0;i<c.size()-a.size()+1;i++){
      d=c.substr(i, 3);
      if(a==d){
        e++;
        i+=a.size()-1;
      }
      else{
        e=0;
      }
      f=max(f,e);
    }
    if(f==c.size()/a.size())
      cout<<-1<<endl;
    else
      cout<<f<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:81:4: error: expected '}' at end of input
   81 |   }
      |    ^
a.cc:57:14: note: to match this '{'
   57 | signed main(){
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){//桁数
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){//最小公倍数
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){//最大公約数
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
signed main(){
  string a,b,c,d;
  int e=0;f=0;
  cin>>b>>a;
  while(a.size()>b.size())
    b+=b;
  c+=b;
  c+=b;
  if(a.size()<=b.size()){
    for(int i=0;i<c.size()-a.size()+1;i++){
      d=c.substr(i, 3);
      if(a==d){
        e++;
        i+=a.size()-1;
      }
      else{
        e=0;
      }
      f=max(f,e);
    }
    if(f==c.size()/a.size())
      cout<<-1<<endl;
    else
      cout<<f<<endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:59:11: error: 'f' was not declared in this scope
   59 |   int e=0;f=0;
      |           ^
a.cc:81:4: error: expected '}' at end of input
   81 |   }
      |    ^
a.cc:57:14: note: to match this '{'
   57 | signed main(){
      |              ^
Language: Java

import java.util.Scanner;

public class CuCse {
    public static void main(String[] args){
        Scanner inp = new Scanner(System.in);
        String s= inp.nextLine();
        String t= inp.nextLine();
        int k=(s.length()-temp.length()) ;
        k=k/t.length();
        System.out.println(k);
    }
}

Compiler output:
Main.java:3: error: class CuCse is public, should be declared in a file named CuCse.java
public class CuCse {
       ^
Main.java:8: error: cannot find symbol
        int k=(s.length()-temp.length()) ;
                          ^
  symbol:   variable temp
  location: class CuCse
2 errors
Language: C++

#include <bits/stdc++.h>
#define ll int
#define pb push_back
using namespace std;
typedef pair<ll, ll> pll;


string s, t;
ll g[2000005];
bool cy;
ll vis[2000005];
vector<ll> z_function(string s) {
    ll n = (ll) s.length();
    vector<ll> z(n);
    for (ll i = 1, l = 0, r = 0; i < n; ++i) {
        if (i <= r)
            z[i] = min (r - i + 1, z[i - l]);
        while (i + z[i] < n && s[z[i]] == s[i + z[i]])
            ++z[i];
        if (i + z[i] - 1 > r)
            l = i, r = i + z[i] - 1;
    }
    return z;
}
ll n, m;
ll dp[2000006];
stack<ll> S;
void dfs(ll s)
{
        if(cy) return;
        vis[s] = 1;
        if(g[s] != -1) {
                if(vis[g[s]] == 0) dfs(g[s]);
                else if(vis[g[s]] == 1) {
                        cy = true; return;
                }
        }
        vis[s]=2;
        S.push(s);
}
void dfs2(ll s)
{
        dp[s] = 0;
        vis[s] = 1;
        if(g[s] != -1) {
                dp[s]=1;
                if(vis[g[s]] == 0) dfs2(g[s]);
                dp[s] += dp[g[s]];
        }
}
int main()
{
        ios_base::sync_with_stdio(false);
        cin.tie(NULL); cout.tie(NULL);
        cin >> s >> t;
        m= t.length();
        string os = s;
        while(s.length() < t.length()) s = s + os;
        os = s + s;
        os = "$" + os;
        os = t + os;
        n = s.length();
        memset(g,-1,sizeof g);
        vector<ll> z = z_function(os);
        for(ll i=0;i<n;i++) {
                ll I = i + m + 1;
                if(z[I] == m){
                        ll j = i + m;
                        if(j >= n) j -= n;
                        g[i] = j;
                        pp[j] = i;
                }
        }
        //cout << s << endl;
        //for(ll i=0;i<n;i++) cout << g[i] << " "; cout << endl;
        ll ans = 0;
        for(ll i=0;i<n;i++) {
                if(vis[i] == 0 && g[i] != -1) {
                        dfs(i);
                        if(cy) {
                                cout << "-1\n"; return 0;
                        }

                }
        }
        memset(vis, 0, sizeof vis);
        while(S.empty() == false) {
                ll u = S.top();
                S.pop();
                if(vis[u] == 0 && g[u] != -1){
                        dfs2(u);
                        //cout << u << " " << dp[u] << endl;
                        ans = max(ans , dp[u]);
                }
        }
        cout << ans << endl;
        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:71:25: error: 'pp' was not declared in this scope; did you mean 'dp'?
   71 |                         pp[j] = i;
      |                         ^~
      |                         dp
Language: C++

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

int nex[500005],sum;
string s,h;

void getnex(string m)
{
	int k=-1,j=0;
	nex[0] = -1;
	while(j<m.length())
	{
		if(k==-1 || m[k]==m[j])
		{
			k++;
			j++;
			nex[j] = k;
		}
		else
			k = nex[k];
	}
}

int kmp()
{
	int k=0,j=0;
	while(j<h.length())
	{
		if(k==-1 || s[k]==h[j])
		{
			k++;
			j++;
		}
		else
			k = nex[k];
		if(k==s.length())
		{
//			printf("%d %d\n",j-k+1,j);
			sum++;
		}
	}
//	cout<<sum<<endl;
}

int main()
{
	cin>>h>>s;
	if(h.length()>s.length())
	{
		getnex(s);
		kmp();
		cout<<sum<<endl;
	}
	else if(h.length()<s.length())
	{
		swap(h,s);
		getnex(s);
		kmp();
		if(sum>0)
			cout<<-1<<endl;
		else
			cout<<0<<endl;
	}
	else if(h.length()==s.length())
	{
		string tmp=s;
		s *= 2;
		swap(h,s);
		getnex(s);
		kmp();
		if(sum>0)
		{
			cout<<-1<<endl;
			exit(0);
		}
		memset(nex,0,sizeof(nex));
		swap(h,s);
		s = tmp;
		h *= 2;
		getnex(s);
		kmp();
		cout<<sum<<endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int kmp()':
a.cc:43:1: warning: no return statement in function returning non-void [-Wreturn-type]
   43 | }
      | ^
a.cc: In function 'int main()':
a.cc:67:19: error: no match for 'operator*=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   67 |                 s *= 2;
      |                 ~~^~~~
a.cc:79:19: error: no match for 'operator*=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   79 |                 h *= 2;
      |                 ~~^~~~
Language: C

    #include<iostream>
    #include<stdio.h>
    //#include <bits/stdc++.h>
    #include<vector>
    #include<float.h>
    #include<iomanip>
    #include<algorithm>
    #include<string>
    #include<cstring>
    #include<math.h>
    #include<cmath>
    #include<sstream>
    #include<set>
    #include<map>
    #include<queue>
    #include<cassert>
    #include<cmath>
    #include<cstdint>
     
    #define INF 1e9
    #define rep(i,n)for(int i=0;(i)<(int)(n);i++)
    #define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
    #define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
    #define vec(type,n) vector<type>(n)
    #define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
    #define ALL(a)  (a).begin(),(a).end()
    #define chmin(a, b) a = min(a, b)
    #define chmax(a, b) a = max(a, b)
    #define pb push_back
    #define sz size()
     
    using namespace std;
    using ll = long long int;
    using Graph = vector<vector<int>>;
    using P = pair<ll, ll>;
    using Vl = vector<ll>;
     
const int MOD = 1e9 + 7;
const ll ZER = 0;

ll dp1[3010][2], dp2[3010][2];
int main(){
    ll s;
    cin >> s;
    ll a = pow(s, 0.5);
    ll b = (s + a - 1) / a;
    ll c = a * b - s;
    cout << 0 << " " << 0 << " " << a << " " << c << " " << 1 << " " << b << endl;
}



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

#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#include <bits/stdc++.h>
using namespace std;
template<class t> inline t read(t &x){
	char c=getchar();bool f=0;x=0;
	while(!isdigit(c)) f|=c=='-',c=getchar();
	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();
	if(f) x=-x;return x;
}
template<class t,class ...A> inline void read(t &x,A &...a){
	read(x);read(a...);
}
template<class t> inline void write(t x){
	if(x<0) putchar('-'),write(-x);
	else{if(x>9) write(x/10);putchar('0'+x%10);}
}

#define int long long

const int A=1e9,B=1e18;
int S,x1=1e9,x2=1,y1,y2;

signed main(){
	read(S);
	y2=S/x1;
	if(x1*y2<S) y2++;
	y1=x1*y2-S;
	printf("%d %d %lld %lld %lld %lld\n",0,0,x1,y1,x2,y2);
}

Compiler output:
a.cc:21:19: error: 'long long int y1' redeclared as different kind of entity
   21 | int S,x1=1e9,x2=1,y1,y2;
      |                   ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:2:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:27:11: error: assignment of function 'double y1(double)'
   27 |         y1=x1*y2-S;
      |         ~~^~~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <cmath>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <stack>
#include <deque>
#include <set>
#include <map>
#include <queue>
#include <bitset>
#pragma GCC optimize(2)
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
const double eps=1e-5;
const double pi=acos(-1.0);
const int MOD=1e9+7;
const int maxn=1e5+10;

int main ()
{
    ll s;
    scanf("%lld",&s);
    ll x,y;
    if(s>1e9){
        x=s/1e9;
        if(s%1e9!=0)
            x++;
        y=x*1e9-s;
    }
    else{
        x=1;
        y=1e9-s;
    }
    printf("0 0 1 1000000000 %lld %lld",x,y);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:13: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
   31 |         if(s%1e9!=0)
      |            ~^~~~
      |            | |
      |            | double
      |            ll {aka long long int}
Language: C++

#include <bits/stdc++.h>

using namespace std;

long long s;

void Reverse(long long &x){
    int xx = x;
    x = 0;
    while(xx / 10){
        x = x * 10 + xx % 10;
        xx /= 10;
    }
}
int main(){
    cin >> s;
    if (s > 1e9){
        if (s % 1e9){
            printf("0 0 0 1000000000 %d 0", s/1000000000);
            return 0;
        }
        long long x = 1;
        long long temp = s;
        while(temp && x <= 1e10){
            x = x * 10 + temp % 10;
            temp /= 10;
        }
        x /= 10;
        Reverse(x);
        x = 1e9 - x;
        long long x2 = x, y1 = 1;
        long long x1 = 1e9, y2 = (s + x) / 1e9;
        printf("0 0 %lld %lld %lld %lld\n", x1, y1, x2, y2);
    }
    else              
        cout << "0 0 0 " << s << " 1 0" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   18 |         if (s % 1e9){
      |             ~ ^ ~~~
      |             |   |
      |             |   double
      |             long long int
Language: C++

#define ll long long
#define pii pair<int,int>
using namespace std;
const int mod=1e9+7;
ll m,n,a,b,c=1,d=1e9,e;

int main()
{
    std::ios::sync_with_stdio(0); std::cin.tie(0);
	cin>>m;
	if(m<=1000000000) cout<<0<<" "<<0<<" "<<0<<" "<<1<<" "<<m<<" "<<0;
	else
	{
		n=m/1000000000;
		a=m/1000000000+1;
		b=a*1000000000-m;
		cout<<0<<" "<<0<<" "<<a<<" "<<b<<" "<<1<<" "<<1000000000;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'std::ios' has not been declared
    9 |     std::ios::sync_with_stdio(0); std::cin.tie(0);
      |          ^~~
a.cc:9:40: error: 'cin' is not a member of 'std'
    9 |     std::ios::sync_with_stdio(0); std::cin.tie(0);
      |                                        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define ll long long
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin>>m;
      |         ^~~
a.cc:10:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:27: error: 'cout' was not declared in this scope
   11 |         if(m<=1000000000) cout<<0<<" "<<0<<" "<<0<<" "<<1<<" "<<m<<" "<<0;
      |                           ^~~~
a.cc:11:27: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout<<0<<" "<<0<<" "<<a<<" "<<b<<" "<<1<<" "<<1000000000;
      |                 ^~~~
a.cc:17:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#define ll long long
#define pii pair<int,int>
using namespace std;
const int mod=1e9+7;
ll m,n,a,b,c=1,d=1e9,e;

int main()
{
    std::ios::sync_with_stdio(0); std::cin.tie(0);
	cin>>m;
	if(m<=1e9) cout<<0<<" "<<0<<" "<<0<<" "<<1<<" "<<m<<" "<<0;
	else
	{
		n=m/1000000000;
		a=m/1000000000+1;
		b=a*1000000000-m;
		cout<<0<<" "<<0<<" "<<a<<" "<<b<<" "<<1<<" "<<1000000000;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'std::ios' has not been declared
    9 |     std::ios::sync_with_stdio(0); std::cin.tie(0);
      |          ^~~
a.cc:9:40: error: 'cin' is not a member of 'std'
    9 |     std::ios::sync_with_stdio(0); std::cin.tie(0);
      |                                        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define ll long long
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin>>m;
      |         ^~~
a.cc:10:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:20: error: 'cout' was not declared in this scope
   11 |         if(m<=1e9) cout<<0<<" "<<0<<" "<<0<<" "<<1<<" "<<m<<" "<<0;
      |                    ^~~~
a.cc:11:20: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout<<0<<" "<<0<<" "<<a<<" "<<b<<" "<<1<<" "<<1000000000;
      |                 ^~~~
a.cc:17:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

def main():
    s = int(input())
    x1, y1 = 0, 0
    x2, y2 = 1, int(1e9)
    x3, y3 = 0, 0

    l, r = 1, int(1e9)
    while True:
        m = int((l + r) / 2)
        y = m * int(1e9) - s
        if y < 0:
            l = m + 1
        elif y > 1e9:
            r = m - 1
        else:
            x3, y3 = m, y
            break
    if s == int(1e18):
        x2, y2 = 0, int(1e9)
        x3, y3 = int(1e9), 0
    print(x1, y1, x2, y2, x3, y3)


main()


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

#include <bits/stdc++.h>

#define rep(X,N) for(ll X = 0LL; X < (N); X++)
#define ALL(V) (V).begin(),(V).end()
#define endl "\n"

using namespace std;
typedef long long ll;

const double PI = 3.1415926535897932384626;
const ll MODN = 1000000007;
const ll MODN2 = 998244353;
const double EPS = 1e-10;

int main(){

    ll s;
    cin >> s;

    ll x2 = s / 1000000000;
    ll y2 = x % 1000000000;

    if(y2 != 0){
        y2 = 1000000000 - y2;
        x2++;
    }

    cout << "0 0 1 1000000000 " << x2 << " " << y2;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'x' was not declared in this scope; did you mean 'x2'?
   21 |     ll y2 = x % 1000000000;
      |             ^
      |             x2
Language: C++

#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int mod=1e9+7;
ll m,n,t,x,y; 

int main()
{
    std::ios::sync_with_stdio(0); std::cin.tie(0);
    cin>>t;
    if(t==1000000000000000000) cout<<0<<" "<<1000000000<<" "<<1000000000<<" "<<0<<" "<<0<<" "<<0;
    else if(t<=1e9) cout<<0<<" "<<0<<" "<<0<<" "<<t<<" "<<1<<" "<<0;
    else
    {
    	ll a=t/1000000000;
    	a++;
    	ll c=d*1000000000-t;
    	cout<<0<<" "<<0<<" "<<a<<" "<<1<<" "<<c<<" "<<1000000000;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: 'd' was not declared in this scope
   17 |         ll c=d*1000000000-t;
      |              ^
Language: C++

#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int mod=1e9+7;
ll m,n,t,x,y; 

int main()
{
    std::ios::sync_with_stdio(0); std::cin.tie(0);
    cin>>t;
    if(t==1000000000000000000) cout<<0<<" "<<1000000000<<" "<<1000000000<<" "<<0<<" "<<0<<" "<<0;
    else if(t<=1e9) cout<<0<<" "<<0<<" "<<0<<" "<<t<<" "<<1<<" "<<0;
    else
    {
    	ll a=t/1000000000;
    	d++;
    	ll c=d*1000000000-t;
    	cout<<0<<" "<<0<<" "<<a<<" "<<1<<" "<<c<<" "<<1000000000;
	}
	return 0;
}

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

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

int main() {
  int S, X1, X2, X3, Y1, Y2, Y3;
  cin >> S;
  X1 = 0; X2 = 1; X3 = 0;
  Y1 = 0; Y2 = 0; Y3 = (sqrt (S))/1+1;
  
  for (; Y3 == 0; Y3 --){
    
    for (X2 =1; X2*X2 <= S; X2 ++){
      X3 = 0; Y2 = 0;
      if (X2*Y3 - X3*Y2 == S){
        cout << "0 0 " << X2 << " " << Y2 << " " << X3 << " " << Y3 << endl;
      break;
      }
           
      X3 = 1; Y2 =1;
      if (X2*Y3 - X3*Y2 == S){
        cout << "0 0 " << X2 << " " << Y2 << " " << X3 << " " << Y3 << endl;
      break;
      }
      
    }
    
  if (X2*Y3 - X3*Y2 = S) break;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: lvalue required as left operand of assignment
   27 |   if (X2*Y3 - X3*Y2 = S) break;
      |       ~~~~~~^~~~~~~
Language: C++

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

int main() {
  int S, X1, X2, X3, Y1, Y2, Y3;
  cin >> S;
  X1 = 0; X2 = 1; X3 = 0;
  Y1 = 0; Y2 = 0; Y3 = (sqrt (S))/1+1;
  
  for (; Y3 == 0; Y3 --){
    
    for (X2 =1; X2*X2 <= S; X2 ++){
      X3 = 0; Y2 = 0;
      if (X2*Y3 - X3*Y2 = S){
        cout << "0 0 " << X2 << " " << Y2 << " " << X3 << " " << Y3 << endl;
      break;
      }
           
      X3 = 1; Y2 =1;
      if (X2*Y3 - X3*Y2 = S){
        cout << "0 0 " << X2 << " " << Y2 << " " << X3 << " " << Y3 << endl;
      break;
      }
      
    }
    
  if (X2*Y3 - X3*Y2 = S) break;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: lvalue required as left operand of assignment
   14 |       if (X2*Y3 - X3*Y2 = S){
      |           ~~~~~~^~~~~~~
a.cc:20:17: error: lvalue required as left operand of assignment
   20 |       if (X2*Y3 - X3*Y2 = S){
      |           ~~~~~~^~~~~~~
a.cc:27:13: error: lvalue required as left operand of assignment
   27 |   if (X2*Y3 - X3*Y2 = S) break;
      |       ~~~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);++i)
#define sayyes cout<<"Yes"<<endl;
#define sayno cout<<"No"<<endl;
using namespace std;
typedef long long ll;
const double PI=acos(-1);
typedef pair<int,int>P;
const int mod =1e9;

int main()
{
    ll s;
    ll x2,y2,x3,y3;
    cin>>s;
    if(s>mod)
    {
        ll q=s/mod;
        ll r=s%mod;
        x2=mod;
        y2=1;
        x3=mod-r;
        y3=q+1

    }
    else
    {
        x2=s;
        y2=0;
        x3=0;
        y3=1;
    }
    
    


     cout<<0<<" "<<0<<" "<<x2<<" "<<y2<<" "<<x3<<" "<<y3<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:15: error: expected ';' before '}' token
   23 |         y3=q+1
      |               ^
      |               ;
   24 | 
   25 |     }
      |     ~
Language: C

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef map<int,int> mii;
#define pb push_back

/*int pare(int en,int start,int par[])
{
	if(par[en]==start)
	{
		return en;
	}
	pare(par[en],start,par);
}*/

int main()
{
    int tst=1;
    //scanf("%d",&tst);
    while(tst--)
    {
       ll s;
       cin >> s;
		printf("0 0 1 1 0 %lld",s);
    }
    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 <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
  ll S;
  cin >> S;
  cout << "0 0 0 1 " << S << " 0" << endl;
}a

Compiler output:
a.cc:9:2: error: 'a' does not name a type
    9 | }a
      |  ^
Language: C++

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;



int main() {
    ll s;
    cin >> s;//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;



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

    ll x1, y1, x2, y2;
    x1 = 1000000000LL;
    y1 = 1LL;
    y2 = (s+x1-1)/x1;
    x2 = x1-s%x1;
    cout << "0 0" << ' ' << x1 << ' ' << y1 << ' ' << x2 << ' ' << y2 << endl;
}

    ll x1, y1, x2, y2;
    x1 = 1000000000LL;
    y1 = 1LL;
    y2 = s/x1;
    x2 = s%x1;
    cout << "0 0" << ' ' << x1 << ' ' << y1 << ' ' << x2 << ' ' << y2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   29 | int main() {
      |         ^~
a.cc:29:9: note: remove parentheses to default-initialize a variable
   29 | int main() {
      |         ^~
      |         --
a.cc:29:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:29:12: error: a function-definition is not allowed here before '{' token
   29 | int main() {
      |            ^
Language: C++

v#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
#define inv(n, a) for(int i = 0; i < n; i++) cin >> a[i]
#define MOD 1000000007
#define INF 1e7
#define LINF 1e15
typedef long long ll;
typedef long double ld;
using Graph = vector<vector<int>>;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
// 'a' = 97 'z' = 122 => 'a' = 0 'z' = 25

int main() {
    ll s; cin >> s;
    ll x2 = 1e9;
    ll a = ceil((long double)s / (long double)x2);
    ll b = x2 - (s % x2);
    ll ans[] = {0, 0, x2, 1, a, b};
    rep(i, 6){
        cout << ans[i] << " ";
    }
    cout << endl;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc:12:15: error: 'vector' does not name a type
   12 | using Graph = vector<vector<int>>;
      |               ^~~~~~
a.cc: In function 'int main()':
a.cc:18:11: error: 'cin' was not declared in this scope
   18 |     ll s; cin >> s;
      |           ^~~
a.cc:20:12: error: 'ceil' was not declared in this scope
   20 |     ll a = ceil((long double)s / (long double)x2);
      |            ^~~~
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << ans[i] << " ";
      |         ^~~~
a.cc:26:5: error: 'cout' was not declared in this scope
   26 |     cout << endl;
      |     ^~~~
a.cc:26:13: error: 'endl' was not declared in this scope
   26 |     cout << endl;
      |             ^~~~
Language: C++

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

#define INF 1999999999
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(int i=1;i<=n;i++)
#define MODA 1000000007 

int main() {
	ll ans = 0;
	int tmp;
	ll ju = pow(10, 9);
	ll x, y, s;
	cin >> s;
	y = (s + ju - 1)/ju;
	x = ju * y - s;
	cout << "0 0 “ << y << " 1 " << x << " " << ju << endl;
}


Compiler output:
a.cc:18:48: warning: missing terminating " character
   18 |         cout << "0 0 “ << y << " 1 " << x << " " << ju << endl;
      |                                                ^
a.cc:18:48: error: missing terminating " character
   18 |         cout << "0 0 “ << y << " 1 " << x << " " << ju << endl;
      |                                                ^~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:18:33: error: expected ';' before numeric constant
   18 |         cout << "0 0 “ << y << " 1 " << x << " " << ju << endl;
      |                                 ^~
      |                                 ;
Language: C++

S = int(input())
x1, y1 = 0, 0
x2, y2 = 10 ** 9, 1
y3 = S // (10 ** 9) + 1
x3 = 10**9 * y3 - S
print(x1, y1, x2, y2, x3, y3)

Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S = int(input())
      | ^