# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
241130 | LucaDantas | Deda (COCI17_deda) | C++17 | 113 ms | 6904 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;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
namespace utils{
constexpr bool use_stdio = false;
ostream* out = &cout;
FILE* stdio_out = stdout;
const bool __ = [](){ if constexpr(!use_stdio){ ios_base::sync_with_stdio(false); cin.tie(nullptr);
cout << fixed; cout << setprecision(12); cerr << fixed; cerr << setprecision(12); } return true; }();
template<typename ...> using to_void = void;
template<typename T, typename = void> struct is_container : false_type {};
template<typename T> struct is_container<T, to_void<decltype(declval<T>().begin()), decltype(declval<T>().end())>> : true_type {};
inline void rd(int& x) { if constexpr(use_stdio) scanf("%d", &x); else cin >> x; }
inline void rd(long long& x) { if constexpr(use_stdio) scanf("%lld", &x); else cin >> x; }
inline void rd(double& x) { if constexpr(use_stdio) scanf("%lf", &x); else cin >> x; }
inline void rd(long double& x) { if constexpr(use_stdio){ double y; scanf("%lf", &y); x=y; } else cin >> x; }
inline void rd(char& x) { if constexpr(use_stdio) scanf(" %c", &x); else cin >> x; }
inline void rd(char* x) { if constexpr(use_stdio) scanf("%s", x); else cin >> x; }
inline void rd(string& x) { if constexpr(use_stdio) assert(false); else cin >> x; }
template<typename T, typename enable_if<!use_stdio && is_integral<T>::value>::type* = nullptr> inline void rd(T& x) { cin >> x; }
template<typename T> inline void rd(T* x);
template<typename T, typename enable_if<is_container<T>::value>::type* = nullptr> inline void rd(T& x);
template<typename... Ts> inline void rd(tuple<Ts...>& x);
template<typename T, typename U> inline void rd(pair<T, U>& x) { rd(x.first); rd(x.second); }
template<typename T, typename enable_if<is_container<T>::value>::type* = nullptr> inline void rd(T& x) { for(auto& v : x) rd(v); }
template<typename T, typename U, typename... Ts> inline void rd(T&& t, U&& u, Ts&&... ts) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |