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

#include <bits/stdc++.h>

#define ll long long
#define re register
#define il inline
#define gc getchar
#define pc putchar

template <class T>
void read(T &x) {
  re bool f = 0;
  re char c = gc();
  while ((c < '0' || c > '9') && c != '-') c = gc();
  if (c == '-') f = 1, c = gc();
  x = 0;
  while (c >= '0' && c <= '9') x = x * 10 + (c ^ 48), c = gc();
  f && (x = -x);
}

template <class T>
void print(T x) {
  if (x < 0) pc('-'), x = -x;
  if (x >= 10) print(x / 10);
  pc((x % 10) ^ 48);
}

#define priln(x) do{print(x);pc('\n');}while(0)
#define prisp(x) do{print(x);pc(' ');}while(0)



int main() {
  int a, b;
  read(a);
  read(b);
  if (a > b) a ^= b ^= a ^= b;
  for (int i = 1; i <= b; i++) print(a);
  ln;
}

Compiler output:
a.cc: In function 'void read(T&)':
a.cc:11:11: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   11 |   re bool f = 0;
      |           ^
a.cc:12:11: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   12 |   re char c = gc();
      |           ^
a.cc: In function 'int main()':
a.cc:38:3: error: 'ln' was not declared in this scope; did you mean 'yn'?
   38 |   ln;
      |   ^~
      |   yn
a.cc: In instantiation of 'void read(T&) [with T = int]':
a.cc:34:7:   required from here
   34 |   read(a);
      |   ~~~~^~~
a.cc:11:11: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   11 |   re bool f = 0;
      |           ^
a.cc:12:11: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   12 |   re char c = gc();
      |           ^
Language: C++

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

