Last active
April 11, 2017 03:38
-
-
Save rdbuf/c7028410c22aed66c7ac5c0ccf4baa14 to your computer and use it in GitHub Desktop.
Solution template for GCJ problems.
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
/* Don't overcomplicate. */ | |
/* Don't construct unnecessary objects. */ | |
/* Stack is for everything. */ | |
#include <bits/stdc++.h> | |
#include <experimental/optional> | |
#include <experimental/any> | |
using namespace std; | |
using namespace std::experimental; | |
using i8 = int_fast8_t; | |
using i16 = int_fast16_t; | |
using i32 = int_fast32_t; | |
using i64 = int_fast64_t; | |
using u8 = uint_fast8_t; | |
using u16 = uint_fast16_t; | |
using u32 = uint_fast32_t; | |
using u64 = uint_fast64_t; | |
using st = size_t; | |
const std::string nl = "\n"; | |
// std::uniform_int_distribution<size_t> random{0, N}; | |
// std::mt19937_64 rng{static_cast<u64>(std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count())}; | |
// IMPLEMENT ME | |
using input_t = vector<vector<u16>>; | |
using output_t = vector<u16>; | |
istream& operator>>(istream& is, input_t& arg) | |
{ | |
// IMPLEMENT ME | |
return is; | |
} | |
ostream& operator<<(ostream& os, const output_t& arg) | |
{ | |
// IMPLEMENT ME | |
return os; | |
} | |
int main(int argc, char** argv) | |
{ | |
std::ios_base::sync_with_stdio(0), std::cin.tie(nullptr); | |
st T; | |
cin >> T; | |
vector<input_t> input(T); | |
for (auto& a : input) | |
{ | |
// IMPLEMENT ME | |
cin >> a; | |
} | |
auto solve = [](const input_t& in) -> output_t | |
{ | |
// IMPLEMENT ME | |
output_t out{}; | |
return out; | |
}; | |
vector<future<output_t>> pool(T); | |
for (st i = 0; i < T; ++i) | |
pool[i] = async(solve, ref(input[i])); | |
for (st i = 0; i < T; ++i) | |
cout << "Case #" << i+1 << ": " << pool[i].get() << nl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment