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

#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

int main()
{
    int N, K;
    cin >> N >> K;
    int Ai;
    vector<int> A;
    for(int i=0;i<N;i++){
        cin >> Ai;
        A.push_back(Ai);
    }
    {
        int nmin = INT_MAX;
        auto itr_min = min_element(A.begin(), A.end());
        auto nleft  = distance(A.begin(), itr_min);
        auto nright = distance(itr_min, A.end())-1;
        for(int i=0;i<K;i++){
            if(nleft  - i       < 0) continue;
            if(nright - (K-1-i) < 0) continue;
            auto n = 1;
            n += (nleft  - i       + (K-2))/(K-1);
            n += (nright - (K-1-i) + (K-2))/(K-1);
            if(n<nmin) nmin = n;
        }
        cout<<nmin<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: 'INT_MAX' was not declared in this scope
   18 |         int nmin = INT_MAX;
      |                    ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <functional>
  +++ |+#include <climits>
    5 | using namespace std;
Language: C++

//----------------------------おまじない
#pragma GCC optimize ("O3")
#pragma GCC target ("tune=native")
#pragma GCC target ("avx")
//----------------------------
#define FOR(i,j,n) for (int i=(j);i<(n);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define REPN(i,n) for (int i=(n);i>0;i--)
#define I(n) scanf("%d", &(n))
#define LL(n) scanf("%lld", &(n))
#define pb(n) push_back((n))
#define mp(i,j) make_pair((i),(j))
#define eb(i,j) emplace_back((i),(j))
#include <bits/stdc++.h>
using namespace std;
//------------------------------typedef集
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef vector<pi> vpi;
typedef vector<vi> vvi;
typedef vector<vpi> vvpi;
typedef vector<vvi> vvvi;
typedef long long ll;
const int mod = 1000000009;


int n,k,a,onepos,onep;

int main(){
    I(n);
    I(k);
    REP(i,n){
        I(a);
        if(a == 1) onep = i;
    }
    if(n == k){
        cout << 1 << endl;
        return 0;
    }

    n--;
    ret = n/(k-1);
    if (n%(k-1)) ret++;
    cout << ret << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:5: error: 'ret' was not declared in this scope
   42 |     ret = n/(k-1);
      |     ^~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
int a=0;
int x,y;
cin>>x>>y;
int f[1000000];
for(int i=0;i<x;i++)
{
cin>>f[i];
}
for(int i=0;i<x;i++)
{
int m=min(f[i],f[i+1]);
if(f[i]==m)
a++;
}
int e=(x-m+y-2)/(y-1);
cout<<e;
system("pause");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: 'm' was not declared in this scope
   19 | int e=(x-m+y-2)/(y-1);
      |          ^
Language: C++

#pragma warning (disable:4996)
#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
	float n, k;
	cin >> n>>k;
	int a[100005];
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	cout << ceil((n - 1) / (k - 1))<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'ceil' was not declared in this scope
   14 |         cout << ceil((n - 1) / (k - 1))<<endl;
      |                 ^~~~
Language: C++

#include<cstdio>
#include<cstring>

int main(){
	int n, k; 
	scanf("%d%d", &n, &l); 
	printf("%d\n", (n - 2) / (k - 1) + 1); 
	return 0; 
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:28: error: 'l' was not declared in this scope
    6 |         scanf("%d%d", &n, &l);
      |                            ^
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int read(){
	int x=0,w=1;
	char ch=0;
	while (ch<'0' || ch>'9'){
		  if (ch=='-') w=-1;
		  ch=getchar();
	}
	while (ch<='9' && ch>='0'){
		  x=(x<<1)+(x<<3)+ch-'0';
		  ch=getchar();
	}
	return x*w;
}
int n,k;
int main(){
	n=read()-1;k=read()-1;
	ans=n/k;
	if (n%k) ++ans;
	printf("%d\n",ans); 
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |         ans=n/k;
      |         ^~~
      |         abs
Language: C++

using System;

namespace bla
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            int n = int.Parse(s[0]);
            int k = int.Parse(s[1]);
            int ans = (n - 1) / (k - 1);
            if (ans * (k - 1) < (n - 1))
                ans++;
            Console.WriteLine(ans);
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:26: error: 'string' has not been declared
    7 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:7:35: error: expected ',' or '...' before 'args'
    7 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:17:6: error: expected ';' after class definition
   17 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void bla::Program::Main(int*)':
a.cc:9:13: error: 'string' was not declared in this scope
    9 |             string[] s = Console.ReadLine().Split();
      |             ^~~~~~
a.cc:9:20: error: expected primary-expression before ']' token
    9 |             string[] s = Console.ReadLine().Split();
      |                    ^
a.cc:10:21: error: expected primary-expression before 'int'
   10 |             int n = int.Parse(s[0]);
      |                     ^~~
a.cc:11:21: error: expected primary-expression before 'int'
   11 |             int k = int.Parse(s[1]);
      |                     ^~~
a.cc:15:13: error: 'Console' was not declared in this scope
   15 |             Console.WriteLine(ans);
      |             ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int N=100005;
int n,k,a[N],id;
int calc(int a,int b){
	if (a==0)
		return 0;
	return (a-1)/b+1;
}
int main(){
	scanf("%d%d",&n,&k);
	for (int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		if (a[i]==1)
			id=i;
	}
	printf("%d",min(calc(id-1,k-1)+calc(n-id,k-1)),calc(n-1,k-1));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: no matching function for call to 'min(int)'
   17 |         printf("%d",min(calc(id-1,k-1)+calc(n-id,k-1)),calc(n-1,k-1));
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:17:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   17 |         printf("%d",min(calc(id-1,k-1)+calc(n-id,k-1)),calc(n-1,k-1));
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

int main() {
    int N, K;
    cin >> N >> K;
    cout << (N - 2) / (K - 1) + 1;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> N >> K;
      |     ^~~
a.cc:4:5: error: 'cout' was not declared in this scope
    4 |     cout << (N - 2) / (K - 1) + 1;
      |     ^~~~
Language: C++

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

long long s(long long n){
    long long res = 0;
    for(; n > 0; n /= 10) res += n%10;
    return res;
}

bool comp(const long long &a, const long long &b){
    long long ta = a * s(b);
    long long tb = b * s(a);
    if(ta == tb) return a < b;
    return ta < tb;
}

long long f(long long n){
    vector<long long> v;
    for(long long i=1;i<=n;i*=10){
        v.push_back(n - n%i + i - 1);
    }
    sort(v.begin(), v.end(), comp);
    return v[0];
}

int main(void){
    int k;
    long long n = 1;
    cin >> k;
    for(int i=0;i<k;i++){
        cout << n << endl;
        n = f(n+1);
    }
}


Compiler output:
a.cc: In function 'long long int f(long long int)':
a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   23 |     sort(v.begin(), v.end(), comp);
      |     ^~~~
      |     short
Language: C++

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

#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define dump(x) cerr << #x " = " << (x) << endl
using vint=vector<int>;
using vvint=vector<vint>;
using pint=pair<int, int>;
using vpint=vector<pint>;
template<typename T> using priority_queue_rev=priority_queue<T, vector<T>, greater<T>>;
constexpr double pi = 3.1415926535897932384626433832795028L;
constexpr int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int gcd(int a, int b) {
    while (b) { swap(a %= b, b); }
    return a;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
template<typename T> void fin(T mes) {
    cout << mes << endl;
    exit(0);
}
template<typename T1, typename T2> bool chmax(T1 &a, const T2 &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template<typename T1, typename T2> bool chmin(T1 &a, const T2 &b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}
template<typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &rhs) {
    os << "(" << rhs.first << ", " << rhs.second << ")";
    return os;
}
template<typename T> ostream &operator<<(ostream &os, const vector<T> &rhs) {
    os << "{";
    for (auto itr = rhs.begin(); itr != rhs.end(); itr++) {
        os << *itr << (next(itr) != rhs.end() ? ", " : "");
    }
    os << "}";
    return os;
}
struct setup {
    static constexpr int PREC = 20;
    setup() {
        cout << fixed << setprecision(PREC);
        cerr << fixed << setprecision(PREC);
    };
} setup;

int S(int n) {
    int ret = 0;
    while (n) {
        ret += n % 10;
        n /= 10;
    }
    return ret;
}

int K;
signed main() {
    cin >> K;
    vint cand;
    int bai = 1;
    rep(i, 10) {
        rep(j, 100000) {
            cand.push_back(j * bai + bai - 1);
        }
        bai *= 10;X
    }
    sort(all(cand));
    uniq(cand);
    vint sn;
    pint p = {1, 0};
    for (int i = cand.size() - 1; i > 0; i--) {
        int s = S(cand[i]);
        if (cand[i] * p.second <= p.first * s) {
            p = {cand[i], s};
            sn.push_back(cand[i]);
        }
    }
    reverse(all(sn));
    rep(i, K) { cout << sn[i] << endl; }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:81:19: error: 'X' was not declared in this scope
   81 |         bai *= 10;X
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

int s(ll x){
    int ret = 0;
    while(x){
        ret += x%10;
        x/=10;
    }
    return ret;
}

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

    vector<ll> v;
    rep(i,15){
        string nine(i,'9');
        for(int j=1; j<=9; ++j){
            string t = to_string(j) + nine;
            v.pb(stoll(t));
        }
    }

    int V = v.size();
    rep(i,V){
        for(int j=i; j<V; ++j){
            // v[i]/s(v[i]) <= v[j]/s(v[j])
            assert(v[i]*s(v[j]) <= v[j]*s(v[i]));
        }
    }

    // rep(i,V) printf(" %lld  %d\n",v[i],s(v[i]));
    assert(k==135)''
    rep(i,k) cout << v[i] << endl;
    return 0;
}


Compiler output:
a.cc:44:19: error: empty character constant
   44 |     assert(k==135)''
      |                   ^~
a.cc: In function 'int main()':
a.cc:44:19: error: expected ';' before '\x0'
a.cc:45:9: error: 'i' was not declared in this scope
   45 |     rep(i,k) cout << v[i] << endl;
      |         ^
a.cc:4:30: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i=0;i<(int)(n);++i)
      |                              ^
Language: C

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <vector>
#include <queue>
#include <iostream>
#include <set>
#include <map>
#include <string>

using namespace std;

#define mod 1e9+7
#define ll long long int
#define epsilon 1e-7

double s(ll x){
    int size = floor((log10l(x)))+1;
    int re = 0;
    ll x0 = x;
    for(int i = 0;i < size;i++){
        re += x%10;
        x /= 10;
    }
    return (double)x0/(double)re;
}

int main(void){
    int k;
    scanf("%d", &k);
    for(int i = 1;i <= 8;i++){
        if(k == 0)break;
        printf("%d\n", i);
        k--;
    }
    for(int i = 1;i <= 9;i++){
        if(k == 0)break;
        printf("%d\n", i*10-1);
        k--;
    }
    for(int i = 1;i <= 19;i++){
        if(k == 0)break;
        printf("%d\n", i*100-1);
        k--;
    }
    for(int i = 1;i <= 28;i++){
        if(k == 0)break;
        printf("%d\n", i*1000+999);
        k--;
    }
    for(int i = 1;i <= 37;i++){
        if(k == 0)break;
        printf("%d\n", i*10000+19999);
        k--;
    }
    for(int i = 1;i <= 46;i++){
        if(k == 0)break;
        printf("%lld\n", i*100000+299999);
        k--;
    }
    for(int i = 1;i <= 55;i++){
        if(k == 0)break;
        printf("%lld\n", i*1000000+3999999);
        k--;
    }
    for(int i = 1;i <= 64;i++){
        if(k == 0)break;
        printf("%lld\n", i*10000000+49999999);
        k--;
    }
    for(int i = 1;i <= 73;i++){
        if(k == 0)break;
        printf("%lld\n", i*100000000+599999999);
        k--;
    }
    for(int i = 1;i <= 82;i++){
        if(k == 0)break;
        printf("%lld\n", i*1000000000+6999999999);
        k--;
    }
    for(int i = 1;i <= 91;i++){
        if(k == 0)break;
        printf("%lld\n", i*10000000000+79999999999);
        k--;
    }
    for(int i = 1;i <= 100;i++){
        if(k == 0)break;
        printf("%lld\n", i*100000000000+899999999999);
        k--;
    }
    //.8.89.1899.28999.38-4-.48-5-.58-6-.68-7-.78-8-.88-9-.
    //8.9.19...28....37....46....55....64....73....82....91
    /*for(int i = 0;i < 100;i++){
        printf("%lld: %lf, %lld: %lf\n", i*2000000000+999999999, s(i*2000000000+999999999), i*2000000000+1999999999, s(i*2000000000+1999999999));
    }
    for(int i = 0;i < 50;i++){
        printf("%d: %lf, %d: %lf\n", i*200000+99999, s(i*200000+99999), i*200000+199999, s(i*200000+199999));
    }
    for(int i = 0;i < 50;i++){
        printf("%d: %lf, %d: %lf\n", i*2000+999, s(i*2000+999), i*2000+1999, s(i*2000+1999));
    }*/
    return 0;
}

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

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int k;
  cin >> k;
  vector<long long> a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 199, 299, 399, 499, 599, 699, 799, 899, 999, 1099, 1199, 1299, 1399, 1499, 1599, 1699, 1799, 1899, 1999, 2999, 3999, 4999, 5999, 6999, 7999, 8999, 9999, 10999, 11999, 12999, 13999, 14999, 15999, 16999, 17999, 18999, 19999, 20999, 21999, 22999, 23999, 24999, 25999, 26999, 27999, 28999, 29999, 39999, 49999, 59999, 69999, 79999, 89999, 99999, 109999, 119999, 129999, 139999, 149999, 159999, 169999, 179999, 189999, 199999, 209999, 219999, 229999, 239999, 249999, 259999, 269999, 279999, 289999, 299999, 309999, 319999, 329999, 339999, 349999, 359999, 369999, 379999, 389999, 399999, 499999, 599999, 699999, 799999, 899999, 999999}
  if(k>a.size()){
    cout << "I'm sorry" << endl;
  }else{
    for(int i = 0;i<k;i++){
      cout << a[i] << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
    8 |   if(k>a.size()){
      |   ^~
a.cc:10:4: error: 'else' without a previous 'if'
   10 |   }else{
      |    ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int k;
  cin >> k;
  vector<long long> a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 199, 299, 399, 499, 599, 699, 799, 899, 999, 1099, 1199, 1299, 1399, 1499, 1599, 1699, 1799, 1899, 1999, 2999, 3999, 4999, 5999, 6999, 7999, 8999, 9999, 10999, 11999, 12999, 13999, 14999, 15999, 16999, 17999, 18999, 19999, 20999, 21999, 22999, 23999, 24999, 25999, 26999, 27999, 28999, 29999, 39999, 49999, 59999, 69999, 79999, 89999, 99999, 109999, 119999, 129999, 139999, 149999, 159999, 169999, 179999, 189999, 199999, 209999, 219999, 229999, 239999, 249999, 259999, 269999, 279999, 289999, 299999, 309999, 319999, 329999, 339999, 349999, 359999, 369999, 379999, 389999, 399999, 499999, 599999, 699999, 799999, 899999, 999999}
  if(k>a.size()){
    cout << "I'm sorry" << endl;
  }else{
    for(int i = 0;i<k;i++){
      cout << a[i] << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<long long> a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 199, 299, 399, 499, 599, 699, 799, 899, 999, 1099, 1199, 1299, 1399, 1499, 1599, 1699, 1799, 1899, 1999, 2999, 3999, 4999, 5999, 6999, 7999, 8999, 9999, 10999, 11999, 12999, 13999, 14999, 15999, 16999, 17999, 18999, 19999, 20999, 21999, 22999, 23999, 24999, 25999, 26999, 27999, 28999, 29999, 39999, 49999, 59999, 69999, 79999, 89999, 99999, 109999, 119999, 129999, 139999, 149999, 159999, 169999, 179999, 189999, 199999, 209999, 219999, 229999, 239999, 249999, 259999, 269999, 279999, 289999, 299999, 309999, 319999, 329999, 339999, 349999, 359999, 369999, 379999, 389999, 399999, 499999, 599999, 699999, 799999, 899999, 999999}
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:10: error: expected primary-expression before 'long'
    6 |   vector<long long> a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 199, 299, 399, 499, 599, 699, 799, 899, 999, 1099, 1199, 1299, 1399, 1499, 1599, 1699, 1799, 1899, 1999, 2999, 3999, 4999, 5999, 6999, 7999, 8999, 9999, 10999, 11999, 12999, 13999, 14999, 15999, 16999, 17999, 18999, 19999, 20999, 21999, 22999, 23999, 24999, 25999, 26999, 27999, 28999, 29999, 39999, 49999, 59999, 69999, 79999, 89999, 99999, 109999, 119999, 129999, 139999, 149999, 159999, 169999, 179999, 189999, 199999, 209999, 219999, 229999, 239999, 249999, 259999, 269999, 279999, 289999, 299999, 309999, 319999, 329999, 339999, 349999, 359999, 369999, 379999, 389999, 399999, 499999, 599999, 699999, 799999, 899999, 999999}
      |          ^~~~
a.cc:7:8: error: 'a' was not declared in this scope
    7 |   if(k>a.size()){
      |        ^
Language: C++

#include<iostream>

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

lli calc(lli n){
	lli ans=0;
	while(n){
		ans += n%10;
		n/=10;
	}
	return ans;
}

int main(){

	/*1,2,3,4,5,6,7,8,9*/
	/*19,29,39,49,59,・・・*/
	/*199,299,399・・・*/
	/*1999,2999,3999,4999と出すプログラムを作る*/
	lli k;
	cin>>k;
	lli base=1;
	lli cnt=0;
	for(lli i=1;i<=k;i++){
		cout<<i<<endl;
		cnt++;
		if(cnt%10==9)base*=10;
		i+=base;
	}

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   22 |         cin>>k;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:26:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |                 cout<<i<<endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |                 cout<<i<<endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

//author Eterna
#define Hello the_cruel_world!
#pragma GCC optimize(2)
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<string>
#include<cstring>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<utility>
#include<cmath>
#include<climits>
#include<deque>
#include<functional>
#include<numeric>
#include<unordered_map>
#define max(x,y) ((x)>(y)?(x):(y))
#define min(x,y) ((x)<(y)?(x):(y))
#define ABS(x) ((x) >= 0 ? (x) : (-(x)))
#define pb(x) push_back(x)
#define lowbit(x) (x & -x)
#define FRIN freopen("C:\\Users\\Administrator.MACHENI-KA32LTP\\Desktop\\in.txt", "r", stdin)
#define FROUT freopen("C:\\Users\\Administrator.MACHENI-KA32LTP\\Desktop\\out.txt", "w", stdout)
#define FAST ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define outd(x) printf("%d\n", x)
#define outld(x) printf("%lld\n", x)
#define il inline
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
const int maxn = 1e5;
const int INF = 0x7fffffff;
const int mod = 1e9 + 7;
const double eps = 1e-7;
const double Pi = acos(-1.0);
inline int read_int() {
	char c;
	int ret = 0, sgn = 1;
	do { c = getchar(); } while ((c < '0' || c > '9') && c != '-');
	if (c == '-') sgn = -1; else ret = c - '0';
	while ((c = getchar()) >= '0' && c <= '9') ret = ret * 10 + (c - '0');
	return sgn * ret;
}
inline ll read_ll() {
	char c;
	ll ret = 0, sgn = 1;
	do { c = getchar(); } while ((c < '0' || c > '9') && c != '-');
	if (c == '-') sgn = -1; else ret = c - '0';
	while ((c = getchar()) >= '0' && c <= '9') ret = ret * 10 + (c - '0');
	return sgn * ret;
}
ll fsum(ll x) {
	ll a = 0;
	while (x) {
		a += (x % 10);
		x /= 10;
	}
	return a;
}
vector<ll>v;
int k;
int main()
{
	for (int i = 1; i < 10; i++) v.push_back(i;);
	v.push_back(19);
	cin >> k;
	ll last = 19;
	while (v.size() < k) {
		ll p = fsum(last);
		ll add = 1;
		while ((last + add)*fsum(last + add * 2) > (last + 2 * add)*fsum(last + add)) add *= 10;
		last += add;
		v.push_back(last);
	}
	for (int i = 0; i < k; i++)cout << v[i] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:69:51: error: expected ')' before ';' token
   69 |         for (int i = 1; i < 10; i++) v.push_back(i;);
      |                                                 ~ ^
      |                                                   )
a.cc:69:52: error: expected primary-expression before ')' token
   69 |         for (int i = 1; i < 10; i++) v.push_back(i;);
      |                                                    ^
Language: C++

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

const int MAX_N = 1e5 + 5;
long long k, ans, ind;

int main() {
	cin >> k;
  	ind = 1;
  	for (int i = 1; i <= k; i++) {
     	ans += ind;
      	if (i % 9 == 0):
      		ind *= 10LL;
    }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #ninclude; did you mean #include?
    1 | #ninclude <bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> k;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #ninclude <bits/stdc++.h>
a.cc:12:24: error: expected primary-expression before ':' token
   12 |         if (i % 9 == 0):
      |                        ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<ctime>
#include<vector>
#include<set>
#include<map>
#include<stack>
using namespace std;
int main(){
      long long n,i;
	  scanf("%lld",&n);
	  for(i=1;i<=min(n,9);i++)
	    printf("%lld\n",i);
	  for(i=1;i<=n-9;i++)
	    printf("%lld%lld",i,9); 
	  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: no matching function for call to 'min(long long int&, int)'
   19 |           for(i=1;i<=min(n,9);i++)
      |                      ~~~^~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:19:25: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   19 |           for(i=1;i<=min(n,9);i++)
      |                      ~~~^~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:19:25: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   19 |           for(i=1;i<=min(n,9);i++)
      |                      ~~~^~~~~
Language: C++

#include <iostream>
#include <tuple>
#include <vector>
using namespace std;
using lint = long long;
vector<tuple<long double, lint>> arr;
vector<lint> ans;
lint ten[16];
int K;
long double S(lint v) {
    int ret = 0;
    for(lint i = 1; v / i; i *= 10) {
        ret += (v / i) % 10;
    }
    return double(ret);
}

int main() {
    ios_base::sync_with_stdio(0);cin.tie(0);
    cin>>K;
    ten[0] = 1;
    for(int i = 1; i < 16; i++) ten[i] = ten[i-1] * 10;
    for(int i = 1; i <= 15; i++) {
        for(int j = 1; j < min(ten[i], ten[4]); j++) {
            lint val = ten[i-1] - 1 + ten[i-1] * j;
            arr.emplace_back(val/S(val), val);
        }
    }
    sort(arr.begin(), arr.end());
    for(int i = 0, mv = 0; i < arr.size(); i++) {
        auto [v, idx] = arr[i];
        if(idx > mv) {
            ans.push_back(idx);
            mv = idx;
        }
    }
    for(int i = 0; i < K; i++) {
        cout<<ans[i]<<'\n';
    }
    return 0;
}

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

#include <iostream>
#include <vector>
#include <algorithm>
 
using namespace std;
 
long long int f(long long n) {
    long long res = 0;
    while (n > 0) {
        res += n % 10;
        n /= 10;
    }
    return res;
}
 
double g(long long n) {
    return (double) (n) / f(n);
}

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<iostream>
#include<iomanip>
//#include<cstdio>
#include<vector>
#include<map>
#include<queue>
#include<algorithm>
#include<cmath>
#include<cassert>
using namespace std;
typedef long long ll;
int K;

int main(){
	cin >> L;

	return 0;
}


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

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

using ll = long long;
double f(ll a){
	ll s = 0;
	for(ll t = a; t; t /= 10) s += t % 10;
	return a * 1.0 / s;
}

int main(){
	int k; cin >> k;
	ll LIM = 3e16;
	vector<ll> v, ans;
	for(int i = 1; i <= 99; i++) for(ll j = i; j < LIM; j = j * 10 + 9) v.push_back(j);
	sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end());
	 mn = 1e18;
	for(int i = v.size() - 1; i >= 0; i--){
		double s = f(v[i]);
		if(mn + 1e-9 > s){
			mn = s;
			ans.push_back(v[i]);
		}
	}
	reverse(ans.begin(), ans.end());
	for(int i = 0; i < k; i++) cout << ans[i] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 'mn' was not declared in this scope; did you mean 'yn'?
   17 |          mn = 1e18;
      |          ^~
      |          yn
Language: C++

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

double f(double i){
	double sum = 0;
    double orig = i;
	while(i > 0) {
		sum += (int(i) % 10);
		i /= 10.0;
	}
	return orig / sum;
}

int main(void){
	int k;
	cin >> k;
    double prev = 2;
    double next = 1;
	for(int i = 1; k > 0; i++){
		int mod = i % 10;
		int minus_mod = i - mod;
		if(i < 10) {
			cout << i << endl;
			k--;
		}
		else if(mod == 9 && minud_mod % 10 != 0){
			cout << i << endl;
			k--;
		}
		/*
        double cur = next;
        next = f(i + 1);
        cout << "i: " << i + 1 << " " << next << endl;
		if(cur <= prev && cur <= next){
			//cout << i << endl;
			k--;
		}
        prev = cur;
        */
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:37: error: 'minud_mod' was not declared in this scope; did you mean 'minus_mod'?
   27 |                 else if(mod == 9 && minud_mod % 10 != 0){
      |                                     ^~~~~~~~~
      |                                     minus_mod
Language: C++

#include <algorithm>
#include <cassert>
// #include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
// #include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>

/*
unsigned seed1 = std::chrono::system_clock::now().time_since_epoch().count();
mt19937 g1.seed(seed1);
*/
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<pii, pii> ppiipii;
typedef pair<int, ppiipii> pippiipii;
typedef pair<int, pii> pipii;
typedef pair<pii, int> ppiii;
typedef pair<int, ppiii> pippiii;
typedef pair<int, ll> pill;
typedef pair<int, double> pid;
typedef pair<string, string> pss;
// note to self, the below two triggers someone
typedef pair<ll, ll> pll;
typedef pair<ll, int> plli;
typedef long double ld;

int main() {
  int n;
  scanf("%d", &n);
  for(int numNine = 0; n > 0; numNine++) {
    for(int i = 1; i <= 9 && n > 0; i++, n--) {
      printf("%d", i);
      for(int a = 0; a < numNine; a++) printf("9");
      printf("\n")
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:19: error: expected ';' before '}' token
   50 |       printf("\n")
      |                   ^
      |                   ;
   51 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  int k;scanf("%d", &k);
  for(int i = 1; i<=min(k,9); ++i)printf("%d ", i);
  k-=10;
  for(int i = 1; i<=k; ++i)printf("%lld ", 10ll*i+9);
  pritf("\n");
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'pritf' was not declared in this scope; did you mean 'printf'?
   11 |   pritf("\n");
      |   ^~~~~
      |   printf
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

long long beki(int a, long long b)
{
    if(b == 0){
        return 1;
    }
    long long ans = beki(a, b / 2);
    ans = ans * ans;
    if(b % 2 == 1){
        ans *= a;
    }
    return ans;
}

long long S(long long n)
{
    if(n < 10){
        return n;
    }
    return (n % 10) + S(n / 10);
}

int main() {
    //cout.precision(10);
    stack<long long> ans;
    double checker = 10000000000000000000000.0;
    for(long long l = 10; l >= 0; l--){
        for(long long k = 10000; k >= 1001; k--){
            long long check = beki(10, l) * k - 1;
            if((double)check / (double)S(check) <= checker){
                ans.push(check);
                checker = (double)check / (double)S(check);
            }
        }
    }
    for(long long k = 9999; k >= 1; k--){
            if((double)k / (double)S(k) <= checker){
                ans.push(k);
                checker = (double)k / (double)S(k);
            }
    }
    long long q;
    cin >> q;
    for(int i = 1; i <= q; i++){
        long long out = ans.top();
        ans.pop();
        cout << out << endl;
        if(ans.empty){
            break;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:69:21: error: cannot convert 'std::stack<long long int>::empty' from type 'bool (std::stack<long long int>::)() const' to type 'bool'
   69 |         if(ans.empty){
      |                     ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string> 
using namespace std;
int main()
{
	ll k;cin>>k;
	for(int i=1;i<k+1;i++){
			long long f=i/9,g=i%9,h=1;
			fo(j,0,f)h*=10;
			cout<<h*(g+1)-1<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'll' was not declared in this scope
    7 |         ll k;cin>>k;
      |         ^~
a.cc:7:19: error: 'k' was not declared in this scope
    7 |         ll k;cin>>k;
      |                   ^
a.cc:10:28: error: 'j' was not declared in this scope
   10 |                         fo(j,0,f)h*=10;
      |                            ^
a.cc:10:25: error: 'fo' was not declared in this scope; did you mean 'f'?
   10 |                         fo(j,0,f)h*=10;
      |                         ^~
      |                         f
Language: Java

mport java.util.Scanner;

public class Main {
        public static void main(String[] args){
            Scanner sr = new Scanner(System.in);
            String inputLine = sr.nextLine();
            Long K = Long.valueOf(inputLine);
            long count = 0;
            for (long m =1; m <=10e16; m*=10){
                boolean sunukeCheckFlag = true;
                for(int i = 1; sunukeCheckFlag; i++){
                    long x = i * m + m - 1;
                    long y = (i + 1) * m + m - 1;
                    if (nPerSn(x) <= nPerSn(y)){
                        System.out.println(x);
                        count ++;
                        if (count == K){
                            return ;
                        }
                    }else{
                        sunukeCheckFlag = false;
                    }
                }

            }
        }
        public static long nPerSn(Long num){

            long Sn = 0;
            Long cNum = num;
            while (cNum != 0){
                Sn += (cNum % 10);
                cNum /= 10;
            }
            return num / Sn;
        }
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: C++

#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

#define REP(i,n) for(int i=0;i<int(n);i++)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define show(x) cout<< #x << " = " << x << endl
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,ll> pdl;

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

int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a*b/gcd(a,b);}	

const ll mod=1e9+7;
const int INF=INT_MAX/2;
const int N_MAX=100010;

ll calc(ll n){
	ll res=0;
	while(n>0){
		res+=n%10;
		n/=10;
	}
	return res;
}

int main(){
	ll k;
	cin>>k;
	vector<pdl> v;
	for(int i=1;i<99;i++){
		v.pb(pdl((double)i/calc(i),i));
	}
	for(int d=3;d<15;d++){
		ll n=0;
		for(int i=0;i<d-3;i++){
			n+=9*pow(10,i);
		}
		ll temp=n;
		for(int i=100;i<=999;i++){
			n=temp;
			n+=i*pow(10,d-3);
			v.pb(pdl((double)n/calc(n),n));
		}
	}
	sort(ALL(v));
	ll mx=0;
	ll cnt=0;
	for(int i=0;i<v.size();i++){
		if(cnt==k)break;
		if(mx<v[i].second){
			cout<<v[i].second<<endl;
			mx=v[i].second;
			cnt++;
		}
	}
	return 0;
}


Compiler output:
a.cc:42:15: error: 'INT_MAX' was not declared in this scope
   42 | const int INF=INT_MAX/2;
      |               ^~~~~~~
a.cc:20:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   19 | #include <utility>
  +++ |+#include <climits>
   20 | #include <vector>
Language: C++

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

#define REP(i,n) for(int i=0;i<int(n);i++)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define show(x) cout<< #x << " = " << x << endl
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,ll> pdl;

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

int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a*b/gcd(a,b);}	

const ll mod=1e9+7;
const int INF=INT_MAX/2;
const int N_MAX=100010;

ll calc(ll n){
	ll res=0;
	while(n>0){
		res+=n%10;
		n/=10;
	}
	return res;
}

int main(){
	ll k;
	cin>>k;
	vector<pdl> v;
	for(int i=1;i<99;i++){
		v.pb(pdl((double)i/calc(i),i));
	}
	for(int d=3;d<15;d++){
		ll n=0;
		for(int i=0;i<d-3;i++){
			n+=9*pow(10,i);
		}
		ll temp=n;
		for(int i=100;i<=999;i++){
			n=temp;
			n+=i*pow(10,d-3);
			v.pb(pdl((double)n/calc(n),n));
		}
	}
	sort(ALL(v));
	ll mx=0;
	ll cnt=0;
	for(int i=0;i<v.size();i++){
		if(cnt==k)break;
		if(mx<v[i].second){
			cout<<v[i].second<<endl;
			mx=v[i].second;
			cnt++;
		}
	}
	return 0;
}


Compiler output:
a.cc:36:15: error: 'INT_MAX' was not declared in this scope
   36 | const int INF=INT_MAX/2;
      |               ^~~~~~~
a.cc:15:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   14 | #include <cassert>
  +++ |+#include <climits>
   15 |
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define x first
#define y second

using namespace std;

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0); cin.tie(0);
    ll n;
    cin >> n;

    if (n <= 9)
    {
        for (int i = 1; i <= n; i++) cout << i << '\n';
        exit(0);
    }
    for (int i = 1; i <= 9; i++) cout << i << '\n';
    n -= 9;
    ll uk = 19;
    while (n > 0)
    {
        cout << uk << '\n';
        n--;
        uk += 10;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'll' was not declared in this scope
   14 |     ll n;
      |     ^~
a.cc:15:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   15 |     cin >> n;
      |            ^
      |            yn
a.cc:24:7: error: expected ';' before 'uk'
   24 |     ll uk = 19;
      |       ^~~
      |       ;
a.cc:27:17: error: 'uk' was not declared in this scope
   27 |         cout << uk << '\n';
      |                 ^~
Language: C++

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

long long f(long long n) {
  long long res = 0;
  while (n > 0) {
	res += n%10;
	n /= 10;
  }
  return res;
}

double g(long long n) {
  return (double)(n)/f(n);
}

int main() {
  vector<long long> res;
  long long base = 1;

  // まずは候補を (1〜150)99999 的なやつを全列挙
  for (int i = 0; i < 15; ++i) {
	for (int j = 1; j < 150; ++j) {
	  res.push_back(base * (j+1) - 1);
	}
	base *= 10;
  }
  sort(res.begin(), res.end());
  res.erase(unique(res.begin(), res.end()), res.end());

  // ダメなやつを除く
  for (long long i = 0; i < res.size(); ++i) {
	for (long long j = i+1; j < res.size(); ++j) {
	  if (g(res[i]) > g(res[j])) {
		res.erase(res.begin() + i--);
		break;
	  }
	}
  }

  long long K;
  cin >> K;
  for (long long i = 0; i < K; ++i) {
	cout << res[i] << endl;
  }
}




























Compiler output:
a.cc: In function 'int main()':
a.cc:29:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   29 |   sort(res.begin(), res.end());
      |   ^~~~
      |   short
a.cc:30:13: error: 'unique' was not declared in this scope
   30 |   res.erase(unique(res.begin(), res.end()), res.end());
      |             ^~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define rep(i,l,r) for(ll i=(l);i<(r);i++)
#define fcout cout << fixed << setprecision(10)
ll digsum(ll n){ //各桁の和
    ll a=0;
    while (n) {
        a+=n%10;
        n/=10;
    }
    return a;
}
int main(){
    ll n;
    cin>>n;
    ll dis=1;
    ll cnt=1;
    while (n) {
        if(cnt*digsum(cnt+dis)<=(cnt+dis)*digsum(cnt)){ //次の数よりn/S(n)が低いなら
            cout<<cnt<<endl;　//出力
            n--;
            cnt+=dis;
        }
        else{ //そうでなければ
            dis*=10; //増加幅を1桁増やし
            cnt=(cnt/dis+1)*dis-1; //下*桁が9の数まで進む
        }
    }
}

Compiler output:
a.cc:21:29: error: extended character 　 is not valid in an identifier
   21 |             cout<<cnt<<endl;　//出力
      |                             ^
a.cc: In function 'int main()':
a.cc:21:29: error: '\U00003000' was not declared in this scope
   21 |             cout<<cnt<<endl;　//出力
      |                             ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
define ll long long
ll arr[1000005];
int main(){
int k;
  cin>>k;
 for(int i=1;i<=9;i++)
   arr[i]=i;
  int id=10;
  ll j=19;
  while(id<1e6){
  arr[id]=j;
    id++;
    j+=10;
  }
  for(int i=1;i<=k;i++)
    cout<<arr[i]<<endl;
}

Compiler output:
a.cc:3:1: error: 'define' does not name a type
    3 | define ll long long
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:9:4: error: 'arr' was not declared in this scope
    9 |    arr[i]=i;
      |    ^~~
a.cc:11:3: error: 'll' was not declared in this scope
   11 |   ll j=19;
      |   ^~
a.cc:13:3: error: 'arr' was not declared in this scope
   13 |   arr[id]=j;
      |   ^~~
a.cc:13:11: error: 'j' was not declared in this scope
   13 |   arr[id]=j;
      |           ^
a.cc:18:11: error: 'arr' was not declared in this scope
   18 |     cout<<arr[i]<<endl;
      |           ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long LL;
typedef pair<double,LL> P;
const LL mod=1e9+7;
const LL LINF=1LL<<62;
const LL INF=1<<30;
 
inline LL f(LL s){
    LL ret=0;
    while(s){
        ret+=s%10;
        s/=10;
    }
    return ret;
}
 
int main(){
    LL K;
    cin >> K;
    LL t=1;
    vector<LL> ans;
    for(int i=1;i<10;i++){
        ans.pb(i);
    }
    for(int s=0;s<=15;s++){
        vector<P> v;
        for(LL p=10;p<=1000;p++){
            v.pb(mp((double)(p*t-1LL)/f(p*t-1LL),p*t-1LL));
        }
        for(int i=0;i<v.size();i++){
            for(int j=i+1;j<v.size();j++){
                if(v[i].fs>v[j].fs) break;
                if(j==v.size()-1) ans.pb(v[i].sc);
            }
        }
        t*=10;
    }
    sort(ALL(ans));
    ans.erase(unique(ALL(ans)),ans.end());
    for(int i=0;i<K;i++){
        cout << ans[i] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:18: error: 'mp' was not declared in this scope; did you mean 'p'?
   33 |             v.pb(mp((double)(p*t-1LL)/f(p*t-1LL),p*t-1LL));
      |                  ^~
      |                  p
a.cc:37:25: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<double, long long int> >, std::pair<double, long long int> >::value_type' {aka 'struct std::pair<double, long long int>'} has no member named 'fs'
   37 |                 if(v[i].fs>v[j].fs) break;
      |                         ^~
a.cc:37:33: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<double, long long int> >, std::pair<double, long long int> >::value_type' {aka 'struct std::pair<double, long long int>'} has no member named 'fs'
   37 |                 if(v[i].fs>v[j].fs) break;
      |                                 ^~
a.cc:38:47: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<double, long long int> >, std::pair<double, long long int> >::value_type' {aka 'struct std::pair<double, long long int>'} has no member named 'sc'
   38 |                 if(j==v.size()-1) ans.pb(v[i].sc);
      |                                               ^~