Submission #404727

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4047272021-05-14 21:51:55usuyusExamination (JOI19_examination)C++14
100 / 100
949 ms311632 KiB
#include <bits/stdc++.h>
#define N 200005
#define M 1000000007
using namespace std;
using ll = long long;
struct ImplicitSegTree {
struct Node {
ll val;
Node *lft, *rgt;;
Node() : val(0), lft(nullptr), rgt(nullptr) {}
void push() {
if (!lft) lft = new Node();
if (!rgt) rgt = new Node();
}
void update(ll l, ll r, ll idx) {
++val;
if (l == r) return;
push();
ll m = (l+r) / 2;
if (idx <= m) lft->update(l, m, idx);
else rgt->update(m+1, r, idx);
}
ll query(ll l, ll r, ll lq, ll rq) {
if (r < lq || rq < l) return 0;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

examination.cpp: In function 'int main()':
examination.cpp:90:12: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   90 |  for (auto [a, b, c, idx] : qs) {
      |            ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...