Submission #926160

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9261602024-02-12 15:58:58knon0501Overtaking (IOI23_overtaking)C++17
19 / 100
7 ms15960 KiB
#include "overtaking.h"
#include <bits/stdc++.h>
using namespace std;
struct A{
long long l,r,t,i,j,mx;
bool operator <(const A& a)const{
return l<a.l;
}
};
long long t[1005][1005];
long long dp[1005][1005];
vector<A> a;
long long x;
long long l;
int n,m;
vector<int> s;
vector<long long> b;
int nn;
int g(long long x){
return lower_bound(b.begin(),b.end(),x) - b.begin();
}
long long seg[4000005];
void upd(int lef,int rig,int x,int y,long long k,int lev){
if(x>rig || lef>y || x>y)return;
if(x<=lef && rig<=y){
seg[lev]=max(seg[lev],k);
return;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

overtaking.cpp: In function 'void upd(int, int, int, int, long long int, int)':
overtaking.cpp:32:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   32 |     int mid=lef+rig>>1;
      |             ~~~^~~~
overtaking.cpp: In function 'void init(int, int, std::vector<long long int>, std::vector<int>, int, int, std::vector<int>)':
overtaking.cpp:70:19: warning: variable 'prv' set but not used [-Wunused-but-set-variable]
   70 |         long long prv = -1;
      |                   ^~~
overtaking.cpp:86:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   86 |     for(nn=1 ; nn<b.size() ;nn *=2);
      |                ~~^~~~~~~~~
overtaking.cpp:121:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<A>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  121 |     for(int i=1 ; i<a.size() ; i++){
      |                   ~^~~~~~~~~
#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...