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 <iostream> | |
#include <cmath> | |
using namespace std; | |
const int M = 1e7+10; | |
bool isPrime[M]; | |
void sieve(){ | |
for(int i=2;i<M;i++) isPrime[i] = true; |
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 <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cmath> | |
using namespace std; | |
const int MAX = 1000000; | |
vector<int> Primes; | |
void sieve(){ |
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
function! HankakuSpace() | |
highlight HankakuSpace cterm=underline ctermfg=darkgrey gui=underline guifg=darkgrey | |
endfunction | |
if has('syntax') | |
augroup HankakuSpace | |
autocmd! | |
"ZenkakuSpaceをカラーファイルで設定するなら次の行は削除 | |
autocmd ColorScheme * call HankakuSpace() |
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
\documentclass{article} | |
\usepackage[a4paper,margin=3cm]{geometry} | |
\usepackage{euler} | |
\usepackage[no-math]{fontspec} | |
\usepackage{xltxtra} | |
\usepackage{listings} | |
\usepackage{graphicx} |
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
open Num | |
let num_of_float f = | |
let is_float_integer fl = | |
float_of_int((int_of_float fl)) = fl | |
in | |
let rec sub_num_of_float fl beg = | |
if is_float_integer fl then | |
num_of_int (int_of_float fl) // num_of_int beg | |
else |
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
let fizzbuzz n = | |
let rec sub_fizzbuzz x lis = | |
if x <= 0 then | |
lis | |
else | |
if x mod 15 = 0 then | |
sub_fizzbuzz (x-1) ("fizzbuzz"::lis) | |
else if x mod 3 = 0 then | |
sub_fizzbuzz (x-1) ("fizz"::lis) | |
else if x mod 5 = 0 then |
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 <stdio.h> | |
#include <stdlib.h> | |
typedef struct list_node { | |
int value; | |
struct list_node *next; | |
} *node; | |
typedef struct list_struct{ | |
node head; |
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 "hash.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include <math.h> | |
int hash_func(Hash hash,int key1,int key2); | |
int rehash_func(Hash hash,int gened_key); | |
void expand(Hash hash,size_t new_size); |
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 <stdio.h> | |
long long fibiter(long long a,long long b,long long p,long long q,long long count){ | |
if(count == 0){ | |
return b; | |
} | |
if(count % 2 == 0){ | |
return fibiter(a,b,(p*p+q*q),(2*p*q+q*q),(count/2)); | |
}else{ | |
return fibiter((b*q+a*q+a*p),(b*p+a*q),p,q,(count-1)); |
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
\documentclass{article} | |
\title{人間の記憶のメモリモデル} | |
\usepackage{xltxtra} | |
\setmainfont{VL Gothic} | |
\XeTeXlinebreaklocale "ja" | |
\author{*******TomokiImai} |
NewerOlder