# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
203458 | alexandra_udristoiu | Restore Array (RMI19_restore) | C++14 | 146 ms | 1400 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<iostream>
#include<queue>
#include<vector>
#define f first
#define s second
using namespace std;
int n, m, i, x, y, t, val, nod, vecin;
int num[5005], sol[5005], viz[5005], sum[5005];
pair<int, int> d[5005];
queue<int> c;
struct str{
int x, minim, maxim;
};
vector<str> v[5005];
int verif(int x){
if(sum[x] < d[x].f || sum[x] > d[x].s){
return 0;
}
for(int i = 0; i < v[x].size(); i++){
int y = v[x][i].x;
if(y > x){
continue;
}
if(sum[x] - sum[y] < v[x][i].minim || sum[x] - sum[y] > v[x][i].maxim){
return 0;
}
}
return 1;
}
int main(){
Compilation message (stderr)
# | 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... |