# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
396924 | AQT | Snowball (JOI21_ho_t2) | C++14 | 1 ms | 332 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 <bits/stdc++.h>
using namespace std;
int N, Q;
long long x[200005];
long long w[200005];
long long d[200005];
long long lft[200005], rht[200005];
long long ans[200005];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> N >> Q;
for(int i = 1; i <= N; i++){
cin >> x[i];
}
for(int i = 1; i <= Q; i++){
cin >> d[i];
d[i] += d[i-1];
}
for(int i = 1; i <= Q; i++){
if(d[i] < 0){
rht[i] = -d[i];
}
else{
lft[i] = d[i];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |