Submission #1009971

#TimeUsernameProblemLanguageResultExecution timeMemory
1009971stdfloatWall (IOI14_wall)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "wall.h" #include "grader.cpp" using namespace std; #define ff first #define ss second #define pii pair<int, int> vector<int> st; vector<pair<pii, pii>> lz; // void Lz(int nd, pii p) { // if ((lz[nd].ff.ff == 1 && p.ff == 1 && lz[nd].ff.ss <= p.ss) || (lz[nd].ff.ff == 2 && p.ff == 2 && lz[nd].ff.ss >= p.ss)) lz[nd].erase(lz[nd].begin() + i); // for (auto i : lz[nd]) { // if (i.ff == p.ff) return; // } // lz[nd].push_back(p); // if ((int)lz[nd].size() == 2) { // if (lz[nd][0].ff == 2) lz[nd][0].ss = max(lz[nd][0].ss, lz[nd][1].ss); // else lz[nd][0].ss = min(lz[nd][0].ss, lz[nd][1].ss); // } // } // void LZ(int nd, int l, int r) { // for (auto [op, h] : lz[nd]) { // if (op == 1) st[nd] = max(st[nd], h); // else st[nd] = min(st[nd], h); // } // if (l < r) { // int ch = (nd << 1) + 1; // for (auto i : lz[nd]) { // Lz(ch, i); Lz(ch + 1, i); // } // } // lz[nd].clear(); // } // int upd(int nd, int l, int r, int x, int y, int op, int h) { // LZ(nd, l, r); // if (r < x || y < l) return st[nd]; // if (x <= l && r <= y) { // Lz(nd, {op, h}); LZ(nd, l, r); // return st[nd]; // } // int ch = (nd << 1) + 1, md = (l + r) >> 1; // return st[nd] = max(upd(ch, l, md, x, y, op, h), upd(ch + 1, md + 1, r, x, y, op, h)); // } // int fnd(int nd, int l, int r, int x) { // LZ(nd, l, r); // if (r < x || x < l) return 0; // if (l == r) return st[nd]; // int ch = (nd << 1) + 1, md = (l + r) >> 1; // return max(fnd(ch, l, md, x), fnd(ch + 1, md + 1, r, x)); // } void buildWall(int n, int k, int op[], int l[], int r[], int h[], int fh[]) { assert(*min_element(h, h + k)); // st.assign(n << 2, 0); // lz.assign(n << 2, {}); // for (int i = 0; i < k; i++) { // upd(0, 0, n - 1, l[i], r[i], op[i], h[i]); // } // for (int i = 0; i < n; i++) { // fh[i] = fnd(0, 0, n - 1, i); // } }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc6XGqga.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccmNnI79.o:wall.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status