# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
230494 | AlexLuchianov | Gap (APIO16_gap) | C++14 | 88 ms | 8936 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 "gap.h"
#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;
using ll = long long;
ll const inf = 1000000000000000000;
long long findGap(int T, int N)
{
vector<ll> v;
if(T == 1){
long long* from = new long long(0);
long long* to = new long long(inf);
for(int i = 0;i < N; i += 2){
MinMax(*from, *to, from, to);
if(-1 == *from)
continue;
v.push_back(*from);
v.push_back(*to);
*from = *from + 1;
*to = *to - 1;
}
} else {
long long* from = new long long(0);
long long* to = new long long(inf);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |