Skip to content

Instantly share code, notes, and snippets.

View mizuhara's full-sized avatar

Masaya Mizuhara mizuhara

View GitHub Profile
#include <iostream>
#include <cstring>
#include <climits>
using namespace std;
constexpr int FIELD_SIZE = 5;
int field[FIELD_SIZE][FIELD_SIZE];
int memo[10][FIELD_SIZE][FIELD_SIZE];
#include <iostream>
#include <string>
#include <vector>
using namespace std;
const int size = 1100;
vector<int> sqrt_nums(const vector<bool> &v, int to)
{
package yhpg
import scala.math.BigInt
object Main extends App {
def makeStream(from: BigInt): Stream[BigInt] = from #:: makeStream(from + 1)
def isSquare(n: BigInt): Boolean = Math.pow(Math.round(Math.sqrt(n.toDouble)), 2) == n
def isCubic(n: BigInt): Boolean = Math.pow(Math.round(Math.cbrt(n.toDouble)), 3) == n
#include <iostream>
#include <set>
#include <string>
#include <vector>
#include <cassert>
using namespace std;
typedef pair<int, int> point_t;
typedef vector<vector<string>> board_t;
#include <iostream>
#include <vector>
#include <string>
#include <cassert>
#include <sstream>
using namespace std;
enum color { Red = 0, Green, Blue, };
// clang++ -stdlib=libc++ -std=c++1y raswi.cpp
#include <vector>
#include <string>
#include <numeric>
#include <iostream>
#include <functional>
#include <unordered_map>
using namespace std;
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <boost/lexical_cast.hpp>
using namespace std;
vector<string> split(string const& src, string const& separator)
{
#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;
trait FareChart {
def baseFare: Int
def baseDistance: Int
def extraFare: Int
}
class EnraiFareChart extends FareChart {
def baseFare: Int = 400
@mizuhara
mizuhara / aoj_ip1_11_b.cpp
Created July 12, 2015 05:46
An answer of AOJ ITP1_11_B & C
#include <queue>
#include <vector>
#include <string>
#include <cassert>
#include <iostream>
#include <algorithm>
enum class Direction
{
North = 0,