Language: C++

#include<bits/stdc++.h>

using namespace std;

#define debug(n) cerr << #n << ':' << n << endl;
#define dline    cerr << __LINE__ << endl;

using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;
template<class T,class U> using umap = unordered_map<T,U>;
template<class T> using uset = unordered_set<T>;

template<class T>
bool ChangeMax(T&a,const T&b){
  if(a >= b) return false;
  a = b;    return true;
}

template<class T>
bool ChangeMin(T&a,const T&b){
  if(a <= b) return false;
  a = b;    return true;  
}

template<class T, size_t N, class U>
void Fill(T (&a)[N], const U&v){
    fill((U*)a,(U*)(a+N),v);
}

template<class T>
istream& operator >> (istream&is, vector<T>&v){
  for(auto&e:v)is >> e;
  return is;
}

int main(){
#define int ll;
  int n,k,s; cin >> n >> k >> s;
  vector<int> v;
  int sum = 0;
  for(int i = 1; i <= n; ++i){
    if(k <= i && sum < s && k > 0){
      v.push_back(s-sum);
      sum += s - sum;
      k--;
    } else {
      v.push_back(1);
      sum += 1;      
    }
    if(i >= k)sum -= v[i-k];
  }
  for(int i = 0; i < n; ++i)cout << v[i] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:13: error: declaration does not declare anything [-fpermissive]
   40 | #define int ll;
      |             ^~
a.cc:41:3: note: in expansion of macro 'int'
   41 |   int n,k,s; cin >> n >> k >> s;
      |   ^~~
a.cc:41:7: error: 'n' was not declared in this scope; did you mean 'yn'?
   41 |   int n,k,s; cin >> n >> k >> s;
      |       ^
      |       yn
a.cc:41:9: error: 'k' was not declared in this scope
   41 |   int n,k,s; cin >> n >> k >> s;
      |         ^
a.cc:41:11: error: 's' was not declared in this scope
   41 |   int n,k,s; cin >> n >> k >> s;
      |           ^
a.cc:40:13: error: template argument 1 is invalid
   40 | #define int ll;
      |             ^~
a.cc:42:10: note: in expansion of macro 'int'
   42 |   vector<int> v;
      |          ^~~
a.cc:40:13: error: template argument 2 is invalid
   40 | #define int ll;
      |             ^~
a.cc:42:10: note: in expansion of macro 'int'
   42 |   vector<int> v;
      |          ^~~
a.cc:42:13: error: expected primary-expression before '>' token
   42 |   vector<int> v;
      |             ^
a.cc:42:15: error: 'v' was not declared in this scope
   42 |   vector<int> v;
      |               ^
a.cc:40:13: error: declaration does not declare anything [-fpermissive]
   40 | #define int ll;
      |             ^~
a.cc:43:3: note: in expansion of macro 'int'
   43 |   int sum = 0;
      |   ^~~
a.cc:43:7: error: 'sum' was not declared in this scope
   43 |   int sum = 0;
      |       ^~~
a.cc:40:13: error: declaration does not declare anything [-fpermissive]
   40 | #define int ll;
      |             ^~
a.cc:44:7: note: in expansion of macro 'int'
   44 |   for(int i = 1; i <= n; ++i){
      |       ^~~
a.cc:44:11: error: 'i' was not declared in this scope
   44 |   for(int i = 1; i <= n; ++i){
      |           ^
a.cc:44:24: error: expected ')' before ';' token
   44 |   for(int i = 1; i <= n; ++i){
      |      ~                 ^
      |                        )
a.cc:44:28: error: 'i' was not declared in this scope
   44 |   for(int i = 1; i <= n; ++i){
      |                            ^
a.cc:40:13: error: declaration does not declare anything [-fpermissive]
   40 | #define int ll;
      |             ^~
a.cc:55:7: note: in expansion of macro 'int'
   55 |   for(int i = 0; i < n; ++i)cout << v[i] << endl;
      |       ^~~
a.cc:55:23: error: expected ')' before ';' token
   55 |   for(int i = 0; i < n; ++i)cout << v[i] << endl;
      |      ~                ^
      |                       )