摘要:
declval作用:返回模板参数类型的右值引用 decltype作用:起别名 #include <utility> using namespace std; class A{}; class B{ public: A m; } decltype(declval<B>().m) n1; 阅读全文
摘要:
常用: using T = typename remove_reference<decltype(*declval<it>())>::type; template <typename T> class remove_reference { public: typedef T type; }; tem 阅读全文
摘要:
A. Gregor and Cryptography 构造... #include <bits/stdc++.h> #define all(a) a.begin(),a.end() #define pb push_back using namespace std; using ll = long l 阅读全文
摘要:
A. Cherry 贪心 #include <bits/stdc++.h> #define all(a) a.begin(),a.end() #define pb push_back using namespace std; using ll = long long ; int test(int n 阅读全文