Language: Java

#include <bits/stdc++.h>
#include <vector> 
# include <cstdint>
#define FOR(i,l,r) for(int i=(l);i<(r);++i)
#define RFOR(i,l,r) for(int i=(l);i>=(int)(r);i--)
#define rep(i,n)  FOR(i,0,n)
#define rrep(i,n)  RFOR(i,n-1,0)

#define int long long
using namespace std;
const int MX = 1e6;
const int inf = 1e13;
const int mod = 1e9+7;
#define ll long long
double dp[3010][3010];
signed main() {
    int n;
    cin >> n;
    rep(i,n) {
        double p;
        cin >> p;
        double np = 1-p;
        if(i==0) {
            dp[0][0] = np;
            dp[0][1] = p;
            continue;
        }
        rep(j,i+2) {
            if(i==0) dp[i][j] = dp[i-1][0]*np;
            else if(i==i+1) dp[i][j] = dp[i-1][j-1]*p;
            else dp[i][j] = dp[i-1][j-1]*p+dp[i-1][j]*np;
        } 
    }
    double ans = 0;
    FOR(i,n/2+1,n+1) {
        ans += dp[n-1][i];
        //cout << dp[n-1][i] << endl;
    }
    cout << setprecision(20)<<ans << endl;
  return 0;
}



Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:2: error: illegal character: '#'
#include <vector> 
^
Main.java:3: error: illegal character: '#'
# include <cstdint>
^
Main.java:4: error: illegal character: '#'
#define FOR(i,l,r) for(int i=(l);i<(r);++i)
^
Main.java:4: error: class, interface, enum, or record expected
#define FOR(i,l,r) for(int i=(l);i<(r);++i)
                                 ^
Main.java:4: error: class, interface, enum, or record expected
#define FOR(i,l,r) for(int i=(l);i<(r);++i)
                                       ^
Main.java:5: error: illegal character: '#'
#define RFOR(i,l,r) for(int i=(l);i>=(int)(r);i--)
^
Main.java:5: error: class, interface, enum, or record expected
#define RFOR(i,l,r) for(int i=(l);i>=(int)(r);i--)
                                  ^
Main.java:5: error: class, interface, enum, or record expected
#define RFOR(i,l,r) for(int i=(l);i>=(int)(r);i--)
                                              ^
Main.java:6: error: illegal character: '#'
#define rep(i,n)  FOR(i,0,n)
^
Main.java:7: error: illegal character: '#'
#define rrep(i,n)  RFOR(i,n-1,0)
^
Main.java:9: error: illegal character: '#'
#define int long long
^
Main.java:11: error: class, interface, enum, or record expected
const int MX = 1e6;
^
Main.java:12: error: class, interface, enum, or record expected
const int inf = 1e13;
^
Main.java:13: error: class, interface, enum, or record expected
const int mod = 1e9+7;
^
Main.java:14: error: illegal character: '#'
#define ll long long
^
Main.java:14: error: class, interface, enum, or record expected
#define ll long long
        ^
Main.java:18: error: not a statement
    cin >> n;
        ^
Main.java:21: error: not a statement
        cin >> p;
            ^
Main.java:39: error: not a statement
    cout << setprecision(20)<<ans << endl;
                                  ^
Main.java:16: error: unnamed classes are a preview feature and are disabled by default.
signed main() {
^
  (use --enable-preview to enable unnamed classes)
Main.java:19: error: ';' expected
    rep(i,n) {
            ^
Main.java:28: error: ';' expected
        rep(j,i+2) {
                  ^
Main.java:35: error: ';' expected
    FOR(i,n/2+1,n+1) {
                    ^
25 errors