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

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		try {

			int height = sc.nextInt();
			int width = sc.nextInt();

			char[][] list = new char[height][width];

			for (int i = 0; i < height; i++) {

				String str = sc.next();

				for (int j = 0; j < width; j++) {
					list[i][j] = str.charAt(j);
				}
			}

			int count = 0;
			boolean result = false;

			for (int i = 0; i < height; i++) {

				boolean flg = false;

				for (int j = 0; j < width; j++) {
					if (list[i][j] == '#') {
						if (flg) {
							count++;
						}
						flg = true;
					}
					else {
						flg = false;
					}
				}
			}

			if (count == width - 1) {
				result = true;
			}
			else {
				System.out.println("Impossible");
			}

			if (result) {

				count = 0;
				for (int i = 0; i < width; i++) {

					boolean flg = false;

					for (int j = 0; j < height; j++) {
						if (list[j][i] == '#') {
							if (flg) {
								count++;
							}
							flg = true;
						}
						else {
							flg = false;
						}
					}
				}

				if (count == height - 1) {
					System.out.println("Possible");
				}
			}
		}
		finally {
			sc.close();
		}
	}

}


Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

bool calc1(char** arr, int height, int width, int i, int j) {
  if(i < 0 || height <= i || j < 0 || width <= j)
    return false;
  if(i == height - 1 && j == width - 1) {
    if(arr[i][j] =='#')
      return true; 
    else
      return false;
  }
  if(arr[i][j] == '.') return false;
  if(calc1(arr, height, width, i + 1, j)) return true;
  if(calc1(arr, height, width, i, j + 1)) return true;
  return false;
}

int sumup(char* arr, int len) {
  int n = 0;
  for(int i = 0; i < len; i++)
    if(arr[i] == '#') n++;
  return n;
}

int main(void) {
  int h, w;
  std::cin >> h;
  std::cin >> w;
  char** arr = new char*[h];
  for(int i = 0; i < h; i++) {
    arr[i] = new char[w];
  }
  int n = 0;
  for(int i = 0; i < h; i++) {
    std::cin >> arr[i];
    n += sumup(arr[i], w);
  }
  if(n == (h + w - 1) && calc1(arr, h, w, 0, 0))
    std::cout << "Possible\n";
  else
    std::cout << "Impossible\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:8: error: 'cin' is not a member of 'std'
   25 |   std::cin >> h;
      |        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | bool calc1(char** arr, int height, int width, int i, int j) {
a.cc:26:8: error: 'cin' is not a member of 'std'
   26 |   std::cin >> w;
      |        ^~~
a.cc:26:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:10: error: 'cin' is not a member of 'std'
   33 |     std::cin >> arr[i];
      |          ^~~
a.cc:33:10: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:37:10: error: 'cout' is not a member of 'std'
   37 |     std::cout << "Possible\n";
      |          ^~~~
a.cc:37:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:10: error: 'cout' is not a member of 'std'
   39 |     std::cout << "Impossible\n";
      |          ^~~~
a.cc:39:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

include<iostream>
using namespace std;
int main()

{
    int h,w;
    char a[10][10];
    cin>>h>>w;
    int sum=0;
    for(int i=0;i<h;i++)
    {
        for(int j=0;j<w;j++)
        {
            cin>>a[i][j];
            if(a[i][j]=='#')
                sum++;
        }
    }
    if(sum==2*h)
        cout<<"Possible"<<endl;
    else cout<<"Impossible"<<endl;
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin>>h>>w;
      |     ^~~
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout<<"Possible"<<endl;
      |         ^~~~
a.cc:20:27: error: 'endl' was not declared in this scope
   20 |         cout<<"Possible"<<endl;
      |                           ^~~~
a.cc:21:10: error: 'cout' was not declared in this scope
   21 |     else cout<<"Impossible"<<endl;
      |          ^~~~
a.cc:21:30: error: 'endl' was not declared in this scope
   21 |     else cout<<"Impossible"<<endl;
      |                              ^~~~
Language: C++

#include <cstdio>
#include <iostream>
using namespace std;
#define maxn 10
char s[maxn][maxn];
int h, w;
bool fuck(char s[][maxn], int i, int j)
{
	
	if (i == h - 1 && j == w - 1 && s[i][j] == '#')
		return 1;
	else if (i < h - 1 && s[i + 1][j] == '#' && j == w - 1)
		fuck(s, i + 1, j);
	else if (i == h - 1 && j < w - 1 && s[i][j + 1] == '#')
		fuck(s, i, j + 1);
	else if (i < h - 1 && s[i + 1][j] == '#' && j < w - 1 && s[i][j + 1] != '#')
		fuck(s, i + 1, j);
	else if (i < h - 1 && s[i + 1][j] != '#' && j < w - 1 && s[i][j + 1] == '#')
		fuck(s, i, j + 1);
	else if (i < h - 1 && s[i + 1][j] == '#' && j < w - 1 && s[i][j + 1] == '#')
		return 0;
	else return 0;

}
int main()
{
	cin >> h >> w;
	memset(s, NULL, sizeof(s));
	char a;
	for (int i = 0; i < h; i++)
	{
		for (int j = 0; j < w; j++)
			scanf("%c", &s[i][j]);
		scanf("%c", &a);
	}
	
	if (fuck(s, 0, 0))
	{
		printf("Possible\n");
	}
	else
	{
		printf("Impossible\n");
	}



	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: error: 'memset' was not declared in this scope
   28 |         memset(s, NULL, sizeof(s));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 | using namespace std;
a.cc: In function 'bool fuck(char (*)[10], int, int)':
a.cc:24:1: warning: control reaches end of non-void function [-Wreturn-type]
   24 | }
      | ^
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		try {

			int h = sc.nextInt();
			int w = sc.nextInt();

			int count_w = 0;
			int count_h = 0;

			boolean flg = false;

			for (int i = 0; i < h; i++) {

				String str = sc.next();

				for (int j = 0; j < w; j++) {

					char ch = str.charAt(j);
					if (ch == '#') {
						count_w++;
						flg = true;
					}
				}

				if (flg) {
					count_h++;
				}
				flg = false;
			}

			if (count_h > 2 * (h - 1) || count_w > 2 * (w - 1)) {
				System.out.println("Impossible");
			}
			else {
				System.out.println("Possible");
			}
		}
		finally {
			sc.close();
		}

	}

}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <memory.h>

char** alloc_masu(int H, int W){
	int i;
	char** A;
	A = malloc(sizeof(char*)*H);
	for(i=0;i<H;i++){
		A[i] = malloc(sizeof(char)*(H+1));
	}
	return A;
}
int evaluate_masu(char** A, int H, int W){
	int i=0, j=0;
	int bottomtrack,righttrack;
	int toptrack, lefttrack;
	while((i<H&&j<W)){
		bottomtrack = (i==H-1?0:A[i+1][j] == '#');
		righttrack = (j==W?0:A[i][j+1] == '#');
		toptrack = (i==0?0:A[i-1][j] == '#');
		lefttrack = (j==0?0:A[i][j-1] == '#');
		if(righttrack&&bottomtrack)return 0;
		if(lefttrack&&toptrack)return 0;
		if(i==H-1&&j==W-1)return 1;
		if(righttrack)j++;
		if(bottomtrack)i++;
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

// AtCoder.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include<stdio.h>
#include<string.h>
#include<math.h>


int main(void){
	int h,w;
	int a[10][10];
	int i,j;
	char buff;
	int flag;
	int k;
	int f_w;
	int f_h;

	scanf("%d %d",&h,&w);
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			scanf("%c",&buff);
			if(buff == '#'){
				a[i+1][j+1] = 1;
			}
			else{
				a[i+1][j+1] = 0;
			}
		}
	}

	flag = 0;
	for(i=0;i<h;i++){	
		for(j=0;j<w;j++){
			if(a[i+1][j+1] == 1){
				if(a[i][j+1] == 0){
					if(a[i+1][j] == 0){
						flag = 1;
				}
			}
		}
	}
	if(flag==0){
		printf("Possible\n");
	}
	else{
		printf("Impossible\n");
	}
	return 0;
}


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

#include <iostream>
using namespace std;

int main() {
    int r,c;
    cin >> r >> c;

    int sr, sc;
    int er, ec;
    int c;
    char ch;
    bool first = false;
    for (int i = 0; i < r; ++i) {
        for (int j = 0; j < c; ++j) {
            char ch;
            cin >> ch;
            if (ch == '#') {
                if (!first) {
                    sr = r;
                    sc = c;
                    first = true;
                }
                er = r;
                ec = c;
                c += i + j;
            }
        }
    }

    if (!first)
        cout << "Impossible" << endl;
    else {
        int dr = er - sr;
        int dc = ec - sc;
        int rightc = dr * (dr + 1) / 2 + dc * (dc + 1) / 2 + dr * sr + dc * sc;
        if (c != rightc)
            cout << "Impossible" << endl;
        else
            cout << "Possible" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: redeclaration of 'int c'
   10 |     int c;
      |         ^
a.cc:5:11: note: 'int c' previously declared here
    5 |     int r,c;
      |           ^
Language: C++

#include <iostream>
using namespace std;

int H, W;
char field[8][8];

bool solve(int x, int y) {
  if (x >= H-1 && y >= W-1) return true;

  if (field[x+1][y] == '.' && field[x][y+1] == '.') {
    return false;
  } else if (field[x+1][y] == '#' && field[x][y+1] == '#') {
    return false;
  } else {
    if (field[x+1][y] == '#') {
      return solve(x+1, y);
    } else {
      return solve(x, y+1);
    }
  }
}

int main() {
  assert(false);
  cin >> H >> W;
  for (int i=0; i<H; i++) {
    for (int j=0; j<W; j++) {
      cin >> field[i][j];
    }
  }

  if (solve(0, 0)) {
    cout << "Possible" << endl;
  } else {
    cout << "Impossible" << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: 'assert' was not declared in this scope
   24 |   assert(false);
      |   ^~~~~~
a.cc:2:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
    1 | #include <iostream>
  +++ |+#include <cassert>
    2 | using namespace std;
Language: C++

#include <iostream>
#include <set>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;

#define IN(n) int n;cin>>n
#define IN_(n,n_) int n,n_;cin>>n>>n_;
#define OUT(n) cout << n << endl
#define OUT_(n,n_) cout << n << " " << n_ << endl

#define v_(a,n,n_) vector<vector<a>>(n,vector<a>(n_)) //vector<vector<n>> initialize

#define FOR(k,m,n) for(int (k)=(m);(k)<(n);(k)++)
#define REP(i,n) for(int i=0;i<(n);i++)
#define REP_(i,n) for(int i=(n)-1;i>=0;i--)
#define SORT(n) sort((n).begin(),(n).end())
#define ALL(n) (n).begin(),(n).end()
#define TRY(n) try{n}catch(...){}

typedef vector<int> vi;
typedef vector<vector<int>> vii;
typedef vector<string> vs;
typedef vector<vector<char>> vcc;

vcc a;

void slv(int i,int j){
    if(a[i][j] == '.')return;
    a[i][j] = '.';
    TRY(if(a.at(i).at(j+1) == '#'){slv(i,j+1);})
    TRY(if(a.at(i+1).at(j) == '#'){slv(i+1,j);})
}

int main(){
    IN_(h,w);
    a = v_(char,h,w);
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cin>>a[i][j];
        }
    }
    slv(0,0);
    bool f = true;
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            if(a[i][j] == '#'){
                f = false
            }
        }
        if(f)cout<<"Possible"<<endl;
        else cout<<"Impossible"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:26: error: expected ';' before '}' token
   50 |                 f = false
      |                          ^
      |                          ;
   51 |             }
      |             ~
Language: C++

#include<iostream>
#include<string>
#include<cstring>
using namespace std;
int main()
{
        int num1=0,num2=0;
        char test1[8][8];
        
        cin>>num1>>num2;
        for(int i=0;i<num1:i++){
        	for(int q=0;q<num2;q++){
        		cin>>test1[i][q];
        	}
        }
        for(int w=0;w<num1-1;w++){
        	for(int r=0;r<num2;r++){
        	e=w+1;
        	if(test1[w][r]=='#'){
        		for(int t=0;t<r;t++){
        			if(test1[e][t]=='#'){
        				cout<<"Impossible\n";
        			}
        		}
        	}
        	}
        }
        cout<<"Possible\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   11 |         for(int i=0;i<num1:i++){
      |                     ^
a.cc:11:27: error: found ':' in nested-name-specifier, expected '::'
   11 |         for(int i=0;i<num1:i++){
      |                           ^
      |                           ::
a.cc:11:23: error: 'num1' is not a class, namespace, or enumeration
   11 |         for(int i=0;i<num1:i++){
      |                       ^~~~
a.cc:16:9: error: expected primary-expression before 'for'
   16 |         for(int w=0;w<num1-1;w++){
      |         ^~~
a.cc:15:10: error: expected ';' before 'for'
   15 |         }
      |          ^
      |          ;
   16 |         for(int w=0;w<num1-1;w++){
      |         ~~~
a.cc:16:9: error: expected primary-expression before 'for'
   16 |         for(int w=0;w<num1-1;w++){
      |         ^~~
a.cc:15:10: error: expected ')' before 'for'
   15 |         }
      |          ^
      |          )
   16 |         for(int w=0;w<num1-1;w++){
      |         ~~~
a.cc:11:12: note: to match this '('
   11 |         for(int i=0;i<num1:i++){
      |            ^
a.cc:18:17: error: 'e' was not declared in this scope
   18 |                 e=w+1;
      |                 ^
Language: C++

// AGC007A.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include<iostream>
#include<vector>
#include<string>
#include<cstdio>
#include<cmath>
using namespace std;
typedef long long ll;
int h, w;
char a[9][9];

bool judge() 
{
	int fx = 0;
	int fy = 0;
	a[fy][fx] = '.';
	while (!(fx == w - 1 && fy == h - 1)) {//goal につくまで進める
		if (fx < w - 1 && fy < h - 1 && a[fy][fx + 1] == '#' && a[fy + 1][fx] == '.') {//右にあって下にない
			fx++;
			a[fy][fx] = '.';
		}
		else if (fx < w - 1 && fy < h - 1 && a[fy][fx + 1] == '.' && a[fy + 1][fx] == '#') {//下にあって右にない
			fy++;
			a[fy][fx] = '.';
		}
		else if (fx == w - 1 && a[fy + 1][fx] == '#') {
			fy++;
			a[fy][fx] = '.';
		}
		else if (fy == h - 1 && a[fy][fx + 1] == '#') {
			fx++;
			a[fy][fx] = '.';
		}
		else {
			//for (int i = 0; i < h; i++) {
				//for (int j = 0; j < w; j++) {
					//cout << a[i][j] << " ";
				//}
				//cout << endl;
			//}
			return false;
		}
	}//右下の経路は終わり
	a[h - 1][w - 1] = '.';
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#')return  false;
		}
	}

	//for (int i = 0; i < h; i++) {
		//for (int j = 0; j < w; j++) {
			//cout << a[i][j] << " ";
		//}
		//cout << endl;
	//}



	return true;

}




int main()
{
	cin >> h >> w;
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			cin >> a[i][j];
		}
	}
	cout << (judge() ? "Possible" : "Impossible" )<< endl;

    return 0;
}



Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
		// 1行、2つ(複数)数字
		String[] ss0 = br.readLine().trim().split(" ", 0);
		int H = Integer.parseInt(ss0[0]);
		int W = Integer.parseInt(ss0[1]);

		String[][] ss2 = new String[H][W];
		for(int h = 0; h < H; h++){
			ss0 = br.readLine().trim().split("", 0);
			for(int w = 0; w < W; w++){
				ss2[h][w] = new String(ss0[w]);
			}
		}


					////入力値確認
					//for(int m = 0; m < H; m++){
					//	for(int n = 0; n < W; n++){
					//		//System.out.print("[" + ss2[m][n] + "]");
					//	}
					//	System.out.println("");
					//}


		//進んだ後に、戻った跡があるとアウト
		int x = 0;
		int y = 0;
		boolean b = true;
		for(int h = 0; h < H; h++){
			for(int w = 0; w < W; w++){
				if (ss2[h][w].equals("#")){
					if(w < y){ 
						b = false;
					}else{
						y = w;
					}
					if(h < x){
						b = false;
					}else{
						x = h;
					}
				}
				if(b){}else{ break; }
			}
			if(b){}else{ break; }
		}

		if (b) {
			System.out.println("Possible");
		}else{
			System.out.println("Impossible");
		}
        //System.out.println(iCount + " " + s);
        return;
    }
    // Debug.Print
    static void dp(String s) {
		System.out.println(s);
	}
    static void dp(StringBuilder s) { dp(s.toString()); }
    static void dp(int i) { dp(String.valueOf(i)); }
    static void dp(long i) { dp(String.valueOf(i)); }

}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>

#define FOR(i, a, b) for(int (i)=(a); (i)<(b); (i)++)
#define IFOR(i, a, b) for(int (i)=(a);(i)<=(b);(i)++)
#define RFOR(i, a, b) for(int (i)=(a);(i)>=(b);(i)--)

using namespace std;

int main() {
    int h, w;
    cin >> h >> w;
    vector<string> data(h+1);
    FOR(i, 0, h) {
        cin >> data[i];
        data[i].push_back('.');
    }
    data[h].resize(w + 1);
    FOR(i, 0, w+1) {
        data[h][i] = '.';
    }
    if (data[0][0] == '.' || data[h - 1][w - 1] == '.') {
        cout << "Impossible" << endl;
        return 0;
    }
    int posy = 0, posx = 0;
    bool res = true;
    while (posx != w - 1 || posy != h - 1) {
        if (data[posy + 1][posx] == data[posy][posx + 1]) {
            res = false;
            break;
        }
        else if (data[posy + 1][posx] == '#') {
            posy++;
        }
        else
            posx++;
    }
    assert(res == "Possible");
    cout << (res ? "Possible" : "Impossible") << endl;
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/cassert:44,
                 from a.cc:21:
a.cc: In function 'int main()':
a.cc:60:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   60 |     assert(res == "Possible");
      |            ~~~~^~~~~~~~~~~~~
Language: C++

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

int main(){
 int h,w; cin>>h>>w;
 vector<string> s(h);
 for(int i=0;i<h;i++)cin>>s[i];
 int cnt=0;
 for(int i=0;i<h;i++){
  for(int j=0;j<w;j++){
   if(s[i][j]=='#')cnt++;
  }
 }
 if(cnt==h+w)cout<<"Possible"<<endl;
 else cout<<"Impossible"<<endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:2: error: 'vector' was not declared in this scope
    7 |  vector<string> s(h);
      |  ^~~~~~
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 | #include <string>
a.cc:7:15: error: expected primary-expression before '>' token
    7 |  vector<string> s(h);
      |               ^
a.cc:7:17: error: 's' was not declared in this scope
    7 |  vector<string> s(h);
      |                 ^
Language: C++

4 5
##...
.##..
..##.
...##

Compiler output:
a.cc:2:1: error: stray '##' in program
    2 | ##...
      | ^~
a.cc:3:2: error: stray '##' in program
    3 | .##..
      |  ^~
a.cc:4:3: error: stray '##' in program
    4 | ..##.
      |   ^~
a.cc:5:4: error: stray '##' in program
    5 | ...##
      |    ^~
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 4 5
      | ^
Language: C++

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

#define FORE(i, a) for (auto i = a.begin(); i != a.end(); ++i)
#define REPU(i, a, b) for (int i = (a); i < (b); ++i)
#define REPD(i, a, b) for (int i = (a); i > (b); --i)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())

vector<string> split(const string &s, char c) {
	vector<string> v;
	stringstream ss(s);
	string x;
	while (getline(ss, x, c)) v.push_back(x);
	return v;
}

#define DEBUG(args...) { vector<string> _v = split(#args, ','); err(_v.begin(), args); }

void err(vector<string>::iterator it) {}

template<typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
	cerr << "[DEBUG] " << it -> substr((*it)[0] == ' ', it -> length()) << " = " << a << '\n';
	err(++it, args...);
}

typedef long long ll;
const int MOD = 1000000007;

template<class T, class U> inline T tmin(T a, U b) { return (a < b) ? a : b; }
template<class T, class U> inline T tmax(T a, U b) { return (a > b) ? a : b; }
template<class T, class U> inline void amax(T &a, U b) { if (b > a) a = b; }
template<class T, class U> inline void amin(T &a, U b) { if (b < a) a = b; }
template<class T> inline T tabs(T a) { return (a > 0) ? a : -a; }
template<class T> T gcd(T a, T b) { while (b != 0) { T c = a; a = b; b = c % b; } return a; }

int main(int argc, char *argv[]) {
	ios_base::sync_with_stdio(false);

	int w, h;
	cin >> w >> h;
	vector<vector<char>> a(w, vector<char>(h));
	REPU(i, 0, w) REPU(j, 0, h) cin >> w[i][j];
	REPU(i, 1, w) {
		int last = -1;
		REPU(j, 0, w) if (a[i - 1][j] == '#') {
			last = j;
		}
		REPU(j, 0, last) if (a[i][j] == '#') {
			puts("Impossible"); return 0;
		}
	}
	puts("Possible");

	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:45:45: error: invalid types 'int[int]' for array subscript
   45 |         REPU(i, 0, w) REPU(j, 0, h) cin >> w[i][j];
      |                                             ^
Language: C++

#include <bits/stdc++.h>
#define INF 2000000000000000000
#define ll long long
#define pll pair<ll, ll>
using namespace std;
bool debug = true;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll N;
  cin >> N;
  vector<ll> temp_P(N);
  for (ll i = 0; i < N; ++i) {
    cin >> temp_P.at(i);
  }
  vector<ll> P(N);
  for (ll i = 0; i < N; ++i) {
    P.at(temp_P) = i + 1;
  }
  vector<ll> a(N, 0), b(N, 0);
  for (ll i = 0; i < N; ++i) {
    a.at(i) = i + 1;
    b.at(N - i - 1) = i + 1;
  }
  for (ll i = 0; i < N; ++i) {
    ll p = P.at(i);
    for (ll j = i; j < N; ++j) {
      a.at(j) += p;
    }
    for (ll j = 0; j <= i; ++j) {
      b.at(j) += p;
    }
  }
  for (ll i = 0; i < N; ++i) {
    cout << a.at(i) << " ";
  }
  cout << "\n";
  for (ll i = 0; i < N; ++i) {
    cout << b.at(i) << " ";
  }
  cout << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: no matching function for call to 'std::vector<long long int>::at(std::vector<long long int>&)'
   19 |     P.at(temp_P) = i + 1;
      |     ~~~~^~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; reference = long long int&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:20: note:   no known conversion for argument 1 from 'std::vector<long long int>' to 'std::vector<long long int>::size_type' {aka 'long unsigned int'}
 1180 |       at(size_type __n)
      |          ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = long long int; _Alloc = std::allocator<long long int>; const_reference = const long long int&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:20: note:   no known conversion for argument 1 from 'std::vector<long long int>' to 'std::vector<long long int>::size_type' {aka 'long unsigned int'}
 1199 |       at(size_type __n) const
      |          ~~~~~~~~~~^~~
Language: C++

n = int(input())
p = list(map(int, input().split()))
a = list(range(20000, (n + 1) * 20000, 20000))
b = a[::-1]
for i in range(len(p)):
	a[p[i] - 1] -= n - i
for i in a:
	print(i, end=" ")
print()
for i in b:
	print(i, end=" ")
print()

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long i, j=0, k, n, m, p=0;
    cin >> n;
    for(i=0; i<n; i++)
    {
        cin >> arr[i];
    }
    sort(arr, arr+n);
    for(i=0; i<n; i++)
    {
        cout << arr[i] << " ";
    }
        cout << endl;
    for(i=n-1; i>=0; i--)
    {
        cout << arr[i]-1; << " ";
    }
    

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'arr' was not declared in this scope
   10 |         cin >> arr[i];
      |                ^~~
a.cc:12:10: error: 'arr' was not declared in this scope
   12 |     sort(arr, arr+n);
      |          ^~~
a.cc:20:27: error: expected primary-expression before '<<' token
   20 |         cout << arr[i]-1; << " ";
      |                           ^~
Language: C++

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

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)
#define ll long long
#define inf 1e18
#define pi acos(-1.0)
#define mod 998244353

ll n,k,a[20005],b[20005],p[20005],i,j,index,m;

int main(void)
{
    fastio;

    cin >> n;
    for(i=0;i<n;i++)cin >> p[i];
    for(i=1;i<=n;i++)a[i]=i;
    for(i=1,j=n;i<=n;i++,j--)b[i]=j;

    m=a[p[0]]+b[p[0]];
    index=p[0];
    for(i=1;i<n;i++)
    {
        if(p[i]<index)
        {
            b[p[i]]=m+1-a[p[i]];
            m++;
        }
        else
        {
            a[p[i]]=m+1-b[p[i]];
            m++;
        }
        index=p[i];
    }
    for(i=1;i<=n;i++)cout << a[i] << " ";
    cout << "\n";
    for(i=1;i<=n;i++)cout << b[i] << " ";

    return 0;
}


Compiler output:
a.cc:10:39: error: 'long long int index' redeclared as different kind of entity
   10 | ll n,k,a[20005],b[20005],p[20005],i,j,index,m;
      |                                       ^~~~~
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'int main()':
a.cc:22:14: error: overloaded function with no contextual type information
   22 |     index=p[0];
      |              ^
a.cc:25:16: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<'
   25 |         if(p[i]<index)
      |            ~~~~^~~~~~
a.cc:35:18: error: overloaded function with no contextual type information
   35 |         index=p[i];
      |                  ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define FORR(i, m, n) for (int i = (m); i >= (n); --i)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const ll mod = 1000000007;
//const ll mod = 998244353;
const int inf = 1e9 + 10;
const ll INF = 1e18;
const ld EPS = 1e-10;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }



int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(25);

  int n;
  cin >> n;
  vector<int> p(n);
  rep(i, n) {
    cin >> p[i];
    p[i]--;
  }

  vector<int> a(n), b(n);
  rep(i, n) a[i] = i + 1;
  rep(i, n) b[n - 1 - i] = i + 1;
  rep(i, n) {
    used[p[i]] = true;
    FOR(j, p[i] + 1, n) {
      if (!used[j]) a[j]++;
    }
    repr(j, p[i] - 1) {
      if (!used[j]) b[j]++;
    }
  }
  rep(i, n) cout << a[i] << (i == n - 1 ? '\n' : ' ');
  rep(i, n) cout << b[i] << (i == n - 1 ? '\n' : ' ');





  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:5: error: 'used' was not declared in this scope
   40 |     used[p[i]] = true;
      |     ^~~~
Language: C++

///Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>

#define                           int                         long long
#define                           fi                          first
#define                           si                          second
#define                           mp                          make_pair
#define                           pb                          push_back
#define                           pi                          pair<int,int>
#define                           f(i,l,r)                    for(int i=l;i<=r;i++)
#define                           rf(i,r,l)                   for(int i=r;i>=l;i--)
#define                           done(i)                     cout<<"done = "<<i<<endl;
#define                           fast                        ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);




using namespace std;

const int inf=1e5;
const int mod=1e9+7;
const int M=20009;

inline int bigmod(int B,int P){int R=1;while(P>0){if(P&1){R=(R*B)%mod;}P>>=1;B=(B*B)%mod;}return R;}
inline int ad(int x,int y){int ret=(x%mod+y%mod)%mod;if(ret<0){ret+=mod,ret=ret%mod;}return ret;}
inline int sub(int x,int y){int ret=((x%mod)-(y%mod)+mod)%mod;if(ret<0){ret+=mod,ret=ret%mod;}return ret;}
inline int gun(int x,int y){int ret=((x%mod)*(y%mod))%mod;if(ret<0){ret+=mod,ret=ret%mod;}return ret;}

int id[M+3];
int pup[M+4];
int pdown[M+4];
int a[M+4];
int b[M+4];
 solve()

{

    int n;
    cin>>n;
    f(i,1,n)
    {
        cin>>id[i];
    }
    f(i,1,n)
    {
        a[i]+=i;
    }
    for(int i=n,j=1;i>=1;i--,j++)
    {
        b[i]+=j;
    }
    for(int i=1;i<=n;i++)
    {
        int idx=id[i];
        b[idx]+=i;
        pdown[idx-1]+=i;
        pup[idx-1]-=i;
    }
    int yo=0;
    int cry=0;
    for(int i=n;i>=1;i--)
    {
         yo+=pdown[i];
         b[i]+=yo;
         cry+=pup[i];
         a[i]+=cry;
    }
    int mn=0;
    f(i,1,n)
    {
        mn=min(mn,a[i]);
    }
    f(i,1,n)
    {
        mn=min(mn,b[i]);
    }
    if(mn>0)mn=0;
    else mn=-mn+2;
    f(i,1,n)
    {
        cout<<a[i]+mn<<" ";
    }
    cout<<endl;
    f(i,1,n)
    {
        cout<<b[i]+mn<<" ";
    }
    cout<<endl;

}
 main()
 {
     //freopen("001.txt", "r", stdin);
     int t;
     t=1;
     while(t--)
     {
         solve();
     }
     return 0;
 }













Compiler output:
a.cc:34:2: error: ISO C++ forbids declaration of 'solve' with no type [-fpermissive]
   34 |  solve()
      |  ^~~~~
a.cc: In function 'int solve()':
a.cc:90:1: warning: no return statement in function returning non-void [-Wreturn-type]
   90 | }
      | ^
a.cc: At global scope:
a.cc:91:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   91 |  main()
      |  ^~~~
Language: C++

// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, n) for (int i = 0; i < n; ++i)
#define range(i,a,b) ((a)<=(i) && (i)<(b))
#define debug(x) cout << #x << ' ' << '=' << ' ' << (x) << endl;
#define fs first
#define sc second
#define pb push_back
typedef long long ll;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> T;
typedef priority_queue<ll> PQI;
typedef priority_queue<P> PQP;
typedef vector<vector<P>> pvec;
typedef vector<vector<ll>> vvec;
typedef vector<ll> vec;
const vector<int> dx = {0, -1, 0, 1, 1, 1, -1, -1};
const vector<int> dy = {1, 0, -1, 0, 1, -1, 1, -1};
const int MOD = (1000000007);
// const int MOD = (998244353);
// const int INF = (1 << 30);
const int INF = (1LL << 60);
const double EPS = (1 >> 30);
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return 1;} return 0;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return 1;} return 0;}



signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(15);
    //---------------------------------------------
    
    int n;
    cin>>n;
    vector<int> c(n);
    REP(i,n) cin >> c[i];
    vec a(n),b(n);
    rep(i,n){
        a[i]=30000*(i+1);
        b[i]=30000*(n-(i+1))+r[i];
    }


    rep(i,n) cout<<a[i]<<endl;
    rep(i,n) cout<<b[i]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:30: error: 'r' was not declared in this scope
   48 |         b[i]=30000*(n-(i+1))+r[i];
      |                              ^
Language: C++

#include<bits/stdc++.h>

using namespace std;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'a' was not declared in this scope
   16 |                 a[i]=1+30000*(i-1),b[i]=1+30000*(n-i);
      |                 ^
a.cc:16:36: error: 'b' was not declared in this scope
   16 |                 a[i]=1+30000*(i-1),b[i]=1+30000*(n-i);
      |                                    ^
a.cc:19:5: error: 'a' was not declared in this scope
   19 |     a[p[i]] += i;
      |     ^
a.cc:23:23: error: 'a' was not declared in this scope
   23 |                 cout<<a[i]<<" ";
      |                       ^
a.cc:27:23: error: 'b' was not declared in this scope
   27 |                 cout<<b[i]<<" ";
      |                       ^
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<iomanip>
#include<set>
#include<queue>

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);
vector<int> b(n);
for(int i=0;i<n;i++)a[i]=i+1;
for(int i=0;i<n;i++)b[i]=n-i;
int bef=0;
for(int i=0;i<n;i++)
{
if(a[p[i]]+b[p[i]]>bef)
{
b[p[i]]=(bef-a[p[i]]+1);
bef=a[p[i]]+b[p[i]];
}
}

	
for(int i=0;i<n;i++)cout<<a[i]<<endl;
for(int i=0;i<n;i++)cout<<b[i]<<endl;

}


Compiler output:
a.cc:19:5: error: extended character — is not valid in an identifier
   19 | p[i]—;
      |     ^
a.cc: In function 'int main()':
a.cc:19:5: error: expected ';' before '\U00002014'
   19 | p[i]—;
      |     ^
      |     ;
a.cc:19:4: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   19 | p[i]—;
      |    ^
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: declared here
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)

signed main(){
    ll n,m=0,x,A=0,B=0,m;cin>>n;
    vector<ll> s(n),a(n),b(n);

    rep(i,n){
        cin>>x;
        s[x-1]=i;
    }

    rep(i,n){
        if(A+B>=s[i]){
            A++;
            B=s[i]-A;
        }else{
            B--;
            A=s[i]-B;
        }
        a[i]=A;b[i]=B;
        m=min(m,B-1);
    }

    rep(i,n)cout<<a[i]-m<< (i==n-1 ? '\n':' ');

    rep(i,n)cout<<b[i]-m<< (i==n-1 ? '\n':' ');
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: redeclaration of 'll m'
    7 |     ll n,m=0,x,A=0,B=0,m;cin>>n;
      |                        ^
a.cc:7:10: note: 'll m' previously declared here
    7 |     ll n,m=0,x,A=0,B=0,m;cin>>n;
      |          ^
Language: C

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    vector<int> v(n), a(n), b(n);
    for (int i = 0; i < n; i++)
    {
        cin >> v[i];
        v[i]--;
        if (i == 0)
        {
            a[v[i]] = 1;
            b[v[i]] = 1000000000;
        }
        else
        {
            a[v[i]] = a[v[i - 1]] + 2;
            b[v[i]] = b[v[i - 1]] - 1;
        }
    }
    for (auto &p : a)
        cout << p << " ";
    cout << endl;
    for (auto &p : b)
        cout << p << " ";
}

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

