criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;

public class Main{
  public static char chalpha(int n){
		char[] ch="ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
		return ch[n];
	}
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int h=sc.nextInt(),w=sc.nextInt(),f=0;
    char c='';
    String[][] str=new String[h][w];
    for(int i=0;i<h;i++){
      for(int j=0;j<w;j++){
        str[i][j]=sc.next();
        if(str[i][j].equals("snuke")){
          f=i+1;
          c=chalpha(j);
        }
      }
    }
    System.out.println(c+""+f);
  }
}


Compiler output:
Main.java:11: error: empty character literal
    char c='';
           ^
1 error
Language: Java

import java.util.*;

public class Main{
  public static char chalpha(int n){
		char[] ch="ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
		return ch[n];
	}
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int h=sc.nextInt(),w=sc.nextInt(),f=0;
    char c;
    String[][] str=new String[h][w];
    for(int i=0;i<h;i++){
      for(int j=0;j<w;j++){
        str[i][j]=sc.next();
        if(str[i][j].equals("snuke")){
          f=i+1;
          c=chalpha(j);
        }
      }
    }
    System.out.println(c+""+f);
  }
}


Compiler output:
Main.java:22: error: variable c might not have been initialized
    System.out.println(c+""+f);
                       ^
1 error
Language: Java

import java.util.*;

public class Main{
  public static chalpha(int n){
		char[] ch="ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
		return ch[n];
	}
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int h=sc.nextInt(),w=sc.nextInt(),f=0;
    char c;
    String[][] str=new String[h][w];
    for(int i=0;i<h;i++){
      for(int j=0;j<w;j++){
        str[i][j]=sc.next();
        if(str[i][j].equals("snuke")){
          f=i+1;
          c=chalpha(j);
        }
      }
    }
    System.out.println(c+""+f);
  }
}


Compiler output:
Main.java:4: error: invalid method declaration; return type required
  public static chalpha(int n){
                ^
1 error
Language: C++

#define repr(i, n) for(int i = n;i >= 0;i--)
#define For(i, s, e) for(int i = s;i <= e;i++)
#define Sort(v, n) sort(v, v+n);
#define VSort(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
#define cY cout<<"Yes";
#define cN cout<<"No";
#define cA(a) cout<<a;
const ll MOD = 1000000007;
 
int main() {
    int h,w;
    cin>>h>>w;
    string s;
    For(i,1,h) {
        For(j,1,w) {
            cin >> s;
            if(s == "snuke") {
                printf("%c",'A'+j-1);
                cout << i;
            }
        }
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'cin' was not declared in this scope
   15 |     cin>>h>>w;
      |     ^~~
a.cc:16:5: error: 'string' was not declared in this scope
   16 |     string s;
      |     ^~~~~~
a.cc:19:20: error: 's' was not declared in this scope
   19 |             cin >> s;
      |                    ^
a.cc:21:17: error: 'printf' was not declared in this scope
   21 |                 printf("%c",'A'+j-1);
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define repr(i, n) for(int i = n;i >= 0;i--)
a.cc:22:17: error: 'cout' was not declared in this scope
   22 |                 cout << 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 <cstdio>
#include <cctype>
using namespace std;
template <typename T> inline void read(T& ret) {
  int c = getchar(); ret = 0;
  while(!isdigit(c)) { c = getchar(); }
  while(isdigit(c)) { ret = ret * 10 + c - 48, c = getchar(); }
}
template <typename T, typename... Args> inline void read(T& ret, Args&... args) { read(ret), read(args...); }
int main()
{
	int n, m; read(n, m);
	for(int i = 1; i <= n; i ++)
      for(int j = 1; j <= m; j ++) {
        string s; cin >> s;
        if(s == "snuke") {
          printf("%c%d\n", char('A' - 1 + j), i);
          return 0;
      }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'string' was not declared in this scope
   15 |         string s; cin >> s;
      |         ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    2 | #include <cctype>
  +++ |+#include <string>
    3 | using namespace std;
a.cc:15:19: error: 'cin' was not declared in this scope
   15 |         string s; cin >> s;
      |                   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <cctype>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:15:26: error: 's' was not declared in this scope
   15 |         string s; cin >> s;
      |                          ^
Language: C++

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

struct union_find {
  vector<long long> parent, sizes;
  void init(long long n) {
    for (long long i = 0; i < n; i++) {
      parent.push_back(i);
      sizes.push_back(1);
    }
  }
  long long root(long long n) {
    if (parent[n] == n) return n;
    return parent[n];
  }
  void unite(long long a, long long b) {
    parent[b] = a;
    sizes[root(a)] += sizes[root(b)];
  }
  bool is_united(long long a, long long b) {return (root(a) == root(b));}
}

int main() {
  long long n, m;
  cin >> n >> m;
  
  union_find uf;
  uf.init(n);
  
  vector<vector<long long>> v(m, vector<long long>(0));
  for (long long i = 0; i < n; i++) {
    long long k;
    cin >> k;
    for (long long j = 0; j < k; j++) {
      long long l;
      cin >> l;
      v[l - 1].push_back(i);
    }
  }
  for (long long i = 0; i < m; i++) {
    for (long long j = 1; j < v[i].size(); j++) {
      uf.unite(v[i][0], v[i][j]);
    }
  }
  
  for (long long i = 1; i < n; i++) {
    if (!uf.is_united(0, i)) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}

Compiler output:
a.cc:21:2: error: expected ';' after struct definition
   21 | }
      |  ^
      |  ;
Language: C++

#include <iostream>
using namespace std;

int main(){
  int h, w, i, j;
  string s;
  cin >> h >> w;
  for(i=0; i<h; i++){
    for(j=0; j<w; j++){
      cin >> s;
      if(s == "snuke"){
        cout << (char)("A"+j) << (i+1) << "\n";
        return 0;
      }
    }  
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: cast from 'const char*' to 'char' loses precision [-fpermissive]
   12 |         cout << (char)("A"+j) << (i+1) << "\n";
      |                 ^~~~~~~~~~~~~
Language: C++

def main():
	h, w = map(int, input().split())
	s = [list(input().split()) for _ in range(h)]

	for i in range(h):
		for j in range(w):
			if s[i][j] == "snuke":
				print(chr(ord('A')+j)+str(i+1))
				return

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(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  int h,w;cin>>h>>w;
  rep(i,h)rep(j,w){
    string s;cin>>s;
    if(s=="snuke"){
      vout<<'A'+j<<i+1<<endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'vout' was not declared in this scope
   13 |       vout<<'A'+j<<i+1<<endl;
      |       ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int h,w;
  cin >> h >> w;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      string s;
      cin >> s;
      if(s=="sunke"){
        cout << char('A'+j) << i+1 << endl;
        return 0;
      }
    }
  }
  

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

#include<stdio.h>
int main()
{
  	char str[10];
  	scanf("%d %d",&n,&m);
  	for(i=1;i<=n;i++)
    {
      	for(j=1;j<=m;j++)
        {
         	scanf("%s",str);
        	if(str[2]='u')
            {
             	printf("%d%c",i,'A'+j-1);
              	return 0;
            }
        }
    }
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:24: error: 'n' was not declared in this scope
    5 |         scanf("%d %d",&n,&m);
      |                        ^
a.cc:5:27: error: 'm' was not declared in this scope
    5 |         scanf("%d %d",&n,&m);
      |                           ^
a.cc:6:13: error: 'i' was not declared in this scope
    6 |         for(i=1;i<=n;i++)
      |             ^
a.cc:8:13: error: 'j' was not declared in this scope
    8 |         for(j=1;j<=m;j++)
      |             ^
Language: C

i;main(h,w,j){char s[6];for(scanf("%d%d",&h,&w);i++<h;)for(j=0;j++<w;){scanf("%s",s);if(b[0]+b[2]+b[4]==313)printf("%c%d",j+64,i);}}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | i;main(h,w,j){char s[6];for(scanf("%d%d",&h,&w);i++<h;)for(j=0;j++<w;){scanf("%s",s);if(b[0]+b[2]+b[4]==313)printf("%c%d",j+64,i);}}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
    1 | i;main(h,w,j){char s[6];for(scanf("%d%d",&h,&w);i++<h;)for(j=0;j++<w;){scanf("%s",s);if(b[0]+b[2]+b[4]==313)printf("%c%d",j+64,i);}}
      |   ^~~~
main.c: In function 'main':
main.c:1:3: error: type of 'h' defaults to 'int' [-Wimplicit-int]
main.c:1:3: error: type of 'w' defaults to 'int' [-Wimplicit-int]
main.c:1:3: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:1:29: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | i;main(h,w,j){char s[6];for(scanf("%d%d",&h,&w);i++<h;)for(j=0;j++<w;){scanf("%s",s);if(b[0]+b[2]+b[4]==313)printf("%c%d",j+64,i);}}
      |                             ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | i;main(h,w,j){char s[6];for(scanf("%d%d",&h,&w);i++<h;)for(j=0;j++<w;){scanf("%s",s);if(b[0]+b[2]+b[4]==313)printf("%c%d",j+64,i);}}
main.c:1:29: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | i;main(h,w,j){char s[6];for(scanf("%d%d",&h,&w);i++<h;)for(j=0;j++<w;){scanf("%s",s);if(b[0]+b[2]+b[4]==313)printf("%c%d",j+64,i);}}
      |                             ^~~~~
main.c:1:29: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:89: error: 'b' undeclared (first use in this function)
    1 | i;main(h,w,j){char s[6];for(scanf("%d%d",&h,&w);i++<h;)for(j=0;j++<w;){scanf("%s",s);if(b[0]+b[2]+b[4]==313)printf("%c%d",j+64,i);}}
      |                                                                                         ^
main.c:1:89: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:109: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | i;main(h,w,j){char s[6];for(scanf("%d%d",&h,&w);i++<h;)for(j=0;j++<w;){scanf("%s",s);if(b[0]+b[2]+b[4]==313)printf("%c%d",j+64,i);}}
      |                                                                                                             ^~~~~~
main.c:1:109: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:109: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:109: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<algorithm>
#include<iostream>
#include<functional>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
  int n,x;
  string count,aa="ABCDEFGHIJKLMNOPQRSTUVWXYZ;
  cin>>n>>x;
  for(int i=0;i<n;i++){
    for(int j=0;j<x;j++){
      string name;
      cin>>name;
      count=name;
      if(count=="s"){
        cout<<aa[j]<<i+1<<<endl;
      }
    }
  }
}

Compiler output:
a.cc:9:19: warning: missing terminating " character
    9 |   string count,aa="ABCDEFGHIJKLMNOPQRSTUVWXYZ;
      |                   ^
a.cc:9:19: error: missing terminating " character
    9 |   string count,aa="ABCDEFGHIJKLMNOPQRSTUVWXYZ;
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:10:9: error: conversion from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   10 |   cin>>n>>x;
      |   ~~~~~~^~~
a.cc:17:27: error: expected primary-expression before '<' token
   17 |         cout<<aa[j]<<i+1<<<endl;
      |                           ^
Language: C++

#include<algorithm>
#include<iostream>
#include<functional>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
  int n,x;
  string count,aa="ABCDEFGHIJKLMNOPQRSTUVWXYZ;
  cin>>n>>x;
  for(int i=0;i<n;i++){
    for(int j=0;j<x;j++){
      string name;
      cin>>name;
      count=name;
      if(count=="s"){
        cout<<j+1<<aa[j]<<endl;
      }
    }
  }
}

Compiler output:
a.cc:9:19: warning: missing terminating " character
    9 |   string count,aa="ABCDEFGHIJKLMNOPQRSTUVWXYZ;
      |                   ^
a.cc:9:19: error: missing terminating " character
    9 |   string count,aa="ABCDEFGHIJKLMNOPQRSTUVWXYZ;
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:10:9: error: conversion from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   10 |   cin>>n>>x;
      |   ~~~~~~^~~
Language: Java

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    H = sc.nextInt(), W = sc.nextInt();
    String[][] S = new String[H][W];
    ansH = -1,ansW = -1;
    for(int i=0;i<H;i++){
      for(int j=0;j<W;j++){
        S[i][j] = s.next();
        if(S[i][j].equals("snuke")){
          ansH = i;
          ansW = j;
        }
      }
    }
    System.out.println(char("A"+j)+(i+1))
  }
}

Compiler output:
Main.java:4: error: ';' expected
    H = sc.nextInt(), W = sc.nextInt();
                    ^
Main.java:6: error: ';' expected
    ansH = -1,ansW = -1;
             ^
Main.java:16: error: '.class' expected
    System.out.println(char("A"+j)+(i+1))
                           ^
Main.java:16: error: not a statement
    System.out.println(char("A"+j)+(i+1))
                                ^
Main.java:16: error: ';' expected
    System.out.println(char("A"+j)+(i+1))
                                 ^
Main.java:16: error: not a statement
    System.out.println(char("A"+j)+(i+1))
                                     ^
Main.java:16: error: ';' expected
    System.out.println(char("A"+j)+(i+1))
                                       ^
7 errors
Language: C++

15 10
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snuke snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 15 10
      | ^~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int h, w;
	cin >> h >> w;
	vector< vector<string> > S(h, vector<string>(w);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			cin >> S[i][j];
			if (S[i][j] == "snuke") {
				cout << 'A' + j << i + 1 << endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:56: error: expected ')' before ';' token
   10 |         vector< vector<string> > S(h, vector<string>(w);
      |                                   ~                    ^
      |                                                        )
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int h, w;
	cin >> h >> w;
	vector< vector<string> > S(h, vextor<string>(w);
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			cin >> S[i][j];
			if (S[i][j] == "snuke") {
				cout << 'A' + j << i + 1 << endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:39: error: 'vextor' was not declared in this scope
   10 |         vector< vector<string> > S(h, vextor<string>(w);
      |                                       ^~~~~~
a.cc:10:52: error: expected primary-expression before '>' token
   10 |         vector< vector<string> > S(h, vextor<string>(w);
      |                                                    ^
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
 
using namespace std;
int main(void)
{
  int h,w;
  cin >> h >> w;
  REP(i,h) RE(j,w){
    string s;
    cin >> s;
    if(s=="snuke") cout << (char)'A'+j << i << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'j' was not declared in this scope
   13 |   REP(i,h) RE(j,w){
      |               ^
a.cc:13:12: error: 'RE' was not declared in this scope; did you mean 'REP'?
   13 |   REP(i,h) RE(j,w){
      |            ^~
      |            REP
Language: C++

h, w = gets.split(" ").map(&:to_i)

x = y = -1

h.times { |i|
  a = gets.split(" ")
  if a.include?("snuke")
    x = ('A'.ord+a.index("snuke"))
    y = i+1
  end
}

puts "#{x.chr}#{y}"


Compiler output:
a.cc:1:1: error: 'h' does not name a type
    1 | h, w = gets.split(" ").map(&:to_i)
      | ^
a.cc:13:1: error: 'puts' does not name a type
   13 | puts "#{x.chr}#{y}"
      | ^~~~
Language: C++

15 10
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snuke snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake
snake snake snake snake snake snake snake snake snake snake


Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 15 10
      | ^~
Language: C++

Inputs()= parse.(Int,split(readline()))
Input()=parse.(Int,readline())
function main()
    N=Input()
    A=[]
    while N>0
        t=floor(Int,N/2+1)
        push!(A,t)
        N-=t
    end
    sort!(A)
    for i=1:length(A)
        println(A[i])
    end
end

main()

Compiler output:
a.cc:1:9: error: expected constructor, destructor, or type conversion before '=' token
    1 | Inputs()= parse.(Int,split(readline()))
      |         ^
Language: C++

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

int main(){
  int n; cin >> n;
  ll num = 0, ans;
  for(int i=1; ; i++) {
    num += i;
    if(n <= num) {
      ans = i;
      break;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll num = 0, ans;
      |   ^~
a.cc:8:5: error: 'num' was not declared in this scope; did you mean 'enum'?
    8 |     num += i;
      |     ^~~
      |     enum
a.cc:10:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |       ans = i;
      |       ^~~
      |       abs
a.cc:14:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <iostream>

using LLONG = long long;
using namespace std;

int main()
{
    LLONG N; cin >> N;
    LLONG max = 0;
    for(max = sqrt(2 * N);; ++max)
    {
        LLONG tmp = max * (max + 1) / 2;
        if(tmp > N)
        {
            break;
        }
    }
    LLONG ng = max * (max + 1) / 2 - N;
    for(int i = 1; i <= max; ++i)
    {
        if(i != ng)
        {
            cout << i << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'sqrt' was not declared in this scope
   10 |     for(max = sqrt(2 * N);; ++max)
      |               ^~~~
Language: C++

　#include <bits/stdc++.h>
using namespace std;
#define PI 3.141592653589793
#define MOD 1000000007
typedef long long ll;
typedef long double ld;

ll calc(ll N){
    ll num = 1;
    while(1){
        if(num * (num + 1) /2 >= N){
            break;
        }
        num++;
    }
    return num;
}

int main() {
    ll N;
    cin >> N;
    vector<ll> ans;
    while(N > 0){
        ans.push_back(calc(N));
        N -=  calc(N);
    }
    
    for(int i = 0; i < ans.size(); i++){
        cout << ans[i] << endl;
    }

}


Compiler output:
a.cc:1:1: error: extended character 　 is not valid in an identifier
    1 | 　#include <bits/stdc++.h>
      | ^
a.cc:1:3: error: stray '#' in program
    1 | 　#include <bits/stdc++.h>
      |   ^
a.cc:1:1: error: '\U00003000' does not name a type
    1 | 　#include <bits/stdc++.h>
      | ^~
a.cc: In function 'int main()':
a.cc:21:5: error: 'cin' was not declared in this scope
   21 |     cin >> N;
      |     ^~~
a.cc:22:5: error: 'vector' was not declared in this scope
   22 |     vector<ll> ans;
      |     ^~~~~~
a.cc:22:14: error: expected primary-expression before '>' token
   22 |     vector<ll> ans;
      |              ^
a.cc:22:16: error: 'ans' was not declared in this scope
   22 |     vector<ll> ans;
      |                ^~~
a.cc:29:9: error: 'cout' was not declared in this scope
   29 |         cout << ans[i] << endl;
      |         ^~~~
a.cc:29:27: error: 'endl' was not declared in this scope
   29 |         cout << ans[i] << endl;
      |                           ^~~~
Language: C

//Exactly N points

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define int long long
#define rep(i,x,y) for(ll i=x;i<y;i++)
#define irep(i,a) for(auto i = a.begin(); i != a.end(); ++i)
#define nvarep(n,a) ll n;cin>>n;vector<ll>a(n);rep(i,0,n)cin>>a[i]
#define vecrep(n,a,type) vector<type>a(n);rep(i,0,n)cin>>a[i]
#define lcm(a,b) (a/__gcd(a, b)*b)
#define range(a) (a).begin(),(a).end() 
#define pb push_back
#define mp make_pair
#define nnn "\n"
#define spa " "
using p = pair<ll, string>;
using garph = vector<vector<ll>>;
const int inf = 2147483647;//2*10^9
const ll INF = 9223372036854775807;//9*10^18

signed main (){
    int n;cin>>n;
    int i;
    for(i=0;(1+i)*i/2<n;i++){}
    vector<int>ans;
    for(;n>0;){
        if(n>=i){
            n-=i;
            ans.pb(i);
            i--;
        }else{
            i--;
            continue;
        }
    }
    rep(i,0,ans.size())cout<<ans[i]<<nnn;
    return 0;
}

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

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i ,n) for(int i = 0 ; i < (n) ; i ++ )
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
using vin=vector<int>;
using P = pair<int, int>;
const int inf=1e9+7;
const ll INF=1e18;
wakaran

Compiler output:
a.cc:12:1: error: 'wakaran' does not name a type
   12 | wakaran
      | ^~~~~~~
Language: C

#include <iostream>
#include <vector>

using namespace std;

int main(void)
{
  int N; cin >> N;
  while(N > 0)
  {
    cout << N/2+1 << endl;
    N /= 2;
  }
}


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

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

int main(){
  int n;
  cin >> n;
  for (int i=1;i<=n;++i){
    if (i*(i+1)/2>=n){
      for (int j=i;j>=1;--j){
	    if (j<=n){
	      cout<<i<<"\n";
	      n-=j;
	    }
      }
      break;
    }
  }
  return 0;
}


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

#include <vector>
#include <cmath>

using namespace std;

int main(int argc, char* argv[]) {
  long double N;
  cin >> N;

  long long X = ceil((-1.0 + sqrt(1.0 + 8.0 * N)) / 2.0);

  vector<long long> ret;
  ret.push_back(X);
  long long cur = N;
  cur -= X;
  while (true) {
    if (cur <= X - 1) {
      ret.push_back(cur);
      break;
    } else {
      X = X - 1;
      if (X > cur)
        X = cur;
      ret.push_back(X);
      cur -= X;
      if (cur == 0)
        break;
    }
  }

  for (int i = ret.size() - 1; i >= 0; --i) {
    if (ret[i] == 0)
      continue;
    cout << ret[i] << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> N;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <cmath>
  +++ |+#include <iostream>
    3 | 
a.cc:34:5: error: 'cout' was not declared in this scope
   34 |     cout << ret[i] << endl;
      |     ^~~~
a.cc:34:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:23: error: 'endl' was not declared in this scope
   34 |     cout << ret[i] << endl;
      |                       ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <cmath>
  +++ |+#include <ostream>
    3 |
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
#define erep(i,n) for(int i = 0;i<=n;i++)
#define rep1(i,n) for(int i = 1;i<n;i++)
#define erep1(i,n) for(int i = 1;i<=n;i++)
typedef long long ll;
#define vint vector<int>
#define vvint vector<vector<int>>
#define vstring vector<string>
#define vll vector<ll>
#define vbool vector<bool>
#define INF 1000000009
using P = pair<int,int>;
 
int main() {
  #define int long long
  int k;
  cin >> k;
  int num = 0,sum = 0;
  while(sum < k){
    num++;
    sum += num;
  }
  vint ans(0);
  while(k > 0){
    if(num < k){
      ans.push_back(num);
      k -= num;
      num--;
    }
    else{
      ans.push_back(k);
      k -= k;
    }
  }
  for(int i = s.size()-1;i >= 0;i--) cout << ans[i] << endl;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:37:15: error: 's' was not declared in this scope
   37 |   for(int i = s.size()-1;i >= 0;i--) cout << ans[i] << endl;
      |               ^
Language: C++

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

int justpoint01(int n, int i) {
  int A = 0;
  for (int j = 1; j < n + 1; j++) {
    A += j;
    if (0 <= A - n && A - n < j) {
      i = j;
      break;
    }
    return A,i;
  }
}

void justpoint02(int a, int n, int i) {
  bitset<i> B;
  for (int j = 0; j < i; j++) {
    B.set(j, 1);
  }
  for (int j = 0; j < i + 1; j++) {
    if (a - j == n) {
      B.set(j - 1, 0);
      break;
    }
  }
  for (int j = 0; j < i; j++) {
    if (B.test(j) == 1) {
      cout << j + 1 << endl;
    }
  }
  return;
}

int main() {
  
  int N;
  cin >> N;
  
  justpoint01(N, i);
  justpoint02(A, N, i);
  
}


Compiler output:
a.cc: In function 'void justpoint02(int, int, int)':
a.cc:17:11: error: 'i' is not a constant expression
   17 |   bitset<i> B;
      |           ^
a.cc:17:11: note: in template argument for type 'long unsigned int'
a.cc:19:7: error: request for member 'set' in 'B', which is of non-class type 'int'
   19 |     B.set(j, 1);
      |       ^~~
a.cc:23:9: error: request for member 'set' in 'B', which is of non-class type 'int'
   23 |       B.set(j - 1, 0);
      |         ^~~
a.cc:28:11: error: request for member 'test' in 'B', which is of non-class type 'int'
   28 |     if (B.test(j) == 1) {
      |           ^~~~
a.cc: In function 'int main()':
a.cc:40:18: error: 'i' was not declared in this scope
   40 |   justpoint01(N, i);
      |                  ^
a.cc:41:15: error: 'A' was not declared in this scope
   41 |   justpoint02(A, N, i);
      |               ^
a.cc: In function 'int justpoint01(int, int)':
a.cc:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      | ^
Language: C++

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

int justpoint01(int n, int i) {
  int A = 0;
  for (int j = 1; j < n + 1; j++) {
    A += j;
    if (0 <= A - N && A - N < j) {
      i = j;
      break;
    }
    return A,i;
  }
}

void justpoint02(int a, int n, int i) {
  bitset<i> B;
  for (int j = 0; j < i; j++) {
    B.set(j, 1);
  }
  for (int j = 0; j < i + 1; j++) {
    if (a - j == n) {
      B.set(j - 1, 0);
      break;
    }
  }
  for (int j = 0; j < i; j++) {
    if (B.test(j) == 1) {
      cout << j + 1 << endl;
    }
  }
  return;
}

int main() {
  
  int N;
  cin >> N;
  
  justpoint01(N, i);
  justpoint02(A, N, i);
  
}


Compiler output:
a.cc: In function 'int justpoint01(int, int)':
a.cc:8:18: error: 'N' was not declared in this scope
    8 |     if (0 <= A - N && A - N < j) {
      |                  ^
a.cc: In function 'void justpoint02(int, int, int)':
a.cc:17:11: error: 'i' is not a constant expression
   17 |   bitset<i> B;
      |           ^
a.cc:17:11: note: in template argument for type 'long unsigned int'
a.cc:19:7: error: request for member 'set' in 'B', which is of non-class type 'int'
   19 |     B.set(j, 1);
      |       ^~~
a.cc:23:9: error: request for member 'set' in 'B', which is of non-class type 'int'
   23 |       B.set(j - 1, 0);
      |         ^~~
a.cc:28:11: error: request for member 'test' in 'B', which is of non-class type 'int'
   28 |     if (B.test(j) == 1) {
      |           ^~~~
a.cc: In function 'int main()':
a.cc:40:18: error: 'i' was not declared in this scope
   40 |   justpoint01(N, i);
      |                  ^
a.cc:41:15: error: 'A' was not declared in this scope
   41 |   justpoint02(A, N, i);
      |               ^
a.cc: In function 'int justpoint01(int, int)':
a.cc:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      | ^
Language: C++

import sys
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
from bisect import bisect_left
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    n = int(input())
    cumsum = list()
    for i in range(n):

        if i == 0:
            cumsum.append(1)
            continue
        
        else:
            cumsum.append(cumsum[i-1]+i+1)

        if cumsum[i] > n:
            break
    
    ban = cumsum[-1]-n
    for i in range(1, len(cumsum)+1):
        if i != ban:
            print(i)

    return

if __name__ == '__main__':
    main()

Compiler output:
a.cc:9:22: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
    9 |     sys.stderr.write('DEBUG: {}'.format(s))
      |                      ^~~~~~~~~~~
a.cc:34:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   34 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
#define tii tuple<int,int,int>
#define Priq priority_queue<int,vi,greater<int>>
#define pb push_back
#define mp make_pair
#define INF (1ll<<60)
signed main(){
  int N; cin>>N;
  int ans,memo;
  REP(i,1,N){
    int P=i*(i+1)/2;
    if(P>=N){
      ans=i;
      memo=P-K;
    }
  }
  REP(i,1,ans){
    if(memo!=i) cout<<i<<endl;
  }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:26:14: error: 'K' was not declared in this scope
   26 |       memo=P-K;
      |              ^
Language: C++

#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
using vc = vector<char>;
using vvc = vector<vc>;
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
int main(){
  ll n;
  cin>>n;
  ll cu=n;
  vll ans(0);
  ll cu=0;
  for(int i=1;;i++){
    if(i*(i+1)/2>=n){
      cu=i;
      break;
    }
  }
  ll k=n-cu*(cu+1)/2;
  for(int i=1;i<=cu;i++){
    if(i==k) continue;
    
    COUT(i);
  }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:47:6: error: redeclaration of 'long long int cu'
   47 |   ll cu=0;
      |      ^~
a.cc:45:6: note: 'long long int cu' previously declared here
   45 |   ll cu=n;
      |      ^~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  int ok = 20000, ng = 0;
  while(ok - ng > 1){
    int mid = (ok + ng) / 2;
    if(mid * (mid + 1) / 2 >= N){
      ok = mid;
    }else{
      ng = mid;
    }
  }

  set<int> ans;
  for(int i = ok; i >= 1; i--){
    if(N >= i){
      cout << i << endl;
      N -= i;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: 'set' was not declared in this scope
   18 |   set<int> ans;
      |   ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    1 | #include<iostream>
  +++ |+#include <set>
    2 | using namespace std;
a.cc:18:7: error: expected primary-expression before 'int'
   18 |   set<int> ans;
      |       ^~~
Language: C++

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

int main(){
  int n; cin>>n;
  int dp[1001];
  dp[0]=0; dp[1]=1;
  for(int i=2;i<1001;i++){
    dp[i]=dp[i-1]+i;
  }
  int i=1000;
  while(n!=0){
    while(dp[i]>=n){
      i--;
    }
    i+=1;
    cout<<i<<endl;
    n-=i; 
  }


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

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

int main(){
  int n; cin>>n;
  int dp[1001];
  dp[0]=0; dp[1]=1;
  for(int i=2;i<1001;i++){
    dp[i]=pd[i-1]+i;
  }
  int i=1000;
  while(n!=0){
    while(dp[i]>=n){
      i--;
    }
    i+=1;
    cout<<i<<endl;
    n-=i; 
  }
}

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

#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
 
#define rep(i,n) for(int i = 0;i<n;i++)
const long long MOD = 1000000007;

bool visited[8][8];
string map[8] = {};

int main(){
    int n;cin >> n;
    int i = 1;
    int sum = 0;
    while(sum < n){
      sum += i;
      i++;
    }
    int not_choose = sum - n;
    for(int j = 1; j<i; j++){
      if(j != not_choose){
        cout << j << "\n";
      }
    }

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

#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd_(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}

int main(){
  
  long long n;
  cin>>n;
  
  long long max_v;
  for(long long i=0;i<=n;i++){
    if((i+1)*i/2>=n){
      mav_v = i;
      break;
    }
  }
  
  long long limit = (max_v+1)*max_v/2;
  long long diff = limit - n;
  for(long long i=1;i<=max_v;i++){
    if(i==diff)continue;
    cout<<i<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:7: error: 'mav_v' was not declared in this scope; did you mean 'max_v'?
   54 |       mav_v = i;
      |       ^~~~~
      |       max_v
Language: C++

#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd_(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}

int main(){
  
  long long n;
  cin>>n;
  
  long long max_v;
  for(long long i=0;i<=n;i++){
    if((i+1)*i/2>=n){
      mav_v = i;
      break;
    }
  }
  
  long long limit = (max_v+1)*max_v/2;
  diff = limit - n;
  for(long long i=1;i<=max_v;i++){
    if(i==diff)continue;
    cout<<i<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:7: error: 'mav_v' was not declared in this scope; did you mean 'max_v'?
   54 |       mav_v = i;
      |       ^~~~~
      |       max_v
a.cc:60:3: error: 'diff' was not declared in this scope
   60 |   diff = limit - n;
      |   ^~~~
Language: C++

#include<bits\stdc++.h>
using namespace std;
#define int long long

int n,sum;

main() {
  cin >> n;
  for(int i=0;;++i) {
    sum += i;
    if (sum >= n) {
      sum -= n;
      n = i;
      break;
    }
  }
  for(int i=1;i<=n;++i) if (i != sum) cout << i << " ";
  cout << endl;
}
  

Compiler output:
a.cc: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;

#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define REV(i,n) for(ll (i) = (n) - 1;(i) >= 0;--i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {REP(WW,n)cerr << v[WW] << ' ';cerr << endl << endl;}
#define SHOW2d(v,WW,HH) {REP(W_,WW){REP(H_,HH)cerr << v[W_][H_] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
#define MOD 1000000007

typedef long long ll;
typedef pair<ll,ll> P;

bool no[11111111];
int main(){
	cin.tie(0);ios::sync_with_stdio(false);
	ll n;cin >> n;
	ll sum = 0;
	REP(i, n){
		sum += i+1;
		no[i] = true;
		if(sum >= n)break;
	}
	REP(i, n){
		if(sum - (i+1) == n){
			sum -= i+1;
			no[i] = false;
		}
	}
	vector<int> ans;
	REP(i, n)if(no[i])ans.PB(i+1) << " " << endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:39: error: invalid operands of types 'void' and 'const char [2]' to binary 'operator<<'
   40 |         REP(i, n)if(no[i])ans.PB(i+1) << " " << endl;
      |                           ~~~~~~~~~~~ ^~ ~~~
      |                                 |        |
      |                                 void     const char [2]
Language: C++

#include<stdio.h>
int main()
{
  	int cnt=0,i;
  	scanf("%d",&n);
  	for(i=1;i<=n;i++)
    {
      	if(cnt<n)
          cnt=cnt+i,tmp=i;
    	else
          	break;
    }
  	for(i=tmp;i>=1;i--)
    {
      	if(n-i>=0)
        {
        	arr[i]=1;
        	n=n-i;
        }
    }
  	for(i=1;i<=tmp;i++)
    {
      	if(arr[i]==1)
      		printf("%d\n",i);
    }
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: 'n' was not declared in this scope
    5 |         scanf("%d",&n);
      |                     ^
a.cc:9:21: error: 'tmp' was not declared in this scope
    9 |           cnt=cnt+i,tmp=i;
      |                     ^~~
a.cc:13:15: error: 'tmp' was not declared in this scope
   13 |         for(i=tmp;i>=1;i--)
      |               ^~~
a.cc:17:17: error: 'arr' was not declared in this scope
   17 |                 arr[i]=1;
      |                 ^~~
a.cc:21:20: error: 'tmp' was not declared in this scope
   21 |         for(i=1;i<=tmp;i++)
      |                    ^~~
a.cc:23:12: error: 'arr' was not declared in this scope
   23 |         if(arr[i]==1)
      |            ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,sum=0,tmp;
  cin >> n;
  for(int i=1;i<=n;i++){
    sum+=i;
    if(sum>=n){
      tmp=sum-n;
      break;
    }
  int a=0;
  for(int i=1;i<=n;i++){
    if(a==n)break;
    if(i!=tmp){
      cout << i << endl;
      a+=i;
    }
  }
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,sum=0,tmp;
  cin >> n;
  for(int i=1;i<=n;i++){
    sum+=i;
    if(sum>=n){
      tmp=sum-n;
      break;
    }
  int a=0;
  for(int i=1;i<=n;i++){
    if(a==n) return 0;
    if(i!=tmp){
      cout << i << endl;
      a+=i;
    }
  }
}


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

#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
 
using namespace std;
int plans(int n,int m)
{
  if(n==0) return 0;
  else if(m>n) return plans(n,--m);
  else{
    cout << m << endl;
    return plans(n-m,--m));
  }
}
int main(void)
{
  int n;
  cin >> n;
  REP(i,n+1) if(i*(i+1)/2>=n) return plans(n,i);
  return 0;
}

Compiler output:
a.cc: In function 'int plans(int, int)':
a.cc:15:26: error: expected ';' before ')' token
   15 |     return plans(n-m,--m));
      |                          ^
      |                          ;
a.cc:15:26: error: expected primary-expression before ')' token
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
 
using namespace std;
int plans(int n,int m)
{
  if(n==0) return 0;
  else if(m>n) return plans(n,--m);
  else{
    cout << m << endl;
    return plans(n-m,--m))
  }
}
int main(void)
{
  int n;
  cin >> n;
  REP(i,n+1) if(i*(i+1)/2>=n) return plans(n,i);
  return 0;
}

Compiler output:
a.cc: In function 'int plans(int, int)':
a.cc:15:26: error: expected ';' before ')' token
   15 |     return plans(n-m,--m))
      |                          ^
      |                          ;
a.cc:15:26: error: expected primary-expression before ')' token
Language: C++


using namespace std;
int plans(int n,int m)
{
  if(n==0) return 0;
  else if(m>n) return plans(n,--m);
  else{
    cout << m << endl;
    return plans(n-m,--m))
  }
}
int main(void)
{
  int n;
  cin >> n;
  REP(i,n+1) if(i*(i+1)/2>=n) return plans(n,i);
  return 0;
}

Compiler output:
a.cc: In function 'int plans(int, int)':
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << m << endl;
      |     ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:8:18: error: 'endl' was not declared in this scope
    8 |     cout << m << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | 
a.cc:9:26: error: expected ';' before ')' token
    9 |     return plans(n-m,--m))
      |                          ^
      |                          ;
a.cc:9:26: error: expected primary-expression before ')' token
a.cc: In function 'int main()':
a.cc:15:3: error: 'cin' was not declared in this scope
   15 |   cin >> n;
      |   ^~~
a.cc:15:3: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:7: error: 'i' was not declared in this scope
   16 |   REP(i,n+1) if(i*(i+1)/2>=n) return plans(n,i);
      |       ^
a.cc:16:3: error: 'REP' was not declared in this scope
   16 |   REP(i,n+1) if(i*(i+1)/2>=n) return plans(n,i);
      |   ^~~