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

#include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<vector>
using namespace std;
char a[104][104];
vector<int> del_hang;
vector<int> del_lie;
int main()
{
    int H,W;
    int i,j,k;
    int h,w;
    int flag;
  cin>>H>>W；
     
       memset(a,0,sizeof(a));
       del_hang.clear();
       del_lie.clear();
       for(i=0;i<H;i++)
          for(j=0;j<W;j++)
            cin>>a[i][j];
       for(j=0;j<H;j++)
       {
	 for(i=0;i<W;i++)
         {
          if(a[j][i]!='.') break;
         }
          if(i>=W) del_hang.push_back(j+1);
       }

       for(i=0;i<W;i++)
       {
	       for(j=0;j<H;j++)
         {
          if(a[j][i]!='.') break;
         }
          if(j>=H) del_lie.push_back(i+1);
       }
       
       for(i=0;i<W;i++) //列
       {
       	 vector<int>::iterator result = find( del_lie.begin( ), del_lie.end( ), i+1 ); 
         if(result==del_lie.end()) continue;
				  for(j=0;j<H;j++)//行
         {
           a[j][i]='@';
          }
       }

       for(i=0;i<H;i++) 
       {
          flag=0;
          for(j=0;j<W;j++)
         {
           if(del_hang.size())
           {
            if(i==del_hang[0]-1){del_hang.erase(del_hang.begin());break;}
            }
           if(a[i][j]!='@') 
            {cout<<a[i][j];flag=1;}
          }
          if(flag) cout<<endl;
       }
     
return 0；
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 'W\U0000ff1b' was not declared in this scope
   18 |   cin>>H>>W；
      |           ^~~
a.cc:69:8: error: unable to find numeric literal operator 'operator""\U0000ff1b'
   69 | return 0；
      |        ^~~
a.cc:69:11: error: expected ';' before '}' token
   69 | return 0；
      |           ^
      |           ;
   70 | }
      | ~
Language: C++

