feast.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
feast.java:1: error: class, interface, or enum expected
#include <bits/stdc++.h>
^
feast.java:3: error: class, interface, or enum expected
typedef long long ll;
^
feast.java:4: error: class, interface, or enum expected
typedef pair<int, int> pii;
^
feast.java:5: error: class, interface, or enum expected
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
^
feast.java:5: error: '{' expected
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
^
feast.java:5: error: illegal start of type
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
^
feast.java:5: error: > expected
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
^
feast.java:5: error: <identifier> expected
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
^
feast.java:5: error: <identifier> expected
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
^
feast.java:6: error: class, interface, or enum expected
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
^
feast.java:6: error: '{' expected
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
^
feast.java:6: error: illegal start of type
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
^
feast.java:6: error: > expected
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
^
feast.java:6: error: <identifier> expected
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
^
feast.java:6: error: <identifier> expected
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
^
feast.java:7: error: illegal character: '#'
#define sz(x) (int)x.size()
^
feast.java:7: error: class, interface, or enum expected
#define sz(x) (int)x.size()
^
feast.java:39: error: class, interface, or enum expected
int n, k, arr[MAXN], ps[MAXN];
^
feast.java:41: error: class, interface, or enum expected
pair<ll, ll> check(ll x){
^
feast.java:43: error: class, interface, or enum expected
pair<ll, ll> mx;
^
feast.java:44: error: class, interface, or enum expected
for (int i=1; i<=n; i++){
^
feast.java:44: error: class, interface, or enum expected
for (int i=1; i<=n; i++){
^
feast.java:44: error: class, interface, or enum expected
for (int i=1; i<=n; i++){
^
feast.java:46: error: class, interface, or enum expected
if (ps[i] + mx.first - x > dp[i].first){
^
feast.java:48: error: class, interface, or enum expected
}
^
feast.java:51: error: class, interface, or enum expected
}
^
feast.java:54: error: class, interface, or enum expected
}
^
feast.java:56: error: class, interface, or enum expected
cin.tie(0); ios_base::sync_with_stdio(0);
^
feast.java:59: error: class, interface, or enum expected
cin >> n >> k;
^
feast.java:60: error: class, interface, or enum expected
for (int i=0; i<n; i++){
^
feast.java:60: error: class, interface, or enum expected
for (int i=0; i<n; i++){
^
feast.java:60: error: class, interface, or enum expected
for (int i=0; i<n; i++){
^
feast.java:62: error: class, interface, or enum expected
}
^
feast.java:63: error: class, interface, or enum expected
for (int i=0; i<n; i++){
^
feast.java:63: error: class, interface, or enum expected
for (int i=0; i<n; i++){
^
feast.java:65: error: class, interface, or enum expected
}
^
feast.java:68: error: class, interface, or enum expected
while (low < high){
^
feast.java:70: error: class, interface, or enum expected
int seg = check(mid).second;
^
feast.java:71: error: class, interface, or enum expected
if (seg > k){
^
feast.java:73: error: class, interface, or enum expected
}else{
^
feast.java:75: error: class, interface, or enum expected
}
^
feast.java:78: error: class, interface, or enum expected
cout << ans.first + k*high << "\n";
^
feast.java:79: error: class, interface, or enum expected
}
^
44 errors