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
"http://d.hatena.ne.jp/osyo-manga/20140121/1390309901 | |
"元との違いはカーソル下が記号の場合、空白区切りの単位でハイライトするようにしたこと | |
" 1 が設定されていれば有効になる | |
let g:enable_highlight_cursor_word = 1 | |
augroup highlight-cursor-word | |
autocmd! | |
autocmd CursorMoved * call s:hl_cword() | |
autocmd ColorScheme * highlight CursorWord gui=underline guifg=#aa2222 |
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
-- 与えられた座標列のn階差分商を求める関数 | |
diffmethod :: [(Double, Double)] -> Double | |
diffmethod [x0] = snd x0 | |
diffmethod [x0,x1] = (snd x1 - snd x0) / (fst x1 - fst x0) | |
diffmethod lst = (diffmethod (tail lst) - diffmethod (init lst)) | |
/ (fst (last lst) - fst (head lst)) | |
-- 第一引数に与えられた座標列から第二引数のy座標を補完し返す関数 | |
newtonPoly :: [(Double, Double)] -> Double -> Double | |
newtonPoly [] _ = 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
"http://d.hatena.ne.jp/osyo-manga/20140121/1390309901 | |
"上記のサイトのコードをカーソル下が記号列でも割と動くように改良 | |
" 1 が設定されていれば有効になる | |
" let g:enable_highlight_cursor_word = 0 | |
let g:enable_highlight_cursor_word = 1 | |
augroup highlight-cursor-word |
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
main = do | |
putStrLn $ a ++ " " ++ b where | |
a = "hello" | |
b = "world" | |
{- | |
以下どちらも嫌 | |
main = do | |
putStrLn $ a ++ " " ++ b |
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 $SSH_ASKPASS = simplify($VIM . '/../../MacOS') . '/macvim-askpass' | |
set noimdisable | |
set imdisableactivate | |
if has('gui_macvim') | |
set guioptions-=T | |
set showtabline=0 | |
set imdisable " IME OFF | |
set guioptions-=T " ツールバー非表示 |
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
set nocompatible | |
set hidden | |
filetype off | |
set autoread | |
set noswapfile | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim | |
call neobundle#rc(expand('~/.vim/bundle')) | |
endif |
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> | |
#define ITEM 128 | |
int Item[ITEM + 1][4]; | |
void ZAQ(int item, int grade, int prise, int MAX){ | |
int i; | |
for (i = 0; i < item; i++){ | |
if (Item[i][3] == 0 && grade + Item[i][1] <= MAX){ | |
Item[i][3] = 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
#include<stdio.h> | |
#define MAX 128 | |
int Item[MAX][2]; | |
int n; //アイテムの数 | |
int total = 0; //総額の最大値 | |
int maxSize; //ナップサックのサイズ | |
void knapsack(int tmpSumSize, int tmpSumPrice, int count){ | |
int i; | |
//count番目から初めて、重複したものを探さないようにする。 |
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> | |
int main(void){ | |
int n; | |
int i,j; | |
int max; //最大サイズ | |
int sum = 0; //総価値を覚える | |
int tmps = 0; //サイズの和 | |
int tmpw = 0; //価値の和 | |
int item[64][2]; | |
printf("n = "); |
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
set nocompatible | |
set hidden | |
filetype off | |
set autoread | |
set noswapfile | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim | |
call neobundle#rc(expand('~/.vim/bundle')) | |
endif |