이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
#define vii vector<int>
#define task "LAZY"
#define pll pair<ll, ll>
#define pii pair< pll, ll >
#define fi first
#define se second
using namespace std;
using ll = int;
using ull = unsigned long long;
const int N = 1e6+5;
const ll mod = 1e9+7;
const ll base1 = 1313;
const ll base2 = 3113;
ll m, n, k, t, T, ans, u, v, tong;
pll a[N], b[N];
vector<ll> kq;
vector<int> find_subset(int l, int u, vector<int> w)
{
n = w.size();
for(int i = 1; i <= n; i ++)
{
a[i].fi = w[i-1];
a[i].se = i;
}
sort(a+1, a+1+n);
int j = 1;
for(int i = 1; i <= n; i ++)
{
tong += a[i].fi;
if(tong > u)tong -= a[j].fi, ++j;
if(tong >= l)
{
for(int id = j; id <= i; id ++)kq.pb(a[id].se);
return kq;
}
}
return kq;
}
# | 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... |