#include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<vector>
using namespace std;
char a[104][104];
vector<int> del_hang;
vector<int> del_lie;
int main()
{
    int H,W;
    int i,j,k;
    int h,w;
    int flag;
    cin>>H>>W；
   {   
       memset(a,0,sizeof(a));
       del_hang.clear();
       del_lie.clear();
       for(i=0;i<H;i++)
          for(j=0;j<W;j++)
            cin>>a[i][j];
       for(j=0;j<H;j++)
       {
	 for(i=0;i<W;i++)
         {
          if(a[j][i]!='.') break;
         }
          if(i>=W) del_hang.push_back(j+1);
       }

       for(i=0;i<W;i++)
       {
	       for(j=0;j<H;j++)
         {
          if(a[j][i]!='.') break;
         }
          if(j>=H) del_lie.push_back(i+1);
       }
       
       for(i=0;i<W;i++) //列
       {
       	 vector<int>::iterator result = find( del_lie.begin( ), del_lie.end( ), i+1 ); 
         if(result==del_lie.end()) continue;
				  for(j=0;j<H;j++)//行
         {
           a[j][i]='@';
          }
       }

       for(i=0;i<H;i++) 
       {
          flag=0;
          for(j=0;j<W;j++)
         {
           if(del_hang.size())
           {
            if(i==del_hang[0]-1){del_hang.erase(del_hang.begin());break;}
            }
           if(a[i][j]!='@') 
            {cout<<a[i][j];flag=1;}
          }
          if(flag) cout<<endl;
       }
    }   

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'W\U0000ff1b' was not declared in this scope
   18 |     cin>>H>>W；
      |             ^~~
Language: C++

#include <stdio.h>

int main(void)
{
	int N,i;
	scanf("%d %d",&N,&i);
	printf("%d\n",N+i-1);[
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected identifier before 'return'
    8 |         return 0;
      |         ^~~~~~
a.cc:8:17: error: expected ']' before ';' token
    8 |         return 0;
      |                 ^
      |                 ]
a.cc: In lambda function:
a.cc:8:17: error: expected '{' before ';' token
Language: C++

#include <cstdio>
#include <string>
#include <cctype>
#include <iostream>
 
 
using namespace std;
int main()
int M_Search(int A[], int B[],int n) {
    int s1=0, d1=n-1, ml, s2=0, d2=n-1, m2;
    //分别表示序列A和B的首位数、末位数和中位数
    while(s1!=d1 || s2!=d2){
        m1=(s1+d1)/2;
        m2=(s2+d2)/2;
        if(A[m1]==B[m2])
            return A[m1];  //满足条件 1)
        if(A[m1]<B[m2]){  // 满足条件 2)
            if((s1+d1)%2==0) {  //若元素个数为奇数
                s1=m1;  //舍弃A中间点以前的部分且保留中间点
                d2=m2;  //舍弃B中间点以后的部分且保留中间点
            }else{  //元素个数为偶数
                s1=m1+1;  //舍弃A中间点及中间点以前部分
                d2=m2;  //舍弃B中间点以后部分且保留中间点
            }
        }else{  //满足条件3)
            if((s2+d2)%2==0){  //若元素个数为奇数
                d1=m1;    //舍弃A中间点以后的部分且保留中间点
                s2-m2;    //舍弃B中间点以前的部分且保留中间点
            }else {  //元素个数为偶数
                d1=m1;    //舍弃A中间点以后部分且保留中间点
                s2=m2 + 1;    //舍弃B中间点及中间点以前部分
            }
        }
    }
    rerurn A[s1]<B[s2]?A[s1]:B[s2];
}


Compiler output:
a.cc:9:1: error: expected initializer before 'int'
    9 | int M_Search(int A[], int B[],int n) {
      | ^~~
Language: C++

#include <cstdio>
#include <string>
#include <cctype>
#include <iostream>


using namespace std;
int main()
int M_Search(int A[], int B[],int n) {
    int s1=0, d1=n-1, ml, s2=0, d2=n-1, m2;
    //分别表示序列A和B的首位数、末位数和中位数
    while(s1!=d1 || s2!=d2){
        m1=(s1+d1)/2;
        m2=(s2+d2)/2;
        if(A[m1]==B[m2])
            return A[m1];  //满足条件 1)
        if(A[m1]<B[m2]){  // 满足条件 2)
            if((s1+d1)%2==0) {  //若元素个数为奇数
                s1=m1;  //舍弃A中间点以前的部分且保留中间点
                d2=m2;  //舍弃B中间点以后的部分且保留中间点
            }else{  //元素个数为偶数
                s1=m1+1;  //舍弃A中间点及中间点以前部分
                d2=m2;  //舍弃B中间点以后部分且保留中间点
            }
        }else{  //满足条件3)
            if((s2+d2)%2==0){  //若元素个数为奇数
                d1=m1;    //舍弃A中间点以后的部分且保留中间点
                s2-m2;    //舍弃B中间点以前的部分且保留中间点
            }else {  //元素个数为偶数
                d1=m1;    //舍弃A中间点以后部分且保留中间点
                s2=m2 + 1;    //舍弃B中间点及中间点以前部分
            }
        }
    }
    rerurn A[s1]<B[s2]?A[s1]:B[s2];
}

Compiler output:
a.cc:9:1: error: expected initializer before 'int'
    9 | int M_Search(int A[], int B[],int n) {
      | ^~~
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int j = input.nextInt();
		System.out.printf(n-j+1);
		
	}
}

Compiler output:
Main.java:7: error: no suitable method found for printf(int)
		System.out.printf(n-j+1);
		          ^
    method PrintStream.printf(String,Object...) is not applicable
      (argument mismatch; int cannot be converted to String)
    method PrintStream.printf(Locale,String,Object...) is not applicable
      (argument mismatch; int cannot be converted to Locale)
1 error
Language: C++

#include <cstdio>
#include <string>
#include <cctype>
#include <iostream>
const int i=1000;

using namespace std;
int main()
{
int a,b[i],i,c;
a=i;
cin<<opertor <<　std::cin << a  <<b[i];

cout<<b[i/2];
return 0;
}

Compiler output:
a.cc:12:16: error: extended character 　 is not valid in an identifier
   12 | cin<<opertor <<　std::cin << a  <<b[i];
      |                ^
a.cc: In function 'int main()':
a.cc:12:6: error: 'opertor' was not declared in this scope; did you mean 'perror'?
   12 | cin<<opertor <<　std::cin << a  <<b[i];
      |      ^~~~~~~
      |      perror
a.cc:12:16: error: '\U00003000std' has not been declared
   12 | cin<<opertor <<　std::cin << a  <<b[i];
      |                ^~~~~
Language: C

int main(){
	
	int N,i;

	scanf N,i;
	
	printf("%d\n",N-(i-1));

	return 0;
	}
	

Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name 'scanf'
    5 |         scanf N,i;
      |         ^~~~~
main.c:5:15: error: redeclaration of 'N' with no linkage
    5 |         scanf N,i;
      |               ^
main.c:3:13: note: previous declaration of 'N' with type 'int'
    3 |         int N,i;
      |             ^
main.c:5:17: error: redeclaration of 'i' with no linkage
    5 |         scanf N,i;
      |                 ^
main.c:3:15: note: previous declaration of 'i' with type 'int'
    3 |         int N,i;
      |               ^
main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |         printf("%d\n",N-(i-1));
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    7 |         printf("%d\n",N-(i-1));
      |         ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main(){
	
	int N,i;

	scanf N,i;
	
	printf("%d",&N-(i-1));

	return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected ';' before 'N'
    7 |         scanf N,i;
      |              ^~
      |              ;
Language: C

#include <stdio.h>

int main(){
	
	int N,i;

	scanf N,i;
	
	printf("%d",N-(i-1));

	return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected ';' before 'N'
    7 |         scanf N,i;
      |              ^~
      |              ;
Language: C

int main(){
	
	int N,i;

	scanf N,i;
	
	printf("%d",N-(i-1));

	return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name 'scanf'
    5 |         scanf N,i;
      |         ^~~~~
main.c:5:15: error: redeclaration of 'N' with no linkage
    5 |         scanf N,i;
      |               ^
main.c:3:13: note: previous declaration of 'N' with type 'int'
    3 |         int N,i;
      |             ^
main.c:5:17: error: redeclaration of 'i' with no linkage
    5 |         scanf N,i;
      |                 ^
main.c:3:15: note: previous declaration of 'i' with type 'int'
    3 |         int N,i;
      |               ^
main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |         printf("%d",N-(i-1));
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    7 |         printf("%d",N-(i-1));
      |         ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<iostream>

using namespaace std;

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

  cout <<(N - i) + 1 << endl;
  return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namespaace'
    3 | using namespaace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> N >> i;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout <<(N - i) + 1 << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout <<(N - i) + 1 << endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;
public class Main
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int i = scan.nextInt();
		int result = 0;
		if(i==1)
			result = 1;
		else	
			result = (N-i)+1; 
		System.out.println(result);
	}
}

Compiler output:
Main.java:2: error: '{' expected
public class Main
                 ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args)
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:15: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;
public class trainA107 
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int i = scan.nextInt();
		int result = 0;
		if(i==1)
			result = 1;
		else	
			result = (N-i)+1; 
		System.out.println(result);
	}
}

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

