Submission #936743

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9367432024-03-02 16:34:00ParsaSSynchronization (JOI13_synchronization)C++17
Compilation error
0 ms0 KiB
// In the name of God
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
typedef long long ll;
const int N = 1e6 + 5;
int n, m, q;
vector<int> qr[N];
vector<pair<int, int> > adj[N];
pair<int, int> edg[N];
bool mark[N];
int sz[N], ans[N];
vector<int> ver, E;
void dfs_sz(int v, int p = 0) {
sz[v] = 1;
ver.pb(v);
for (auto [u, i] : adj[v]) {
if (!mark[u] && u != p) {
for (auto x : qr[i])
E.pb(x);
dfs_sz(u, v);
sz[v] += sz[u];
}
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

synchronization.cpp: In function 'void shift(int, int, int)':
synchronization.cpp:67:12: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   67 |   SET(seg[v], lz[v] * (tr - tl + 1));
      |       ~~~~~^
synchronization.cpp:56:15: note:   initializing argument 1 of 'void SET(int&, int)'
   56 | void SET(int& x, int y) {
      |          ~~~~~^
synchronization.cpp:70:14: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   70 |   SET(lz[v<<1], lz[v]);
      |       ~~~~~~~^
synchronization.cpp:56:15: note:   initializing argument 1 of 'void SET(int&, int)'
   56 | void SET(int& x, int y) {
      |          ~~~~~^
synchronization.cpp:71:20: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   71 |   SET(lz[v << 1 | 1], lz[v]);
      |       ~~~~~~~~~~~~~^
synchronization.cpp:56:15: note:   initializing argument 1 of 'void SET(int&, int)'
   56 | void SET(int& x, int y) {
      |          ~~~~~^
synchronization.cpp:73:10: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   73 |  SET(lz[v], -1);
      |      ~~~~^
synchronization.cpp:56:15: note:   initializing argument 1 of 'void SET(int&, int)'
   56 | void SET(int& x, int y) {
      |          ~~~~~^
synchronization.cpp: In function 'void set_val(int, int, int, int, int, int)':
synchronization.cpp:83:11: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   83 |   SET(lz[v], val);
      |       ~~~~^
synchronization.cpp:56:15: note:   initializing argument 1 of 'void SET(int&, int)'
   56 | void SET(int& x, int y) {
      |          ~~~~~^
synchronization.cpp:91:11: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   91 |  SET(seg[v], seg[v << 1] + seg[v << 1 | 1]);
      |      ~~~~~^
synchronization.cpp:56:15: note:   initializing argument 1 of 'void SET(int&, int)'
   56 | void SET(int& x, int y) {
      |          ~~~~~^