Submission #144308

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1443082019-08-16 15:30:11LyestriaRectangles (IOI19_rect)C++14
Compilation error
0 ms0 KiB
#include "rect.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int short
const int mn=2510;
struct seg{
int seg[mn][12];
inline void up(int a,int b){
seg[a][0]=b;
}
inline void init(){
for(int i=1;i<12;i++){
for(int j=0;j+(1<<i-1)<mn;j++){
seg[j][i]=min(seg[j][i-1],seg[j+(1<<i-1)][i-1]);
}
}
}
inline int qu(int a,int b){
int ret=0x3f3f3f3f;
for(int i=11;i>=0;i--){
if(a+(1<<i)<=b+1)ret=min(ret,seg[a][i]),a+=(1<<i);
}
return ret;
}
};
seg lef[mn],rig[mn],up[mn],dow[mn];
int elef[mn][mn],erig[mn][mn],eup[mn][mn],edow[mn][mn];
multiset<ll>ss;
long long hsh(ll a,ll b,ll c,ll d){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

rect.cpp: In member function 'void seg::init()':
rect.cpp:14:32: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
             for(int j=0;j+(1<<i-1)<mn;j++){
                               ~^~
rect.cpp:15:54: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
                 seg[j][i]=min(seg[j][i-1],seg[j+(1<<i-1)][i-1]);
                                                     ~^~
rect.cpp: In member function 'short int seg::qu(short int, short int)':
rect.cpp:20:17: warning: overflow in implicit constant conversion [-Woverflow]
         int ret=0x3f3f3f3f;
                 ^~~~~~~~~~
/tmp/ccjnnPzG.o: In function `main':
grader.cpp:(.text.startup+0x89e): undefined reference to `count_rectangles(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)'
collect2: error: ld returned 1 exit status