# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
989741 | samek08 | Potatoes and fertilizers (LMIO19_bulves) | C++14 | 118 ms | 262144 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;
typedef long long ll;
typedef long double ld;
#define rep(a,b) for(int a = 0; a < (b); ++a)
#define all(t) t.begin(), t.end()
#define pb push_back
const int MAXN = 5e5+5, INF = 1e9+50;
const ll INF_L = (ll)1e18+(ll)50000;
int n;
int A[MAXN];
int B[MAXN];
int C[MAXN];
ll S[MAXN];
vector<ll> stan;
vector<vector<ll>> dp;
void solve()
{
cin >> n;
rep(i,n) cin >> A[i] >> B[i];
rep(i,n) C[i] = A[i]-B[i];
S[0] = C[0];
for(int i = 1; i < n; ++i) S[i] = S[i-1] + C[i];
set<ll> fg;
# | 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... |