# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198103 | model_code | Building Skyscrapers (CEOI19_skyscrapers) | C++17 | 2782 ms | 324140 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.
/* Constructs the minimum required grid graph.
Tracks connected components using union-find.
Decides which cells may be deleted based on neighbourhoods,
updates that information when necessary and keeps these cells
in a set<>.
O(N log N)
*/
#include <bits/stdc++.h>
using namespace std;
class HashPair {
static inline size_t hash_combine(size_t h_first, size_t h_second) {
return h_first ^ (h_second + 0x9e3779b9 + (h_first << 6) + (h_second >> 2));
}
static inline size_t hash_int(unsigned int x) {
x = ((x >> 16) ^ x) * 0x45d9f3b;
x = ((x >> 16) ^ x) * 0x45d9f3b;
x = (x >> 16) ^ x;
return x;
}
public:
size_t operator() (const pair<int, int> & p) const {
size_t h_first = hash_int(p.first);
size_t h_second = hash_int(p.second);
return hash_combine(h_first, h_second);
}
};
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |