Submission #986596

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9865962024-05-20 20:37:25activedeltorreInterval Collection (CCO20_day2problem2)C++14
18 / 25
7055 ms337428 KiB
#include <iostream>
#include <vector>
#include <set>
#include <map>
#pragma GCC optimize("Ofast,unroll-loops")
using namespace std;
struct ura
{
int a,b;
};
vector<ura>vec;
const int nmax=1000005;
int aint[nmax*4];
int aint2[nmax*4];
int inf=1e9+5;
int inter(int i,int j)
{
return max(0,min(vec[i].b,vec[j].b)-max(vec[i].a,vec[j].a));
}
int reun(int i,int j)
{
return max(vec[i].b,vec[j].b)-min(vec[i].a,vec[j].a);
}
int distsol,cost;
multiset<int>lfend;
multiset<int>rgend;
/// qr1 pe partea dreapta
struct undos
{
int unde,pozupdate,delacat;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In function 'void add(ura)':
Main.cpp:121:9: warning: unused variable 'sol' [-Wunused-variable]
  121 |     int sol=inf,cost=inf,supra=inf,nosupra=inf,supra1=inf,nosupra1=inf;
      |         ^~~
Main.cpp:121:17: warning: unused variable 'cost' [-Wunused-variable]
  121 |     int sol=inf,cost=inf,supra=inf,nosupra=inf,supra1=inf,nosupra1=inf;
      |                 ^~~~
Main.cpp: In function 'void dfsdnc(int, int, int)':
Main.cpp:186:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<ura>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  186 |     for(int j=0;j<vectorus[curr].size();j++)
      |                 ~^~~~~~~~~~~~~~~~~~~~~~
Main.cpp:200:22: warning: comparison of integer expressions of different signedness: 'std::vector<undos>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  200 |     while(oper.size()>number)
      |           ~~~~~~~~~~~^~~~~~~
Main.cpp: In function 'int main()':
Main.cpp:207:13: warning: unused variable 'j' [-Wunused-variable]
  207 |     int n,i,j,k,l,r,z;
      |             ^
Main.cpp:207:15: warning: unused variable 'k' [-Wunused-variable]
  207 |     int n,i,j,k,l,r,z;
      |               ^
Main.cpp:207:21: warning: unused variable 'z' [-Wunused-variable]
  207 |     int n,i,j,k,l,r,z;
      |                     ^
#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...