# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
159202 | Bilyana | Arranging Shoes (IOI19_shoes) | C++17 | 240 ms | 142848 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<iostream>
#include<queue>
#include<cmath>
using namespace std;
const long long MAXN = 200000;
long long n, to[MAXN+10], from[MAXN+10];
queue<long long> bs[MAXN+10];
long long fw[MAXN+10];
long long counter=0;
void find_place(vector<int> S)
{
long long curr = 0;
long long temp;
for (long long i=0; i<n; i++)
{
temp = abs(S[i]);
if (S[i]>0)
{
if (!bs[temp].empty() && bs[temp].front()%2==0)
{
to[i] = bs[temp].front()+1;
bs[temp].pop();
}
else
{
to[i] = curr+1;
bs[temp].push(curr+1);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |