# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1116353 | staszic_ojuz | Foehn Phenomena (JOI17_foehn_phenomena) | C++17 | 74 ms | 7108 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;
using ll = long long;
int main()
{
cin.tie(0);
ios_base::sync_with_stdio(0);
int n, q, s, t;
cin >> n >> q >> s >> t;
int pop, ter;
cin >> pop;
vector<int> roz;
for(int i = 0; i < n; ++i)
{
cin >> ter;
roz.push_back(ter - pop);
pop = ter;
}
roz.push_back(0);
ll odp = 0;
for(int i = 0; i < n; ++i)
{
if(roz[i] > 0)
odp -= s*roz[i];
else
odp -= t*roz[i];
}
for(int i = 0; i < q; ++i)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |