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

#include <iostream>
using namespace std;

int N;
int A[20010].B[20010];

int main(){
	cin >> N;
	for(int i=1;i<=N;i++){
		cin >> A[i];
		B[A[i]] = i;
	}
	for(int i=1;i<=N;i++){
		if(i!=N) cout << 30000*i << " ";
		else cout << 30000*i << endl;
	}
	for(int i=1;i<=N;i++){
		if(i!=N) cout << 30000*(N-i) + B[i] <<" ";
		else cout << 30000*(N-i) + B[i] << endl;
	}
}

Compiler output:
a.cc:5:13: error: expected initializer before '.' token
    5 | int A[20010].B[20010];
      |             ^
a.cc: In function 'int main()':
a.cc:10:24: error: 'A' was not declared in this scope
   10 |                 cin >> A[i];
      |                        ^
a.cc:11:17: error: 'B' was not declared in this scope
   11 |                 B[A[i]] = i;
      |                 ^
a.cc:18:48: error: 'B' was not declared in this scope
   18 |                 if(i!=N) cout << 30000*(N-i) + B[i] <<" ";
      |                                                ^
a.cc:19:44: error: 'B' was not declared in this scope
   19 |                 else cout << 30000*(N-i) + B[i] << endl;
      |                                            ^
Language: C++

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

#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x,n) bitset<n>(x)
#define PI 3.14159265358979323846

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

//-----------------------------------------------------------------------------

int n;
int p[20000];
int a[20000],b[20000];

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	cin>>n;
	REP(i,n) cin>>p[i];
	REP(i,n) {
		a[i]=i*40000+p[i];
		b[i]=(n-i)*40000+p[i];
	}
	REP(i,n) cout<<a[i]<<(i==n-1?endl:' ');
	REP(i,n) cout<<b[i]<<(i==n-1?endl:' ');

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:43: error: overloaded function with no contextual type information
   37 |         REP(i,n) cout<<a[i]<<(i==n-1?endl:' ');
      |                                           ^~~
a.cc:38:43: error: overloaded function with no contextual type information
   38 |         REP(i,n) cout<<b[i]<<(i==n-1?endl:' ');
      |                                           ^~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <utility>
#include <queue>
#include <set>
#include <map>

#define inf  1000000007
#define ll long long
#define PA pair<int,int>
#define PPAP pair<int,PA>
#define  MP make_pair
#define  PB push_back

using namespace std;

int main(){
	int n;
	cin >> n;
	vector<int> p(n);
	for(int i=0;i<n;i++){
		cin >> p[i];
		p[i]--;
	}
	vector<int> a(n),b(n);
	for(int i=1;i<=n;i++){
		a[i-1] = 33000*i;
		b[p-i] = 33000*i;
	}
	for(int i=0;i<n;i++){
			a[p[i]] += i;
	}
	for(int i=0;i<n-1;i++){
		cout << a[i] << " ";
	}
	cout << a[n-1] << endl;
	for(int i=0;i<n-1;i++){
		cout << b[i] << " ";
	}
	cout << b[n-1] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:20: error: no match for 'operator-' (operand types are 'std::vector<int>' and 'int')
   31 |                 b[p-i] = 33000*i;
      |                   ~^~
      |                   | |
      |                   | int
      |                   std::vector<int>
In file included from /usr/include/c++/14/string:48,
                 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_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:31:21: note:   'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
   31 |                 b[p-i] = 33000*i;
      |                     ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:31:21: note:   'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
   31 |                 b[p-i] = 33000*i;
      |                     ^
Language: C++

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

const int maxn=20005;
//int s[maxn];

int n;

struct node
{
    long long id,num,aa,bb;
}s[maxn];
bool cmp1(node x,node y)
{
    return x.num<y.num;
}
bool cmp2(node x,node y)
{
    return x.id<y.id;
}
int main()
{
    int n;
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        scanf("%d",&s[i].num);
        s[i].id=i;
    }
    sort(s+1,s+1+n,cmp1);
    long long ans=2*n+1;
    for(int i=1;i<=n;i++)
    {
        s[i].aa=i;
        s[i].bb=ans-i;
        ans--;
    }
    sort(s+1,s+1+n,cmp2);
    for(int i=1;i<=n;i++)
        cout<<s[i].aa<<' ';
    cout<<endl;
    for(int i=1;i<=n;i++)
        cout<<s[i].bb<<' ';
        cout<<endl;
   return 0;
}


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

typedef pair<int, int> Pi;
#define fi first
#define se second

const int INF = 1 << 28;
signed main()
{
  int N;
  Pi P[20005];

  cin >> N;
  Rep(i, N) {
    cin >> P[i].fi; P[i].se = i;
  }
  
  sort(P, P + N);
  
  int A[20005], B[20005];
  
  int a, b;
  a = b = 0;
  A[0] = a, B[0] = b;
  
  Rep(i, N - 1) {
    int sa1 = P[i + 1].se - P[i].se;
    int sa2 = P[i + 1].se - P[0].se;
    if(sa1 < 0) {
      a++; b = sa2 - a;
    } else {
      b--; a = sa2 - b;
    }
    
    A[i + 1] = a, B[i + 1] = b;
  }

  Rep(i, N - 1) cout << A[i] + LLINF << " "; cout << A[N - 1] + LLINF << endl;
  Rep(i, N - 1) cout << B[i] + LLINF << " "; cout << B[N - 1] + LLINF << endl;

  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:41:32: error: 'LLINF' was not declared in this scope; did you mean 'INF'?
   41 |   Rep(i, N - 1) cout << A[i] + LLINF << " "; cout << A[N - 1] + LLINF << endl;
      |                                ^~~~~
      |                                INF
a.cc:41:65: error: 'LLINF' was not declared in this scope; did you mean 'INF'?
   41 |   Rep(i, N - 1) cout << A[i] + LLINF << " "; cout << A[N - 1] + LLINF << endl;
      |                                                                 ^~~~~
      |                                                                 INF
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll MOD = 1000000007;


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

    vector<int> p(N);
    for(int i=0;i<N;i++){
        cin >> p[i];
    }

    vector<int> a(N), b(N);
    for(int i=0;i<N;i++){
        a[i] = 30000 * (i+1);
        b[i] = 30000 * (n-i);
    }
    for(int i=0;i<N;i++){
        b[p[i]-1] += i;
    }

    for(int i=0;i<N;i++){
        cout << (i ? " " : "") << a[i] << endl;
    }
    for(int i=0;i<N;i++){
        cout << (i ? " " : "") << b[i] << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: 'n' was not declared in this scope
   20 |         b[i] = 30000 * (n-i);
      |                         ^
Language: Java

import java.util.*;
public class pB {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int p[] = new int [N];
		for (int i = 0; i < N; i++) {
			p[i] = sc.nextInt() - 1;
		}
		
		int r[] = new int[N];
		for (int i = 0; i < N; i++) {
			r[p[i]] = i + 1;
		}
		
		long a[] = new long[N];
		long b[] = new long[N];
		// 初期値の設定
		for (int i = 0; i < N; i++) {
			a[i] = (N + 1) * (i + 1);
			b[i] = (N + 1) * (N - i - 1) + r[i]; 
		}
		
		// 出力
		for (long n : a) {
			System.out.print(n + " ");
		}
		System.out.println("");
		for (long n : b) {
			System.out.print(n + " ");
		}
		
		sc.close();
	}
}

Compiler output:
Main.java:2: error: class pB is public, should be declared in a file named pB.java
public class pB {
       ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int p[] = new int [N];
		for (int i = 0; i < N; i++) {
			p[i] = sc.nextInt() - 1;
		}
		
		int r[] = new int[N];
		for (int i = 0; i < N; i++) {
			r[p[i]] = i + 1;
		}
		
		long a[] = new long[N];
		long b[] = new long[N];
		// 初期値の設定
		for (int i = 0; i < N; i++) {
			a[i] = (N + 1) * (i + 1);
			b[i] = (N + 1) * (N - i - 1) + r[i]; 
		}
		
		// 出力
		for (long n : a) {
			System.out.print(n + " ");
		}
		System.out.println("");
		for (long n : b) {
			System.out.print(n + " ");
		}
		
		sc.close();
	}

Compiler output:
Main.java:36: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.*;
public class pB {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int p[] = new int [N];
		for (int i = 0; i < N; i++) {
			p[i] = sc.nextInt() - 1;
		}
		
		int r[] = new int[N];
		for (int i = 0; i < N; i++) {
			r[p[i]] = i + 1;
		}
		
		long a[] = new long[N];
		long b[] = new long[N];
		// 初期値の設定
		for (int i = 0; i < N; i++) {
			a[i] = 25000 * (i + 1);
			b[i] = 25000 * (N - i) + r[p[i]]; 
		}
		
		// 出力
		for (long n : a) {
			System.out.print(n + " ");
		}
		System.out.println("");
		for (long n : b) {
			System.out.print(n + " ");
		}
		
		sc.close();
	}
}

Compiler output:
Main.java:2: error: class pB is public, should be declared in a file named pB.java
public class pB {
       ^
1 error
Language: C++

#include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring> 
#include <sstream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <memory.h>
#include <iomanip>
#include <bitset>
#include <list>
#include <stack>
 
using namespace std;

#define mod 1000000007
#define maxnum 1000000000

int main()
{
    int n;
    cin >> n;
    int a[20010], b[20010], p[20010];
    for(int i = 1; i <= n; i++){
        a[i] = maxnum - n + i;
        b[i] = n - i + 1;
        int tmp;
        cin >> tmp;
        p[tmp] = i;
    }
    for(int i = 1; i <= n; i++){
        cout << i * n + p[i];
        if(i != n) cout << " ";
    }
    cout << endl;
    for(int i = 1; i <= n; i++){
        cout << (n - i) * n;
        if(i != n) cout << " ";
    }
    cour << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:5: error: 'cour' was not declared in this scope
   45 |     cour << endl;
      |     ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

const int d = 20100;

int main(){
	vector<pair<int,int> > v;
	int N;
	cin>>N;
	for(int i=0;i<N;i++){
		int p;
		cin>>p;
		p--;
		v.push_back(make_pair(p,i));
	}
	sort(ALL(v));
	vector<int> a(N),b(N);
	for(int i=0;i<N;i++){
		a[i] = v[i].second;
		b[i] = 0;
		a[i] += d*i;
		b[i] += -d*i + 500000000;
	}
	for(int i=0;i<N;i++){
		cout<<a[i]<<" ";
	}
	cout<<endl;
	for(int i=0;i<N;i++){
		cout<<b[i]<<" ";
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: 'ALL' was not declared in this scope
   19 |         sort(ALL(v));
      |              ^~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

const int d = 20100;

int main(){
	vector<pair<int,int> > v;
	int N;
	cin>>N;
	for(int i=0;i<N;i++){
		int p;
		cin>>p;
		p--;
		v.push_back(make_pair(p,i));
	}
	sort(ALL(v));
	vector<int> a,b;
	for(int i=0;i<N;i++){
		a[i] = v[i].second;
		b[i] = 0;
		a[i] += d*i;
		b[i] += -d*i + 500000000;
	}
	for(int i=0;i<N;i++){
		cout<<a[i]<<" ";
	}
	cout<<endl;
	for(int i=0;i<N;i++){
		cout<<b[i]<<" ";
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: 'ALL' was not declared in this scope
   19 |         sort(ALL(v));
      |              ^~~
Language: C++

#include<iostream>
#include<vector>

using namespace std;

const int d = 20100;

int main(){
	vector<pair<int,int> > v;
	int N;
	cin>>N;
	for(int i=0;i<N;i++){
		int p;
		cin>>p;
		p--;
		v.push_back(make_pair(p,i));
	}
	sort(ALL(v));
	vector<int> a,b;
	for(int i=0;i<N;i++){
		a[i] = v[i].second;
		b[i] = 0;
		a[i] += d*i;
		b[i] += -d*i + 500000000;
	}
	for(int i=0;i<N;i++){
		cout<<a[i]<<" ";
	}
	cout<<endl;
	for(int i=0;i<N;i++){
		cout<<b[i]<<" ";
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: 'ALL' was not declared in this scope
   18 |         sort(ALL(v));
      |              ^~~
a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |         sort(ALL(v));
      |         ^~~~
      |         short
Language: C++

#include<iostream>

using namespace std;

const int d = 20100;

int main(){
	vector<pair<int,int> > v;
	int N;
	cin>>N;
	for(int i=0;i<N;i++){
		int p;
		cin>>p;
		p--;
		v.push_back(make_pair(p,i));
	}
	sort(ALL(v));
	vector<int> a,b;
	for(int i=0;i<N;i++){
		a[i] = v[i].second;
		b[i] = 0;
		a[i] += d*i;
		b[i] += -d*i + 500000000;
	}
	for(int i=0;i<N;i++){
		cout<<a[i]<<" ";
	}
	cout<<endl;
	for(int i=0;i<N;i++){
		cout<<b[i]<<" ";
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<pair<int,int> > v;
      |         ^~~~~~
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 | 
a.cc:8:30: error: expected primary-expression before '>' token
    8 |         vector<pair<int,int> > v;
      |                              ^
a.cc:8:32: error: 'v' was not declared in this scope
    8 |         vector<pair<int,int> > v;
      |                                ^
a.cc:17:14: error: 'ALL' was not declared in this scope
   17 |         sort(ALL(v));
      |              ^~~
a.cc:17:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |         sort(ALL(v));
      |         ^~~~
      |         short
a.cc:18:16: error: expected primary-expression before 'int'
   18 |         vector<int> a,b;
      |                ^~~
a.cc:20:17: error: 'a' was not declared in this scope
   20 |                 a[i] = v[i].second;
      |                 ^
a.cc:21:17: error: 'b' was not declared in this scope
   21 |                 b[i] = 0;
      |                 ^
a.cc:26:23: error: 'a' was not declared in this scope
   26 |                 cout<<a[i]<<" ";
      |                       ^
a.cc:30:23: error: 'b' was not declared in this scope
   30 |                 cout<<b[i]<<" ";
      |                       ^
Language: C++

#define DEB
#include<bits/stdc++.h>
#define REP(i,m) for(int i=0;i<(m);++i)
#define REPN(i,m,in) for(int i=(in);i<(m);++i)
#define ALL(t) (t).begin(),(t).end()
#define CLR(a) memset((a),0,sizeof(a))
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
 
using namespace std;
 
 
#ifdef DEB
#define dump(x)  cerr << #x << " = " << (x) << endl
#define prl cerr<<"called:"<< __LINE__<<endl
template<class T> void debug(T a,T b){ for(;a!=b;++a) cerr<<*a<<' ';cerr<<endl;}
#else
#define dump(x) ;
#define prl ;
template<class T> void debug(T a,T b){ ;}
#endif

const int MAXN= 201000;
int a[MAXN];
int up[MAXN];
int down[MAXN];
int b[MAXN];
int s[MAXN];


int c[MAXN],n;
int lowbit(int x)//计算lowbit
{
    return x&(-x);
}

void add(int i,int val)//将第i个元素更改为val
{
    while(i<=n)
    {
        c[i]+=val;
        i+=lowbit(i);
    }
}

int sum(int i)//求前i项和
{
    int s=0;
    while(i>0)
    {
        s+=c[i];
        i-=lowbit(i);
    }
    return s;
}

int main(){
        scanf("%d",&n);
        memset(c,0,sizeof(c));
        for(int i=0;i<n;i++){
                scanf("%d",&a[i]);
                int small = sum(a[i]);
                int big = i - small;
                //cout<< small << " "<<big<<endl;
                up[a[i]] = a[i] + small;
                //cout<< a[i] << " "<<small<<endl;
                down[a[i]] = n+1-a[i] + big;

                add(a[i],1);
        }
        for(int i=1;i<=n;i++){
                if(i!=n)
                        printf("%d ",up[i]);
                else
                        printf("%d\n",up[i]);
        }     
        for(int i=1;i<=n;i++){
          if(i!=n)
              printf("%d ",down[i]);
          else
              printf("%d\n",down[i]);
   }
  

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

#include <bits/stdc++.h>
using namespace std;
#define N_PRIME 1000000007
#define ll int64_t


int main(void){
    
    int N;
    cin >> N;
    vector<int> p;
    for(int i = 0 ;i < N ; i++ ){
        int temp;
        cin >> temp;
        temp--;
        p.push_back(temp);
    }
    
    int a[N];
    int b[N];
    for(int i = 0 ; i < N ; i++ ){
        a[i] = 0;
        b[i] = 0;
    }
    
    a[ p[0] ] = 0;
    b[ p[0] ] = 0;
    
    for(int i = 0 ; i < p.size()  - 1; i++ ){
        /* a[p[i]] - a[[p+1]] < b[p[i+1]] - b[p[i]] */
        /* p[p+1] > p[i] のとき， */
    
        int sub = p[i+1] - p[i];
        if( sub > 0 ){
            /* a[p[i]] - a[[p+1]] = -sub <  -sub + 1 = b[p[i+1]] - b[p[i]] < 0 */
            sub = sub * 1000;
            a[ p[i+1] ] = a[p[i]] + sub;
            b[ p[i+1] ] = b[p[i]] - sub + 10;
        }else{
            sub = sub * (-1);
            sub = sub * 10  00 ;
            /* 0 < a[p[i]] - a[[p+1]] = sub < sub+1 =  b[p[i+1]] - b[p[i]]  */
            a[ p[i+1] ] = a[p[i]] - sub;
            b[ p[i+1] ] = b[p[i]] + sub + 10;
        }
    }
    
    int m = min(a[0],b[N-1]);
    if( m <= 0 ){
        for(int i = 0 ; i < N ; i++ ){
            a[i] += -m + 1;
            b[i] += -m + 1;
        }
    }
    
    for(int i = 0 ; i < N - 1; i++ ){
        cout << a[i] << " ";
    }
    cout << a[N-1] << endl;
    
    for(int i = 0 ; i < N - 1; i++ ){
        cout << b[i] << " ";
    }
    cout << b[N-1] << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:27: error: expected ';' before numeric constant
   41 |             sub = sub * 10  00 ;
      |                           ^ ~~
      |                           ;
Language: C++

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

//諸機能
#pragma region MACRO 
#define putans(x)  std::cerr << "[ answer ]: " ; cout << (x) << endl
#define dputans(x) std::cerr << "[ answer ]: "; cout << setprecision(40) << (double)(x) << endl
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define RREP(i,n,a) for(int i=(int)(n-1); i>= a; i--)
#define rep(i,n) REP(i,0,n)
#define rrep(i,n) RREP(i,n,0)
#define all(a) begin((a)),end((a))
#define mp make_pair
#define exist(container, n) ((container).find((n)) != (container).end())
#define equals(a,b) (fabs((a)-(b)) < EPS)
#ifdef _DEBUG //ファイルからテストデータを読み込む
std::ifstream ifs("data.txt");
#define put ifs >>
#else //ジャッジシステムでいい感じにやる
#define put cin >>
#endif
#pragma endregion
//デバッグなどの支援
#pragma region CODING_SUPPORT
#ifdef _DEBUG
#define dbg(var0) { std::cerr << ( #var0 ) << "=" << ( var0 ) << endl; }
#define dbg2(var0, var1) { std::cerr << ( #var0 ) << "=" << ( var0 ) << ", "; dbg(var1); }
#define dbg3(var0, var1, var2) { std::cerr << ( #var0 ) << "=" << ( var0 ) << ", "; dbg2(var1, var2); }
#define dbgArray(a,n) {std::cerr << (#a) << "=";  rep(i,n){std::cerr <<(a[i])<<",";} cerr<<endl;} 
#else
#define dbg(var0) {}
#define dbg2(var0, var1) {}
#define dbg3(var0, var1, var2) {}
#define dbgArray(a,n) {}
#endif 
#pragma endregion 
//typedef（書き換える、書き足す可能性ある）
#pragma region TYPE_DEF
typedef long long ll;
typedef pair<int, int> pii; typedef pair<string, string> pss; typedef pair<int, string>pis;
typedef pair<long long, long long> pll;
typedef vector<string> vs; typedef vector<int> vi;
#pragma endregion
//諸々の定数(書き換える可能性ある)
#pragma region CONST_VAL
#define PI (2*acos(0.0))
#define EPS (1e-10)
#define MOD (ll)(1e9 + 7)
#define INF (ll)(2*1e9)
#pragma endregion

int main() {
	int n; put n;
	vector<ll> p(n); rep(i, n) put p[i];
	vector<ll> a(n),b(n);
	rep(i, n) {
		a[i] = i + 1;
		b[i] = n - i;
	}
	rep(i, n) {
		int k = p[n - 1-i];
		int plus = n - 1 - i;
		dbg(k, plus);
		REP(j, k - 1, n) {
			a[j] += plus;
		}
		RREP(j,k,0) {
			b[j] += plus;
		}
		//cout << i << endl;
		//rep(j, n) cout << a[j] << " ";
		//cout << endl;
		//rep(j, n) cout << b[j] << " ";
		//cout << endl;
	}
	int amin = a[0] - 1;
	int bmin = b[n-1] - 1;
	rep(i, n) {
		a[i] -= amin;
		b[i] -= bmin;
	}

	rep(i, n-1) cout << a[i] << " ";
	cout << a[n-1] << endl;
	rep(i, n-1) cout << b[i] << " " ;
	cout << b[n-1] << endl;
	//rep(i, n) {
	//	cout << a[i] + b[i] << " ";
	//}
END:
	return 0;
}
//TLEしたらいもす

Compiler output:
a.cc:63:28: error: macro "dbg" passed 2 arguments, but takes just 1
   63 |                 dbg(k, plus);
      |                            ^
a.cc:31:9: note: macro "dbg" defined here
   31 | #define dbg(var0) {}
      |         ^~~
a.cc: In function 'int main()':
a.cc:63:17: error: 'dbg' was not declared in this scope
   63 |                 dbg(k, plus);
      |                 ^~~
Language: C++

#include <iostream>
using namespace std;

int n;
int p[20000];
int a[20000],b[20000];

void input(){
	int x;
	cin>>n;
	for(int i=0;i<na;i++){
		cin>>x;
		p[x-1]=i;
	}
}
void solve(){
	for(int i=0;i<n;i++){
		a[i]=(i+1)*30000;
		b[i]=999999999-(a[i]-p[i]);
	}
	
}

int main() {
	input();
	solve();
	for(int i=0;i<n-1;i++){
		cout<<a[i]<<" ";
	}
	cout<<a[n-1]<<endl;
	
	for(int i=0;i<n-1;i++){
		cout<<b[i]<<" ";
	}
	cout<<b[n-1]<<endl;
}

Compiler output:
a.cc: In function 'void input()':
a.cc:11:23: error: 'na' was not declared in this scope; did you mean 'n'?
   11 |         for(int i=0;i<na;i++){
      |                       ^~
      |                       n
Language: C++


 69         ll diff = cur - (a[i] + b[i]);
 70         if(diff < 0){
 71             a[i] -= diff;
 72         }
 73         else {


Compiler output:
a.cc:2:2: error: expected unqualified-id before numeric constant
    2 |  69         ll diff = cur - (a[i] + b[i]);
      |  ^~
a.cc:3:2: error: expected unqualified-id before numeric constant
    3 |  70         if(diff < 0){
      |  ^~
a.cc:6:2: error: expected unqualified-id before numeric constant
    6 |  73         else {
      |  ^~
Language: C++

include<bits/stdc++.h>
using namespace std;
double d,x,ans;
int n;
int main(){
	scanf("%d%lf%lf",&n,&x,&d);
	while(n!=0){
		ans+=x+n*d-d/2;
		x=(n+1.0)/n*x+5*d/(2*n);
		d=(n+2.0)/n*d;
		--n;
	}
	printf("%.10lf\n",ans);
	return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf' was not declared in this scope
    6 |         scanf("%d%lf%lf",&n,&x,&d);
      |         ^~~~~
a.cc:13:9: error: 'printf' was not declared in this scope
   13 |         printf("%.10lf\n",ans);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include<bits/stdc++.h>
Language: C++

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

typedef long long ll;
const int maxn = 1e5 + 5;

inline int gi()
{
	char c = getchar();
	while (c < '0' || c > '9') c = getchar();
	int sum = 0;
	while ('0' <= c && c <= '9') sum = sum * 10 + c - 48, c = getchar();
	return sum;
}

int n;

int main()
{
	double d, x;
	n = gi();
	scanf("%lf%lf", &d, &x);
	double ans = 0;
	++n;
	while ((n--) > 1) {
		ans += d + (n - 0.5) * x;
		d = (5 * x + (2 * n + 2) * d) / (2 * n);
		x = (2 * n + 4) * x / 2 / n;
	}
	printf("%.10lf\n", ans);
	
	return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | 1#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1#include <bits/stdc++.h>
      | ^
a.cc: In function 'int gi()':
a.cc:9:18: error: 'getchar' was not declared in this scope
    9 |         char c = getchar();
      |                  ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 1#include <bits/stdc++.h>
a.cc: In function 'int main()':
a.cc:22:9: error: 'scanf' was not declared in this scope
   22 |         scanf("%lf%lf", &d, &x);
      |         ^~~~~
a.cc:30:9: error: 'printf' was not declared in this scope
   30 |         printf("%.10lf\n", ans);
      |         ^~~~~~
a.cc:30:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

int main()
{
    freopen("1.in","r",stdin);
    int n;double d,x;
    cin>>n>>d>>x;
    double ans=0;
    for(;n;--n)
    {
        ans+=d+(n-0.5)*x;
        d=((2*n+2)*d+5*x)/(2*n);
        x=(2*n+4)*x/(2*n);
    }
    printf("%.9f\n",ans);


Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: expected '}' at end of input
   16 |     printf("%.9f\n",ans);
      |                          ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;
double d,x;
int main(){
	scanf("%d%d%d",&n,&d,&x);
	double ans=0;
	for(;n;--n){
		ans+=d+(n-0.5)*x;
		d=(((n+1)<<1)*d+(x<<1)+(x<<2))/(n<<1);
		x=((n+2)<<1))*x/(n<<1);
	}
	printf("%.9f\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:35: error: invalid operands of types 'double' and 'int' to binary 'operator<<'
   10 |                 d=(((n+1)<<1)*d+(x<<1)+(x<<2))/(n<<1);
      |                                  ~^~~
      |                                  |  |
      |                                  |  int
      |                                  double
a.cc:10:42: error: invalid operands of types 'double' and 'int' to binary 'operator<<'
   10 |                 d=(((n+1)<<1)*d+(x<<1)+(x<<2))/(n<<1);
      |                                         ~^~~
      |                                         |  |
      |                                         |  int
      |                                         double
a.cc:11:29: error: expected ';' before ')' token
   11 |                 x=((n+2)<<1))*x/(n<<1);
      |                             ^
      |                             ;
Language: C++

Quick and Efficient EDB to PST tool from EdbMails

The days of worrying over corrupted Exchange Server databases are long over. EdbMails Exchange Server Recovery tool is here to fix all your EDB issues and retrieve every last bit of data from it.

This is designed for quick, efficient and accurate recovery of EDB after events like sudden power failure, accidentally deleted mailboxes and similar scenarios.

It supports exchange server versions like 2019,2016,2013,2010,2007 and 2003. For exchange server version 2003,the tool automatically locates the .stm file.

The tool is compatible with Windows operating systems like Windows XP, Vista, 7, 8, 8.1 and 10. 

You can chose to export the EDB file mailbox into single or multiple PST files. There is even brick level recovery option that lets you export only the selected items instead of doing it as a whole.

This tool can recover mails,mail attachments,drafts,contacts,calendar,tasks,notes,journals etc. 

What makes EdbMails a one stop exchange recovery solution is the fact that it can migrate EDB directly to Office 365 or even Live Exchange Server. 

EdbMails offers support for Public and Private folder recovery and migration as well as archive folder migration. It also has support for Non-English Unicode characters and maintains the folder structure intact post  export. The data in the original source EDB file is not altered with in any manner when using EdbMails. There is also support for direct migration to Office 365 and on-premise exchange server. Not only can you Convert EDB to PST using EdbMails, but there is also support for incremental EDB migration to Office 365 and Live Exchange Server.

For more information and downloads please visit : https://www.edbmails.com

Compiler output:
a.cc:1:1: error: 'Quick' does not name a type
    1 | Quick and Efficient EDB to PST tool from EdbMails
      | ^~~~~
Language: C++

#include <bits/stdc++.h>
#define mod 1000000007
#define pb push_back
#define ll long long
using namespace std;
double solve(ll num, double d1, double dif){
	if(num == 1) return d1;
	else{
		ll nnum = num-1;
		double nd1 = (num+1) * d1 / num + 3 * dif / (2 * num);
		double ndif = (num+2) * dif / num;
		return ex + solve(nnum, nd1,ndif);
	}
}
int main(){
	ll n,d,x;
	cin>>n>>d>>x;
	double nd = (d + d + x) / 2.0;
	double nx = x * 2.0;
	cout<<fixed;
	cout<<setprecision(12)<<solve(n,nd,nx)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'double solve(long long int, double, double)':
a.cc:12:24: error: 'ex' was not declared in this scope; did you mean 'exp'?
   12 |                 return ex + solve(nnum, nd1,ndif);
      |                        ^~
      |                        exp
Language: C++

#include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <cmath>
#include <vector>
#include <ctime>
#include <Queue>
#include <sstream>
#include <utility>
#include <bitset>
#include <stack>

using namespace std;

#define MP make_pair 
#define PB push_back 
#define INF (1000000007) 
#define eps 1e-8
#define MOD (1000003)
#define IOS ios::sync_with_stdio(false)

typedef pair<int,int> pii ;
typedef pair<double,double> pdd ;
typedef long long ll ;

ll n,e,t;
ll dp[100005],p[100005];
ll mx=1e18;
multiset<ll>s;

int main()
{
	IOS;
	cin>>n>>e>>t;
	for(int i=1;i<=n;i++) cin>>p[i];
	dp[0]=0;
	int pos=0;
	for(int i=1;i<=n;i++)
	{
		s.insert(dp[i-1]);
		while(pos<=i)
		{
			if((p[i]-p[pos])*2>t) 
			{
				mx=min(dp[pos-1]-p[pos]*2,mx);
				s.erase(dp[pos-1]);
				pos++;
			}
			else break;
		}
		dp[i]=min(*s.begin()+t,mx+2*p[i]);
	}
	cout<<dp[n]+e;
	return 0;
}

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

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

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N,D,X;
ll T;
double F[402020];

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N>>D>>X;
	
	FOR(i,2*N) {
		T += D;
		D += X;
	}
	
	for(x=1;x<=N;x++) {
		F[x] = 1.0/(2*x) + ((x-1.0)/x)*(1+1.0/x)*F[x-1];
	}
	
	_P("%.12lf\n",T[2*N]*F[N]);
	
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false);
	FOR(i,argc-1) s+=argv[i+1],s+='\n';
	FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	solve(); return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:33:24: error: invalid types 'll {aka long long int}[int]' for array subscript
   33 |         _P("%.12lf\n",T[2*N]*F[N]);
      |                        ^
a.cc:6:30: note: in definition of macro '_P'
    6 | #define _P(...) (void)printf(__VA_ARGS__)
      |                              ^~~~~~~~~~~
Language: C++

 Name Khoda, Besmellah Rahmane Rahim, In The Name Of God;
//#include<bits/stweight++.h>
#include<iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <queue>
#include <deque>
#include <map>
#include <stack>
#include<bitset>
#include<list>
#include<cassert>
#include<numeric>
#include <stdio.h>
#include <string.h>
#include<iomanip>
#include<unordered_map>
#include<unordered_set>
#include <fstream>


using namespace std;

const int N = 1e5 + 10;

int n, m;
bool isVal[N];
vector<int> graph[N];
vector<int> adj[N];
bool mark[N];
int h[N];
int jump[N];

void dfs(int v, int par = -1) 
{
    jump[v] = h[v];
    mark[v] = true;
    for (auto u: graph[v])
    {
        if (u == par)
        {
            continue;
        }
        if (!mark[u])
        {
            h[u] = h[v] + 1;
            dfs(u, v);
            jump[v] = min(jump[v], jump[u]);
        }
        else
        {
            jump[v] = min(jump[v], h[u] - 1);
        }
    }
}

void dfs2(int v)
{
    mark[v] = true;
    for (auto u: graph[v])
    {
        if (!mark[u] && isVal[u])
        {
            if (isVal[u] && isVal[v])
            {
                adj[u + 1].push_back(v + 1);
                adj[v + 1].push_back(u + 1);
            }
            dfs2(u);
        }
    }
}


int main() 
{
    cin >> n >> m;
    for (int i = 0; i < m; i++) 
    {
        int u, v;
        cin >> u >> v;
        graph[u - 1].push_back(v - 1);
        graph[v - 1].push_back(u - 1);
    }
    for (int i = 0; i < n; i++)
    {
        if (!mark[i])
        {
            dfs(i);
        }
    }
    for (int i = 0; i < n; i++)
    {
        //cout << i << " " << jump[i] << " " << h[i] << endl;;
        if (jump[i] >= h[i])
        {
            isVal[i] = true;
        }
    }
    memset(mark, 0, sizeof mark);
    for (int i = 0; i < n; i++)
    {
        if (!mark[i] && isVal[i])
        {
            dfs2(i);
            adj[0].push_back(i + 1);
        }
    }


}

Compiler output:
a.cc:1:2: error: 'Name' does not name a type
    1 |  Name Khoda, Besmellah Rahmane Rahim, In The Name Of God;
      |  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define si(x) int(x.size())
const int mod=1000000007,MAX=200005;
const ll INF=1LL<<60;

ll dp[MAX];

int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    ll N,E,T;cin>>N>>E>>T;
    if(N>2000) return 0;
    vector<ll> A(N);
    for(int i=0;i<N;i++) cin>>A[i];
    A.push_back(0);
    A.push_back(INF);
    sort(all(A));
    
    for(int i=1;i<=N+1;i++) dp[i]=INF;
    dp[0]=0;
    
    for(int i=1;i<=N;i++){
        auto it=upper_bound(all(A),A[i]+(T+1)/2);
        chmin(dp[it-A.begin()],dp[i-1]+max((A[it-A.begin()]-A[i])*2,T));
        
        it--;
        chmin(dp[it-A.begin()],dp[i-1]+max((A[it-A.begin()]-A[i])*2,T));
        
        if(it==A.begin()) continue;
        
        it--;
        chmin(dp[it-A.begin()],dp[i-1]+max((A[it-A.begin()]-A[i])*2,T));*/
    }
    
    cout<<dp[N]+E<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:74: error: expected primary-expression before '/' token
   43 |         chmin(dp[it-A.begin()],dp[i-1]+max((A[it-A.begin()]-A[i])*2,T));*/
      |                                                                          ^
a.cc:44:5: error: expected primary-expression before '}' token
   44 |     }
      |     ^
Language: C++

// Code by H~$~C
#include <bits/stdc++.h>
using namespace std;

static const int Maxn = 100005;

#define int long long

int n;
long long T, E;
long long a[Maxn];
long long dp[Maxn];
// dp[i] = min { dp[j] + a[i] - a[j] + max(T, 2 * (a[i] - a[j + 1]) }
// dpt[i] = min { dpt[j] + max(T, 2 * (a[i] - a[j + 1])) }
// dp[i] = dpt[i] + a[i]
// Ans = dp[n] + (E - a[n]) = dpt[n] + E

namespace sgt1 {
  #define ls (p * 2 + 1)
  #define rs (p * 2 + 2)
  #define mid (l + r >> 1)
  long long tr[Maxn << 2];
  inline void init() {
    memset(tr, 0x3f, sizeof(tr));
  }
  inline void pushup(int p) {
    tr[p] = min(tr[ls], tr[rs]);
  }
  void modify(int p, int l, int r, int pos, long long val) {
    if (l == r) {
      tr[p] = min(tr[p], val);
      return ;
    }
    if (pos <= mid) {
      modify(ls, l, mid, pos, val);
    }
    else {
      modify(rs, mid + 1, r, pos, val);
    }
  }
  long long query(int p, int l, int r, int L, int R) {
    if (L > r || l > R) return 1e18;
    if (L <= l && r <= R) {
      return tr[p];
    }
    long long left = query(ls, l, mid, L, R);
    long long right = query(rs, mid + 1, r, L, R);
    return min(left, right);
  }
  #undef ls
  #undef rs
  #undef mid
}
namespace sgt2 {
  #define ls (p * 2 + 1)
  #define rs (p * 2 + 2)
  #define mid (l + r >> 1)
  long long tr[Maxn << 2];
  inline void init() {
    memset(tr, 0x3f, sizeof(tr));
  }
  inline void pushup(int p) {
    tr[p] = min(tr[ls], tr[rs]);
  }
  void modify(int p, int l, int r, int pos, long long val) {
    if (l == r) {
      tr[p] = min(tr[p], val);
      return ;
    }
    if (pos <= mid) {
      modify(ls, l, mid, pos, val);
    }
    else {
      modify(rs, mid + 1, r, pos, val);
    }
  }
  long long query(int p, int l, int r, int L, int R) {
    if (L > r || l > R) return 1e18;
    if (L <= l && r <= R) {
      return tr[p];
    }
    long long left = query(ls, l, mid, L, R);
    long long right = query(rs, mid + 1, r, L, R);
    return min(left, right);
  }
  #undef ls
  #undef rs
  #undef mid
}

signed main() {
  scanf("%lld%lld%lld", &n, &E, &T);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", a + i);
  }
  
  memset(dp, 63, sizeof(dp));
  dp[0] = 0;
  sgt1::init();
  sgt2::init();
  sgt1::modify(0, 0, n, 0, dp[0]);
  sgt2::modify(0, 0, n, 0, dp[0] - 2 * a[1]);
  for (int i = 1; i <= n; ++i) {
    int low = 0, high = i;
    while (high - low > 1) {
      int mid = low + high >> 1;
      if ((a[i] - a[mid]) * 2 > T) L = mid;
      else R = mid;
    }
    int pos = low;
    if (pos < i) {
      dp[i] = min(dp[i], sgt1::query(0, 0, n, pos, i - 1) + T);
    }
    if (pos > 0) {
      dp[i] = min(dp[i], sgt2::query(0, 0, n, 0, pos - 1) + 2 * a[i]);
    }
    sgt1::modify(0, 0, n, i, dp[i]);
    sgt2::modify(0, 0, n, i, dp[i] - 2 * a[i + 1]);
  }
  printf("%lld\n", dp[n] + E);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:107:36: error: 'L' was not declared in this scope
  107 |       if ((a[i] - a[mid]) * 2 > T) L = mid;
      |                                    ^
a.cc:108:12: error: 'R' was not declared in this scope
  108 |       else R = mid;
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll read(){
	ll a=0,b=getchar(),c=1;
	while(!isdigit(b))c=b=='-'?-1:1,b=getchar();
	while(isdigit(b))a=a*10+b-'0',b=getchar();
	return a*c;
}
ll n,t,e,x,ab,a[200005],dp[200005];
int main(){
	n=read(),e=read(),t=read();
	for(int i=1;i<=n;i++)
		a[i]=read();
	a[n+1]=e;
	for(int i=1;i<=n;i++){
		while((s[i]-s[ab+1])*2>t)
			x=min(x,dp[ab]-2*s[ab+1]),ab++;
		dp[i]=min((ll)(1e18),dp[ab]+t);
		if(ab)dp[i]=min(dp[i],2*s[i]+x);
	}
	printf("%lld",dp[n]+e);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: 's' was not declared in this scope
   17 |                 while((s[i]-s[ab+1])*2>t)
      |                        ^
a.cc:20:41: error: 's' was not declared in this scope
   20 |                 if(ab)dp[i]=min(dp[i],2*s[i]+x);
      |                                         ^
Language: C++

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

using ll=long long;
const ll INF=1e18;
int main(){
    int n;
    cin>>n;
    ll t,e;
    cin>>e>>t;
    vector<ll> x(n+1);
    for(int i=1;i<=n;i++) cin>>x[i];

    vector<ll> dp(n+1);    
    multiset<ll> As;
    multiset<ll> Bs;
    vector<ll> A(n);
    vector<ll> B(n);
    auto calcA=[&](int i){
        return dp[i]-2*x[i+1]-x[i];
    };
    auto calcB=[&](int i){
        return dp[i]-x[i];
    };
    A[0]=calcA(0),B[0]=calcB(0);
    Bs.insert(B[0]);
    int iter=0;
    for(int i=1;i<=n;i++){
        while(iter<i && 2*(x[i]-x[iter+1])>=t){
            As.insert(A[iter]);
            Bs.erase(Bs.find(B[iter]));
            iter++;
        }
        ll vX=(As.empty() ? INF : *As.begin()+3*x[i]);
        ll vY=(Bs.empty() ? INF : *Bs.begin()+x[i]+t);
        dp[i]=min(vX,vY);
        if(i==n) break;
        A[i]=calcA(i),B[i]=calcB(i);
        Bs.insert(B[i]);
    }
    cout<<e-x[n]+dp[n]<<endl;
    return 0;
}#include<bits/stdc++.h>
using namespace std;

using ll=long long;
const ll INF=1e18;
int main(){
    int n;
    cin>>n;
    ll t,e;
    cin>>e>>t;
    vector<ll> x(n+1);
    for(int i=1;i<=n;i++) cin>>x[i];

    vector<ll> dp(n+1);    
    multiset<ll> As;
    multiset<ll> Bs;
    vector<ll> A(n);
    vector<ll> B(n);
    auto calcA=[&](int i){
        return dp[i]-2*x[i+1]-x[i];
    };
    auto calcB=[&](int i){
        return dp[i]-x[i];
    };
    A[0]=calcA(0),B[0]=calcB(0);
    Bs.insert(B[0]);
    int iter=0;
    for(int i=1;i<=n;i++){
        while(iter<i && 2*(x[i]-x[iter+1])>=t){
            As.insert(A[iter]);
            Bs.erase(Bs.find(B[iter]));
            iter++;
        }
        ll vX=(As.empty() ? INF : *As.begin()+3*x[i]);
        ll vY=(Bs.empty() ? INF : *Bs.begin()+x[i]+t);
        dp[i]=min(vX,vY);
        if(i==n) break;
        A[i]=calcA(i),B[i]=calcB(i);
        Bs.insert(B[i]);
    }
    cout<<e-x[n]+dp[n]<<endl;
    return 0;
}

Compiler output:
a.cc:43:2: error: stray '#' in program
   43 | }#include<bits/stdc++.h>
      |  ^
a.cc:43:3: error: 'include' does not name a type
   43 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:47:10: error: redefinition of 'const ll INF'
   47 | const ll INF=1e18;
      |          ^~~
a.cc:5:10: note: 'const ll INF' previously defined here
    5 | const ll INF=1e18;
      |          ^~~
a.cc:48:5: error: redefinition of 'int main()'
   48 | int main(){
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main(){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long maxn=(1ll<<63-1);
long long a[10001],dp[10001]={0};
long long n,e,t,k=0;
int main()
{
	memset(dp,0x3f3f3f3f,sizeof(dp));
    cin>>n>>e>>t;
    for(int i=1;i<=n;i++)
        scanf("%d",&a[i]);
    for(int i=1;i<=n;i++)
    {
        while(t<=2*(a[i]-a[k+1]))
        {
            maxn=min(maxn,dp[k]-2*a[k+1]);
            k++;
        }
        dp[i]=dp[k]+t;
        dp[i]=min(dp[i],maxn+2*a[i]);
    }
    dp[n]+=e;
    cout<<dp[n]<<endl;
}#include<bits/stdc++.h>
using namespace std;
long long inf=(1ll<<63-1);
long long a[10005],dp[1005];    
long long n,e,t,maxn=inf;
int main()
{    
	memset(dp,(ll)0x3f3f3f3f,sizeof(dp));
    cin>>n>>e>>t;
    for(int i=1;i<=n;i++)
        cin>>a[i];
    dp[0]=0;
    int t=0;
    for(int i=1;i<=n;i++)
	{
        while(t<=2*(a[i]-a[t+1]))
        {
            maxn=min(maxn,dp[t]-2*a[t+1]);
            t++;
        }
        dp[i]=dp[t]+t;
        dp[i]=min(dp[i],maxn+2*a[i]);
    }
    dp[n]+=e;
    cout<<dp[n]<<endl;
}

Compiler output:
a.cc:24:2: error: stray '#' in program
   24 | }#include<bits/stdc++.h>
      |  ^
a.cc:24:3: error: 'include' does not name a type
   24 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:27:11: error: conflicting declaration 'long long int a [10005]'
   27 | long long a[10005],dp[1005];
      |           ^
a.cc:4:11: note: previous declaration as 'long long int a [10001]'
    4 | long long a[10001],dp[10001]={0};
      |           ^
a.cc:27:20: error: conflicting declaration 'long long int dp [1005]'
   27 | long long a[10005],dp[1005];
      |                    ^~
a.cc:4:20: note: previous declaration as 'long long int dp [10001]'
    4 | long long a[10001],dp[10001]={0};
      |                    ^~
a.cc:28:11: error: redefinition of 'long long int n'
   28 | long long n,e,t,maxn=inf;
      |           ^
a.cc:5:11: note: 'long long int n' previously declared here
    5 | long long n,e,t,k=0;
      |           ^
a.cc:28:13: error: redefinition of 'long long int e'
   28 | long long n,e,t,maxn=inf;
      |             ^
a.cc:5:13: note: 'long long int e' previously declared here
    5 | long long n,e,t,k=0;
      |             ^
a.cc:28:15: error: redefinition of 'long long int t'
   28 | long long n,e,t,maxn=inf;
      |               ^
a.cc:5:15: note: 'long long int t' previously declared here
    5 | long long n,e,t,k=0;
      |               ^
a.cc:28:17: error: redefinition of 'long long int maxn'
   28 | long long n,e,t,maxn=inf;
      |                 ^~~~
a.cc:3:11: note: 'long long int maxn' previously defined here
    3 | long long maxn=(1ll<<63-1);
      |           ^~~~
a.cc:29:5: error: redefinition of 'int main()'
   29 | int main()
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:31:20: error: 'll' was not declared in this scope
   31 |         memset(dp,(ll)0x3f3f3f3f,sizeof(dp));
      |                    ^~
Language: C++

#include<bits/stdc++.h>
long long n,E,T,t,a[100005],f[100005],M=1LL<<60;int main(){scanf("%d%d%d",&n,&E,&T);for(int i=1;i<=n;i++)scanf("%d",&a[i]);for(int i=1;i<=n;i++){for (;T<=2*(a[i]-a[t+1]);t++)M=__min(M,f[t]-2*a[t+1]);f[i]=__min(f[t]+T,M+2*a[i]);}printf("%lld",E+f[n]);}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:177: error: '__min' was not declared in this scope; did you mean '__sin'?
    2 | long long n,E,T,t,a[100005],f[100005],M=1LL<<60;int main(){scanf("%d%d%d",&n,&E,&T);for(int i=1;i<=n;i++)scanf("%d",&a[i]);for(int i=1;i<=n;i++){for (;T<=2*(a[i]-a[t+1]);t++)M=__min(M,f[t]-2*a[t+1]);f[i]=__min(f[t]+T,M+2*a[i]);}printf("%lld",E+f[n]);}
      |                                                                                                                                                                                 ^~~~~
      |                                                                                                                                                                                 __sin
a.cc:2:205: error: '__min' was not declared in this scope; did you mean '__sin'?
    2 | long long n,E,T,t,a[100005],f[100005],M=1LL<<60;int main(){scanf("%d%d%d",&n,&E,&T);for(int i=1;i<=n;i++)scanf("%d",&a[i]);for(int i=1;i<=n;i++){for (;T<=2*(a[i]-a[t+1]);t++)M=__min(M,f[t]-2*a[t+1]);f[i]=__min(f[t]+T,M+2*a[i]);}printf("%lld",E+f[n]);}
      |                                                                                                                                                                                                             ^~~~~
      |                                                                                                                                                                                                             __sin
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, e, t;
int x[100005];
ll f[100005];
ll tr[100005 << 2][2];
void Update(int L, int R, int p, int x, int l, int r, int rt)
{
	if(L <= l && r <=R)
	{
		tr[rt]
	}
}
int main()
{
	scanf("%d%d%d", &n, &e, &t);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d", &x[i]);
	}
	memset(f, 0x3f, sizeof f);
	f[0] = 0;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 0; j < i; j++)
		{
			f[i] = min(f[i], f[j] + max((x[i] - x[j + 1]) * 2, t) + (x[i] - x[j]));
		}
	}
	printf("%lld\n", f[n] + e - x[n]);
	
	
	
	
	return 0;
}

Compiler output:
a.cc: In function 'void Update(int, int, int, int, int, int, int)':
a.cc:12:23: error: expected ';' before '}' token
   12 |                 tr[rt]
      |                       ^
      |                       ;
   13 |         }
      |         ~