Submission #336666

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3366662020-12-16 09:51:47errorgornStreet Lamps (APIO19_street_lamps)C++17
100 / 100
2754 ms95344 KiB
//
//
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#define ll long long
#define ii pair<ll,ll>
#define iii pair<ii,ll>
#define fi first
#define se second
#define endl '\n'
#define debug(x) cout << #x << " is " << x << endl
#define rep(x,start,end) for(auto x=(start)-((start)>(end));x!=(end)-((start)>(end));((start)<(end)?x++:x--))
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
#define indexed_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
//change less to less_equal for non distinct pbds, but erase will bug
mt19937 rng(chrono::system_clock::now().time_since_epoch().count());
struct U{
int typ;
int a,b;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

street_lamps.cpp: In function 'void add(std::pair<long long int, long long int>, int)':
street_lamps.cpp:14:12: warning: narrowing conversion of 'range.std::pair<long long int, long long int>::first' from 'long long int' to 'int' [-Wnarrowing]
   14 | #define fi first
      |            ^
street_lamps.cpp:43:25: note: in expansion of macro 'fi'
   43 |  upd.push_back({1,range.fi,range.se,t,1});
      |                         ^~
street_lamps.cpp:15:12: warning: narrowing conversion of 'range.std::pair<long long int, long long int>::second' from 'long long int' to 'int' [-Wnarrowing]
   15 | #define se second
      |            ^
street_lamps.cpp:43:34: note: in expansion of macro 'se'
   43 |  upd.push_back({1,range.fi,range.se,t,1});
      |                                  ^~
street_lamps.cpp: In function 'void rem(std::pair<long long int, long long int>, int)':
street_lamps.cpp:14:12: warning: narrowing conversion of 'range.std::pair<long long int, long long int>::first' from 'long long int' to 'int' [-Wnarrowing]
   14 | #define fi first
      |            ^
street_lamps.cpp:48:25: note: in expansion of macro 'fi'
   48 |  upd.push_back({1,range.fi,range.se,t,-1});
      |                         ^~
street_lamps.cpp:15:12: warning: narrowing conversion of 'range.std::pair<long long int, long long int>::second' from 'long long int' to 'int' [-Wnarrowing]
   15 | #define se second
      |            ^
street_lamps.cpp:48:34: note: in expansion of macro 'se'
   48 |  upd.push_back({1,range.fi,range.se,t,-1});
      |                                  ^~
street_lamps.cpp: In function 'void dnc(int, int, std::vector<U>)':
street_lamps.cpp:70:9: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   70 |  int m=l+r>>1;
      |        ~^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...