Pagini recente » Cod sursa (job #2897142) | Cod sursa (job #2893063) | Cod sursa (job #2846122) | Cod sursa (job #922773) | Cod sursa (job #2168290)
#include <fstream>
using namespace std;
ifstream in("heapuri.in");
ofstream out("heapuri.out");
int *H=new int[200010];
inline int father(int nod)
{
return nod/2;
}
inline int left_son(int nod)
{
return nod*2;
}
inline int right_son(int nod)
{
return nod*2+1;
}
void sift(int nod)
{
int son;
while(left_son(nod)<=N)
{
son=left_son(k);
if(right_son(nod)<=N&&H[right_son(nod)]>son) son=right_son(nod);
}
}
int main()
{
int n, op, x;
for(int i=0;i<n;i++)
{
in>>op;
if(op==1)
{
}
else if(op==2)
{
}
else
{
}
}
return 0;
}