carnival.java:7: error: illegal character: '#'
#include <bits/stdc++.h>
^
carnival.java:7: error: class, interface, or enum expected
#include <bits/stdc++.h>
^
carnival.java:10: error: illegal character: '#'
#define ll long long
^
carnival.java:10: error: class, interface, or enum expected
#define ll long long
^
carnival.java:11: error: illegal character: '#'
#define ull unsigned long long
^
carnival.java:12: error: illegal character: '#'
#define ld long double
^
carnival.java:13: error: illegal character: '#'
#define pb push_back
^
carnival.java:14: error: illegal character: '#'
#define setpre(i) setprecision(i)<<fixed
^
carnival.java:15: error: illegal character: '#'
#define foru(i, a, b) for(int i=a;i<=b;i++)
^
carnival.java:15: error: class, interface, or enum expected
#define foru(i, a, b) for(int i=a;i<=b;i++)
^
carnival.java:15: error: class, interface, or enum expected
#define foru(i, a, b) for(int i=a;i<=b;i++)
^
carnival.java:16: error: illegal character: '#'
#define ford(i, a, b) for(int i=a;i>=b;i--)
^
carnival.java:16: error: class, interface, or enum expected
#define ford(i, a, b) for(int i=a;i>=b;i--)
^
carnival.java:16: error: class, interface, or enum expected
#define ford(i, a, b) for(int i=a;i>=b;i--)
^
carnival.java:17: error: illegal character: '#'
#define mp make_pair
^
carnival.java:18: error: illegal character: '#'
#define moo cout<<"moo "
^
carnival.java:19: error: illegal character: '#'
#define fi first
^
carnival.java:20: error: illegal character: '#'
#define se second
^
carnival.java:23: error: class, interface, or enum expected
typedef vector<int> vi;
^
carnival.java:24: error: class, interface, or enum expected
typedef vector< vector<int> > vvi;
^
carnival.java:25: error: class, interface, or enum expected
typedef pair<int, int> ii;
^
carnival.java:26: error: class, interface, or enum expected
typedef pair<double, double> dd;
^
carnival.java:28: error: class, interface, or enum expected
int main(){
^
carnival.java:31: error: class, interface, or enum expected
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
^
carnival.java:31: error: class, interface, or enum expected
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
^
carnival.java:32: error: class, interface, or enum expected
int n; cin >> n;
^
carnival.java:32: error: class, interface, or enum expected
int n; cin >> n;
^
carnival.java:33: error: class, interface, or enum expected
cout << "? 1 " << n << endl;
^
carnival.java:34: error: class, interface, or enum expected
int pos, x; cin >> pos;
^
carnival.java:34: error: class, interface, or enum expected
int pos, x; cin >> pos;
^
carnival.java:35: error: class, interface, or enum expected
bool left;
^
carnival.java:36: error: class, interface, or enum expected
if(pos != 1){
^
carnival.java:38: error: class, interface, or enum expected
cin >> x;
^
carnival.java:39: error: class, interface, or enum expected
left = (x == pos);
^
carnival.java:40: error: class, interface, or enum expected
}
^
carnival.java:42: error: class, interface, or enum expected
if(left){
^
carnival.java:44: error: class, interface, or enum expected
while(l < r){
^
carnival.java:46: error: class, interface, or enum expected
cout << "? " << mid << " " << pos << endl;
^
carnival.java:47: error: class, interface, or enum expected
cin >> x;
^
carnival.java:49: error: class, interface, or enum expected
if(x != pos) r = mid - 1;
^
carnival.java:50: error: class, interface, or enum expected
else l = mid;
^
carnival.java:51: error: class, interface, or enum expected
}
^
carnival.java:53: error: class, interface, or enum expected
}
^
carnival.java:56: error: class, interface, or enum expected
while(l < r){
^
carnival.java:58: error: class, interface, or enum expected
cout << "? " << pos << " " << mid << endl;
^
carnival.java:59: error: class, interface, or enum expected
cin >> x;
^
carnival.java:60: error: class, interface, or enum expected
if(x != pos) l = mid + 1;
^
carnival.java:61: error: class, interface, or enum expected
else r = mid;
^
carnival.java:62: error: class, interface, or enum expected
}
^
carnival.java:64: error: class, interface, or enum expected
}
^
50 errors