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

int main() {
    int n;
    cin>> n;
    int ev =n/2;
    int od =n-ev;
    doble answer = (double) od/n;
    cout << answer;

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin>> n;
      |     ^~~
a.cc:6:5: error: 'doble' was not declared in this scope; did you mean 'double'?
    6 |     doble answer = (double) od/n;
      |     ^~~~~
      |     double
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout << answer;
      |     ^~~~
a.cc:7:13: error: 'answer' was not declared in this scope
    7 |     cout << answer;
      |             ^~~~~~
a.cc:7:20: error: expected '}' at end of input
    7 |     cout << answer;
      |                    ^
a.cc:1:12: note: to match this '{'
    1 | int main() {
      |            ^
Language: C++


#include <iostream>

using namespace std;

int main() {
    int n ;
    cin>> n ;
    int even=n/2;
    int odd = n-even ;
    double result =(double ) odd/n;
    cout<<result ;
    
   
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: expected '}' at end of input
   12 |     cout<<result ;
      |                   ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

using namespace std;

int main() {
    int n;
   cin>>n;
   int ev= n/2;
   int od= n-ev;
   double answer= (double)od/n;
   cout<<answer;
   
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:4: error: 'cin' was not declared in this scope
    5 |    cin>>n;
      |    ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:9:4: error: 'cout' was not declared in this scope
    9 |    cout<<answer;
      |    ^~~~
a.cc:9:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
using namespace std;
 
int main() {
 
  int n;
  cin >> n;
  
  long double result;
  
  if(n%2==0)
    result = (double)1/2;
  else {
  	result = (double) (n+1)/2n;
  }
  
  cout << result << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: unable to find numeric literal operator 'operator""n'
   14 |         result = (double) (n+1)/2n;
      |                                 ^~
Language: Java

public class OddsProbability {
	public static void main(String[] args) {
      double N = Double.parseDoubel(args[0]);
      if (N % 2 == 0){
      	System.out.println(N/2*N);
      }
      else{
        System.out.println((N+1) / 2*N);
      }
	}
}

Compiler output:
Main.java:1: error: class OddsProbability is public, should be declared in a file named OddsProbability.java
public class OddsProbability {
       ^
Main.java:3: error: cannot find symbol
      double N = Double.parseDoubel(args[0]);
                       ^
  symbol:   method parseDoubel(String)
  location: class Double
2 errors
Language: C++

#include<iostream>
using namesoace std;

int main(){
  int N;
  cin>>N;
  cout<<(double)((N+1)/2)/N<<endl;
  
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesoace'
    2 | using namesoace std;
      |       ^~~~~~~~~
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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<(double)((N+1)/2)/N<<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:7:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout<<(double)((N+1)/2)/N<<endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;
 
public class Main{
   public static void main(String args[]){
     Scanner sc = new Scanner(System.in);
     int N = sc.nextInt();
     int S = N / 2;
     K = (double)S / N;
     System.out.println(K);
   }
}

Compiler output:
Main.java:8: error: cannot find symbol
     K = (double)S / N;
     ^
  symbol:   variable K
  location: class Main
Main.java:9: error: cannot find symbol
     System.out.println(K);
                        ^
  symbol:   variable K
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
 
public class Main{
   public static void main(String args[]){
     Scanner sc = Scanner(System.in);
     int N = sc.nextInt();
     int S = N / 2;
     double K = S / N ;
     System.out.println(K);
   }
}

Compiler output:
Main.java:5: error: cannot find symbol
     Scanner sc = Scanner(System.in);
                  ^
  symbol:   method Scanner(InputStream)
  location: class Main
1 error
Language: Java

import java.util.Scanner;
 
public class Main{
   public static void main(String args[]){
     Scanner sc = Scanner(System.in);
     int N = sc.nextInt();
     int S = N / 2;
     System.out.println(S / N);
   }
}

Compiler output:
Main.java:5: error: cannot find symbol
     Scanner sc = Scanner(System.in);
                  ^
  symbol:   method Scanner(InputStream)
  location: class Main
1 error
Language: Java

import java.util.Scanner;
 
public class Main{
   public static void main(String args[]){
     Scanner sc = Scanner(System.in);
     int N = sc.nextInt();
     int S = N / 2
     System.out.println(S / N);
   }
}

Compiler output:
Main.java:7: error: ';' expected
     int S = N / 2
                  ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main{
   public static void main(String args[]){
     Scanner sc = Scanner(System.in);
     int N = sc.nextInt();
     int S = N / 2;
     System.out.println(S / N);

Compiler output:
Main.java:8: error: reached end of file while parsing
     System.out.println(S / N);
                               ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
   public static void main(String args[]){
     Scanner sc = Scanner(System.in);
     int N = sc.nextInt();
     int S = N / 2
     System.out.println(S / N);

Compiler output:
Main.java:7: error: ';' expected
     int S = N / 2
                  ^
Main.java:8: error: reached end of file while parsing
     System.out.println(S / N);
                               ^
2 errors
Language: Java

package sample;

import java.util.Scanner;

public class SampleClass {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int odd_counter =0;
		int even_counter =0;
		
		for( int m = 1 ; m <= n; m++) {
			
			if ( m % 2 == 1 ) {
				odd_counter  = odd_counter + 1;
			}
			else {	
				even_counter = even_counter + 1;		
			}	
			
		}	
		float k = (float) odd_counter / (float)(odd_counter + even_counter);
		System.out.println(k);
	 }
}

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

mport java.util.*;
public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    double m=n/2;
    double k=Math.floor(m);
    double l=(n-m)/n;
    System.out.println(l);
  }
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: C++

#include<iostream>

int main()
{
    int n;
    cin>>n;
    if(n%2==0)
        cout<<0.5
    else
        cout<<0.5*(n+1)/n;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: 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:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout<<0.5
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n;
  cin>>n;
  if(n%2==0){
    float z=0.5;
    cout<<z<<"\n";
  }
  else{
    float z=1/n;
    cout<<z+(1/2)<<"\n";
  return 0;
}

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

#include <iostream>
using namespace std;
int main() {
  int n;
  
  cin >> n;
  if(n == 1){
    cout << 1.0 << endl;
  }else{
    cout << (n/2)/static_cast<double>n << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:38: error: expected '(' before 'n'
   10 |     cout << (n/2)/static_cast<double>n << endl;
      |                                      ^
      |                                      (
a.cc:10:40: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |     cout << (n/2)/static_cast<double>n << endl;
      |                                      ~~^~~~~~~
a.cc:10:47: error: expected ')' before ';' token
   10 |     cout << (n/2)/static_cast<double>n << endl;
      |                                               ^
      |                                               )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{

  float n;
  float f;
  f=(n/2)/n;
  cin>>n;
  if(n%2==0)
  {cout<<fixed;
  cout<<setprecision(9);
  cout<<0.5;
  }else 
  {
  cout<<f;
  }




return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: invalid operands of types 'float' and 'int' to binary 'operator%'
   10 |   if(n%2==0)
      |      ~^~
      |      | |
      |      | int
      |      float
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long a,b,c,d; 
int h;

long long Euclid(ll x,ll y){return y?Euclid(y,x%=y):x;}

int main() {
  cin>>a>>b;
  c=Euclid(a,b);
  d=sqrt(c);
  for(int i=2;i<=d;i++){
    if(c%i==0){
      while(c%i==0)
        c=c/i;
      h++;
    }
  }
  if(c!=1)
    h++;
  cout<<h+1;
}


Compiler output:
a.cc:6:18: error: 'll' was not declared in this scope
    6 | long long Euclid(ll x,ll y){return y?Euclid(y,x%=y):x;}
      |                  ^~
a.cc:6:23: error: 'll' was not declared in this scope
    6 | long long Euclid(ll x,ll y){return y?Euclid(y,x%=y):x;}
      |                       ^~
a.cc:6:27: error: expression list treated as compound expression in initializer [-fpermissive]
    6 | long long Euclid(ll x,ll y){return y?Euclid(y,x%=y):x;}
      |                           ^
a.cc: In function 'int main()':
a.cc:10:11: error: 'Euclid' cannot be used as a function
   10 |   c=Euclid(a,b);
      |     ~~~~~~^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a;
  cin >> a;
  cout << ceil(a / 2) / a;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'ceil' was not declared in this scope
    6 |   cout << ceil(a / 2) / a;
      |           ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a;
  cin >> a;
  cout << ceil(a / 2) / a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'ceil' was not declared in this scope
    6 |   cout << ceil(a / 2) / a;
      |           ^~~~
Language: C++

    #include <stdio.h>
     
    int main() {
      int N;
      scanf("%d", &N);
      int a = 0;
      for(int i=1;, i<N; ++i) {
        if(i%2) ++a;
      }
      printf("%f", a/(double)N);
      return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected primary-expression before ',' token
    7 |       for(int i=1;, i<N; ++i) {
      |                   ^
Language: C++

#include <stdio.h>

int main() {
  int N;
  scanf("%d", &N);
  int a = 0;
  for(int i=1;, i<N; ++i) {
    if(i%2) ++a;
  }
  printf("%f", a/N);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before ',' token
    7 |   for(int i=1;, i<N; ++i) {
      |               ^
Language: C++

    int main() {
      int N;
      scanf("%d", &N);
      printf("%f", (N/2)/N);
      return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:7: error: 'scanf' was not declared in this scope
    3 |       scanf("%d", &N);
      |       ^~~~~
a.cc:4:7: error: 'printf' was not declared in this scope
    4 |       printf("%f", (N/2)/N);
      |       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 |     int main() {
Language: C++

int main() {
  int N;
  scanf("%d", &N);
  printf(%f, (N/2)/N);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d", &N);
      |   ^~~~~
a.cc:4:10: error: expected primary-expression before '%' token
    4 |   printf(%f, (N/2)/N);
      |          ^
a.cc:4:11: error: 'f' was not declared in this scope
    4 |   printf(%f, (N/2)/N);
      |           ^
a.cc:4:3: error: 'printf' was not declared in this scope
    4 |   printf(%f, (N/2)/N);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
Language: C++

#include <iostream>
#include <iomanip>

int main(){
  int n;
  cin >> n;
  double a = (n+1)/2;
  cout << a/n << endl;
}

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:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout << a/n << 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:8:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cout << a/n << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double x=0;
        for(int i =1 ; i<n ; i++){
            
            if(i%2==1)x++;
        }
        System.out.println(x/n);
    }
}


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

#include <cstdio>
 
int main() {
  int n;
  double ans;
  cin >> n;
  if (n % 2 == 0){
    ans = n / 2;
  } else {
    ans = (n-1)/2 + 1;
  }
  printf("%.6f",ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n;
      |   ^~~
Language: C++

#include <iostream>
int main(){
int N;
std::cin >> N;
if(N & 1 == 0){
  std::cout <<"0.5"<<std::endl;
}else{
   std::cout<< float(N+1)/2/N)<<std::endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before ')' token
    8 |    std::cout<< float(N+1)/2/N)<<std::endl;
      |                              ^
      |                              ;
Language: C++

#include <iostream>
int N;
std::cin >> N;
if(N & 1 == 0){
  std::cout <<"0.5"<<std::endl;
}else{
   std::cout<< float(N+1)/2/N)<<std::endl;
}

Compiler output:
a.cc:3:6: error: 'cin' in namespace 'std' does not name a type
    3 | std::cin >> N;
      |      ^~~
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:4:1: error: expected unqualified-id before 'if'
    4 | if(N & 1 == 0){
      | ^~
a.cc:6:2: error: expected unqualified-id before 'else'
    6 | }else{
      |  ^~~~
Language: C++

#include <stdio>
int N;
std::cin >> N;
if(N & 1 == 0){
  std::cout <<"0.5"<<std::endl;
}else{
   std::cout<< float(N+1)/2/N)<<std::endl;
}

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

#include <iostream>

using namespace std;

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

        if (N%2==1) {
                cout << (N/2+1.0)/N << endl;
        }
        else {
                cout << 1/2.0 << endl;
        }

        return 0;
}
~         

Compiler output:
a.cc:18:2: error: expected class-name at end of input
   18 | ~
      |  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int m = 1000000007;
int state[200005];
int dp[5000][1005];
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int n,m;
	cin>>n>>m;
	int cost[m+1];
	for(int i=0;i<5000;i++){
		for(int j=0;j<1005;j++){
			dp[i][j]=m;
		}
	}
	for(int i=1;i<=m;i++){
		int q;
		cin>>cost[i]>>q;
		while(q--){
			int x;
			cin>>x;
			state[i]=state[i]|(1<<x-1);
		}
	}
	dp[0][0]=0;
	for(int i=0;i<(1<<n);i++){
		for(int j=1;j<=m;j++){
			dp[i][j]=min(dp[i][j],dp[i][j-1]);
			dp[i|state[j]][j]=min(dp[i|state[j]][j],dp[i][j-1]+cost[j]);
		}
	}
	int ans=dp[(1<<n)-1][m];
	if(ans==m) cout<<"-1\n";
	else cout<<ans<<endl;
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int m = 1000000007;
int state[5000];
int dp[5000][1005];
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int n,m;
	cin>>n>>m;
	int cost[m+1];
	for(int i=0;i<5000;i++){
		for(int j=0;j<1005;j++){
			dp[i][j]=m;
		}
	}
	for(int i=1;i<=m;i++){
		int q;
		cin>>cost[i]>>q;
		while(q--){
			int x;
			cin>>x;
			state[i]=state[i]|(1<<x-1);
		}
	}
	dp[0][0]=0;
	for(int i=0;i<(1<<n);i++){
		for(int j=1;j<=m;j++){
			dp[i][j]=min(dp[i][j],dp[i][j-1]);
			dp[i|state[j]][j]=min(dp[i|state[j]][j],dp[i][j-1]+cost[j]);
		}
	}
	int ans=dp[(1<<n)-1][m];
	if(ans==m) cout<<"-1\n";
	else cout<<ans<<endl;
	return 0;
}
Submission Info
Submission Time

Compiler output:
a.cc:43:11: error: redefinition of 'const int m'
   43 | const int m = 1000000007;
      |           ^
a.cc:4:11: note: 'const int m' previously defined here
    4 | const int m = 1000000007;
      |           ^
a.cc:44:5: error: conflicting declaration 'int state [5000]'
   44 | int state[5000];
      |     ^~~~~
a.cc:5:5: note: previous declaration as 'int state [200005]'
    5 | int state[200005];
      |     ^~~~~
a.cc:45:5: error: redefinition of 'int dp [5000][1005]'
   45 | int dp[5000][1005];
      |     ^~
a.cc:6:5: note: 'int dp [5000][1005]' previously declared here
    6 | int dp[5000][1005];
      |     ^~
a.cc:46:5: error: redefinition of 'int main()'
   46 | int main(){
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main(){
      |     ^~~~
a.cc:79:1: error: 'Submission' does not name a type
   79 | Submission Info
      | ^~~~~~~~~~
Language: C++

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

int main() {
	double n;
	cin >> n;
	double ans = (n % 2 == 0 ? n / 2 : (n - 1) / 2 + 1);
	cout << fixed << setprecision(7) << ans / n << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |         double ans = (n % 2 == 0 ? n / 2 : (n - 1) / 2 + 1);
      |                       ~ ^ ~
      |                       |   |
      |                       |   int
      |                       double
Language: Java


import java.util.*;
public class AtCoderABC142A {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        if (n == 1) {
            System.out.println("1.0000000000");
        } else if (n % 2 == 0) {
            System.out.println("0.5000000000");
        } else {
            System.out.println("0.6000000000");
        }

    }

}


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

import java.util.Scanner;
 
public class Main {
    // Making a static main function
    public static void main(String[] args) {
      Scanner scanner = new Scanner(System.in);
      int num = scanner.nextInt();
      
      if (num % 2 ==0) 
        system.out.println("0.5");
      else {
        system.out.println(((num/2) + 1) / num);
      }     
    }
}

Compiler output:
Main.java:10: error: package system does not exist
        system.out.println("0.5");
              ^
Main.java:12: error: package system does not exist
        system.out.println(((num/2) + 1) / num);
              ^
2 errors
Language: Java

import java.util.Scanner;

public class test {
    // Making a static main function
    public static void main(String[] args) {
      Scanner scanner = new Scanner(System.in);
      int num = scanner.nextInt();
      
      if (num % 2 ==0) 
        system.out.println("0.5");
      else {
        system.out.println(((num/2) + 1) / num);
      }     
    }
}

Compiler output:
Main.java:3: error: class test is public, should be declared in a file named test.java
public class test {
       ^
Main.java:10: error: package system does not exist
        system.out.println("0.5");
              ^
Main.java:12: error: package system does not exist
        system.out.println(((num/2) + 1) / num);
              ^
3 errors
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	if(n%2)
	{
		ll k=n/2+1;
		cout<<double(k)/n;
	}
	else
	{
		cout<<"0.50000000";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'll' was not declared in this scope
    9 |                 ll k=n/2+1;
      |                 ^~
a.cc:10:30: error: 'k' was not declared in this scope
   10 |                 cout<<double(k)/n;
      |                              ^
Language: C

#include<stdio.h>

int main(){
  
  int N,M,C = 0;
  char R[500];
  
  scanf("%d %d",&N,&M);
  
  for(int t = 0; t<N ;t++){
    scanf("%d",R[t]);
    if(M<=R[t]){
      c=c+1;
    }
  }
  
  printf("%d",&c);
  
  return 0;
  
}

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

#include<iostream>


using namespace std;
int main(){
	int n;
  	cin>>n;
  	double p;
  	p=(double)(floor(n/2)/n);
  	cout<<p;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'floor' was not declared in this scope
    9 |         p=(double)(floor(n/2)/n);
      |                    ^~~~~
Language: C++

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

int main()
{
  int n;
  cin >> n;
  int le = n/2+n%2;
  cout << round(le/n,6);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: no matching function for call to 'round(int, int)'
    9 |   cout << round(le/n,6);
      |           ~~~~~^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
                 from a.cc:1:
/usr/include/c++/14/cmath:2699:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::round(_Tp)'
 2699 |     round(_Tp __x)
      |     ^~~~~
/usr/include/c++/14/cmath:2699:5: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:334:1: note: candidate: 'double round(double)'
  334 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
      | ^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:334:1: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/cmath:2691:3: note: candidate: 'constexpr long double std::round(long double)'
 2691 |   round(long double __x)
      |   ^~~~~
/usr/include/c++/14/cmath:2691:3: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/cmath:2687:3: note: candidate: 'constexpr float std::round(float)'
 2687 |   round(float __x)
      |   ^~~~~
/usr/include/c++/14/cmath:2687:3: note:   candidate expects 1 argument, 2 provided
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <intrin.h>
using namespace std;
typedef long long ll;
typedef long double ld;

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

	int n; cin >> n;
	cout << setprecision(10) << fixed;
	if (n % 2 == 0)
		cout << 0.5 << endl;
	else
		cout << (double((n + 1) / 2) / double(n)) << endl;

	return 0;
}

Compiler output:
a.cc:5:10: fatal error: intrin.h: No such file or directory
    5 | #include <intrin.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int n=sc.nextInt();
		int pattern=(n+1)/2;
		double p=((double) pattern)/((double) n);
		System.out.println(p);

	}

}


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

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int n=sc.nextInt();
		int pattern=(n+1)/2;
		double p=((double) pattern)/((double) n);
		System.out.println(p);

	}

}


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

#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  int q = (n + 1) / 2;
  double ans = (double)q / (double)n;
  cout<<fixed<<setprecision(12)<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'setprecision' was not declared in this scope
    9 |   cout<<fixed<<setprecision(12)<<ans;
      |                ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include <iostream>
  +++ |+#include <iomanip>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long       ll;
typedef long double     ld;
typedef string          str;
#define all(x)			(x).begin(),(x).end()
#define Sort(x)			sort(all(x))
#define A               first
#define B               second
#define sep             ' '
#define endl            '\n'
#define fast_io         ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

const int MAX1 = 5e5 + 7;

ll a, b, c, T, d, e, x1, y1, x2, y2, l, r, x, y, z, mid, cnt, flag, mod = 1e9+7;
vector <ll> vec;

int main(){
	cin >> a;
	cout << 1.0*(a%2+a/2)/a;
    return 0;
}
/*                          now or never                         */

Compiler output:
a.cc:16:26: error: 'll y1' redeclared as different kind of entity
   16 | ll a, b, c, T, d, e, x1, y1, x2, y2, l, r, x, y, z, mid, cnt, flag, mod = 1e9+7;
      |                          ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  printf("%.6f\n", (double)(N+1)>>1/ N);
  
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: invalid operands of types 'double' and 'int' to binary 'operator>>'
    8 |   printf("%.6f\n", (double)(N+1)>>1/ N);
      |                    ~~~~~~~~~~~~~^~~~~~
      |                    |               |
      |                    double          int
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  printf("%.6f\n", N%2 ? (double)((N+1)>>1)/ N);
  
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:47: error: expected ':' before ')' token
    8 |   printf("%.6f\n", N%2 ? (double)((N+1)>>1)/ N);
      |                                               ^
      |                                               :
a.cc:8:47: error: expected primary-expression before ')' token
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  printf("%.6f\n", N%2 ? (double)(N+1)>>1/ N);
  
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:39: error: invalid operands of types 'double' and 'int' to binary 'operator>>'
    8 |   printf("%.6f\n", N%2 ? (double)(N+1)>>1/ N);
      |                          ~~~~~~~~~~~~~^~~~~~
      |                          |               |
      |                          double          int
a.cc:8:45: error: expected ':' before ')' token
    8 |   printf("%.6f\n", N%2 ? (double)(N+1)>>1/ N);
      |                                             ^
      |                                             :
a.cc:8:45: error: expected primary-expression before ')' token
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N;
  double a;
  cin >> N;
  
  printf("%.6f\n", N%2 ? (double)((N+1)>>1)/b : (double)(N>>1)/b;
  
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:45: error: 'b' was not declared in this scope
    9 |   printf("%.6f\n", N%2 ? (double)((N+1)>>1)/b : (double)(N>>1)/b;
      |                                             ^
Language: C

#include<stdio.h>
int main(void){

  int a,b,c[100000],i,j;
  scanf("%d%d",&a,&b);
  j=0;
  for(i=1;i<=a;i++){
    scanf("%d",&c[i]);
    if(b<=c[i]){
      j=j+1;
    }
    printf("%d",j);
    return 0;
  }
      

Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected declaration or statement at end of input
   14 |   }
      |   ^
Language: C++

#include<stdio.h>
int main(){
  int N,K,c[100000],i,j;
  scanf_s("%d",&N);
  scanf_s("%d",&K);
  j=0;
  for(i=1;i<=N;i++){
    printf("%d番目の人の身長を入力してください\n",i);
    scanf_s("%d",&c[i]);
    if(K<=c[i]){
      j=j+1;
    }
  }
  printf("乗ることが出来るのは%d人",j);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    4 |   scanf_s("%d",&N);
      |   ^~~~~~~
      |   scanf
Language: C

#include<stdio.h>
int main(){
  int N,K,c[100000],i,j;
  scanf_s("%d",&N);
  scanf_s("%d",&K);
  j=0;
  for(i=1;i<=N;i++){
    printf("%d番目の人の身長を入力してください\n",i);
    scanf_s("%d",&c[i]);
    if(K<=c[i]){
      j=j+1;
    }
  }
  printf("乗ることが出来るのは%d人",j);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |   scanf_s("%d",&N);
      |   ^~~~~~~
      |   scanf
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  double ans;
  cin >> N;
  ans = ((N+1.0)/2.0)/(1.0*N)
    cout << fixed << setprecision(8);
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: expected ';' before 'cout'
    7 |   ans = ((N+1.0)/2.0)/(1.0*N)
      |                              ^
      |                              ;
    8 |     cout << fixed << setprecision(8);
      |     ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  double N;
  cin >> N;
  double y = N/2;
  double x = y+1;
    cout << fixed << setprecision(8);
    cout << ((N+1)/2)/N << endl;
  }
}




Compiler output:
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C

#include<stdio.h>
int main(){
  int N,a;
  float b;
  scanf("%d",&N);
  if(N % 2==0){
    a=N/2;
    b=float(a)/float(N);
    printf("求める確率は%f\n",b);
  }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:7: error: expected expression before 'float'
    8 |     b=float(a)/float(N);
      |       ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  int a=(n+1)/2;
  float c=a;
  float b=n;
  cout<<c/b;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected '}' at end of input
    9 |   cout<<c/b;
      |             ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
  double n;
  cin >> n;
  double odd =n;
  if (odd&1) odd++;
  odd/=2;
  cout << setprecision(10) << fixed<<  odd/n << '\n';
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: invalid operands of types 'double' and 'int' to binary 'operator&'
   10 |   if (odd&1) odd++;
      |       ~~~^~
      |       |   |
      |       |   int
      |       double
a.cc:12:11: error: 'setprecision' was not declared in this scope
   12 |   cout << setprecision(10) << fixed<<  odd/n << '\n';
      |           ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include <iostream>
  +++ |+#include <iomanip>
    2 |
Language: C++

#include<iostream> 
using namespace std ; 
int n; 
int main ()
{ cin >>n ; 
 if(n%2==0) cout << n/2; 
 else cout << float ((n-(n-1)/2))/n); 
return 0; } 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: expected ';' before ')' token
    7 |  else cout << float ((n-(n-1)/2))/n);
      |                                    ^
      |                                    ;
Language: C++

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

int main() {
    int N;
    cin >> N;
        int y = N/2;
        double x = N / (N-y);
        cout << x ;
    }
}

Compiler output:
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C

    #include<stdio.h>
     
    double scan();
     
    int main(void){
      double a;
      a = scan();
      printf("%lf", a);
      return 0;
    }
     
    double scan(void){
      double num;
      scanf("%lf", &num);
      if(num < 1 || num>100){
        return scan();
      }else{
        return num;
    }

Compiler output:
main.c: In function 'scan':
main.c:19:5: error: expected declaration or statement at end of input
   19 |     }
      |     ^
Language: C

#include<stdio.h>

double scan();

int main(void){
  double a;
  a = scan();
  printf("%lf", a);
  return 0;
}

double scan(void){
  double num;
  scanf("%lf", &num);
  if(num < 1 || num>100){
    return scan();
  }else if(){
    return num;
}

Compiler output:
main.c: In function 'scan':
main.c:17:12: error: expected expression before ')' token
   17 |   }else if(){
      |            ^
main.c:19:1: error: expected declaration or statement at end of input
   19 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{ 
    float n;
    cin>>n;
    if(n%2==1){
        cout<<(n+1)/(2*n)<<endl;
    }
    else{cout<<0.5<<endl;}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: invalid operands of types 'float' and 'int' to binary 'operator%'
    7 |     if(n%2==1){
      |        ~^~
      |        | |
      |        | int
      |        float
Language: C++

#include<iostream>
using namespace std;
int main()
{ 
    float n;
    cin>>n;
    if(n%2==1){
        cout<<(n+1)/(2n)<<endl;
    }
    else{cout<<0.5<<endl;}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: invalid operands of types 'float' and 'int' to binary 'operator%'
    7 |     if(n%2==1){
      |        ~^~
      |        | |
      |        | int
      |        float
a.cc:8:22: error: unable to find numeric literal operator 'operator""n'
    8 |         cout<<(n+1)/(2n)<<endl;
      |                      ^~
Language: C++

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

int main() {
  float n;
  if(n%2 == 0) cout << 0.5 << endl;
  else{
    printf("%12f\n" , ((n-1)/2) / n);
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: invalid operands of types 'float' and 'int' to binary 'operator%'
    8 |   if(n%2 == 0) cout << 0.5 << endl;
      |      ~^~
      |      | |
      |      | int
      |      float
Language: C++

#include<cstdio>
int cur;
double ans;
int main()
{
	scanf("%d",&n);
  	for(int i=1;i<=n;++i)if(i%2)++cur;
  	ans=cur*1.0/n;
  	printf(".10lf",ans);
  	reutrn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: 'n' was not declared in this scope
    6 |         scanf("%d",&n);
      |                     ^
a.cc:10:9: error: 'reutrn' was not declared in this scope
   10 |         reutrn 0;
      |         ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int n;
    in >> n;
    int impare;

    if(n%2 == 0)
        impare = n/2;
    else
        impare = n/2 + 1;

    float rezultat = (float)impare / n;
    cout << rezultat << endl;
     return 0;
}


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

#include <algorithm>
#include <array>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>

using namespace std;

typedef long long ll;
const ll INF = 1e9;
const ll MOD = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define loop(i, a, n) for (int i = a; i < (n); i++)
#define all(in) in.begin(), in.end()
#define vint vector<int>

int main() {
    double N;
    cin >> N;
    if (N % 2.0 == 0) {
        printf("%.12lf\n", N / 2 / N);
    } else {
        printf("%.12lf\n", (N / 2 + 1) / N);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   30 |     if (N % 2.0 == 0) {
      |         ~ ^ ~~~
      |         |   |
      |         |   double
      |         double
Language: C++

#include <algorithm>
#include <array>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>

using namespace std;

typedef long long ll;
const ll INF = 1e9;
const ll MOD = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define loop(i, a, n) for (int i = a; i < (n); i++)
#define all(in) in.begin(), in.end()
#define vint vector<int>

int main() {
    double N;
    cin >> N;
    if (N % 2 == 0) {
        printf("%.12lf\n", N / 2 / N);
    } else {
        printf("%.12lf\n", (N / 2 + 1) / N);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   30 |     if (N % 2 == 0) {
      |         ~ ^ ~
      |         |   |
      |         |   int
      |         double
Language: C++

input = sys.stdin.readline

n , m = map(int,input(),split())

edge = [[]for _ in [0] * n]
back = [[]for _ in [0] * n]

for _ in [0] * m:
    a , b = map(int,input(),split())
    edge[a-1].append(b-1)
    back[b-1].aapend(a-1)

res = [None] * (n+1)

for end in range (n):
    for start in edge [end]:
        cost = [-1] * n
        cost = [start] = 0
        new = [start]
        tank = []
        judge = True

    while len (new) > 0 and judge:
        tank = []
        for fr in new:
            for go in edge [fr]:
                if cost [go] < 0:
                    cost [go] = cost [fr] + 1
                    tank.append(go)
                    if go == end:
                        judge = False
        new = tank

    if cost [end] >= 0 and cost [end] < len (res):
        p = end
        res = [p + 1]
        while p! = start:
            for e in back [p]:
                if cost [p] == cost [e] + 1:
                    p = e
                    res.append (p + 1)
                    break

    if res [0] == None:
        print (-1)

    else:
        print(les(res))
        for e in res:
            print(e)

Compiler output:
a.cc:1:1: error: 'input' does not name a type; did you mean 'int'?
    1 | input = sys.stdin.readline
      | ^~~~~
      | int
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n, k;
  cin >> n >> k;
  int s[100];
  int ans=0;
  for(int i=0;i<n; i++){
     cin >> s[i];
  }
  for(int i=0; i<n; ++){
     if (s[i]>=k){
       ans++;
     }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: expected primary-expression before ')' token
   12 |   for(int i=0; i<n; ++){
      |                       ^
Language: C++

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

int main(){
   int n;
   cin >> n;
   int ans=0;
   for(int i=1; i<=n; i++){
      if (i%2==1){
         ans++;
      }
   }
   double s;
   s = (double)ans/n;
   cout << ans << endl;
}

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

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

int main(){
   int n;
   cin >> n;
   int ans=0;
   for(int i=1; i<=n; i++){
      if (i%2==1){
         ans++;
      }
   }
   double s;
   s = (double)ans/n;
   cout << ans << endl;
}

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #inlude; did you mean #include?
    3 | #inlude<bits/stdc.h>
      |  ^~~~~~
      |  include
Language: C++

#include<iostream>

int main(void){
int n;
scanf("%d",&n);
int a=0;
for(int i=1,i<=n,i++){
    if(i%2==1)
    {
        a++;
    }
}
printf("%lf",a/n);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before '<=' token
    7 | for(int i=1,i<=n,i++){
      |              ^~
      |              ;
a.cc:7:14: error: expected primary-expression before '<=' token
    7 | for(int i=1,i<=n,i++){
      |              ^~
a.cc:7:21: error: expected ';' before ')' token
    7 | for(int i=1,i<=n,i++){
      |                     ^
      |                     ;
Language: C++

#include<iostream>

int main(void){
double n;
scanf("%lf",&n);
double a=0;
for(int i=1,i<=n,i++){
    if(i%2==1)
    {
        a++;
    }
}
printf("%lf",a/n);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before '<=' token
    7 | for(int i=1,i<=n,i++){
      |              ^~
      |              ;
a.cc:7:14: error: expected primary-expression before '<=' token
    7 | for(int i=1,i<=n,i++){
      |              ^~
a.cc:7:21: error: expected ';' before ')' token
    7 | for(int i=1,i<=n,i++){
      |                     ^
      |                     ;
Language: C++

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

int main(){
  int N;
  cin>>N;
  
  if(N%2==0) cout<<0.5000000000<<endl;
  else{
    cout<<(N/2 +1)/N<<ensl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: 'ensl' was not declared in this scope
   10 |     cout<<(N/2 +1)/N<<ensl;
      |                       ^~~~
Language: C++

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

int main(){
    int n;
    cin >> n;
    double sol;

    sol = (double(n/2)+1)/n;
    
    cout << sol;
}

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

using namespace std;
 
int main()
{
  int n;
  std::cin>>n;
  double count=0.0;
    if(n%2==0)
    count=n/2;
    else
    count=(n+1)/2;
  double n1=(double)n;
  double p=(double)(count/n1);
  std::cout<<"/n"<<p;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'cin' is not a member of 'std'
    6 |   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 | using namespace std;
a.cc:14:8: error: 'cout' is not a member of 'std'
   14 |   std::cout<<"/n"<<p;
      |        ^~~~
a.cc:14:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
using namespace std;

void main()
{
  int n;
  std::cin>>n;
  double count=0;
    if(n%2==0)
    count=n/2;
    else
    count=(n+1)/2;
  double p=(double)(count/n);
  std::cout<<"/n"<<p;
  
}

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

#include<iostream>
using namespace std;

int main()
{
  double n;
  std::cin>>n;
  double count=0;
    if(n%2.0==0)
    count=n/2.0;
    else
    count=(n+1)/2;
  double p=(double)(count/n);
  std::cout<<"/n"<<p;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    9 |     if(n%2.0==0)
      |        ~^~~~
      |        | |
      |        | double
      |        double
Language: C++

#include<iostream>
using namespace std;

int main()
{
  double n;
  std::cin>>n;
  double count=0;
    if(n%2==0)
    count=n/2;
    else
    count=(n+1)/2;
  double p=(double)(count/n);
  std::cout<<"/n"<<p;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |     if(n%2==0)
      |        ~^~
      |        | |
      |        | int
      |        double
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n;
  std::cin>>n;
  int count=0;
    if(n%2==0)
    count=n/2;
    else
    count=(n+1)/2;
  double p=(double)(count/n;)
  std::cout<<"/n"<<p;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ')' before ';' token
   13 |   double p=(double)(count/n;)
      |                    ~       ^
      |                            )
a.cc:13:29: error: expected primary-expression before ')' token
   13 |   double p=(double)(count/n;)
      |                             ^
Language: C++

#include<iostream>
sing namespace std;

int main()
{
  int n;
  std::cin>>n;
  int count=0;
  int i=0;
  for(i=1;i<=n;i++)
  {
    if(i%2!=0)
      count+=1;
  }
  double p=count/n;
  std::cout<<"/n"<<p;
  return 0;
}

Compiler output:
a.cc:2:1: error: 'sing' does not name a type
    2 | sing namespace std;
      | ^~~~