Created
January 14, 2019 15:31
-
-
Save asi1024/b0b440ea21fd4998bcc71ceebc2bf0aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "../../lib/template/template.cpp" | |
{% if mod %} #include "../../lib/types/mod.cpp" {% endif %} | |
{% if mod %} using Mod = Modulo<{{ mod }}>; {% endif %} | |
{% if yes_str and no_str %} | |
struct yes_no : std::numpunct<char> { | |
string_type do_truename() const { return "{{ yes_str }}"; } | |
string_type do_falsename() const { return "{{ no_str }}"; } | |
}; | |
struct Initialize { | |
Initialize() { | |
std::locale loc(std::locale(), new yes_no); | |
std::cout << std::boolalpha << std::setprecision(11) << std::fixed; | |
std::cout.imbue(loc); | |
} | |
}; | |
const Initialize initialize; | |
{% endif %} | |
{% if yes_str %} const string yes = "{{ yes_str }}"; {% endif %} | |
{% if no_str %} const string no = "{{ no_str }}"; {% endif %} | |
template<typename T> | |
vector<T> table(int n, T v) { return vector<T>(n, v); } | |
template <class... Args> | |
auto table(int n, Args... args) { | |
auto val = table(args...); | |
return vector<decltype(val)>(n, move(val)); | |
} | |
{% if input_part and actual_arguments %} | |
void solve({{formal_arguments}}) { | |
// FILL IN HERE. | |
} | |
int main() { | |
{{input_part}} | |
solve({{actual_arguments}}); | |
return 0; | |
} | |
{% else %} | |
int main() { | |
// FILL IN HERE. | |
return 0; | |
} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment