Skip to content

Commit

Permalink
Move include and import statements to top
Browse files Browse the repository at this point in the history
  • Loading branch information
metopa committed Mar 17, 2018
1 parent 98656cf commit ac4239e
Show file tree
Hide file tree
Showing 431 changed files with 588 additions and 756 deletions.
3 changes: 1 addition & 2 deletions epi_judge_cpp/a_b_sqrt2.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#include "test_framework/generic_test.h"

using std::vector;

Expand All @@ -7,8 +8,6 @@ vector<double> GenerateFirstKABSqrt2(int k) {
return {};
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/absent_value_array.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <stdexcept>
#include <vector>

#include "test_framework/generic_test.h"
#include "test_framework/test_failure.h"

using std::invalid_argument;
Expand All @@ -20,8 +21,6 @@ int FindMissingElementWrapper(const vector<int>& stream) {
}
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/adding_credits.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <string>

#include "test_framework/fmt_print.h"
#include "test_framework/generic_test.h"
#include "test_framework/test_failure.h"

using std::string;
Expand Down Expand Up @@ -87,8 +88,6 @@ void ClientsCreditsInfoTester(const std::vector<Operation>& ops) {
}
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/advance_by_offsets.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#include "test_framework/generic_test.h"

using std::vector;

Expand All @@ -7,8 +8,6 @@ bool CanReachEnd(const vector<int>& max_advance_steps) {
return true;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/alternating_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <vector>

#include "test_framework/fmt_print.h"
#include "test_framework/generic_test.h"
#include "test_framework/test_failure.h"
#include "test_framework/timed_executor.h"

Expand Down Expand Up @@ -56,8 +57,6 @@ void RearrangeWrapper(TimedExecutor& executor, vector<int> A) {
CheckAnswer(A);
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/anagrams.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <string>
#include <vector>
#include "test_framework/generic_test.h"

using std::string;
using std::vector;
Expand All @@ -9,8 +10,6 @@ vector<vector<string>> FindAnagrams(const vector<string>& dictionary) {
return {};
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/apply_permutation.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#include "test_framework/generic_test.h"

using std::vector;

Expand All @@ -12,8 +13,6 @@ vector<int> ApplyPermutationWrapper(vector<int> perm, vector<int> A) {
return A;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/arbitrage.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#include "test_framework/generic_test.h"

using std::vector;

Expand All @@ -7,8 +8,6 @@ bool IsArbitrageExist(vector<vector<double>> graph) {
return true;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
6 changes: 2 additions & 4 deletions epi_judge_cpp/binary_tree_node.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@

#pragma once

#include <list>
#include <memory>
#include <random>

#include "test_framework/binary_tree_utils.h"
#include "test_framework/test_utils_serialization_traits.h"

#pragma once

using std::unique_ptr;

template <typename T>
Expand Down
6 changes: 2 additions & 4 deletions epi_judge_cpp/binary_tree_with_parent_prototype.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

#pragma once

#include <memory>

#include "test_framework/binary_tree_utils.h"
#include "test_framework/test_utils_serialization_traits.h"

#pragma once

using std::unique_ptr;

template <typename T>
Expand Down
4 changes: 1 addition & 3 deletions epi_judge_cpp/binomial_coefficients.cc
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

#include "test_framework/generic_test.h"

int ComputeBinomialCoefficient(int n, int k) {
// Implement this placeholder.
return 0;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/bonus.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#include "test_framework/generic_test.h"

using std::vector;

Expand All @@ -7,8 +8,6 @@ int CalculateBonus(const vector<int>& productivity) {
return 0;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/bst_from_preorder.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <memory>

#include "bst_node.h"
#include "test_framework/generic_test.h"

using std::unique_ptr;
using std::vector;
Expand All @@ -11,8 +12,6 @@ unique_ptr<BstNode<int>> RebuildBSTFromPreorder(
return nullptr;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/bst_from_sorted_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "bst_node.h"
#include "test_framework/binary_tree_utils.h"
#include "test_framework/generic_test.h"
#include "test_framework/test_failure.h"
#include "test_framework/timed_executor.h"

Expand All @@ -26,8 +27,6 @@ int BuildMinHeightBSTFromSortedArrayWrapper(TimedExecutor& executor,
return BinaryTreeHeight(result);
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/bst_merge.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <memory>

#include "bst_prototype_shared_ptr.h"
#include "test_framework/generic_test.h"

using std::shared_ptr;

Expand All @@ -10,8 +11,6 @@ shared_ptr<BstNode<int>> MergeTwoBSTs(shared_ptr<BstNode<int>> A,
return nullptr;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
6 changes: 2 additions & 4 deletions epi_judge_cpp/bst_node.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

#pragma once

#include <memory>

#include "test_framework/binary_tree_utils.h"
#include "test_framework/test_utils_serialization_traits.h"

#pragma once

using std::unique_ptr;

template <typename T>
Expand Down
6 changes: 2 additions & 4 deletions epi_judge_cpp/bst_prototype_shared_ptr.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

#pragma once

#include <memory>

#include "test_framework/binary_tree_utils.h"
#include "test_framework/test_utils_serialization_traits.h"

#pragma once

using std::shared_ptr;

template <typename T>
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/bst_to_sorted_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <vector>

#include "bst_prototype_shared_ptr.h"
#include "test_framework/generic_test.h"
#include "test_framework/test_failure.h"
#include "test_framework/timed_executor.h"

Expand Down Expand Up @@ -32,8 +33,6 @@ std::vector<int> BSTToDoublyLinkedListWrapper(
return v;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/buy_and_sell_stock.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#include "test_framework/generic_test.h"

using std::vector;

Expand All @@ -7,8 +8,6 @@ double BuyAndSellStockOnce(const vector<double>& prices) {
return 0.0;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/buy_and_sell_stock_k_times.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#include "test_framework/generic_test.h"

using std::vector;

Expand All @@ -7,8 +8,6 @@ double BuyAndSellStockKTimes(const vector<double>& prices, int k) {
return 0.0;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/buy_and_sell_stock_twice.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#include "test_framework/generic_test.h"

using std::vector;

Expand All @@ -7,8 +8,6 @@ double BuyAndSellStockTwice(const vector<double>& prices) {
return 0.0;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/calendar_rendering.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <vector>

#include "test_framework/generic_test.h"
#include "test_framework/test_utils_serialization_traits.h"

using std::vector;
Expand All @@ -16,8 +17,6 @@ int FindMaxSimultaneousEvents(const vector<Event>& A) {
template <>
struct SerializationTraits<Event> : UserSerTraits<Event, int, int> {};

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/circular_queue.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

#include "test_framework/generic_test.h"
#include "test_framework/test_failure.h"
#include "test_framework/test_utils_serialization_traits.h"

Expand Down Expand Up @@ -79,8 +80,6 @@ void QueueTester(const std::vector<QueueOp>& ops) {
}
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
4 changes: 1 addition & 3 deletions epi_judge_cpp/closest_int_same_weight.cc
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

#include "test_framework/generic_test.h"

unsigned long ClosestIntSameBitCount(unsigned long x) {
// Implement this placeholder.
return 0;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
3 changes: 1 addition & 2 deletions epi_judge_cpp/collatz_checker.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#include "test_framework/generic_test.h"

using std::vector;

Expand All @@ -7,8 +8,6 @@ bool TestCollatzConjecture(int n) {
return false;
}

#include "test_framework/generic_test.h"

int main(int argc, char* argv[]) {
// The timeout is set to 15 seconds for each test case.
// If your program ends with TIMEOUT error, and you want to try longer time
Expand Down
Loading

0 comments on commit ac4239e

Please sign in to comment.