# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
436669 | 2021-06-24T17:58:22 Z | PiejanVDC | Fountain Parks (IOI21_parks) | C++17 | 3 ms | 1704 KB |
#include "parks.h" #include <bits/stdc++.h> using namespace std; int construct_roads(vector<int>x, vector<int> y) { vector<pair<int,int>>z(y.size()); for(int i = 0 ; i < y.size() ; i++) z[i].first=y[i],z[i].second=i; sort(z.begin(),z.end()); for(int i = 1 ; i < y.size() ; i++) { if(z[i].first-z[i-1].first != 2) { return 0; } } vector<int>u(y.size()-1); vector<int>v(y.size()-1); vector<int>a(y.size()-1),b(y.size()-1); for(int i = 0 ; i < y.size()-2 ; i++) { u.push_back(z[i].second); v.push_back(z[i+1].second); a.push_back(z[i].second+1); b.push_back(z[i].second+1); } build(u,v,a,b); return 1; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 1704 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 1704 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 1704 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 1704 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 1704 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 1704 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |