trapezoid.java:1: error: illegal character: '#'
#include <iostream>
^
trapezoid.java:1: error: class, interface, or enum expected
#include <iostream>
^
trapezoid.java:2: error: illegal character: '#'
#include <cstdlib>
^
trapezoid.java:3: error: illegal character: '#'
#include <cstdio>
^
trapezoid.java:4: error: illegal character: '#'
#include <fstream>
^
trapezoid.java:5: error: illegal character: '#'
#include <algorithm>
^
trapezoid.java:6: error: illegal character: '#'
#include <string>
^
trapezoid.java:7: error: illegal character: '#'
#include <utility>
^
trapezoid.java:8: error: illegal character: '#'
#include <vector>
^
trapezoid.java:9: error: illegal character: '#'
#include <queue>
^
trapezoid.java:10: error: illegal character: '#'
#include <set>
^
trapezoid.java:11: error: illegal character: '#'
#include <map>
^
trapezoid.java:15: error: class, interface, or enum expected
struct trap {
^
trapezoid.java:17: error: class, interface, or enum expected
trap(long i1, long i2, long i3, long i4){
^
trapezoid.java:18: error: class, interface, or enum expected
a = i1; b = i2; c = i3; d = i4; i = 0;
^
trapezoid.java:18: error: class, interface, or enum expected
a = i1; b = i2; c = i3; d = i4; i = 0;
^
trapezoid.java:18: error: class, interface, or enum expected
a = i1; b = i2; c = i3; d = i4; i = 0;
^
trapezoid.java:18: error: class, interface, or enum expected
a = i1; b = i2; c = i3; d = i4; i = 0;
^
trapezoid.java:19: error: class, interface, or enum expected
}
^
trapezoid.java:21: error: class, interface, or enum expected
struct comp1 {
^
trapezoid.java:24: error: class, interface, or enum expected
}
^
trapezoid.java:26: error: class, interface, or enum expected
struct comp2 {
^
trapezoid.java:29: error: class, interface, or enum expected
}
^
trapezoid.java:32: error: class, interface, or enum expected
long n, dp[100000]; //dp[i] stores longest sequence ending in trapezoid i
^
trapezoid.java:33: error: class, interface, or enum expected
priority_queue<trap, vector<trap>, comp1> pqa; // for sorting the values by a initially
^
trapezoid.java:34: error: class, interface, or enum expected
priority_queue<trap, vector<trap>, comp2> pqb; // sorts trapezoids by b
^
trapezoid.java:35: error: class, interface, or enum expected
map<long, long> mp; //map(i, j) j = longest sequence of trapezoids with lower right distance i
^
trapezoid.java:37: error: class, interface, or enum expected
int main(){
^
trapezoid.java:39: error: class, interface, or enum expected
cin.tie(NULL);
^
trapezoid.java:40: error: class, interface, or enum expected
cin >> n;
^
trapezoid.java:41: error: class, interface, or enum expected
for (long i = 0; i < n; i++){
^
trapezoid.java:41: error: class, interface, or enum expected
for (long i = 0; i < n; i++){
^
trapezoid.java:41: error: class, interface, or enum expected
for (long i = 0; i < n; i++){
^
trapezoid.java:43: error: class, interface, or enum expected
cin >> i1 >> i2 >> i3 >> i4;
^
trapezoid.java:44: error: class, interface, or enum expected
pqa.push(trap(i1, i2, i3, i4));
^
trapezoid.java:45: error: class, interface, or enum expected
}
^
trapezoid.java:47: error: class, interface, or enum expected
long a1 = 0;
^
trapezoid.java:48: error: class, interface, or enum expected
for (int i = 0; i < n; i++){
^
trapezoid.java:48: error: class, interface, or enum expected
for (int i = 0; i < n; i++){
^
trapezoid.java:48: error: class, interface, or enum expected
for (int i = 0; i < n; i++){
^
trapezoid.java:49: error: class, interface, or enum expected
trap curr = pqa.top(); pqa.pop();
^
trapezoid.java:50: error: class, interface, or enum expected
map<long, long>::iterator temp;
^
trapezoid.java:51: error: class, interface, or enum expected
while (pqb.size() > 0 && pqb.top().b < curr.a){ //while the b values in our priority queue are less than our current a
^
trapezoid.java:52: error: class, interface, or enum expected
temp = mp.lower_bound(pqb.top().d); temp--; //find lowest value in map that's smaller than our current
^
trapezoid.java:53: error: class, interface, or enum expected
mp.insert(make_pair(pqb.top().d, max(dp[pqb.top().i], temp->second))); //map values
^
trapezoid.java:54: error: class, interface, or enum expected
pqb.pop();
^
trapezoid.java:55: error: class, interface, or enum expected
}
^
trapezoid.java:57: error: class, interface, or enum expected
pqb.push(curr);
^
trapezoid.java:58: error: class, interface, or enum expected
temp = mp.lower_bound(curr.c); temp--; //find longest sequence of trapezoids with lower right distance i less than curr.c
^
trapezoid.java:58: error: class, interface, or enum expected
temp = mp.lower_bound(curr.c); temp--; //find longest sequence of trapezoids with lower right distance i less than curr.c
^
trapezoid.java:59: error: class, interface, or enum expected
dp[i] = temp->second + 1;
^
trapezoid.java:60: error: class, interface, or enum expected
a1 = max(a1, dp[i]);
^
trapezoid.java:62: error: class, interface, or enum expected
}
^
trapezoid.java:64: error: class, interface, or enum expected
}
^
54 errors