#include<stdio.h>

int main(void)
{
    int N,i,t;
    scanf(%d,&N);
    scanf(%d,&i);

    t=N-i+1;
    printf(%d,t);
}

Compiler output:
main.c: In function 'main':
main.c:6:11: error: expected expression before '%' token
    6 |     scanf(%d,&N);
      |           ^
main.c:7:11: error: expected expression before '%' token
    7 |     scanf(%d,&i);
      |           ^
main.c:10:12: error: expected expression before '%' token
   10 |     printf(%d,t);
      |            ^
Language: C++

#include <iostream>
#include <stdlib.h>
#include <vector>
#include <string>

int main(int argc,char** argv){
  int n,i;
  cin >> n >> i;
  cout << n - i + 1 << endl;
  return 0;
}


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

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
int main(){
	int a,b,c,d,sum;
	cin>>a>>b;
	printf("%d\n",a-b+1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'sin'?
    8 |         cin>>a>>b;
      |         ^~~
      |         sin
Language: C++

#include<stdio.h>

int main()
{
   int a,b,p;
   scanf("%d,&a);
   scanf("%d",&b);
   if(a>=b)
   p=a-b;
   else
   p=b-a;

   printf("%d\n",p);
   

    return 0;
}

Compiler output:
a.cc:6:10: warning: missing terminating " character
    6 |    scanf("%d,&a);
      |          ^
a.cc:6:10: error: missing terminating " character
    6 |    scanf("%d,&a);
      |          ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:18: error: expected ')' before ';' token
    7 |    scanf("%d",&b);
      |                  ^
      |                  )
a.cc:6:9: note: to match this '('
    6 |    scanf("%d,&a);
      |         ^
Language: C++

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
#include<iostream>
int main(){
	int a,b,c,d,sum;
	cin>>a>>b;
	printf("%d\n",a-b+1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |         cin>>a>>b;
      |         ^~~
      |         std::cin
In file included from a.cc:6:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

int main()
{
  int N, i;
  std::cin >> N >> i;

  std::cout << N - i + 1 << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: 'cin' is not a member of 'std'
    4 |   std::cin >> N >> i;
      |        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:6:8: error: 'cout' is not a member of 'std'
    6 |   std::cout << N - i + 1 << std::endl;
      |        ^~~~
a.cc:6:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:34: error: 'endl' is not a member of 'std'
    6 |   std::cout << N - i + 1 << std::endl;
      |                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main()
Language: C++

#include<iostream>

using namespace std;
int main()
{
	int i,N;
	cin >> N >> i;
	
	cout << N+1-i << endl;
	
	return 0;
}
　

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


import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int k = input.nextInt();
        System.out.print(N-k+1);
    }}

Compiler output:
Main.java:11: error: cannot find symbol
        System.out.print(N-k+1);
                         ^
  symbol:   variable N
  location: class Main
1 error
Language: C++

#include <iostream>
using namespace std;

int main(){
	int N,i;

	cin >> N;
	cin >> i;
	
	cou >> (N - i + 1);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'cou' was not declared in this scope
   10 |         cou >> (N - i + 1);
      |         ^~~
Language: Java

package sample_problem;

import java.util.Arrays;
import java.util.Scanner;

public class Sample_problem {

    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int k = input.nextInt();
        System.out.print(n-k+1);
    }}

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

#include<iostream>
using namespace std;
int main()
{
int N,i;
while(cin>>N>>i)
{
cout<<n+1-i<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'n' was not declared in this scope
    8 | cout<<n+1-i<<endl;
      |       ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;


/**
 *
 * @author
 *
 *
 *
 */

public class Train {

    public static void main(String[] args) throws IOException {
        MyScanner scanner = new MyScanner();
        PrintStream out = System.out;

        int[] data = scanner.nextIntArray();

        out.println(data[0] - data[1] + 1);

        scanner.reader.close();
        out.close();
    }

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader reader;

        public MyScanner() {
            this.reader = new BufferedReader(new InputStreamReader(System.in));
        }

        public void close() throws IOException {
            this.reader.close();
        }

        int nextInt() {
            return Integer.parseInt(this.next());
        }

        long nextLong() {
            return Long.parseLong(this.next());
        }

        double nextDouble() {
            return Double.parseDouble(this.next());
        }

        String next() {
            String str = "";
            try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        String[] nextStringArray() {
            String[] str = null;
            try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextIntArray() {
            String[] data  = nextStringArray();
            int[] a  = new int[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        Integer[] nextIntegerArray() {
            String[] data  = nextStringArray();
            Integer[] a  = new Integer[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        long[] nextLongArray() {
            String[] data  = nextStringArray();
            long[] a  = new long[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            }

            return a;
        }
    }
}



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

package sample_problem;
import java.util.Arrays;
import java.util.Scanner;

public class Sample_problem {

    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int k = input.nextInt() - 1;
        System.out.print(n-k+1);
}}

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

#include<stdio.h>

int main(void){
int N,i;
scanf("%d%d",&N,&i);
printf("%d",N-i+1);
return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected '}' at end of input
    7 | return 0;
      |          ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: Java

package sample_problem;

import java.util.Arrays;
import java.util.Scanner;

public class Sample_problem {
    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int k = input.nextInt();
        System.out.print(N-k+1);
    }
}

Compiler output:
Main.java:6: error: class Sample_problem is public, should be declared in a file named Sample_problem.java
public class Sample_problem {
       ^
Main.java:11: error: cannot find symbol
        System.out.print(N-k+1);
                         ^
  symbol:   variable N
  location: class Sample_problem
2 errors
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Sample_problem {

    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int k = input.nextInt();
        System.out.print(N-k+1);
    }}

Compiler output:
Main.java:4: error: class Sample_problem is public, should be declared in a file named Sample_problem.java
public class Sample_problem {
       ^
Main.java:10: error: cannot find symbol
        System.out.print(N-k+1);
                         ^
  symbol:   variable N
  location: class Sample_problem
2 errors
Language: C

#include <stdio.h>
int main(void){
 int n,i;
 scanf("%d",&n);
 scanf("%d",&i);
 printf("%d\n",(n - i) + !);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:27: error: expected expression before ')' token
    6 |  printf("%d\n",(n - i) + !);
      |                           ^
Language: C++

include<bits/stdc++.h>
using namespace std;
int main(){
     int a, b, i=0;
     cin >> a >> b;
     cout << a-b+1 << endl;
}


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:5:6: error: 'cin' was not declared in this scope
    5 |      cin >> a >> b;
      |      ^~~
a.cc:6:6: error: 'cout' was not declared in this scope
    6 |      cout << a-b+1 << endl;
      |      ^~~~
a.cc:6:23: error: 'endl' was not declared in this scope
    6 |      cout << a-b+1 << endl;
      |                       ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>;
cout<<a-b+1;
system ("pause");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before ';' token
    6 | cin>>a>>;
      |         ^
Language: Java

import java.util.Scanner;

import org.apache.commons.lang3.builder.EqualsBuilder;

class Main {
	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int i = scanner.nextInt();

		System.out.println(n - i + 1);
	}

	@Override
	public boolean equals(Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	}

}

Compiler output:
Main.java:3: error: package org.apache.commons.lang3.builder does not exist
import org.apache.commons.lang3.builder.EqualsBuilder;
                                       ^
Main.java:17: error: cannot find symbol
		return EqualsBuilder.reflectionEquals(this, obj);
		       ^
  symbol:   variable EqualsBuilder
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();z
        int i = stdIn.nextInt();
        System.out.println(N-i+1);
    }
}


Compiler output:
Main.java:6: error: not a statement
        int N = stdIn.nextInt();z
                                ^
Main.java:6: error: ';' expected
        int N = stdIn.nextInt();z
                                 ^
2 errors
Language: C++

# coding: utf-8
# Your code here!

N,A=map(int,input()split())
print(N-A+1)

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #coding
    1 | # coding: utf-8
      |   ^~~~~~
a.cc:2:3: error: invalid preprocessing directive #Your
    2 | # Your code here!
      |   ^~~~
a.cc:4:1: error: 'N' does not name a type
    4 | N,A=map(int,input()split())
      | ^
Language: C++

#include<bits/c++.h>

using namespace std;
int main(){
  int a,b;
  cin >> a;
  cin >> b;
  cout << a-b+1 << endl;
}

Compiler output:
a.cc:1:9: fatal error: bits/c++.h: No such file or directory
    1 | #include<bits/c++.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: Java


import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (PrintWriter out = new PrintWriter(System.out); Scanner sc = new Scanner(System.in);) {
			Task task = new Task();
			task.solve(sc, out);
			out.flush();

		} catch (Exception e) {
			// DO NOT USE
			int a = nint(sc)+1;
			int b = nint(sc);
			
			out.print(a-b);
			

		}
	}

	static class Task {
		public void solve(Scanner sc, PrintWriter out) {
			// TODO

		}
	}

	// method
	static int nint(Scanner sc) {
		return Integer.parseInt(sc.next());
	}

	static long nlong(Scanner sc) {
		return Long.parseLong(sc.next());
	}

	static double ndouble(Scanner sc) {
		return Double.parseDouble(sc.next());
	}

	static String nstr(Scanner sc) {
		return sc.next();
	}

	static long[] longLine(Scanner sc, int size) {
		long[] lLine = new long[size];
		for (int i = 0; i < size; i++) {
			lLine[i] = nlong(sc);
		}
		return lLine;
	}

	static int[] intLine(Scanner sc, int size) {
		int[] iLine = new int[size];
		for (int i = 0; i < size; i++) {
			iLine[i] = nint(sc);
		}
		return iLine;
	}

	static String[] strLine(Scanner sc, int size) {
		String[] strLine = new String[size];
		for (int i = 0; i < size; i++) {
			strLine[i] = nstr(sc);
		}
		return strLine;
	}

	static long maxFromList(List<Long> longList) {
		return longList.stream().max(Comparator.naturalOrder()).get();
	}

	static long minFromList(List<Long> longList) {
		return longList.stream().min(Comparator.naturalOrder()).get();
	}

	public static int sumDigits(int n) {
		int sum = 0;
		while (n != 0) {
			sum += n % 10;
			n /= 10;
		}
		return sum;
	}

	public static long sumDigits(long n) {
		long sum = 0;
		while (n != 0) {
			sum += n % 10;
			n /= 10;
		}
		return sum;
	}

	static List<Integer> getIntegerList(Scanner sc, int size) {
		List<Integer> list = new ArrayList<>();
		for (int i = 0; i < size; i++) {
			list.add(nint(sc));
		}
		return list;
	}

	static List<Long> getLongList(Scanner sc, int size) {
		List<Long> list = new ArrayList<>();
		for (int i = 0; i < size; i++) {
			list.add(nlong(sc));
		}
		return list;
	}
}

Compiler output:
Main.java:17: error: cannot find symbol
			int a = nint(sc)+1;
			             ^
  symbol:   variable sc
  location: class Main
Main.java:18: error: cannot find symbol
			int b = nint(sc);
			             ^
  symbol:   variable sc
  location: class Main
Main.java:20: error: cannot find symbol
			out.print(a-b);
			^
  symbol:   variable out
  location: class Main
3 errors
Language: C++

#include<bits/c++.h>

int main(){
  int a,b;
  cin >> a;
  cin >> b;
  cout << a-b+1 << endl;
}

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

#include<stdio.h>

int main()
{
	int N,i;
	scanf("%d%d", &N,&i);

	printf("%d",N-i+1) 
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:27: error: expected ';' before 'return'
    8 |         printf("%d",N-i+1)
      |                           ^
      |                           ;
    9 |         return 0;
      |         ~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

class Timer {
    clock_t start;
    string name;
public:
    Timer() {name = "";start = clock();}
    Timer(string s){name = s;start = clock();}
    ~Timer() {fprintf(stderr, "%s: %.3gs\n", name.c_str(), 1.0*(clock() - start) / CLOCKS_PER_SEC);}
};

#define sq(a) ((a) * (a))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define what_is(x) cerr << fixed << setprecision(2) << boolalpha << #x << " = " << x << endl
#define setbitj(n, j) (n |= (1 << (j)))
#define isbitjOn(n, j) (((n & (1 << (j))) > 0) ? 1 : 0)
#define safeMod(a, m) ((((a)%(m))+(m))%(m))/*handling negative sign of remainder*/

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vii;

const double EPS = 1e-9;
const int INF = 0x7fffffff;
const double PI = acos(-1.0);
const int MAX = 600005;
const int MOD = 1000000007;
const int precision = 10;

inline bool isEq(double a, double b){return abs(a - b) < EPS;}
inline bool isEq(double a, double b, double eps){return abs(a - b) < eps;}
inline double toRad(double deg){return deg*PI/180;}
inline double toDeg(double rad){return rad*180/PI;}

//#define isValid(a, b) (a >= 0 && a < b)
//int dr[]  =  {0, -1, -1, -1,  0,  1, 1, 1};
//int dc[]  =  {1,  1,  0, -1, -1, -1, 0, 1};

struct info
{
    int p;
    bool isRight;
    int ind;
    info(int p, int i, bool r):p(p), ind(i), isRight(r){}
    info():info(0, 0, 0){}
    bool operator<(const info &i)const
    {
        return p < i.p || (p == i.p && isRight < i.isRight);
    }
};

vector<pii>segs;
vector<info>pranto;
map<int, int>orgDir;

int tree[4*MAX];
int lazy[4*MAX];
void build(int n, int l, int r)
{
    if(l == r){
        tree[n]++;
        lazy[n] = 0;
        return;
    }
    int mid = (l+r)>>1;
    build(n<<1, l, mid);
    build((n<<1)|1, mid+1, r);

}
int main(int argc, char* argv[])
{
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    //ios_base::sync_with_stdio(false); cin.tie(NULL);
    //cout << fixed << setprecision(precision);
    int n, l;
cin >> n >>l;
cout << n-l+1 << endl;

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:84:23: error: expected '}' at end of input
   84 | cout << n-l+1 << endl;
      |                       ^
a.cc:77:1: note: to match this '{'
   77 | {
      | ^
Language: C++

#pragma once
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <deque>
#include <concurrent_priority_queue.h>
using namespace std;
void Train() {
	int N, i;
	cin >> N >> i;
	cout << N - i + 1 << "\n";
}

int main() {
	Train();
	return 0;
}

Compiler output:
a.cc:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
a.cc:18:10: fatal error: concurrent_priority_queue.h: No such file or directory
   18 | #include <concurrent_priority_queue.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N,i;
  cin>>N>>i;
  cour<<N-i+1<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cour' was not declared in this scope
    6 |   cour<<N-i+1<<endl;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std
int main(){
	int n,i;
	cin>>n>>i;
	cout<<n-i+1<<endl;
	return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main(){
      | ~~~
Language: C

#include <stdio.h>
int main(void) {
	int n,i;
	scanf("%d", &n);
	scanf("%d", &i);
	printf("%d", n + 1 - i);



	return 0}

Compiler output:
main.c: In function 'main':
main.c:10:17: error: expected ';' before '}' token
   10 |         return 0}
      |                 ^
      |                 ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9+7;
const int INF = 1e9;
const ll INFll = 1e18;
#define put(n) cout<<(n)<<endl
#define Cout(n) cout<<(n)
#define FOR(i,num,N) for(int(i)=(num);(i)<(N);++(i))
#define RFOR(i,num,N) for(int (i)=(num);(i)>(N);--(i))
#define all(v) (v).begin() , (v).end()
#define rall(v) (v).rbegin() , (v).rend()
#define MP make_pair
#define pb(q) push_back(q)
int dx[4] = {0,0,1,-1};
int dy[4] = {1,-1,0,0}


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

    int N;
    int i;
    cin>>N>>i;
    put(N-i+1);

}

Compiler output:
a.cc:19:1: error: expected ',' or ';' before 'int'
   19 | int main(){
      | ^~~
Language: C++

# coding: utf-8

n, i = [int(i) for i in input().split()]

print(n - i + 1)


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #coding
    1 | # coding: utf-8
      |   ^~~~~~
a.cc:3:1: error: 'n' does not name a type
    3 | n, i = [int(i) for i in input().split()]
      | ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include <cstdlib>
#include <math.h>
#include<algorithm>
using namespace std;


int main(int argc,char** argv)
{

	　int a,b;
	cin >> a >> b;
	cout << a-b+1 <<endl;

	return 0;
}

Compiler output:
a.cc:14:9: error: extended character 　 is not valid in an identifier
   14 |         　int a,b;
      |         ^
a.cc: In function 'int main(int, char**)':
a.cc:14:9: error: '\U00003000int' was not declared in this scope
   14 |         　int a,b;
      |         ^~~~~
a.cc:15:16: error: 'a' was not declared in this scope
   15 |         cin >> a >> b;
      |                ^
a.cc:15:21: error: 'b' was not declared in this scope
   15 |         cin >> a >> b;
      |                     ^
Language: C++

#include <iostream>
using namespace std;
main()
{
  int N,a;
  cin >> N>>a;
  cout << N - a + 1 <, endl;
}


Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:22: error: expected primary-expression before ',' token
    7 |   cout << N - a + 1 <, endl;
      |                      ^
Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<string>
#include<algorithm>
#define MAX 100005
using namespace std;

int main(){
  int n, m,;
  cin >> n >> m;
  cout << n - m + 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected unqualified-id before ';' token
   10 |   int n, m,;
      |            ^
Language: C++

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <iterator>
#include <unordered_map>
#include <unordered_set>
#include <tuple>
#include <random>
#include <cassert>
#include <limits>

using namespace std;

#define mp make_pair
#define pb push_back
#define repi(i, p, q) for (long i = p; i < q; i++)
#define repd(i, p, q) for (long i = p; i >= q; i--)
#define sz(x) x.size()
#define INF 2000000000
#define MOD 1000000007

typedef map<int, int> MI;
typedef pair<int, int> PI;
typedef long long int LLI;
typedef long int LI;
typedef int I;

int main()
{
    int n, i;
    cin >> n >> i;
    cout << n = i + 1;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:21: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'int')
   51 |     cout << n = i + 1;
      |                     ^
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from a.cc:13:
/usr/include/c++/14/ostream:458:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator=(std::basic_ostream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]'
  458 |       operator=(basic_ostream&& __rhs)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:458:33: note:   no known conversion for argument 1 from 'int' to 'std::basic_ostream<char>&&'
  458 |       operator=(basic_ostream&& __rhs)
      |                 ~~~~~~~~~~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <string.h>
using namespace std;
 
int main(){
    
    int N,i;
    cin >> N >> i;

    cout << N-i+1 << ;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected primary-expression before ';' token
   12 |     cout << N-i+1 << ;
      |                      ^
Language: Java

import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int line = sc.nextLine();
      int line2 = sc.nextLine();
        System.out.println((line+1)-line2);
    }
}

Compiler output:
Main.java:10: error: incompatible types: String cannot be converted to int
        int line = sc.nextLine();
                              ^
Main.java:11: error: incompatible types: String cannot be converted to int
      int line2 = sc.nextLine();
                             ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9+7
const int INF = 1e9
const ll INFll = 1e18
#define put(n) cout<<(n)<<endl
#define Cout(n) cout<<(n)
#define FOR(i,num,N) for(int(i)=(num);(i)<(N);++(i))
#define RFOR(i,num,N) for(int (i)=(num);(i)>(N);--(i))
#define all(v) (v).begin() , (v).end()
#define rall(v) (v).rbegin() , (v).rend()
#define MP make_pair
#define pb(q) push_back(q)
int dx[4] = {0,0,1,-1};
int dy[4] = {1,-1,0,0}


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

    int N;
    int i;
    cin>>N>>i;
    put(N-i+1);

}

Compiler output:
a.cc:5:1: error: expected ',' or ';' before 'const'
    5 | const int INF = 1e9
      | ^~~~~
a.cc:19:1: error: expected ',' or ';' before 'int'
   19 | int main(){
      | ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
using namespace std;
int main() {
	int a, b, ans;
	cin >> a >> b;
	if (a == = 1) ans = 1;
	else ans = a - b + 1;
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before '=' token
   10 |         if (a == = 1) ans = 1;
      |                  ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int n;
    cin >> n;
    cout << n-i+1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'i' was not declared in this scope
    6 |     cout << n-i+1;
      |               ^
Language: C++

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

signed main(){
	int n,i;
	cin>>n>>i;
	cout<<n-i+1<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:7:9: note: in expansion of macro 'int'
    7 |         int n,i;
      |         ^~~
a.cc:7:13: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |         int n,i;
      |             ^
      |             yn
a.cc:7:15: error: 'i' was not declared in this scope
    7 |         int n,i;
      |               ^
Language: C++

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

int main() {
  
  int H,W;
  cin >> H >> W;
  
  vector<vector<char>> data(H, vector<char>(W));
  
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cin >> data.at(i).at(j);
    }
  }
  
  for (int i = 0; i < H; i++) {
    int white = 0;
      for (int j = 0; j < W; j++){
      if(data.at(i).at(j) == '.') {white++;}}
    
    if(white == W)    
    {
      for(int j = 0; j < W; j++) {
        data.at(i).at(j) = 'k';}
    }
  

  }
  
   
  
  for (int j = 0; j < W; j++) {
    int white = 0;
      for (int i = 0; i < H; i++){
      if(data.at(i).at(j) != '#') {white++;}}
    
    if(white == H)    
    {
      for(int i = 0; i < H; i++) {
        data.at(i).at(j) = 'k';}
    }
  


Compiler output:
a.cc: In function 'int main()':
a.cc:42:6: error: expected '}' at end of input
   42 |     }
      |      ^
a.cc:33:31: note: to match this '{'
   33 |   for (int j = 0; j < W; j++) {
      |                               ^
a.cc:42:6: error: expected '}' at end of input
   42 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int N, M;
  int s = t = 0;
  cin >> N >> M;
  vector<vector<char>> kekka(N, vector<char>(N));
  for(int i = 0; i < N; i++){
    for(int j = 0; j < M; j++){
      cin >> kekka.at(i).at(j);
      if(kekka.at(i).at(j) == '#'){
        s++;
      }else{
        t++;
      }
    }
    if(s == N - 1 || t == N - 1){
      kekka.at(i) = ' ';
    }else{
      s = t = 0;
    }
  }
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 't' was not declared in this scope
    6 |   int s = t = 0;
      |           ^
a.cc:19:21: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'std::vector<char>'} and 'char')
   19 |       kekka.at(i) = ' ';
      |                     ^~~
In file included from /usr/include/c++/14/vector:72,
                 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/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'char' to 'const std::vector<char>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = char; _Alloc = std::allocator<char>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'char' to 'std::vector<char>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'char' to 'std::initializer_list<char>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Language: C++

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

int main() {
  int h,w,a,c;
  a = 0;
  c = 0;
  cin >> h >> w;
  vector<vector<char>> data(h, vector<char>(w));
  for(int i = 0; i < h; i++) {
    for(int j = 0; j < w; j++) {
      cin >> data.at(i).at(j);
    }
  }
  for(int i = 0; i < h; i++) {
    for(int j = 0; j < w; j++) {
      if(data.at(i).at(j) == '#') {
        continue;
      }
      else {
        a++;
        c = 1
      }
    }
  }
  for(int i = 0; i < h; i++) {
    for(int j = 0; j < w; j++) {
      if(c == 0 || a == w) {
        
      }
      else {
        cout << data.at(i).at(j) << endl;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: expected ';' before '}' token
   22 |         c = 1
      |              ^
      |              ;
   23 |       }
      |       ~
Language: C++

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

int main() {
	int H,W;cin>>H>>W;
	vector<string> a(H);
	for (int i = 0; i < H; i++) cin >> a[i];

	vector<bool> row(H, false);
	vector<bool> col(W, false);
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
		}
	}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: 'h' was not declared in this scope
   20 |         for (int i = 0; i < h; i++) {
      |                             ^
a.cc:22:45: error: 'w' was not declared in this scope
   22 |                         for (int j = 0; j < w; j++) {
      |                                             ^
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<vector<char>> chart(H, vector<char>(W));
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cin >> chart.at(i).at(j);
    }
  }
  vector<bool> line(H, false);
  vector<bool> row(W, false);
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (chart.at(i).at(j) == '#') {
        line(i) = true;
        row(j) = true;
      }
    }
  }
  for (int i = 0; i < H; i++) {
    if (line(i)) {
      for (int j = 0; j < W; j++) {
        if (row(j)) {
          cout << chart.at(i).at(j);
        }
      }
    cout << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: no match for call to '(std::vector<bool>) (int&)'
   18 |         line(i) = true;
      |         ~~~~^~~
a.cc:19:12: error: no match for call to '(std::vector<bool>) (int&)'
   19 |         row(j) = true;
      |         ~~~^~~
a.cc:24:13: error: no match for call to '(std::vector<bool>) (int&)'
   24 |     if (line(i)) {
      |         ~~~~^~~
a.cc:26:16: error: no match for call to '(std::vector<bool>) (int&)'
   26 |         if (row(j)) {
      |             ~~~^~~