Submission #610960

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6109602022-07-28 20:03:09PiejanVDCRoller Coaster Railroad (IOI16_railroad)C++17
Compilation error
0 ms0 KiB
#include "railroad.h"
#include <bits/stdc++.h>
using namespace std;
const int mxN = (int)2e5+5;
vector<int>st(8*mxN);
int l,r,val;
vector<int>lazy(8*mxN);
int query(int i, int j, int p) {
if(i > r || j < l)
return 0;
if(i >= l && j <= r)
return st[p]+lazy[p];
int mid = (i+j)/2;
lazy[2*p] += lazy[p];
lazy[2*p+1] += lazy[p];
lazy[p] = 0;
return query(i, mid, 2*p) + query(mid+1, j, 2*p+1);
}
void update(int i, int j, int p) {
if(i > r || j < l)
return;
if(i >= l && j <= r) {
lazy[p] += val;
return;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

railroad.cpp: In function 'long long int plan_roller_coaster(std::vector<int>, std::vector<int>)':
railroad.cpp:55:13: error: 'out' was not declared in this scope
   55 |             out[rev[s[i]]]++,in[rev[t[i]]]++;
      |             ^~~
railroad.cpp:55:30: error: 'in' was not declared in this scope; did you mean 'i'?
   55 |             out[rev[s[i]]]++,in[rev[t[i]]]++;
      |                              ^~
      |                              i
railroad.cpp:64:13: error: 'out' was not declared in this scope
   64 |             out[rev[t[i]]]++,in[rev[s[i]]]++;
      |             ^~~
railroad.cpp:64:30: error: 'in' was not declared in this scope; did you mean 'i'?
   64 |             out[rev[t[i]]]++,in[rev[s[i]]]++;
      |                              ^~
      |                              i