int main() {
	int n;
	cin >> n;
	vector<int> p(n);

	int ans = 0;
	for (int i = 0; i < n; i++) {
		cin >> p[i];
		bool f = true;
		for (int j = 0; j < i; j++) {
			if (a[j] < a[i]) {
				f = false;
				break;
			}
		}
		if (f) ans++;
	}

	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: 'a' was not declared in this scope
   14 |                         if (a[j] < a[i]) {
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
  ll a;
  vector<ll>vec(a);
  vector<ll>veco<a>;
  cin>>vec.at(0);
  veco.at(0)=vec.at(0);
  ll b=vec.at(0);
  for(ll i=1;i<a;i++){
    cin>>vec.at(i);
    veco.at(i)=min(a,vec.at(i));
  }
  ll c=0;
  for(ll i=0;i<a;i++){
    if(vec.at(i)==veco.at(i)){
      c+=1;
    }
  }
  cout<<c<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected initializer before '<' token
    7 |   vector<ll>veco<a>;
      |                 ^
a.cc:9:3: error: 'veco' was not declared in this scope; did you mean 'vec'?
    9 |   veco.at(0)=vec.at(0);
      |   ^~~~
      |   vec
Language: C++

#include <bits/stdc++.h>
#define rep(i,N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int inf{int(1e9)};
int main(void){
  int N;
  cin >> N;
  vector <int> P(N);
  rep(i,N) cin >> P[i];
  int ans = 0;
  int curMin = 1e9;  //今までのmin
  rep(i,N){
    curMin = min(curMin, P[i]);
    if (p[i] == curMin) ans ++;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'p' was not declared in this scope
   17 |     if (p[i] == curMin) ans ++;
      |         ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int inf{int(1e9)};
int main(void){
  int N;
  cin >> N;
  vector <int> P(N);
  rep(i,N) cin >> P[i];
  int ans = 0;
  int curMin = 1e9;  //今までのmin
  rep(i,N){
    curMin = min(curMin, p[i]);
    if (p[i] == curMin) ans ++;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: 'p' was not declared in this scope
   16 |     curMin = min(curMin, p[i]);
      |                          ^
Language: C

include<stdio.h>
int main()
{
    int N,i,max,count=1;
    int p[100];
    scanf("%d",&N);
    for(i=0;i<N;i++)
    {
        scanf("%d",&p[i]);
    }
    max=p[0];
    for(i=1;i<N;i++)
    {
        if(p[i]<max)
        {
            max=p[i];
            count++;
        }
    }
    printf("%d\n",count);
    return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include<stdio.h>

int main()
{
    int a,x=1,b,i=0,A[a];

    scanf("%d",&a);

    while(i<a){
        scanf("%d",&A[i]);
        i++;
    }

    b=P[0];
    i=1;

    while(i<a){
    
        if(A[i]<b)
        {
            b= A[i];
            x++;

        }
    }

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

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:7: error: 'P' undeclared (first use in this function)
   14 |     b=P[0];
      |       ^
main.c:14:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
long long int n,a,b,c,d;
cin>>n;
c = 99999999999;
d=0;
for(i=0;i<n;i++){
cin>>a;
c = min(a,c);
if(c==a)d++;}
cout<<d<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'i' was not declared in this scope
    9 | for(i=0;i<n;i++){
      |     ^
Language: C++

n=int(input())
L=list(map(int,input().split()))
num=1
min_num=0
for i in range(n):
    if i==0:
        min_num=L[0]

    elif min_num>=L[i]:
        num+=1
        min_num=L[i]

print(num)


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

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
//if(strcmp(s[i],"AC")==0)
//if(s[l]=='#')
/*小文字判定
if((moji>= 'a') && (moji<='z')){
    printf("a\n");
    return 0;
  }
  */

int W_Length(char *str){
	int length = 0;
	while(*str++ != '\0')
		length++;
	return length;
}

void swap(long long int *a, long long int *b){
  int temp;
  temp=*a;
  *a=*b;
  *b=temp;
}
//swap(&a, &b)

double deg(double theta){//deg to theta
return theta*(2*3.14159265359)/360;
}

long long int cmp( const void *p, const void *q ) {
    return *(long long int*)p - *(long long int*)q;
}//ちいさい順
//qsort(a,n,sizeof(long long int),cmp);


int cmp_s(const void * left, const void * right)
{
	char *left_char = (char *)left;
  char *right_char = (char *)right;
  return strcmp(left_char, right_char);
}
//qsort(s,n,sizeof(s[0]),cmp_s);
//char s[n][11]

long long int GCD(long long int a, long long int b){
  long long int L=a,S=b;
  while(1){
    if(S>L){
      L=S+L;
      S=L-S;
      L=L-S;
    }
    if(L%S==0){
      return S;
    }
    L=L%S;
  }
  
}

long long int LCM(long long int a, long long int b){
  return a*b/(GCD(a,b));
}

int main (void)
{
	long long int p[5005],b,c,n,i,k,a[210000],max,j=1,t[210000],count=0;
scanf("%lld",&n);
for(i=0;i<n;i++){
  scanf("%lld",&a[i]);
}  
  min=a[0];
  for(i=0;i<n;i++){
    if(a[i]<=min){
      min=a[i];
      count++;
    }
  }
  
  printf("%lld",count);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:75:3: error: 'min' undeclared (first use in this function); did you mean 'main'?
   75 |   min=a[0];
      |   ^~~
      |   main
main.c:75:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
    ll n; cin >> n;
    vl p(n);
    rep(i,n) cin >> p[i];

    ll ans = 0;
    rep(i,n){
        rep(j,i){
            if(p[i] > p[j]){
                ans--;
                break;
            }
        }
        ans++;
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'vl' was not declared in this scope; did you mean 'll'?
    8 |     vl p(n);
      |     ^~
      |     ll
a.cc:9:21: error: 'p' was not declared in this scope
    9 |     rep(i,n) cin >> p[i];
      |                     ^
a.cc:14:16: error: 'p' was not declared in this scope
   14 |             if(p[i] > p[j]){
      |                ^
Language: C

main(){int a,b,i=1,d,c=1; scanf("%d%d",&a,&d);
rep(i,n){scanf("%d",&b);if(b<=d){d=b;c++;}}
printf("%d",c);}                


Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){int a,b,i=1,d,c=1; scanf("%d%d",&a,&d);
      | ^~~~
main.c: In function 'main':
main.c:1:27: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){int a,b,i=1,d,c=1; scanf("%d%d",&a,&d);
      |                           ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){int a,b,i=1,d,c=1; scanf("%d%d",&a,&d);
main.c:1:27: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){int a,b,i=1,d,c=1; scanf("%d%d",&a,&d);
      |                           ^~~~~
main.c:1:27: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:1: error: implicit declaration of function 'rep' [-Wimplicit-function-declaration]
    2 | rep(i,n){scanf("%d",&b);if(b<=d){d=b;c++;}}
      | ^~~
main.c:2:7: error: 'n' undeclared (first use in this function)
    2 | rep(i,n){scanf("%d",&b);if(b<=d){d=b;c++;}}
      |       ^
main.c:2:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:2:9: error: expected ';' before '{' token
    2 | rep(i,n){scanf("%d",&b);if(b<=d){d=b;c++;}}
      |         ^
      |         ;
Language: C++

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

int main() {
  int N ; 
  cin >> N ; 
  vector<int> P(N) ; 
  
  for(int i = 0 ; i < N ; i++ ) {
    cin >> P.at(i) ; 
  }
  
  int max = P.at(0); 
  int cnt = 0 ; 
  
  for(int i = 0 ; i < N ; i++){
    if(max >= P.at(i) ){
      cnt++ ;
    }
    else{
      max = P.at(i) 
    }
  }
  cout << cnt << endl ; 
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: expected ';' before '}' token
   21 |       max = P.at(i)
      |                    ^
      |                    ;
   22 |     }
      |     ~
Language: C++

int main(void){

    ll t,b,r,d,n,m,mx,mi,f=0,sum=0;
        cin>>n;

    vector<ll>a(n+1);

    for(int i=1; i<=n; i++){
        cin>>a[i];
    }

    int cnt=1;

    for(int i=1; i<=n-1; i++){
        if(a[i]>a[i+1]){
            cnt++;
        }
    }
    cout<<cnt<<nl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'll' was not declared in this scope
    3 |     ll t,b,r,d,n,m,mx,mi,f=0,sum=0;
      |     ^~
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin>>n;
      |         ^~~
a.cc:4:14: error: 'n' was not declared in this scope
    4 |         cin>>n;
      |              ^
a.cc:6:5: error: 'vector' was not declared in this scope
    6 |     vector<ll>a(n+1);
      |     ^~~~~~
a.cc:6:15: error: 'a' was not declared in this scope
    6 |     vector<ll>a(n+1);
      |               ^
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout<<cnt<<nl;
      |     ^~~~
a.cc:19:16: error: 'nl' was not declared in this scope
   19 |     cout<<cnt<<nl;
      |                ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[n];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	if(a[0]==1)
	{
		cout<<1<<endl;
		return 0;
	}
	int c=0;
	for(int i=0;i<n;i++)
	{
		if(a[0]>a[i+1])
		{
			a[i]==1
			c++;	
		}
			
			
	}
	cout<<c+1;

	
}

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

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

int main() {
  cin n;
  cin >> n;
  vector<int> a(n);
  for(int i=0;i<n;i++) cin >> a[ui];
  int smallest_so_far = n+1;
  int ans=0;
  for(int i=0;i<n;i++) {
    if(smallest_so_far > a[i]) {
      ans++;
      smalles_so_far = a[i];
    }
  }
  cout << ans << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected ';' before 'n'
    5 |   cin n;
      |      ^~
      |      ;
a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |   cin >> n;
      |          ^
      |          yn
a.cc:8:33: error: 'ui' was not declared in this scope; did you mean 'i'?
    8 |   for(int i=0;i<n;i++) cin >> a[ui];
      |                                 ^~
      |                                 i
a.cc:14:7: error: 'smalles_so_far' was not declared in this scope; did you mean 'smallest_so_far'?
   14 |       smalles_so_far = a[i];
      |       ^~~~~~~~~~~~~~
      |       smallest_so_far
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <utility>
#include<stack>
#include<string>
#include<algorithm> 
#include <set>
#include<list>
#include <bit>
#include <bitset>
#include <cstdint>
#include <initializer_list>
using namespace std;
int main() {
	long long int N, ans=0,max_val=LLONG_MAX; cin >> N;

	vector<long long int >data(N);
	for (int i = 0; i < N; i++)cin >> data[i];
	for (int i = 0; i < N; i++) {
		if (max_val >= data[i]) {
			max_val = data[i];
			ans++;
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:40: error: 'LLONG_MAX' was not declared in this scope
   16 |         long long int N, ans=0,max_val=LLONG_MAX; cin >> N;
      |                                        ^~~~~~~~~
a.cc:13:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   12 | #include <cstdint>
  +++ |+#include <climits>
   13 | #include <initializer_list>
Language: C++

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

int main() {
  int N,min=1000000,Ans=0;
  cin>>N;
  vector<int> P(N);
  rep(i,N){cin>>P.at(i);
          if(min(P.at(i),min)<=min){min=P.at(i);Ans++;}
          }
  cout<<Ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'min' cannot be used as a function
   10 |           if(min(P.at(i),min)<=min){min=P.at(i);Ans++;}
      |              ~~~^~~~~~~~~~~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	
      	int[] a = new int[n];
      	int min = 0;
      	int count = 1;
        for(int i = 0; i < a.length; ++i){
          a[i] = sc.nextInt();
        } 
        min = a[0];
      	for(int i = 0; i <n; i++){
          if(min > a[i]){
            min = a[i];
            count += 1; 
          }
        } 
      system.out.println(count);
        
        }
}


Compiler output:
Main.java:20: error: package system does not exist
      system.out.println(count);
            ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	
      	int[] a = new int[n];
      	int min = 0;
      	int count = 1;
        for(int i = 0; i < a.length; ++i){
          a[i] = sc.nextInt();
        } 
        min = a[0];
      	for(int i = 0; i <n; i++){
          if(min > a[i]){
            min = a[i];
            count += 1; 
          }
          system.out.println(count);
          }
        }
}


Compiler output:
Main.java:19: error: package system does not exist
          system.out.println(count);
                ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	
      	int[] a = new int[n];
      	int min = 0;
      	int count = 1;
        for(int i = 0; i < a.length; ++i){
          a[i] = sc.nextInt();
          min = a[0];
        }
      	for(int i = 0; i <n; i++){
          if(min > a[i]){
            min = a[i];
            count += 1; 
          }
          system.out.println(count);
          }
        }
}


Compiler output:
Main.java:19: error: package system does not exist
          system.out.println(count);
                ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	
      	int[] a = new int[n];
      	int min = 0;
      	int count = 1;
        for(int i = 0; i < a.length; ++i){
          a[i] = sc.nextInt;
          min = a[0];
        }
      	for(int i = 0; i <n; i++){
          if(min > a[i]){
            min = a[i];
            count += 1; 
          }
          system.out.println(count);
          }
        }
}


Compiler output:
Main.java:11: error: cannot find symbol
          a[i] = sc.nextInt;
                   ^
  symbol:   variable nextInt
  location: variable sc of type Scanner
Main.java:19: error: package system does not exist
          system.out.println(count);
                ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	
      	int[] a = new int[n];
      	int min = 0;
      	int count = 1;
        for(int i = 0; i < a.length; ++i){
          a[i] = sc.nextInt;
          min = a[0];
        }
      	for(int i = 0; i <n; i++){
          if(min > a[i]){
            min = a[i];
            count += 1;   
          system.out.println(min);
          }
        }
}


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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
      	
      	int[] a = new int[n];
      	int min = 0;
      	int count = 1;
        for(int i = 0; i < a.length; ++i){
          a[i] = sc.nextInt;
          min = a[0];
        }
      	for(int i = 0; i <n; i++){
          if(min > a[i]){
            min = a[i];
            count += 1;   
          system.out.println(min);
          }
}


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

import java.util.*;
public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);   
      // 順列
	  int N = sc.nextInt();
      // Pnの値
      int[] P = new int[N];
      for(int i=0;i<N;i++){
        P[i] = sc.nextInt();
      }
      //カウント
      int count = 0;
      //条件を満たすか
      for(int i=1;i<=N;i++){
         for(int j=1;j<=i;j++){
           if(P[i-1]<=P[j-1]){
             break;
           }
         }
        if(j==i){
          count++;
        }
      }
      
      System.out.println(count);
    }
}

Compiler output:
Main.java:21: error: cannot find symbol
        if(j==i){
           ^
  symbol:   variable j
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
      	int i = 0;
        int min = N + 1;
        int count = 0; 
      	int P[] = new int[N];
      	for(i = 0;i < N;i++){
          A[i] = sc.nextInt();
          if(A[i] < min){
            min = A[i];
            count += 1;
          }
        }
       System.out.println(count);            
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
          A[i] = sc.nextInt();
          ^
  symbol:   variable A
  location: class Main
Main.java:13: error: cannot find symbol
          if(A[i] < min){
             ^
  symbol:   variable A
  location: class Main
Main.java:14: error: cannot find symbol
            min = A[i];
                  ^
  symbol:   variable A
  location: class Main
3 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  int s=0;
  cin>>n;
  vector<int>vec(n);
  for(int X=0;X<N;X++){
    cin>>vec.at(X);
  }
  int M=vec.at(0);
  for(int X=1;X<n;X++){
    if(M>vec.at(X)){
      M=vec.at(X);
      s++;
    }
  }
  cout<<s+1<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'N' was not declared in this scope
    9 |   for(int X=0;X<N;X++){
      |                 ^
Language: C++

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

int main() {
  int n;
  vector<int> a(n);
  for(int i;i<n;i++)cin>>a.at(n);
  int s=1;
  for(int i=1;i<n;i++){
    if(i==0||a.at(i)==1){s++;continue;}
    int k=0p
    for(int j=i-1;j>=0;j--){
      if(a.at(i)<a.at(j))k++;
    }if(k==i)s++;
  }cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: unable to find numeric literal operator 'operator""p'
   11 |     int k=0p
      |           ^~
a.cc:12:19: error: 'j' was not declared in this scope
   12 |     for(int j=i-1;j>=0;j--){
      |                   ^
Language: Java


public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int min = sc.nextInt();
		int ans = 1;
		for(int i=1;i<N;i++) {
			int x = sc.nextInt();
			if(x<min) {
				min = x;
				ans++;
			}
		}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
	public static void main(String[] args) throws FileNotFoundException {
	                                              ^
  symbol:   class FileNotFoundException
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int M;
  int S=0;
  cin>>N;
  vector<int>vec(N);
  for(int X=0;X<N;X++){
    cin>>vec.at(N);
  }
  int M=vec.at(0);
  for(int X=1;X<N;X++){
    if(M>=vec.at(X)){
      M=vec.at(X);
      S++;
    }
  }
  cout<<S<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: redeclaration of 'int M'
   13 |   int M=vec.at(0);
      |       ^
a.cc:6:7: note: 'int M' previously declared here
    6 |   int M;
      |       ^
Language: C++

#include <bits/stdc++.h>
#include <vector>
using namespace std ;
int main(void)
{
    //int t ;
    //cin >>t ;
    //t = 1 ;
    while(t--)
    {
    int n , temp ;
    vector <int> num ;
    num.push_back(-1) ;
    cin >> n ;
    for(int i = 0 ; i < n ; i++)
    {
        cin >> temp ;
        num.push_back(temp);
    }
    int cnt = 0 ;

    for(int i = 2 ; i <= n ; i++)
    {
        if(num[i] <= num[i-1]) cnt ++ ;

    }
    cnt++ ;
    cout << cnt ;
    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 't' was not declared in this scope; did you mean 'tm'?
    9 |     while(t--)
      |           ^
      |           tm
Language: Java

package com.company;

import java.io.*;
import java.util.*;

public class lowelements {
    public static void main(String[] args) {

        out = new PrintWriter(new BufferedOutputStream(System.out));
        MyScanner sc = new MyScanner();//start
        int n=sc.nextInt();
        String[] input = new String[n];
        input=sc.nextLine().split(" ");
        int[] arr=new int[n];
        for (int i = 0; i <n; i++) {
            arr[i]=Integer.parseInt(input[i]);
        }
        int sum=0;
        for (int i = 1; i < n; i++) {
            if(arr[i-1]>arr[i] || arr[i-1]==1){sum++;}//0>1
        }
        if(arr[n-1]==1){sum++;}
        out.println(sum);
        out.close();
    }


    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    //--------------------------------------------------------

}


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

//package com.company;

import java.io.*;
import java.util.*;

public class lowelements {
    public static void main(String[] args) {

        out = new PrintWriter(new BufferedOutputStream(System.out));
        MyScanner sc = new MyScanner();//start
        int n=sc.nextInt();
        String[] input = new String[n];
        input=sc.nextLine().split(" ");
        int[] arr=new int[n];
        for (int i = 0; i <n; i++) {
            arr[i]=Integer.parseInt(input[i]);
        }
        int sum=0;
        for (int i = 1; i < n; i++) {
            if(arr[i-1]>arr[i] || arr[i-1]==1){sum++;}//0>1
        }
        if(arr[n-1]==1){sum++;}
        out.println(sum);
        out.close();
    }


    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    //--------------------------------------------------------

}


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

//package com.company;

import java.io.*;
import java.util.*;

public class LowElements {
    public static void main(String[] args) {

        out = new PrintWriter(new BufferedOutputStream(System.out));
        MyScanner sc = new MyScanner();//start
        int n=sc.nextInt();
        String[] input = new String[n];
        input=sc.nextLine().split(" ");
        int[] arr=new int[n];
        for (int i = 0; i <n; i++) {
            arr[i]=Integer.parseInt(input[i]);
        }
        int sum=0;
        for (int i = 1; i < n; i++) {
            if(arr[i-1]>arr[i] || arr[i-1]==1){sum++;}//0>1
        }
        if(arr[n-1]==1){sum++;}
        out.println(sum);
        out.close();
    }


    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    //--------------------------------------------------------

}


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

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

int main() {
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,n) {
    cin >> a.at(i);
    }
    
    int count = 0;
    int curMin = 1e9;
    rep(i,n) {
        curMin = min(curMin, a.at(i));
        if curMin == a.at(i);
        count++;
       
    }
    cout << count;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: expected '(' before 'curMin'
   18 |         if curMin == a.at(i);
      |            ^~~~~~
      |            (
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main() {  
    int n;
    cin >> n;
    vectror<int> p(n);
    rep(i,n)cin >>p.at(i);
    int a=p.at(0);
    int ans=0;
    rep(i,n){
        if(a>=p.at(i)){
            ans++;
            a=p.at(i);
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'vectror' was not declared in this scope
   11 |     vectror<int> p(n);
      |     ^~~~~~~
a.cc:11:13: error: expected primary-expression before 'int'
   11 |     vectror<int> p(n);
      |             ^~~
a.cc:12:19: error: 'p' was not declared in this scope
   12 |     rep(i,n)cin >>p.at(i);
      |                   ^
a.cc:13:11: error: 'p' was not declared in this scope
   13 |     int a=p.at(0);
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x,long long int y) 
{ 
    long long int res = 1;     // Initialize result 
  // x=x;
    while (y > 0) 
    { 
        // If y is odd, multiply x with result 
        if (y & 1) 
            res = (res*x); 
   
        // y must be even now 
        y = y>>1; // y = y/2 
        x = (x*x);  // Change x to x^2 
    } 
    return res; 
}
long long int power(long long int x,long long int y,long long int m) 
{ 
    long long int res = 1;     // Initialize result 
   x=x%m;
    while (y > 0) 
    { 
        // If y is odd, multiply x with result 
        if (y & 1) 
            res = (res*x)%m; 
   
        // y must be even now 
        y = y>>1; // y = y/2 
        x = (x*x)%m;  // Change x to x^2 
    } 
    return res; 
}

long long int gcd(long long int a, long long int b){ 
    if (a == 0) 
        return b;  
    return gcd(b % a, a);  
 } 
 long long int lcm(long long int a, long long int b)  
 { 
     long long int temp;
    
    return (a*b)/gcd(a, b);  
 }
 
int main() {
        long long int t=0,b[1000000]={0};
        string c;
        string s;
       long long int n,m,o=0,l,d=0,i,j,p=0,k,f;
       double pie=3.141592653589793238;
    long long int MOD=1000000007;
    cin>>n;
    long long int a[n],b[n+1];
    for(i=0;i<n;i++)
    {
        cin>>a[i];
    }
    p=a[0];
    d=d+1;
    for(i=1;i<n;i++)
    {
        if(a[i]<p)
        {
            d=d+1;
        }
        else
        p=a[i];
    }
    cout<<d;
    //cout<<P;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:24: error: conflicting declaration 'long long int b [(n + 1)]'
   56 |     long long int a[n],b[n+1];
      |                        ^
a.cc:49:27: note: previous declaration as 'long long int b [1000000]'
   49 |         long long int t=0,b[1000000]={0};
      |                           ^
Language: C++

#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//イテレータあるけど順序保持しないmap
#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列

// vectorの重複削除
// std::sort(test.begin(), test.end());
// test.erase(std::unique(test.begin(), test.end()), test.end());

using namespace std;
using ll = long long;
using P = pair<int, int>; // vector<P> ba(n); みたいな感じですぐ使える ba[i] = P(a, b); make_pairをしなくてもいい
// typedef vector<int> v;
template <class T>ostream &operator<<(ostream &o,const vector<T>&v){o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}
#define debug(v) {cerr<<"\033[1;36m[debug]\033[m "<<#v<<" : "<<v<<endl;}
#define rep(i, c) for(int i = 0; i < int(c); i++)
#define ALL(x) (x).begin(), (x).end() //sort(ALL(obj))みたいな
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値
#define pb push_back //
// const int MOD = 1000000007;
// string alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// printf("%.20f\n", ans); あれ
// const double PI = 3.141592653589793238462643383;

int main() {
  //char in[120];
  int n; cin>>n;
  std::vector<int> v(n);
  rep (i,n) cin>>v[i];
  int ans = 0;
  rep(i,n) {
    int num = v[i];
    bool flag = true;
    for (j=i; j>=0; j--;) {
      if (v[i] > v[j]) {
        flag = false;
        break;
      }
    }
    if (flag) ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:10: error: 'j' was not declared in this scope
   50 |     for (j=i; j>=0; j--;) {
      |          ^
a.cc:50:24: error: expected ')' before ';' token
   50 |     for (j=i; j>=0; j--;) {
      |         ~              ^
      |                        )
a.cc:50:25: error: expected primary-expression before ')' token
   50 |     for (j=i; j>=0; j--;) {
      |                         ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int[] P = new int[N];
		int min = Integer.MAX_VALUE;
		int count = 0;
      
		for(int i=0; i<N; i++){
			P[i] = sc.nextInt();
			if(min>p[i]){
				count++;
            }
        }
		System.out.println(count);
    }
}

Compiler output:
Main.java:13: error: cannot find symbol
			if(min>p[i]){
			       ^
  symbol:   variable p
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  cin >> n;
  
  long long p[n];
  for(int i=0; i<n; i++){
    cin >> p[i];
  }
 
  int ans=1;
  for(int j=1; j<n; j++){
    if(a[j] < a[j-1]){
      ans++;
    }
  }
  
  cout << ans << endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: 'a' was not declared in this scope
   15 |     if(a[j] < a[j-1]){
      |        ^
Language: Java

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

int main(){
    int n;
    cin >> n;
    int p[n];
    for(int i = 0; i < n; i++) cin >> p[i];
    int out;
    out = n;
    for(int i = 0; i < n; i++){
        for(int j = 0; j <= i; j++){
            if(p[i] > p[j]){
                out--;
                break;
            }
        }
    }
    cout << out << endl;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:6: error: not a statement
    cin >> n;
        ^
Main.java:7: error: not a statement
    int p[n];
          ^
Main.java:8: error: not a statement
    for(int i = 0; i < n; i++) cin >> p[i];
                                   ^
Main.java:19: error: not a statement
    cout << out << endl;
                ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: ';' expected
    int p[n];
           ^
8 errors
Language: Java

import java.util.Scanner;


class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int count=0;
   
   int[] P = new int[N];
   for(int i=0;i<N;i++){
   	P[i] = sc.nextInt();
   }

   for(int a=0;a<N;a++){
   	for(int b=0;b<=i;b++){
     if(P[a]>P[b]){
       break;
     }
      
   }
     count+=1;
   }
   System.out.println(count);
 }
}


Compiler output:
Main.java:16: error: cannot find symbol
   	for(int b=0;b<=i;b++){
   	               ^
  symbol:   variable i
  location: class Main
1 error
Language: C++

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

int main() {
  int N;
  cin>>N;
  vector<int> a(N);
  for(int i=0;i<N;i++){
    cin>>a.at(i);
  }
  int ss=0;
  for(int i=0;i<N-1;i++){
    for(int j=0;j<N-i;j++){
      if(a.at(i)>a.at(j){
        ss++;
        break;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: expected ')' before '{' token
   14 |       if(a.at(i)>a.at(j){
      |         ~               ^
      |                         )
a.cc:18:5: error: expected primary-expression before '}' token
   18 |     }
      |     ^
Language: C++

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

int main() {
  int N;
  cin>>N;
  vector<int> a(N);
  for(int i=0;i<N;i++){
    cin>>a.at(i)+
  }
  int ss=0;
  for(int i=0;i<N-1;i++){
    for(int j=0;j<N-i;j++){
      if(a.at(i)>a.at(j){
        ss++;
        break;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected primary-expression before '}' token
   10 |   }
      |   ^
a.cc:14:25: error: expected ')' before '{' token
   14 |       if(a.at(i)>a.at(j){
      |         ~               ^
      |                         )
a.cc:18:5: error: expected primary-expression before '}' token
   18 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
   int N;
   cin>>N;
   vector<int>wtf(N);
   int m=0;
   int answer=0;
   for(int i=0; i<N; i++){
    cin>>wtf.at(i);
    if(wtf.at(i)>m){
        if(m==0){
        count++;
        }
    m=wtf.at(i);
    
    }
    else
    answer++;
      }   
   cout<<answer<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: no post-increment operator for type
   13 |         count++;
      |              ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
typedef int64_t Int;

int main(){ 
  Int N;
  vector<Int> P(N);
  
  rep(i,N) cin >> P[i];
  
  Int m = P[0], ans = 1;
  
  rep1(i,N-1) {
    if (m >= P[i]) ans+;
    m = min(m, P[i]);
  }
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: expected primary-expression before ';' token
   16 |     if (m >= P[i]) ans+;
      |                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int m(vector<int>v,int n){
  if(n==1)
    return 1;
  int c=0;x=v.at(0);
  vector<int>w(n-1);
  for(int i=1;i<n;i++){
    w.at(i-1)=v.at(i);
    if(x>v.at(i))
      continue;
    c++;
    x=v.at(i);
  }
  return max(c,m(w,n-1));
}
int main(){
  int n;
  cin>>n;
  vector<int>v(n);
  for(int i=0;i<n;i++)
    cin>>v.at(i);
  cout<<m(v,n)<<endl;
}

Compiler output:
a.cc: In function 'int m(std::vector<int>, int)':
a.cc:6:11: error: 'x' was not declared in this scope
    6 |   int c=0;x=v.at(0);
      |           ^
Language: C++

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


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


    ll count=0;
    
    ll mini=P[i];
    for(ll i=0;i<N;i++){
      mini=min(mini,P[i]);
      if(mini==P[i]){
        count++;
      }
    }
        

    cout << count << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: 'i' was not declared in this scope
   17 |     ll mini=P[i];
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int N,K;
    cin>>N;
    long long a=0;
    long long c[N]={0};
    for(int i=0; i<N; i++){
    cin>>c[i];}
    K=c[0];
    for(int j=0; j<N; j++){
    if(c[j]<=K){
    a++;}
    K=min(K,c[j]);}
    cout<<a<<endl;
    }

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i < (int)(n); i++)
#define fo(i,s,e) for (int i=(s); i < (e); i++)
#define ALL(obj) (obj).begin(), (obj).end()
/*卍卍卍 #define int long long 卍卍卍*/
signed main () {
  int n;cin >> n;
  vector<int> v(n,0);
  rep(i,n){cin >> v[i];}
  int ans=0;
  rep(i,n){
    bool flag=true;
    rep(j,i+1){
      if (flag==false){break}
      else if (v[j]<v[i]) {
        flag = false;
      }
    }
    if (flag == true) {
      ans+=1;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: expected ';' before '}' token
   15 |       if (flag==false){break}
      |                             ^
      |                             ;
Language: Java

import java.util.*;
public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] P = new int[N];
		for(int i = 0;i < N;i++){
			P[i] = sc.nextInt();
		}
		boolean[] list = new boolean[N];
		Arrays.fill(list,true);
		for(int i = 0;i < N - 1;i++){
			flg = true;
			for(int j = 1;j < N;j++){
				if(P[j] > P[i]){
					flg = false;
				}else{
					list[j] = false;
				}
			}
			if(flg){
				list[i] = (true && list[i]);
			}
		}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
			flg = true;
			^
  symbol:   variable flg
  location: class Main
Main.java:16: error: cannot find symbol
					flg = false;
					^
  symbol:   variable flg
  location: class Main
Main.java:21: error: cannot find symbol
			if(flg){
			   ^
  symbol:   variable flg
  location: class Main
Main.java:25: error: cannot find symbol
		System.out.println(ans);
		                   ^
  symbol:   variable ans
  location: class Main
4 errors
Language: C++

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

int n;
int k;
int64_t p;

int main(){
    cin >> n;
    vector<int64_t> a(n);

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

    vector<int64_t> s(n, 0);
    s[0] = a[0];
    for(int i=0;i<n-1;i++){
        if(a[i+1] < s[i]) {
            s[i+1] = a[i+1];
        }
        else s[i+1] = s[i];
        // cout << s[i+1] << endl;
    }

    int count=0;

    for(int i=0;i<n;i++){
        if(a[i] <= s[i]){
            count++;
        }
    }

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

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

int n,largestCurrently,sum;

int main(){
	cin>>n;
	for(int i = 1;i <= n;i++){
		cin>>bil;
		if(i == 1){
			largestCurrently = bil;
		}
		if(largestCurrently < bil){
			largestCurrently = bil;
		}else{
			sum++;
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'bil' was not declared in this scope
    9 |                 cin>>bil;
      |                      ^~~