# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
100098 | 2019-03-09T08:27:12 Z | SomeoneUnknown | Roller Coaster Railroad (IOI16_railroad) | C++14 | 2000 ms | 4244 KB |
#include "railroad.h" #include <bits/stdc++.h> using namespace std; long long plan_roller_coaster(vector<int> s, vector<int> t) { long long tal = 0; int p2[s.size()]; for(int i = 0; i < s.size(); i++){ p2[i] = i; } do{ long long p = 1; long long subtal = 0; for(int i = 0; i < s.size(); i++){ subtal += max(0LL, p-s[p2[i]]); p = t[p2[i]]; } }while(next_permutation(p2, p2+s.size())); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | answer is not correct: 140728684956720 instead of 0 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | answer is not correct: 140728684956720 instead of 0 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2048 ms | 4244 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | answer is not correct: 140728684956720 instead of 0 |
2 | Halted | 0 ms | 0 KB | - |