제출 #95591

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
955912019-02-02 06:21:28lycGap (APIO16_gap)C++14
30 / 100
2076 ms11028 KiB
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> solve(ll s, ll t) {
//cout << s << " " << t << endl;
ll mn, mx;
MinMax(s, t, &mn, &mx);
vector<ll> v;
if (mn != -1) {
ll p = rand()%(mx-mn+1) + mn;
//cout << mn << " " << p << " " << mx << endl;
v.push_back(mn);
if (mn+1 <= p) {
vector<ll> a = solve(mn+1, p);
for (auto x : a) v.push_back(x);
}
if (p <= mx-1) {
vector<ll> b = solve(p, mx-1);
for (auto x : b) v.push_back(x);
}
v.push_back(mx);
}
return move(v);
}
long long findGap(int T, int N)
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:51:12: warning: unused variable 'arr' [-Wunused-variable]
         ll arr[N];
            ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...