Language: C++

#include <bits/stdc++.h>
#define rep(i,s,n) for(int i=s;i<n;i++)
#define pb push_back
#define all(x) (x).begin(),(x).end()
using namespace std;
using P=pair<int,int>;
using Graph=vector<vector<int>>;
using ll=long long;
ll gcd(ll A, ll B){
    if(B == 0)return A;
    return gcd(B, A % B);
}
ll lcm(ll A, ll B){
    return A * B / gcd(A, B);
}
bool root(string s){
    int n=s.length();
    if(n==2){
        if(s[0]==s[1]){
            return true;
        }
        else return false;
    }
    if(n==3){
        if(s[0]==s[2]){
            return true;
        }
        else return false;
    }

    return false;
}


//深さ優先
vector<int> seen;
vector<ll> h;

//普通の深さ優先探索seenを返す感じ
void dfs(const Graph &G,int v){
    seen[v] = 0; //v探索済み

    P good=make_pair(v,h[v]);
    for(auto next_v :G[v]){
        if(seen[next_v]!=-1) continue;//もう探索していた
        if(h[next_v]>good.second){
            good=make_pair(next_v,h[next_v]);
        }
        dfs(G,next_v);
    }

    if(!(h[v]==good.second && v==good.first)){
        seen[good.first]=1;
    }
}

signed main() {
    int K; cin >> K;
    int rec[60], ans[60];
    int div = K / 50, md = K % 50;
    rep(i,0,50) rec[i] = div + (i < md);
 
    rep(i,0,50) {
        int S = 0;
        rep(j,0,50) {
            if(i != j) S += rec[j];
        }
        ans[i] = 50 * (rec[i] + 1) - S - 1;
    }
    cout << 50 << endl;
    rep(i,0,50) cout << (i ? " " : "") << ans[i];
    cout << endl;
    return 0;
}

/*
int main(){
    /*
    int n,m;
    cin>>n>>m;

    h.assign(n,0);
    rep(i,0,n) cin>>h[i];

    Graph G(n);
    rep(i,0,m){
        int a,b; cin>>a>>b;
        G[a-1].push_back(b-1);
        G[b-1].push_back(a-1);
    }

    seen.assign(n,-1);

    rep(i,0,n){
        if(seen[i]==-1){
            dfs(G,i);
        }
    }

    int sum=accumulate(all(seen),0);

    cout<<sum<<endl;*/

    ll k; cin>>k;
    ll n=50;
    ll s[n],ans[n];
    vector<ll> d(n,0);

    ll div=k/n; ll ama=k%n;

    rep(i,0,n){
        s[i]=div+(i<ama);
    }

    rep(i,0,n){
        int sum=0;
        rep(j,0,n){
            if(i!=j) sum+=s[j];
        }
        ans[i]=n*(s[i]+1)-sum-1;
    }

    cout<<n<<endl;
    rep(i,0,n){
        cout<<(i ? " ":"") <<ans[i];
    }

    cout<<endl;
}   
*/

Compiler output:
a.cc:104:11: error: 'cin' does not name a type
  104 |     ll k; cin>>k;
      |           ^~~
a.cc:106:10: error: size of array 's' is not an integral constant-expression
  106 |     ll s[n],ans[n];
      |          ^
a.cc:106:17: error: size of array 'ans' is not an integral constant-expression
  106 |     ll s[n],ans[n];
      |                 ^
a.cc:109:8: error: 'll div' redeclared as different kind of entity
  109 |     ll div=k/n; ll ama=k%n;
      |        ^~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:992:14: note: previous declaration 'div_t div(int, int)'
  992 | extern div_t div (int __numer, int __denom)
      |              ^~~
a.cc:2:20: error: expected unqualified-id before 'for'
    2 | #define rep(i,s,n) for(int i=s;i<n;i++)
      |                    ^~~
a.cc:111:5: note: in expansion of macro 'rep'
  111 |     rep(i,0,n){
      |     ^~~
a.cc:111:9: error: 'i' does not name a type
  111 |     rep(i,0,n){
      |         ^
a.cc:2:32: note: in definition of macro 'rep'
    2 | #define rep(i,s,n) for(int i=s;i<n;i++)
      |                                ^
a.cc:111:9: error: 'i' does not name a type
  111 |     rep(i,0,n){
      |         ^
a.cc:2:36: note: in definition of macro 'rep'
    2 | #define rep(i,s,n) for(int i=s;i<n;i++)
      |                                    ^
a.cc:2:20: error: expected unqualified-id before 'for'
    2 | #define rep(i,s,n) for(int i=s;i<n;i++)
      |                    ^~~
a.cc:115:5: note: in expansion of macro 'rep'
  115 |     rep(i,0,n){
      |     ^~~
a.cc:115:9: error: 'i' does not name a type
  115 |     rep(i,0,n){
      |         ^
a.cc:2:32: note: in definition of macro 'rep'
    2 | #define rep(i,s,n) for(int i=s;i<n;i++)
      |                                ^
a.cc:115:9: error: 'i' does not name a type
  115 |     rep(i,0,n){
      |         ^
a.cc:2:36: note: in definition of macro 'rep'
    2 | #define rep(i,s,n) for(int i=s;i<n;i++)
      |                                    ^
a.cc:123:5: error: 'cout' does not name a type
  123 |     cout<<n<<endl;
      |     ^~~~
a.cc:2:20: error: expected unqualified-id before 'for'
    2 | #define rep(i,s,n) for(int i=s;i<n;i++)
      |                    ^~~
a.cc:124:5: note: in expansion of macro 'rep'
  124 |     rep(i,0,n){
      |     ^~~
a.cc:124:9: error: 'i' does not name a type
  124 |     rep(i,0,n){
      |         ^
a.cc:2:32: note: in definition of macro 'rep'
    2 | #define rep(i,s,n) for(int i=s;i<n;i++)
      |                                ^
a.cc:124:9: error: 'i' does not name a type
  124 |     rep(i,0,n){
      |         ^
a.cc:2:36: note: in definition of macro 'rep'
    2 | #define rep(i,s,n) for(int i=s;i<n;i++)
      |                                    ^
a.cc:128:5: error: 'cout' does not name a type
  128 |     cout<<endl;
      |     ^~~~
a.cc:129:1: error: expected declaration before '}' token
  129 | }
      | ^
a.cc:130:2: error: expected unqualified-id before '/' token
  130 | */
      |  ^