QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#304249#8006. Dinosaur Bones Diggingucup-team2045#Compile Error//C++142.3kb2024-01-13 17:00:472024-01-13 17:00:47

Details

answer.code:1:3: error: ‘lazy’ does not name a type
    1 |   lazy[idx] = 0;
      |   ^~~~
answer.code:2:1: error: expected declaration before ‘}’ token
    2 | }
      | ^
answer.code:3:48: error: ‘m’ was not declared in this scope
    3 | void update(int tl, int tr, int l = 0, int r = m - 1, int idx = 1) {
      |                                                ^
answer.code: In function ‘void update(int, int, int, int, int)’:
answer.code:5:5: error: ‘seg’ was not declared in this scope
    5 |     seg[idx]++; lazy[idx]++;
      |     ^~~
answer.code:5:17: error: ‘lazy’ was not declared in this scope
    5 |     seg[idx]++; lazy[idx]++;
      |                 ^~~~
answer.code:8:3: error: ‘pushdown’ was not declared in this scope
    8 |   pushdown(idx);
      |   ^~~~~~~~
answer.code:12:3: error: ‘seg’ was not declared in this scope
   12 |   seg[idx] = max(seg[(idx << 1)], seg[(idx << 1) | 1]);
      |   ^~~
answer.code:12:14: error: ‘max’ was not declared in this scope
   12 |   seg[idx] = max(seg[(idx << 1)], seg[(idx << 1) | 1]);
      |              ^~~
answer.code: At global scope:
answer.code:14:46: error: ‘m’ was not declared in this scope
   14 | int query(int tl, int tr, int l = 0, int r = m - 1, int idx = 1) {
      |                                              ^
answer.code: In function ‘int query(int, int, int, int, int)’:
answer.code:16:12: error: ‘seg’ was not declared in this scope
   16 |     return seg[idx];
      |            ^~~
answer.code:18:3: error: ‘pushdown’ was not declared in this scope
   18 |   pushdown(idx);
      |   ^~~~~~~~
answer.code:21:24: error: ‘max’ was not declared in this scope
   21 |   if (tl <= mid) res = max(res, query(tl, tr, l, mid, (idx << 1)));
      |                        ^~~
answer.code:22:23: error: ‘max’ was not declared in this scope
   22 |   if (tr > mid) res = max(res, query(tl, tr, mid + 1, r, (idx << 1) | 1));
      |                       ^~~
answer.code: In function ‘void solve(int&)’:
answer.code:31:10: error: ‘cin’ was not declared in this scope
   31 |   int n; cin >> n;
      |          ^~~
answer.code:32:3: error: ‘vector’ was not declared in this scope
   32 |   vector<pii> v(n);
      |   ^~~~~~
answer.code:32:10: error: ‘pii’ was not declared in this scope
   32 |   vector<pii> v(n);
      |          ^~~
answer.code:32:15: error: ‘v’ was not declared in this scope
   32 |   vector<pii> v(n);
      |               ^
answer.code:37:28: error: ‘greater’ was not declared in this scope
   37 |   sort(v.begin(), v.end(), greater<pii>());
      |                            ^~~~~~~
answer.code:37:41: error: expected primary-expression before ‘)’ token
   37 |   sort(v.begin(), v.end(), greater<pii>());
      |                                         ^
answer.code:37:3: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
   37 |   sort(v.begin(), v.end(), greater<pii>());
      |   ^~~~
      |   short
answer.code:39:15: error: ‘ranges’ was not declared in this scope
   39 |   vector<pii> ranges(q);
      |               ^~~~~~
answer.code:40:15: error: found ‘:’ in nested-name-specifier, expected ‘::’
   40 |   for (pii &x : ranges) {
      |               ^
      |               ::
answer.code:40:13: error: ‘x’ has not been declared
   40 |   for (pii &x : ranges) {
      |             ^
answer.code:44:3: error: ‘lp’ was not declared in this scope
   44 |   lp.pb(ranges[0].ff);
      |   ^~
answer.code:44:22: error: expected ‘)’ before ‘;’ token
   44 |   lp.pb(ranges[0].ff);
      |                      ^
      |                      )
answer.code:40:7: note: to match this ‘(’
   40 |   for (pii &x : ranges) {
      |       ^
answer.code:45:3: error: ‘rp’ was not declared in this scope
   45 |   rp.pb(ranges[0].ss);
      |   ^~
answer.code:48:7: error: ‘lp’ was not declared in this scope
   48 |       lp.pb(ranges[i].ff);
      |       ^~
answer.code:52:3: error: ‘m’ was not declared in this scope
   52 |   m = lp.size();
      |   ^
answer.code:52:7: error: ‘lp’ was not declared in this scope
   52 |   m = lp.size();
      |       ^~
answer.code:54:11: error: expected ‘;’ before ‘cur’
   54 |   for (pii cur : v) {
      |           ^~~~
      |           ;
answer.code:63:3: error: ‘cout’ was not declared in this scope
   63 |   cout << ans << endl;
      |   ^~~~
answer.code:63:18: error: ‘endl’ was not declared in this scope
   63 |   cout << ans << endl;
      |                  ^~~~
answer.code:64:1: error: expected primary-expression before ‘}’ token
   64 | }
      | ^
answer.code:63:23: error: expected ‘)’ before ‘}’ token
   63 |   cout << ans << endl;
      |                       ^
      |                       )
   64 | }
      | ~                      
answer.code:54:7: note: to match this ‘(’
   54 |   for (pii cur : v) {
      |       ^
answer.code:64:1: error: expected primary-expression before ‘}’ token
   64 | }
      | ^
answer.code: At global scope:
answer.code:65:1: error: ‘int32_t’ does not name a typ...