# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198535 | Andrei_Cotor | Restore Array (RMI19_restore) | C++14 | 92 ms | 1020 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<vector>
#include<deque>
using namespace std;
int Nr0[5005]; //cate valori 0 am in [1,i]
int NrInQ[5005],InQ[5005];
vector<pair<int,int> > A[5005]; //(x,y,c) = Nr0[y]<=Nr0[x]+c
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n,m;
cin>>n>>m;
for(int i=1; i<=m; i++)
{
int st,dr,k,val;
cin>>st>>dr>>k>>val;
st++;
dr++;
if(val==0)
A[dr].push_back({st-1,-k});
else
# | 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... |