#include<cstdio>
#define MN 20005
int n,a[MN],i;
int main(){
  scanf("%d",&n);
  for(i=0,x;i<n;i++)scanf("%d",&x),a[x]=i+1;
  for(i=1;i<=n;i++)printf("%d%c",a[i]+i*MN,i<n?' ':'\n');
  for(i=1;i<=n;i++)printf("%d ",(n-i+1)*MN);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'x' was not declared in this scope
    6 |   for(i=0,x;i<n;i++)scanf("%d",&x),a[x]=i+1;
      |           ^
Language: C++

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

signed main(){
	int n;cin>>n;
	vector<int>p(n),a(n),b(n);
	for(auto&& w:p)cin>>w;
	int d=30000;
	for(int i=0;i<n;i++)a[i]=d*(i+1);b[i]=d*(n-i)+p[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; 

	
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:44: error: 'i' was not declared in this scope
   10 |         for(int i=0;i<n;i++)a[i]=d*(i+1);b[i]=d*(n-i)+p[i];
      |                                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define MOD 1000000007
int main(){
  ll n;
  cin>>n;
  ll p[n],a[n],b[n];
  for(int i=0;i<n;i++){
    cin>>p[i];
    a[p[i]-1]=i+1;
    b[p[i]-1]=n*2-1-(i*2);
  }
  for(int i=0;i<n;i++) cout<<a[i]<<" ";
  cout<<endl;
  for(int i=0;i<n;i++ cout<<b[i]<<" ";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: expected ')' before 'cout'
   17 |   for(int i=0;i<n;i++ cout<<b[i]<<" ";
      |      ~               ^~~~~
      |                      )
Language: C++

#include<bits/stdc++h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define MOD 1000000007
int main(){
  ll n;
  cin>>n;
  ll p[n],a[n],b[n];
  for(int i=0;i<n;i++){
    cin>>p[i];
    a[p[i]-1]=i+1;
    b[p[i]-1]=n*2-1-(i*2);
  }
  for(int i=0;i<n;i++) cout<<a[i]<<" ";
  cout<<endl;
  for(int i=0;i<n;i++ cout<<b[i]<<" ";
}

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<cstdio>
using namespace std;
int main(){
  int n,p[20001],a;
  scanf("%d"&n);
  for(int i=0;i<n;i++){
    scanf("%d",a);
    p[a]=i;
  }
  for(int i=1;i<=n;i++)
    printf("%d ",n*i);
  printf("\n");
  for(int i=1;i<=n;i++)
    printf("%d ",n*i+p[a]);
  printf("\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
    5 |   scanf("%d"&n);
      |         ~~~~^~
      |         |    |
      |         |    int
      |         const char [3]
Language: C++

using namespace std;
typedef long long ll;
ll n, p[21000], a;
int main(void){
    // Your code here!
    cin >> n;
    for (ll i = 0; i < n; i++) {
        cin >> a;
        p[a] = i;
    }
    for (ll i = 1; i <= n; i++) {
        cout << i * n + p[i] << ' ';
    }
    cout << endl;
    for (ll i = n; i > 0; i--) {
        cout << i * n  << ' ';
    }
    cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << i * n + p[i] << ' ';
      |         ^~~~
a.cc:12:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << endl;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:13: error: 'endl' was not declared in this scope
   14 |     cout << endl;
      |             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int n;
int p[30005]={0},a[30005]={0},b[30005]={0};
int main()
{	
//asdf
	scanf("%d",&n);
	for(int i=1;i<=n;i++)scanf("%d",&p[i]);
	a[i]=100000;
	for(int i=2;i<=n;i++)a[i]=a[i-1]+30000;
	for(int i=1;i<=n;i++)b[n-i+1]=a[i];
	for(int i=1;i<=n;i++)b[p[i]]+=i;
	for(int i=1;i<=n;i++)cout<<a[i]<<" ";
	cout<<'\n';
	for(int i=1;i<=n;i++)cout<<b[i]<<" ";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'i' was not declared in this scope
   13 |         a[i]=100000;
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int n;
int p[30005]={0},a[30005]={0},b[30005]={0};
int main()
{	
	scanf("%d",&n);
	for(int i=1;i<=n;i++)scanf("%d",&p[i]);
	a[i]=100000;
	for(int i=2;i<=n;i++)a[i]=a[i-1]+30000;
	for(int i=1;i<=n;i++)b[n-i+1]=a[i];
	for(int i=1;i<=n;i++)b[p[i]]+=i;
	for(int i=1;i<=n;i++)cout<<a[i]<<" ";
	cout<<'\n';
	for(int i=1;i<=n;i++)cout<<b[i]<<" ";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'i' was not declared in this scope
   12 |         a[i]=100000;
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int n;
int p[30005]={0},a[30005]={0},b[30005]={0};
int main()
{	
if (0){}
	scanf("%d",&n);
	for(int i=1;i<=n;i++)scanf("%d",&p[i]);
	a[i]=100000;
	for(int i=2;i<=n;i++)a[i]=a[i-1]+30000;
	for(int i=1;i<=n;i++)b[n-i+1]=a[i];
	for(int i=1;i<=n;i++)b[p[i]]+=i;
	for(int i=1;i<=n;i++)cout<<a[i]<<" ";
	cout<<'\n';
	for(int i=1;i<=n;i++)cout<<b[i]<<" ";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'i' was not declared in this scope
   13 |         a[i]=100000;
      |           ^
Language: C++



vector<bool> gen_sosuu(vector<bool> sosuu){
  int size = sosuu.size();
  REP(i,size){
    sosuu[i] = true;
  }
  sosuu[0] = false;
  sosuu[1] = false;
  sosuu[2] = true;
  FOR(i,2,sqrt(size)+1){
    if(sosuu[i] == false) continue;
    for(int j = 2; i*j<size;j++){
      sosuu[i*j] =false;
    }
  }
  return sosuu;
}

int n;
int p[200001];
int main(){
  cin >>n;
  REP(i,n){
    int x;
    cin >> x;
    p[x] = i+1;
  }
  FOR(i,1,n+1) cout << 30000*i << " ";
  cout <<endl;
  FOR(i,1,n+1) cout << 30000*(n-i) + p[i] << " ";
  cout <<endl;
}


Compiler output:
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<bool> gen_sosuu(vector<bool> sosuu){
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:23:3: error: 'cin' was not declared in this scope
   23 |   cin >>n;
      |   ^~~
a.cc:24:7: error: 'i' was not declared in this scope
   24 |   REP(i,n){
      |       ^
a.cc:24:3: error: 'REP' was not declared in this scope
   24 |   REP(i,n){
      |   ^~~
a.cc:29:3: error: 'FOR' was not declared in this scope
   29 |   FOR(i,1,n+1) cout << 30000*i << " ";
      |   ^~~
a.cc:30:3: error: 'cout' was not declared in this scope
   30 |   cout <<endl;
      |   ^~~~
a.cc:30:10: error: 'endl' was not declared in this scope
   30 |   cout <<endl;
      |          ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef pair<int,int> pii;
typedef long long int ll;

#define INF 1 << 30
#define REP(i,n) for(ll i=0; i<(int)(n); i++)
#define FOR(i,k,n) for(ll i=(k);i<(int)(n);i++)



vector<bool> gen_sosuu(vector<bool> sosuu){
  int size = sosuu.size();
  REP(i,size){
    sosuu[i] = true;
  }
  sosuu[0] = false;
  sosuu[1] = false;
  sosuu[2] = true;
  FOR(i,2,sqrt(size)+1){
    if(sosuu[i] == false) continue;
    for(int j = 2; i*j<size;j++){
      sosuu[i*j] =false;
    }
  }
  return sosuu;
}

int n;
int a[200001];
int b[200001];
int main(){
  cin >>n;
  REP(i,n){
    int x;
    cin >> x;
    p[x] = i+1;
  }
  FOR(i,1,n+1) cout << 30000*i << " ";
  cout <<endl;
  DOR(i,1,n+1) cout << 30000*(n-i) + p[i] << " ";
  cout <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:5: error: 'p' was not declared in this scope
   38 |     p[x] = i+1;
      |     ^
a.cc:42:7: error: 'i' was not declared in this scope
   42 |   DOR(i,1,n+1) cout << 30000*(n-i) + p[i] << " ";
      |       ^
a.cc:42:3: error: 'DOR' was not declared in this scope; did you mean 'FOR'?
   42 |   DOR(i,1,n+1) cout << 30000*(n-i) + p[i] << " ";
      |   ^~~
      |   FOR
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define PPF pop_front
#define PPB pop_back
#define MA make_pair
#define ll long long
#define PA pair<int,int>
#define VE vector<int>
#define VP vector<PA>
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
const int mod=1e9+7;
//
//
struct poi{
  int X;int Y;int Z;
  bool operator<(const poi&R)const{
    return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X;
  }
};
//
//
int A[200000];
int P[200000];
int B[200000];
int a[200000];
int b[200000];
int main(){
  int N;
  cin>>N;
  FOR(i,0,N){
    A[i]=1e9+i;
  }
  FOR(i,0,N){
    cin>>P[i];
    P[i]--;
    B[P[i]]=A[i];
  }
  FOR(i,0,N){
    a[i]=(i+1)*30000;
    b[i]=B[i]-a[i];
  }
  FOR(i,0,N){
    cout<<a[i]<<" \n"[i==N-1];
  }
  FOR(i,0,N){
    cout<<b[i]<<" \n"[i==N-1];
  }
	return 0;
}
　

Compiler output:
a.cc:66:1: error: extended character 　 is not valid in an identifier
   66 | 　
      | ^
a.cc:66:1: error: '\U00003000' does not name a type
   66 | 　
      | ^~