# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
378360 | smjleo | Snowball (JOI21_ho_t2) | C++14 | 116 ms | 11216 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
#define int long long
#define nl '\n'
#define io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
mt19937 rng((unsigned)chrono::steady_clock::now().time_since_epoch().count());
const int mod = 1000000007, mod2 = 998244353;
// change this
const int N = 200005;
int n, q, x[N], w, ans[N];
signed main() {
io;
// cout << "COMPILED" << endl;
cin >> n >> q;
vector< pair<int, pair<int, int> > > inter;
for (int i=0; i<n; i++) {
cin >> x[i];
if (i) inter.push_back({x[i] - x[i-1], {i-1, i}});
}
sort(inter.begin(), inter.end());
int l = 0, r = 0, d = 0, j = 0, m = inter.size();
for (int i=0; i<q; i++) {
cin >> w;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |