Submission #282489

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2824892020-08-24 13:07:06GREGOIRELCArranging Shoes (IOI19_shoes)C++14
65 / 100
137 ms71928 KiB
#include "shoes.h"
#include <cmath>
#include <iostream>
#include <queue>
using namespace std;
const int MAX_SHOES = 1e5 + 1;
const int T_MAX = 1 << 18;
const int MID = 1 << 17;
int lstType[MAX_SHOES];
int segTree[T_MAX];
queue<int> enCours[MAX_SHOES];
void addVal(int noeud, int deb, int fin, int curDeb, int curFin)
{
if(curDeb > fin || curFin < deb || curDeb > curFin)
{
return;
}
if(curDeb >= deb && curFin <= fin)
{
segTree[noeud]++;
return;
}
int mid = (curDeb + curFin) / 2;
addVal(noeud * 2, deb, fin, curDeb, mid);
addVal(noeud * 2 + 1, deb, fin, mid + 1, curFin);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...