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

#include <stdio.h>

int main(){
	int N,i,m;
  	scanf("%d", &N);
  	char P[N],n;
  	int P_2[N];
  
  	fgets(P,N,stdin);
  
  	int num=0,max_m;
  	
  	
  	for(i=0;i<n;i++){
      if(i==0){
      	num++;
        n = P[i];
        max_m = int(n);
      }
      else{
      	n = P[i];
        m = int(n);
        if(m <= max_m){
        	num++;
          	max_m = m;
        }
      }
    }
  
 	printf("%d",num);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:17: error: expected expression before 'int'
   18 |         max_m = int(n);
      |                 ^~~
main.c:22:13: error: expected expression before 'int'
   22 |         m = int(n);
      |             ^~~
Language: C++

#include <iostream>
#include <vector>
#include <fstream>
#include <stdio.h>
#include <cmath>
#define REP(i, n) for(int i = 0; i < n; i++)
//#define REPR(i, n) for(int i = n; i >= 0; i--)
//#define FOR(i, m, n) for(int i = m; i < n; i++)
//#define INF 1e9
//#define ALL(v) v.begin(), v.end()

using namespace std;
//typedef long long ll;

int main() { //int argc, const char * argv[]

    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int N, m, tmp=0, ans=0;
    std::vector<int> v;
    cin>>N;
    m = N;
    while(1)
    {
        int x;
        std::cin >> x;
        if(std::cin.eof()){
            break;
        }
        v.push_back(x);
    }
    
    REP(i,N) {
        std::vector<int>::iterator p = std::find(v.begin(), v.end(), i);
        tmp = static_cast<int>(p - v.begin());
        if (tmp < m) {
            ans += 1;
            m = tmp;
        }
    }

    std::cout << ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:49: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   35 |         std::vector<int>::iterator p = std::find(v.begin(), v.end(), i);
      |                                        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:35:49: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   35 |         std::vector<int>::iterator p = std::find(v.begin(), v.end(), i);
      |                                        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[2000005],sum[2000005],ans;
int main()
{
    int n,i,j,len;
    cin>>n;
    for(i=1;i<=n;i++)
    cin>>a[i];
    sum[1]=a[1];
    len=1;
    for(j=2;j<=n;j++)
    {
    	if(a[j]<=sum[len])
    	{
    		len++;
    		sum[len]=a[j];
    	}
    	else
    	{
    		int x=upper_bound(sum+1,sum+,a[j],greater<int>())-sum;
    		sum[x]=a[j];
    	}
    }
    cout<<len;
 } 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:45: error: expected primary-expression before ',' token
   21 |                 int x=upper_bound(sum+1,sum+,a[j],greater<int>())-sum;
      |                                             ^
Language: C++

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

int main()
{
  int i,j,N;
  int k;
  int h,sum;
  h=0;
  vector<int> P;
  sum=0;
  
  cin >> N;
  
  for( i=0;i<N;i++)
  {
    cin >>k;
    P.push_back(k);
  }
  
  for( i=N-1;i>=0;i--)
  {
    for( j=i-1;j>=N/2;j--)
    {
      if(P[i]>P[j])
      {
        h=1;
        break;
      }
      if(P[i]<P[N-j])
    }
    if(h==0)
    {
      sum++;
    }
    h=0;
  }
  cout << sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: expected primary-expression before '}' token
   31 |     }
      |     ^
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'j' was not declared in this scope
   12 | for(j=1;j>0i;j--)
      |     ^
Language: C++

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

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

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

    for (int i = 1; i < N; i++){
        for (int j = 0; j < i; j++){
            if(p[i] > p[j]){
                num--;
                break;
            }
        }
    }
    
    cout << num << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'p' was not declared in this scope
   10 |         cin >> p[i];
      |                ^
a.cc:15:16: error: 'p' was not declared in this scope
   15 |             if(p[i] > p[j]){
      |                ^
Language: C

#include <stdio.h>

int main(){
	int N,i,m;
  	scanf("%d", &N);
  	char P[N],n;
  	int P_2[N];
  
  	fgets(P,N,stdin);
  	for(i=0;i<n;i++){
      	n = P[i];
    	P_2[i] = (int)n;
    }
  
  	int num=0,max_n;
  	max_n  = P[0];

  	for(i=0;i<N;i++){
    	m = P_2[i];
        if(m <= max_n){
        	num++;
          	m = max_n
        }   
    }
  
 	printf("%d",num);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:22:26: error: expected ';' before '}' token
   22 |                 m = max_n
      |                          ^
      |                          ;
   23 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  int N;
  cin >> N;
  vector<int> q(N);
  for(int i = 0; i < N; i++) {
    cin >> q.at(i);
  }
  int e = 0;
  longlong r = 0;
  for(longlong i = 0; i < N; i++) {
    for(longlong j = 0; j < i + 1; j++) {
      if(q.at(j) >= q.at(i)) {
        r++;
      }
      if(r == i + 1) {
        e++;
      }
    }
    r = 0;
  }
  cout << e << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'longlong' was not declared in this scope
   13 |   longlong r = 0;
      |   ^~~~~~~~
a.cc:14:15: error: expected ';' before 'i'
   14 |   for(longlong i = 0; i < N; i++) {
      |               ^~
      |               ;
a.cc:14:23: error: 'i' was not declared in this scope
   14 |   for(longlong i = 0; i < N; i++) {
      |                       ^
a.cc:15:17: error: expected ';' before 'j'
   15 |     for(longlong j = 0; j < i + 1; j++) {
      |                 ^~
      |                 ;
a.cc:15:25: error: 'j' was not declared in this scope
   15 |     for(longlong j = 0; j < i + 1; j++) {
      |                         ^
a.cc:17:9: error: 'r' was not declared in this scope
   17 |         r++;
      |         ^
a.cc:19:10: error: 'r' was not declared in this scope
   19 |       if(r == i + 1) {
      |          ^
a.cc:23:5: error: 'r' was not declared in this scope
   23 |     r = 0;
      |     ^
Language: C

#include <stdio.h>

int main(){
	int N,i,m;
  	scanf("%d", &N);
  	char P[N],n;
  	int P_2[N];
  
  	fgets(P,N,stdin);
  	for(i=0;i<n;i++){
      	n = P[i];
    	P_2[i] = (int)n;
    }
  
  	int num=0,max_n;
  	max_n  = P[0];

  	for(i=0;i<N;i++){
    	m = P_2[i]
        if(n <= max_n){
        	num++;
          	m = max_n
        }   
    }
  
 	printf("%d",num);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:19: error: expected ';' before 'if'
   19 |         m = P_2[i]
      |                   ^
      |                   ;
   20 |         if(n <= max_n){
      |         ~~
Language: Java

import java.util.Scanner;

public class C {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] p = new int[n];
        for(int i = 0;i < n;i++) {
            p[i] = in.nextInt();
        }
        int minZ = p[0], cnt = 1;
        for(int i = 1;i < n;i++) {
            if(minZ >= p[i]) {
                minZ = p[i];
                cnt++;
            }
        }
        System.out.println(cnt);
    }
}

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

#include <stdio.h>

int main(){
	int N,i;
  	scanf("%d", &N);
  	char P[N],n;
  	int P_2[N];
  
  	fgets(P,N,stdin);
  	for(i=0;i<n;i++){
      	n = P[i];
    	P_2[i] = int(n);
    }
  
  	int num=0,max_n;
  	max_n  = P[0];

  	for(i=0;i<N;i++){
    	n = P_2[i]
        if(n <= max_n){
        	num++;
          	n = max_n
        }   
    }
  
 	printf("%d",num);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:18: error: expected expression before 'int'
   12 |         P_2[i] = int(n);
      |                  ^~~
main.c:19:19: error: expected ';' before 'if'
   19 |         n = P_2[i]
      |                   ^
      |                   ;
   20 |         if(n <= max_n){
      |         ~~
Language: C++

#include<iostream>

int main()
{
  int n;
  cin>>n;
  int k,count=1;
  int arri[200000];
  for(int i =0;i<n;i++)
  {
    cin>>arr[i];}
  for(int i=1 ;i<n-1;i++)
  {
    int k=arr[0];
    if(k>arr[i]){count++};
  }
  if(count==1){cout<<"1"<<endl;}
  else cout<<count-1<<endl;
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>n;
      |   ^~~
      |   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:11:10: error: 'arr' was not declared in this scope; did you mean 'arri'?
   11 |     cin>>arr[i];}
      |          ^~~
      |          arri
a.cc:14:11: error: 'arr' was not declared in this scope; did you mean 'arri'?
   14 |     int k=arr[0];
      |           ^~~
      |           arri
a.cc:15:25: error: expected ';' before '}' token
   15 |     if(k>arr[i]){count++};
      |                         ^
      |                         ;
a.cc:17:16: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   if(count==1){cout<<"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:17:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   if(count==1){cout<<"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)
      |     ^~~~
a.cc:18:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |   else cout<<count-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:18:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |   else cout<<count-1<<endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
int P[N],j;
int sam=0;
int small=0;
for(int i=0;i<N;i++)
{cin >>P[i];
 if(small>=P[i]){
		small=P[i];
		sam++:
		}
}
cout <<sam;}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: expected ';' before ':' token
   14 |                 sam++:
      |                      ^
      |                      ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: 'a' was not declared in this scope
   15 |     if(x > a[i]) {
      |            ^
a.cc:19:4: error: expected '}' at end of input
   19 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:10:25: error: expected expression before '<' token
   10 |                 if(A[i]=<A[i-1])
      |                         ^
Language: C++

// best coder in the world do not mess with me!!
#include <bits/stdc++.h>
#include <string>
#include <cmath>
#include <sstream>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORD(i, a, b) for(int i = (a); i > (b); i--)
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
typedef long long int ll;
using namespace std;
ll mod=1000000007;
void generate(int per[],int n)
{
	
	for(int i=n-1;i>0;i--)
	{
		int k=rand()%i;
		swap(per[k],per[i]);
	}
}
int main()
{

    	int t;
        int count1 = 1;
    	int result = a[0];
    	cin>>t;
    	vector<int> a(t);
    	for(int i =0;i<t;i++)
    		cin>>a[i];
    	
    	for(int i =1;i<t;i++)
    	{
    		if(a[i]<result)
    		{
    			count1++;
    			result=a[i];
    		}
    	}
    	cout<<count1<<'\n';
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:22: error: 'a' was not declared in this scope
   27 |         int result = a[0];
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,arr[n+1];
    cin>>n;
    int index[n+1];
    for(int i=1;i<=n;i++)
    {
        cin>>arr[i];
        index[arr[i]]=i;
    }
    int count=0,dead=n;
    
    for(int i=1;i<=n;i++)
    {  
         if(index[i]<=dead){
            count++;
          dead=index[i];
        //cout<<dead<<" "<<count<<endl;}
    }
    cout<<count;

}

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

int main()
{
    int n;
    std::cin >> n;
    std::priority_queue< int, std::vector<int>, std::greater<int>> q;

    int ans = 0;
    q.push(INT_MAX);
    for (int i = 0; i < n; i++) {
        int tmp;
        std::cin >> tmp;
        int m = q.top();
        if (m >= tmp)
            ans++;
        q.push(tmp);
    }
    std::cout << ans << std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' is not a member of 'std'
    4 |     std::cin >> n;
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:5:10: error: 'priority_queue' is not a member of 'std'
    5 |     std::priority_queue< int, std::vector<int>, std::greater<int>> q;
      |          ^~~~~~~~~~~~~~
a.cc:1:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
  +++ |+#include <queue>
    1 | int main()
a.cc:5:26: error: expected primary-expression before 'int'
    5 |     std::priority_queue< int, std::vector<int>, std::greater<int>> q;
      |                          ^~~
a.cc:8:5: error: 'q' was not declared in this scope
    8 |     q.push(INT_MAX);
      |     ^
a.cc:8:12: error: 'INT_MAX' was not declared in this scope
    8 |     q.push(INT_MAX);
      |            ^~~~~~~
a.cc:1:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
  +++ |+#include <climits>
    1 | int main()
a.cc:11:14: error: 'cin' is not a member of 'std'
   11 |         std::cin >> tmp;
      |              ^~~
a.cc:11:14: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:10: error: 'cout' is not a member of 'std'
   17 |     std::cout << ans << std::endl;
      |          ^~~~
a.cc:17:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:30: error: 'endl' is not a member of 'std'
   17 |     std::cout << ans << 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<bits/stdc++.h>
using namespace std;

int main()
{
	long long sum=0;
	long long a[2000010]={0}, n;
	
	cin>>n;
	
	for(int i=1; i<=n; i++)
	{
		cin>>a[i];
	}
	
	for(int i=1; i<=n; i++)
	{
		if(a[i]>=1 && a[i]<=i && a[i]<=a[a[j]])
		{
			sum++;
		}
	}
	
	cout<<sum<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:52: error: 'j' was not declared in this scope
   18 |                 if(a[i]>=1 && a[i]<=i && a[i]<=a[a[j]])
      |                                                    ^
Language: C++

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

using namespace std;

int main() {
    size_t n;
    cin >> n;
    std::vector<size_t> p(n, 0);
    for (size_t i = 0; i < n; ++i)
        cin >> p[i];
    size_t x = p.front();
    size_t c = 0;
    for (size_t i = 0; i < n; ++i) {
        auto a = p[i];
        if (a < x)
            x = a;
        if (a <= x)
            ++c;
    }
    cout << c << endl;
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'cin' was not declared in this scope
   16 |     cin >> n;
      |     ^~~
a.cc:11:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   10 | #include <cmath>
  +++ |+#include <iostream>
   11 | 
a.cc:29:5: error: 'cout' was not declared in this scope
   29 |     cout << c << endl;
      |     ^~~~
a.cc:29:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:29:18: error: 'endl' was not declared in this scope
   29 |     cout << c << endl;
      |                  ^~~~
a.cc:11:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
   10 | #include <cmath>
  +++ |+#include <ostream>
   11 | 
a.cc:30:14: error: expected '}' at end of input
   30 |     return 0;
      |              ^
a.cc:14:12: note: to match this '{'
   14 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int a[300000];
int d[300000];
int main()
{
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    if (n == 0)
        cout<<"0";
    else{
	
	    d[1] = a[1];  
	    ll len = 1;
	    for (int i = 2; i <= n; i++){
	        if (a[i] <= d[len])
				d[++len] = a[i];   
	        else{
	            int j = upper_bound(d + 1, d + len + 1, a[i]) - d;  
	            d[j] = a[i];
	        }
	    }
	    cout<<len;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'll' was not declared in this scope
   16 |             ll len = 1;
      |             ^~
a.cc:18:31: error: 'len' was not declared in this scope
   18 |                 if (a[i] <= d[len])
      |                               ^~~
a.cc:21:29: error: 'upper_bound' was not declared in this scope
   21 |                     int j = upper_bound(d + 1, d + len + 1, a[i]) - d;
      |                             ^~~~~~~~~~~
a.cc:25:19: error: 'len' was not declared in this scope
   25 |             cout<<len;
      |                   ^~~
Language: C++

include<bits/stdc++.h>
using namespace std;
int main()
{int a,b,i,j,ar[10008],br[100009];
 int cnt=0;
 cin>>a;
 for(i=1;i<=a;i++)
 {cin>>ar[i];
  br[i]=ar[i];}
 for(i=1;i<=a;i++)
 {if(ar[i]>=br[i])
   cnt++;
  cout<<cnt<<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:6:2: error: 'cin' was not declared in this scope
    6 |  cin>>a;
      |  ^~~
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout<<cnt<<endl;
      |   ^~~~
a.cc:13:14: error: 'endl' was not declared in this scope
   13 |   cout<<cnt<<endl;
      |              ^~~~
a.cc:14:3: error: expected '}' at end of input
   14 |  }
      |   ^
a.cc:4:1: note: to match this '{'
    4 | {int a,b,i,j,ar[10008],br[100009];
      | ^
Language: C++

include<bits/stdc++.h>
using namespace std;
int main()
{int a,b,i,j,ar[100008],br[100009];
 int cnt=0;
 cin>>a;
 for(i=1;i<=a;i++)
 {cin>>ar[i];
  br[i]=ar[i]}
 for(i=1;i<=a;i++)
 {if(ar[i]>=br[i])
   cnt++;
  cout<<cnt<<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:6:2: error: 'cin' was not declared in this scope
    6 |  cin>>a;
      |  ^~~
a.cc:9:14: error: expected ';' before '}' token
    9 |   br[i]=ar[i]}
      |              ^
      |              ;
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout<<cnt<<endl;
      |   ^~~~
a.cc:13:14: error: 'endl' was not declared in this scope
   13 |   cout<<cnt<<endl;
      |              ^~~~
a.cc:14:3: error: expected '}' at end of input
   14 |  }
      |   ^
a.cc:4:1: note: to match this '{'
    4 | {int a,b,i,j,ar[100008],br[100009];
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{int a,b,i,j,ar[10008],br[100009];
 int cnt=0;
 cin>>a;
 for(i=1;i<=a;i++)
 {cin>>ar[i];
  br[i]=ar[i]}
 for(i=1;i<=a;i++)
 {if(ar[i]>=br[i])
   cnt++;
  cout<<cnt<<endl;
 }
 

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before '}' token
    9 |   br[i]=ar[i]}
      |              ^
      |              ;
a.cc:14:3: error: expected '}' at end of input
   14 |  }
      |   ^
a.cc:4:1: note: to match this '{'
    4 | {int a,b,i,j,ar[10008],br[100009];
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
void main()
{
  int n,m;
  cin>>n;
  int p[n];
  for(int i=0;i<n;i++)
    cin>>p[i];
  int stat;
  int count_it=0;
  for(int i=0;i<n;i++)
  {
    stat=0;
    int j=0;
    while(j<=i)
    {
      if(p[i]>p[j])
      {
        stat=1;
        break;
      }
    }
    if(stat==0)
      count_it++;
  }
  cout<<count_it<<endl;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
void main()
{
  int n,m;
  cin>>n;
  int p[i];
  for(int i=0;i<n;i++)
    cin>>p[i];
  int stat;
  int count_it=0;
  for(int i=0;i<n;i++)
  {
    stat=0;
    int j=0;
    while(j<=i)
    {
      if(p[i]>p[j])
      {
        stat=1;
        break;
      }
    }
    if(stat==0)
      count_it++;
  }
  cout<<count_it<<endl;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'i' was not declared in this scope
    7 |   int p[i];
      |         ^
a.cc:9:10: error: 'p' was not declared in this scope
    9 |     cin>>p[i];
      |          ^
a.cc:18:10: error: 'p' was not declared in this scope
   18 |       if(p[i]>p[j])
      |          ^
Language: C++

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

int main(){
  int i;
  cin >> i;
  
  int p[i];
  
  for(int j; i<p; p++){
    cin >> p[j];
  }
  
  
    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   for(int j; i<p; p++){
      |              ~^~
a.cc:10:19: error: lvalue required as increment operand
   10 |   for(int j; i<p; p++){
      |                   ^
a.cc:12:4: error: expected '}' at end of input
   12 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include<algorithm>
#include <stdio.h>
#include <bitset>
#include<math.h>
#include<list>
#include<map>
using namespace std;
typedef long long ll;
#define PI 3.14159265358979323846  

int main() {
	int min=INT_MAX,x,n, ans = 0;
	cin >> n;
	//vector<int> a(n,0);
	for (int i = 0; i < n; i++) {
		cin >> x;
		if (min >= x) {
			ans++;
			min = x;
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'INT_MAX' was not declared in this scope
   15 |         int min=INT_MAX,x,n, ans = 0;
      |                 ^~~~~~~
a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    9 | #include<map>
  +++ |+#include <climits>
   10 | using namespace std;
a.cc:16:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   16 |         cin >> n;
      |                ^
      |                yn
a.cc:19:24: error: 'x' was not declared in this scope
   19 |                 cin >> x;
      |                        ^
a.cc:21:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |                         ans++;
      |                         ^~~
      |                         abs
a.cc:25:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C++

#include <bits/stdc++.h>
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define sol (k+k)
#define sag (k+k+1)
#define orta ((bas+son)/2)
#define coc g[node][i]
#define mod 1000000007
#define inf 1000000009
#define N 1000005
using namespace std;

typedef long long ll;
typedef pair < int , int > ii;

int n,m,a[N],ans = 1, ans = 1,mn = -1000;

int main()
{

	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a[i];
		if(mn > a[i])
			ans++;
		mn = min(mn, a[i]);
	}

	return 0;
}


Compiler output:
a.cc:18:23: error: redefinition of 'int ans'
   18 | int n,m,a[N],ans = 1, ans = 1,mn = -1000;
      |                       ^~~
a.cc:18:14: note: 'int ans' previously defined here
   18 | int n,m,a[N],ans = 1, ans = 1,mn = -1000;
      |              ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vevtor' was not declared in this scope
    7 |   vevtor<int> a(n,0);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vevtor<int> a(n,0);
      |          ^~~
a.cc:9:12: error: 'a' was not declared in this scope
    9 |     cin >> a[i];
      |            ^
a.cc:12:8: error: 'a' was not declared in this scope
   12 |     if(a[0]>=a[i]){
      |        ^
Language: C

include <stdio.h>
int main(void){
	int N, n=0;
    scanf("%d", &N);
    int i, j, P[N];
	for(i=0; i<N; i++){
      scanf("%d",&P[i]);
    }
    for(i=0; i<N; i++){
    	for(j=0; j<i; j++){
        	if(P[i] <= P[j]){
            	n++;
            }
        }
    }
    printf("%d",n);
	return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
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 num = 1;
  int min = p.at(0);
  for (int i = 1; i < n; i++) {
    if (p.at(i) < min) {
      mim = p.at(i);#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 num = 1;
  int min = p.at(0);
  for (int i = 1; i < n; i++) {
    if (p.at(i) < min) {
      min = p.at(i);
      num++;
    }
  }
  cout << num << endl;
}

Compiler output:
a.cc:17:21: error: stray '#' in program
   17 |       mim = p.at(i);#include <bits/stdc++.h>
      |                     ^
a.cc: In function 'int main()':
a.cc:17:7: error: 'mim' was not declared in this scope; did you mean 'min'?
   17 |       mim = p.at(i);#include <bits/stdc++.h>
      |       ^~~
      |       min
a.cc:17:22: error: 'include' was not declared in this scope
   17 |       mim = p.at(i);#include <bits/stdc++.h>
      |                      ^~~~~~~
a.cc:17:31: error: 'bits' was not declared in this scope
   17 |       mim = p.at(i);#include <bits/stdc++.h>
      |                               ^~~~
a.cc:17:36: error: 'stdc' was not declared in this scope; did you mean 'std'?
   17 |       mim = p.at(i);#include <bits/stdc++.h>
      |                                    ^~~~
      |                                    std
a.cc:18:1: error: expected primary-expression before 'using'
   18 | using namespace std;
      | ^~~~~
a.cc:20:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   20 | int main() {
      |         ^~
a.cc:20:9: note: remove parentheses to default-initialize a variable
   20 | int main() {
      |         ^~
      |         --
a.cc:20:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:20:12: error: a function-definition is not allowed here before '{' token
   20 | int main() {
      |            ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:16:24: note: to match this '{'
   16 |     if (p.at(i) < min) {
      |                        ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:15:31: note: to match this '{'
   15 |   for (int i = 1; i < n; i++) {
      |                               ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
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[i];
  int ans=0;
  int nibu=n;
  for(int i=0;i<n;i++){
    nibu=min(nibu,p[i]);
    if(p[i]<=min) ans++;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator<='
   13 |     if(p[i]<=min) ans++;
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
#define REP(i, a, b) for(int i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)

int main()
{
	int N, P;
	int count = 0;
	int Max = INT_MAX;
	cin >> N;

	rep(i, N) {
		cin >> P;
		if (P < Max) {
			Max = P;
			count++;
		}
	}

	cout << count << endl;

	system("pause");
	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'INT_MAX' was not declared in this scope
   13 |         int Max = INT_MAX;
      |                   ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <algorithm>
  +++ |+#include <climits>
    5 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
 int N;
 cin >> N;
 int A[N];
 int i;
 for(i=0;i<N;++i){
   cin >> A[i];}
int count = 0;
int min = 1000000;
 for(i=0;i<N;++i){
    if(min>a[i]){count++;
    min = a[i];}
 }

     cout << -1 << endl;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'a' was not declared in this scope
   14 |     if(min>a[i]){count++;
      |            ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>

#include "BIT.h"

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rep1(i,n) for(int i = 1; i <= (n); ++i)

#define debug(vec) for(auto v : vec) cout << v << " "; cout << endl;

#define debug2D(vec2D) for(auto vec : vec2D) { for (auto v : vec) cout << v << " "; cout << endl; } 

using namespace std;

typedef long long ll;

const long long int INF = 1 << 29; //<10^10
//const ll MOD = 998244353;
const ll MOD = 1000000007;

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

  int n;
	cin >> n;

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

	vector<int> q(n);
		int m = INF;
	rep(i, n) {
		q[i] = min(p[i], m);
		m = q[i];
	}

	//debug(q);

	int ans = 0;
	rep(i, n) {
		if (p[i] <= q[i]) ans++;
	}
	
		std::cout << ans << endl;
}


Compiler output:
a.cc:8:10: fatal error: BIT.h: No such file or directory
    8 | #include "BIT.h"
      |          ^~~~~~~
compilation terminated.
Language: Java

n = int(input())
A = list(map(int, input().split(' ')))

c = 0
for i in range(n):
    can = True
    for j in range(0, i):
        if A[i] > A[j]:
            can = False
            break
    #if can: print(i)
    if can: c+=1

print(c)

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
n = int(input())
^
Main.java:11: error: illegal character: '#'
    #if can: print(i)
    ^
2 errors
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
#define REP(i, a, b) for(int i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)

int main()
{
	int N, P;
	int count = 0;
	int Max = INT_MAX;
	cin >> N;

	rep(i, N) {
		cin >> P;
		if (P <. Max) {
			Max = P;
			count++;
		}
	}

	cout << count << endl;

	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'INT_MAX' was not declared in this scope
   13 |         int Max = INT_MAX;
      |                   ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <algorithm>
  +++ |+#include <climits>
    5 | using namespace std;
a.cc:18:24: error: expected primary-expression before '.' token
   18 |                 if (P <. Max) {
      |                        ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
    int N;
    vector<int> P;

    cin >> N;
    for (int i = 0 ; i < N ; i++) {
        int p;
        cin >> p;
        P.push_back(p);
    }

    int cnt = 0;
    int min = numeric_limits<int>::max();
    for (int i = 0 ; i < N ; i++) {
        if (P[i] < min) {
            cnt++;
            min = P[i];
        }
    }

    cout << cnt << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: 'numeric_limits' was not declared in this scope
   18 |     int min = numeric_limits<int>::max();
      |               ^~~~~~~~~~~~~~
a.cc:18:30: error: expected primary-expression before 'int'
   18 |     int min = numeric_limits<int>::max();
      |                              ^~~
Language: C++

#include<bits/stdc++.h>
using namespase std;
int main(){
int n;
cin >> n;
int p;
int cnt =0;
int maxx=0;
int i;
for(i=0;i<n;i++){
cin>>p;
if(p>maxx){
cnt++;
maxx=p;
}
}
cout<<cnt;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin >> n;
      | ^~~
      | std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:17:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 | cout<<cnt;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

/*---------------Go Code GO---------------*/

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

#define     PI              acos(-1.0)
#define     O_O             ios_base::sync_with_stdio(false); cin.tie(NULL)
#define     precision(a)    fixed<<setprecision(a)
#define     endl            '\n'
#define     Flush           cout<<flush
#define     LLMX            0x3fffffffffffffff
#define     PW2(a)          (long long)1<<a


int main()
{
    long long i,j,k,l,m,n,o,p,q,tst,csin=0;

    cin>>n;
    vector<long long> vc;
    while(n--)
    {
        cin>>k;
        vc.push_back(k);
    }

    n=vc[0];
    l=0;
    for(auto k:vc)
    {
        if(k<=n)
        {
            l++;
            n=k
        }
    }
    cout<<l<<endl;




    //main();
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:34:16: error: expected ';' before '}' token
   34 |             n=k
      |                ^
      |                ;
   35 |         }
      |         ~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
    int N;
    vector<int> P;

    cin >> N;
    for (int i = 0 ; i < N ; i++) {
        int p;
        cin >> p;
        P.push_back(p);
    }

    int cnt = 0;
    int min = INT_MAX;
    for (int i = 0 ; i < N ; i++) {
        if (P[i] < min) {
            cnt++;
            min = P[i];
        }
    }
    
    cout << cnt << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: 'INT_MAX' was not declared in this scope
   18 |     int min = INT_MAX;
      |               ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <vector>
  +++ |+#include <climits>
    3 |
Language: C++

#include<bits/stdc++.h>
using namespace std;
int date[1000000];
int a,b[1000000];
int c[1000000];
itn q;
//#define int long long
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin>>a;
    for(int i=0;i<a;i++){
      cin>>b[i];
    }
    for(int i=0;i<a;i++){
      q=b[i];
      for(int j=i;j<a;j++){
	if(q>=b[j]) c[i]++,q=b[j];
      }
    }
    sort(c,c+a,greater<int>());
    cout<<c[0]<<"\n";
}


Compiler output:
a.cc:6:1: error: 'itn' does not name a type; did you mean 'int'?
    6 | itn q;
      | ^~~
      | int
a.cc: In function 'int main()':
a.cc:16:7: error: 'q' was not declared in this scope
   16 |       q=b[i];
      |       ^
Language: Java

import java.util.Scanner;

public class Main3 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[] a = new int[n];
		for(int i=0;i<n;i++) {
			a[i] = s.nextInt();
		}
		int c = 0;
		for(int i=0;i<n;i++) {
			boolean f = true;
			for(int j=0;j<=i;j++) {
				if (a[i] > a[j]) {
					f = false;
					break;
				}
			}
			if(f) c++;
		}
		System.out.println(c);
	}
	
	
}


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

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <math.h>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <utility>
#include <set>
using namespace std;
//cout <<  << endl;
typedef long long int ll;
typedef long double ld;
const ll INF = 1LL << 60;
#define MOD 1000000007
#define MAX_V 100010
#define MAX_N 100010
 
ll gcd(ll a,ll b){
    if (a%b==0)return(b);
    else return(gcd(b,a%b));
}
 
ll junnretu(ll n){
    ll ans=1;
    for (ll i=1;i<=n;i++){
        ans*=i;
    }
    return ans;
}

int main(){
	ll n,ans=0;
	cin >>n;
	ll x[n];
	ll flag=x[0];
	for (ll i=0:i<n;i++)cin>>x[i];
	for (ll i=1;i<n;i++){
		if (x[i]<flag){
			flag=x[i];
			ans++;
		}
	}
	cout<<ans<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:18: error: initializer in range-based 'for' loop
   40 |         for (ll i=0:i<n;i++)cin>>x[i];
      |                  ^
a.cc:40:24: error: expected ')' before ';' token
   40 |         for (ll i=0:i<n;i++)cin>>x[i];
      |             ~          ^
      |                        )
a.cc:40:25: error: 'i' was not declared in this scope
   40 |         for (ll i=0:i<n;i++)cin>>x[i];
      |                         ^
Language: C

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

int main(){
int N,k,min,a=1;
  scanf("%d",&N);
  int *P=(int*)malloc(sizeof(int)*N);
  for(k=0;k<N;k++)scanf("%d ",&P[k]);
  min=P[0];
  for(i=1;i<N;i++){
  	if(min>=P[i]){
		min=P[i];
      	a++;
    }
  }
  printf("%d\n",a);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:7: error: 'i' undeclared (first use in this function)
   10 |   for(i=1;i<N;i++){
      |       ^
main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

//#include <bits/stc++.h>
#include <bits/stdc++.h>
#include <string> 
#include <algorithm>
#include <iostream>
#include <map>
using namespace std;

#define max(a,b) a>b?a:b
#define min(a,b) a<b?a:b

char cry(char a)
{
	return ('Z'-a)+'A';
}
int main()
{
	long long n,k;
	cin>>n;
	vector <long long> ar(n);
	for(long long i=0; i<n; i++)
	{
		cin>>ar[i];
	}
	long long m=ar[0];
	long long sum=0;
	for(long long i=0; i<n; i++)
	{
		if(min>=ar[i])
		{
			sum++;
		}
		else
		{
			min=ar[i];
		}
		
	}
	cout<<sum<<endl;	

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:23: error: invalid operands of types '<unresolved overloaded function type>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to binary 'operator>='
   29 |                 if(min>=ar[i])
a.cc:35:33: error: overloaded function with no contextual type information
   35 |                         min=ar[i];
      |                                 ^
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[] b = new int[N];
   for(int i=0;i<N;i++) b[i] = sc.nextInt();
   int ans = 0; 
   boolean plus = 0;
   for(int i =0; i<N;i++)
   {
     plus = true;
     for(int j =0;j<i;j++)
     {
       if(b[j]<b[i])
       {
         plus = false;
         break;
       }
     }
     if(plus) ans++;
   }
   System.out.println(ans);
 }
}

Compiler output:
Main.java:9: error: incompatible types: int cannot be converted to boolean
   boolean plus = 0;
                  ^
1 error
Language: C++

#include<cstdio>
int a[1000000];
int lis(int x)
{
    int num[MAX];
    for(int i=0;i<x;i++)
    {
        num[i]=1;
        for(int j=0;j<i;j++)
        {
            if(a[j]>=a[i]&&num[j]+1>num[i])
                   num[i]=num[j]+1;
        }
    }
    int maxx=0;
    for(int i=0;i<x;i++)
        if(maxx<num[i])
            maxx=num[i];
    return maxx;
}
int main()
{
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
        scanf("%d",&a[i]);
    return !printf("%d",lis(n));
}


Compiler output:
a.cc: In function 'int lis(int)':
a.cc:5:13: error: 'MAX' was not declared in this scope
    5 |     int num[MAX];
      |             ^~~
a.cc:8:9: error: 'num' was not declared in this scope; did you mean 'enum'?
    8 |         num[i]=1;
      |         ^~~
      |         enum
a.cc:17:17: error: 'num' was not declared in this scope; did you mean 'enum'?
   17 |         if(maxx<num[i])
      |                 ^~~
      |                 enum
Language: C

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

int main(){
int N,k,min,a=1;
  scanf("%d",&N);
  int *P=(int*)malloc(sizeof(int)*N);
  for(k=0;k<N;k++)scanf("%d",&P[k]);
  min=P[0];
  for(i=1;i<N;i++){
  	if(min>=P[i]){
		min=P[i];
      	a++;
    }
  }
  printf("%d\n",a);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:7: error: 'i' undeclared (first use in this function)
   10 |   for(i=1;i<N;i++){
      |       ^
main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
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[] b = new int[N];
   for(int i=0;i<N;i++) b[N] = sc.nextInt();
   int ans = 0; 
   boolean plus = 0;
   for(int i =0; i<N;i++)
   {
     plus = true;
     for(int j =0;j<i;j++)
     {
       if(b[j]<b[i])
       {
         plus = false;
         break;
       }
     }
     if(plus) ans++;
   }
   System.out.println(ans);
 }
}

Compiler output:
Main.java:9: error: incompatible types: int cannot be converted to boolean
   boolean plus = 0;
                  ^
1 error
Language: C

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

int main(){
int N,k,min,a=1;
  scanf("%d",&N);
  int *P=(int*)malloc(sizeof(int)*N);
  for(k=0;k<N;k++)scanf("%d",&P[i]);
  min=P[0];
  for(i=1;i<N;i++){
  	if(min>=P[i]){
		min=P[i];
      	a++;
    }
  }
  printf("%d\n",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:33: error: 'i' undeclared (first use in this function)
    8 |   for(k=0;k<N;k++)scanf("%d",&P[i]);
      |                                 ^
main.c:8:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {

    int N,cnt=1,tmp;
    cin >> N;
    vector<int>A(N);
    for (int i = 0; i < N; i++) { cin >> A.at(i); }
  tmp=A[0];
    for (int i = 1; i < N; i++) { if(tmp>=A[i]){cnt++;tmp=A[i]; }

    cout<<cnt<<endl;
}
    

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

#include<stdio.h>
int main()
{
  int N;
  int P;
  int i;
  int min=20001;
  int counter=0;
  
  scanf("%d",&N);
  for(i=0;i<N;i++)
  {
    scanf("%d",&P);
    if(P<=min)
    {
      conter++;
      min=P;
    }
  }
  printf("%d",counter);
  return 0;
}

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

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

int main(){
  
 int n;
 cin>>n;
  
 int a;
 int ans = 0;
  
 int mini = INT_MAX;
  
 for(int i=0;i<n;i++){
  cin>>a;
  if(a<=mini)
    ans++;
  mini = min(mini,a)
 }
  
 cout<<ans;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: expected ';' before '}' token
   18 |   mini = min(mini,a)
      |                     ^
      |                     ;
   19 |  }
      |  ~
Language: C++

#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <vector>
using namespace std;
#define ll long long
int main()
{
	int n;
	cin >> n;
	vector<int> p(n+1);
	int	smallest = INT_MAX;
	int ans = 0;
	for (int i = 1; i <= n; i++)
	{
		cin >> p[i];
		if (smallest >= p[i])
		{
			smallest = p[i];
			ans++;
		}
	}
	cout << ans;
	system("pause>0");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: 'INT_MAX' was not declared in this scope
   14 |         int     smallest = INT_MAX;
      |                            ^~~~~~~
a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    6 | #include <vector>
  +++ |+#include <climits>
    7 | using namespace std;
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[i];
  int ans=0;
  int nibu=n;
  for(int i=0;i<n;i++){
    nibu=min(nibu,p[i]);
    if(p[i]<=min) ans++:
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator<='
   13 |     if(p[i]<=min) ans++:
a.cc:13:24: error: expected ';' before ':' token
   13 |     if(p[i]<=min) ans++:
      |                        ^
      |                        ;