Submission #1068711

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10687112024-08-21 11:28:22LittleOrangeRectangles (IOI19_rect)C++17
72 / 100
2832 ms1048576 KiB
#include "rect.h"
#include<bits/stdc++.h>
using namespace std;
using ll = int;
using lll = long long;
const ll maxn = 2500;
const ll big = 1e9;
struct BIT{
ll n;
vector<ll> a;
BIT(ll N):n(N),a(N+1,0){}
void add(ll i, ll v){
for(;i<=n;i+=i&-i) a[i] += v;
}
ll get(ll i){
ll x = 0;
for(;i>0;i-=i&-i) x += a[i];
return x;
}
};
struct dsu{
vector<ll> p;
dsu(ll N):p(N,-1){}
ll g(ll i){
return p[i]<0?i:p[i] = g(p[i]);
}
bool m(ll a,ll b){
a = g(a),b = g(b);
if (a==b) return false;
if (p[a]>p[b]) swap(a,b);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

rect.cpp: In constructor 'node::node(ll, ll)':
rect.cpp:39:32: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   39 |  node(ll a, ll b):l(a),r(b),m(a+b>>1),v(0),L(nullptr),R(nullptr){
      |                               ~^~
rect.cpp: In member function 'll segtree_n::build(ll, ll)':
rect.cpp:100:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  100 |    ll m = l+r>>1;
      |           ~^~
rect.cpp: In member function 'void segtree_n::add(ll, ll, ll, ll, ll)':
rect.cpp:115:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  115 |    ll m = l+r>>1;
      |           ~^~
rect.cpp: In member function 'll segtree_n::qry(ll, ll, ll, ll)':
rect.cpp:132:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  132 |    ll m = l+r>>1;
      |           ~^~
rect.cpp: In member function 'void mxt::mod(ll, ll, ll, ll, ll)':
rect.cpp:150:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  150 |    ll m = l+r>>1;
      |           ~^~
rect.cpp: In member function 'll mxt::qry(ll, ll, ll, ll, ll)':
rect.cpp:159:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  159 |    ll m = l+r>>1;
      |           ~^~
rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:216:11: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  216 |    if (req==o.size()) ans++;
      |        ~~~^~~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...