Submission #691657

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6916572023-01-31 11:26:36MateiKing80Simple (info1cup19_simple)C++14
0 / 100
300 ms8788 KiB
#include <iostream>
using namespace std;
struct sus
{
int maxpar=-1,minpar=-1,maximpar=-1,minimpar=-1,lazy=0;
}aint[400005];
int v[200005];
sus join(sus a, sus b)
{
sus x;
x.lazy=0;
if(a.maxpar==-1)
{
x.maxpar=b.maxpar;
x.minpar=b.minpar;
}
else if(b.maxpar==-1)
{
x.maxpar=a.maxpar;
x.minpar=a.minpar;
}
else
x.maxpar=max(a.maxpar,b.maxpar),x.minpar=min(a.minpar,b.minpar);
if(a.maximpar==-1)
{
x.maximpar=b.maximpar;
x.minimpar=b.minimpar;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

subway.cpp: In function 'sus join(sus, sus)':
subway.cpp:38:1: warning: no return statement in function returning non-void [-Wreturn-type]
   38 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...