Skip to content

Instantly share code, notes, and snippets.

View orisano's full-sized avatar

Nao Yonashiro orisano

View GitHub Profile
/*************************************************************************
参考資料
http://ja.wikipedia.org/wiki/%E3%83%AD%E3%83%BC%E3%83%9E%E6%95%B0%E5%AD%97
**************************************************************************/
#include <assert.h>
#include <stdio.h>
#include <string.h>
int arabic_to_roman(int arabic, char *roman);
int check(int arabic, const char *roman);
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef tuple<int, int> duo;
const int dx[] = {0, 0, 1, -1, 1, 1, -1, -1};
const int dy[] = {1, -1, 0, 0, 1, -1, 1, -1};
const int Mod = 1000000000 + 0;
#coding:utf-8
import random
def is_prime(n):
i = 2
while i * i <= n:
if n % i == 0:
return False
i += 1
@orisano
orisano / 2015-yo-t1.cc
Created December 14, 2014 09:19
JOI2015予選
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef tuple<int, int> duo;
const int dx[] = {0, 0, 1, -1, 1, 1, -1, -1};
const int dy[] = {1, -1, 0, 0, 1, -1, 1, -1};
const int Mod = 1000000000 + 0;
#include <iostream>
using namespace std;
template<typename T>
inline T in(){ T x; cin >> x; return x; }
int main(){
const int x = in<int>();
const double y = in<double>();
@orisano
orisano / yosupo.js
Last active August 29, 2015 14:21
問題ページでソースコードをデベロッパーコンソールに貼り付けると、雑なフォームが出来上がります
(function(global){
var $comment_form, $chat_form, $user_id, $token, $comment, $text, $comment_submit, $chat_submit, $section;
var doc = global["document"];
function create_input(type, name, value){
var $dom = doc.createElement("input");
$dom.type = type;
$dom.name = name;
$dom.value = value;
@orisano
orisano / pck2012_1.c
Created November 11, 2012 13:30
PCK本戦1問目:後になって書いてみた編
#include <stdio.h>
enum {A, X, Y, Z, W, B, ERROR};
int map[6][2] = {
{X, Y},
{ERROR, Z},
{X, ERROR},
{W, B},
{B, Y},
{Y, X}
@orisano
orisano / pck2012_1.c
Created November 11, 2012 15:38
PCK本戦:後になって書いてみた編
#include <stdio.h>
enum {A, X, Y, Z, W, B, ERROR};
int map[6][2] = {
{X, Y},
{ERROR, Z},
{X, ERROR},
{W, B},
{B, Y},
{Y, X}
@orisano
orisano / pck2012_2.c
Created November 11, 2012 13:48
PCK本戦2問目:後になって書いてみた編
#include <stdio.h>
#define LIMIT (10000)
int main(void)
{
int n;
int mem[2][10000];
int ct;
int under_line;
@orisano
orisano / opencv_link.h
Created May 8, 2013 16:52
OpenCVのリンクを楽にするためのヘッダファイル