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 <map> | |
#include <iostream> | |
#include <string> | |
int main() | |
{ | |
std::string input; | |
while (std::getline(std::cin, input)) | |
{ | |
std::map<char, std::pair<std::string, bool>> table = |
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 "gtest\gtest.h" | |
#include "Segment.h" | |
#include <iostream> | |
using namespace std; | |
void resize_pattern(const vector<char> &pattern, size_t size, vector<string> &result) | |
{ | |
result.resize(15,""); | |
result[0] += pattern[0]; |
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 <string> | |
#include <iostream> | |
using namespace std; | |
bool is_palindrome(const string & s) | |
{ | |
if (s.length() == 1) return true; | |
for (size_t i = 0; i < s.length() / 2; i++) if (s[i] != s[s.length() - 1 - i]) return false; |
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 "Dominos.h" | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int test_case_number; | |
cin >> test_case_number; | |
for (int i = 0; i < test_case_number; i++) |
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 <iostream> | |
#include <string> | |
#include "Checkerboard.h" | |
using namespace std; | |
Piece create_piece(const char c, const size_t ¤t_col, const size_t ¤t_row) | |
{ | |
if (c == 'p') return Piece(eCountry::BLACK, eRank::PAWN, current_col, current_row); | |
if (c == 'n') return Piece(eCountry::BLACK, eRank::KNIGHT, current_col, current_row); |
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 "DataTansfer.h" | |
#include <fstream> | |
#include <iostream> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sstream> | |
using namespace std; | |
void DataTransfer::read_data(string filename) |
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 <vector> | |
#include <iostream> | |
#include <algorithm> | |
#include <string> | |
using namespace std; | |
void put_data(const int &input_data, vector<int> &stack, vector<int> &queue, vector<int> &priority_queue) | |
{ | |
stack.push_back(input_data); |
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 <vector> | |
#include <array> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
#define EACH_TEST_CASE_DATA_NUMBER 10 | |
typedef vector<array<pair<string, int>, EACH_TEST_CASE_DATA_NUMBER>> test_case_struct; | |
typedef vector<vector<string>> result_struct; |
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 <stdio.h> | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <numeric> | |
using namespace std; | |
int main() | |
{ |
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 <iostream> | |
#include <string> | |
using namespace std; | |
void translated(const long long& input, string& output, bool flag = true); | |
void translated(const long long& input, string& output, bool flag) | |
{ | |
int kuti = input % 100; |