Submission #146420

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1464202019-08-24 00:13:10osaaateiasavtnlBulldozer (JOI17_bulldozer)C++14
100 / 100
1016 ms66612 KiB
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcount
#define ll long long
const int N = 2007, C = 1e9 + 7;
int n, ans = 0;
struct Point {
int x, y, c;
bool operator < (Point p) { return (y < p.y) || (y == p.y && x > p.x); }
} a[N];
namespace TREE {
struct Node {
int l, r, sum, ans;
Node (int x) {
sum = x;
l = r = ans = max(0ll, x);
}
Node () {}
};
Node merge(Node l, Node r) {
Node ans;
ans.sum = l.sum + r.sum;
ans.l = max(l.l, l.sum + r.l);
ans.r = max(r.r, r.sum + l.r);
ans.ans = max(max(l.ans, r.ans), l.r + r.l);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

bulldozer.cpp: In function 'int main()':
bulldozer.cpp:78:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     while (ptr < l.size()) {
            ~~~~^~~~~~~~~~
bulldozer.cpp:80:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         while (ptr < l.size() && cp(l[t].x, l[t].y, l[ptr].x, l[ptr].y) == 0) {
                ~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...