This file contains hidden or 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 <queue> | |
#include <regex> | |
#include <string> | |
#include <bitset> | |
#include <sstream> | |
#include <iostream> | |
#include <algorithm> | |
const int width = 8; | |
const int height = 8; |
This file contains hidden or 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 <set> | |
#include <regex> | |
#include <queue> | |
#include <vector> | |
#include <string> | |
#include <iostream> | |
#include <algorithm> | |
const std::size_t base = 16; |
This file contains hidden or 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
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
namespace Problem | |
{ | |
public interface IType | |
{ | |
bool IsStrongerThan (IType other); |
This file contains hidden or 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
START_POS = %w(a b c) | |
MAP = [ | |
[ 'ab', 'ac', 'ac', 'a', 'a', 'ab', 'a', '', 'a' ], | |
[ 'bc', 'b', 'ab', 'ab', 'bc', 'b', '', 'b', 'b' ], | |
[ 'c', 'bc', 'c', 'bc', 'ac', 'ac', 'c', 'c', '' ], | |
] | |
def can_goal(str, path) | |
return !str.empty? if (path.empty?) or (str.empty?) |
This file contains hidden or 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 <string> | |
#include <cstdlib> | |
#include <iostream> | |
#include <algorithm> | |
#include <unordered_map> | |
std::string nextRoot(const std::string & root, int sideway) | |
{ | |
static const std::unordered_map<std::string, std::string> um = { |
This file contains hidden or 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
using System; | |
using System.Linq; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
namespace ESM | |
{ | |
public interface IHand | |
{ |
This file contains hidden or 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 <string> | |
#include <numeric> | |
#include <iostream> | |
#include <algorithm> | |
constexpr size_t CHAIR_COUNTS = 8; | |
constexpr size_t OCCUPIED_STATE = 3; | |
void wait(std::vector<int>& chairs, size_t customer) |
This file contains hidden or 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 <queue> | |
#include <vector> | |
#include <string> | |
#include <cassert> | |
#include <iostream> | |
#include <algorithm> | |
enum class Direction | |
{ | |
North = 0, |
This file contains hidden or 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
trait FareChart { | |
def baseFare: Int | |
def baseDistance: Int | |
def extraFare: Int | |
} | |
class EnraiFareChart extends FareChart { | |
def baseFare: Int = 400 |
This file contains hidden or 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 <vector> | |
#include <iostream> | |
#include <algorithm> | |
#include <boost/range/algorithm_ext/erase.hpp> | |
bool is_remove_string(const std::string &s) | |
{ | |
const std::string not_remove_string = "wxyz/"; | |
return not_remove_string.find(s) == std::string::npos; |