# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
73143 | Kmcode | Roller Coaster Railroad (IOI16_railroad) | C++14 | 1378 ms | 33500 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;
//#include "railroad.h"
map<int,long long int> mp;
long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) {
t.push_back(-1);
s.push_back(INT_MAX-3);
for(int i=0;i<s.size();i++){
mp[s[i]]++;
mp[t[i]]--;
}
long long int sum=0;
for(auto it:mp){
long long int add=sum;
sum-=it.second;
it.second-=add;
it.second+=sum;
cout<<add<<" "<<sum<<endl;
if(sum<0){
return 111;
}
}
for(auto it:mp){
if(it.second!=0){
return 222;
}
}
return 0;
}
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... |