# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
951189 | 2024-03-21T10:22:37 Z | Trisanu_Das | Fountain Parks (IOI21_parks) | C++17 | 51 ms | 9908 KB |
#include "parks.h" #include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) #define trav(a,v) for(auto a:v) typedef long long int lld; #define INF 1000000000000000LL vector<pair<int,int> >V; int construct_roads(std::vector<int> x, std::vector<int> y) { rep(i,0,y.size())V.push_back({y[i],i}); sort(V.begin(),V.end()); std::vector<int> u, v, a, b; rep(i,0,V.size()){ if(i<V.size()-1 && V[i].first!=V[i+1].first-2){ return 0; } if(i<V.size()-1){ u.push_back(V[i].second); v.push_back(V[i+1].second); a.push_back(3); b.push_back(V[i].first+1); } } build(u, v, a, b); return 1; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 48 ms | 9880 KB | Output is correct |
10 | Correct | 5 ms | 1372 KB | Output is correct |
11 | Correct | 22 ms | 5420 KB | Output is correct |
12 | Correct | 7 ms | 1884 KB | Output is correct |
13 | Correct | 8 ms | 2512 KB | Output is correct |
14 | Correct | 1 ms | 344 KB | Output is correct |
15 | Correct | 1 ms | 348 KB | Output is correct |
16 | Correct | 47 ms | 9908 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 48 ms | 9880 KB | Output is correct |
10 | Correct | 5 ms | 1372 KB | Output is correct |
11 | Correct | 22 ms | 5420 KB | Output is correct |
12 | Correct | 7 ms | 1884 KB | Output is correct |
13 | Correct | 8 ms | 2512 KB | Output is correct |
14 | Correct | 1 ms | 344 KB | Output is correct |
15 | Correct | 1 ms | 348 KB | Output is correct |
16 | Correct | 47 ms | 9908 KB | Output is correct |
17 | Incorrect | 0 ms | 348 KB | Solution announced impossible, but it is possible. |
18 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 48 ms | 9880 KB | Output is correct |
10 | Correct | 5 ms | 1372 KB | Output is correct |
11 | Correct | 22 ms | 5420 KB | Output is correct |
12 | Correct | 7 ms | 1884 KB | Output is correct |
13 | Correct | 8 ms | 2512 KB | Output is correct |
14 | Correct | 1 ms | 344 KB | Output is correct |
15 | Correct | 1 ms | 348 KB | Output is correct |
16 | Correct | 47 ms | 9908 KB | Output is correct |
17 | Incorrect | 0 ms | 348 KB | Solution announced impossible, but it is possible. |
18 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 48 ms | 9880 KB | Output is correct |
10 | Correct | 5 ms | 1372 KB | Output is correct |
11 | Correct | 22 ms | 5420 KB | Output is correct |
12 | Correct | 7 ms | 1884 KB | Output is correct |
13 | Correct | 8 ms | 2512 KB | Output is correct |
14 | Correct | 1 ms | 344 KB | Output is correct |
15 | Correct | 1 ms | 348 KB | Output is correct |
16 | Correct | 47 ms | 9908 KB | Output is correct |
17 | Incorrect | 0 ms | 348 KB | Solution announced impossible, but it is possible. |
18 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 48 ms | 9880 KB | Output is correct |
10 | Correct | 5 ms | 1372 KB | Output is correct |
11 | Correct | 22 ms | 5420 KB | Output is correct |
12 | Correct | 7 ms | 1884 KB | Output is correct |
13 | Correct | 8 ms | 2512 KB | Output is correct |
14 | Correct | 1 ms | 344 KB | Output is correct |
15 | Correct | 1 ms | 348 KB | Output is correct |
16 | Correct | 47 ms | 9908 KB | Output is correct |
17 | Incorrect | 51 ms | 7856 KB | Solution announced impossible, but it is possible. |
18 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 48 ms | 9880 KB | Output is correct |
10 | Correct | 5 ms | 1372 KB | Output is correct |
11 | Correct | 22 ms | 5420 KB | Output is correct |
12 | Correct | 7 ms | 1884 KB | Output is correct |
13 | Correct | 8 ms | 2512 KB | Output is correct |
14 | Correct | 1 ms | 344 KB | Output is correct |
15 | Correct | 1 ms | 348 KB | Output is correct |
16 | Correct | 47 ms | 9908 KB | Output is correct |
17 | Incorrect | 0 ms | 348 KB | Solution announced impossible, but it is possible. |
18 | Halted | 0 ms | 0 KB | - |