This file contains 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 "a.hpp" | |
#include <cmath> | |
A::size_type find(const A &lhs, const A &rhs) { | |
if (lhs.n >= rhs.n) return 0; | |
else return A::npos; | |
} | |
A replace(const A &dest, const A &pattern, const A &rep) { | |
A::size_type count = dest.n / pattern.n; |
This file contains 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
# -*- coding: utf-8 -*- | |
Plugin.create(:tanzaku_filter) do | |
filter_show_filter do |msgs| | |
msgs = msgs.select {|m| | |
/(┏|★)(┷|┻)┓\n(┃[[:print:]]?┃\n)+┗━(┛|★)/.match(m.to_s) == nil | |
} | |
[msgs] | |
end | |
end |
This file contains 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
# encoding: utf-8 | |
require 'json' | |
require 'nkf' | |
require 'unf' | |
def func(name) | |
fx = name.gsub(/♂/u, "オス") | |
fx = fx.gsub(/♀/u, "メス") | |
fx = fx.gsub(/2/u, "ツー") | |
fx = fx.gsub(/Z/u, "ゼット") |
This file contains 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
[>]<[-]<[[>+>+<<-]>>[<<+>>-]<<<[>->>+<<<-]>[[-]>[<<+>>-]<]>[-]<<]+>+>+>[-]>----------[++++++++++[>]>>>>[>>>]+[<<<]<<[<]>[[>]>>>>[>>>]<<<<+>[<<<]<<[<]>-]<+>>----------]>----------[++++++++++[>]>>>>[>>>]>>>[>>>]+[<<<]<<<[<<<]<<[<]>[[>]>>>>[>>>]>>>[>>>]<<<<+>[<<<]<<<[<<<]<<[<]>-]<+>>----------]>[[>]>>>>[>>>]>>>[>>>]>>>[>>>>]+>+<[<<<<]<<[<<<]<<<[<<<]<<[<]>[[>]>>>>[>>>]>>>[>>>]>>>[>>>>]<<<<<+>[<<<<]<<[<<<]<<<[<<<]<<[<]>-]<+>>]>>>>[>>>]>>>[>>>]>>>[>>>>]+>+<<<<<[<<<<]>>>>->-<<<<<<<[<<<]<<<[<<<]<+<<[-]<[-]<[-]>>>>[->>>>[-<[>>+>>[>>>]>>>[>>>]>>>[>>>>]>>+<<<<<<[<<<<]<<[<<<]<<<[<<<]<-]>>[<<+>>-]>>[>>>]>>>[>>>]>>>[>>>>]<[<+>>>>-<<<-]<[>+<-]+>>>>[[-]<<<<-<<[<<<<]<<[<<<]<<<[<<<]>+>>[>>>]>>>[>>>]>>>[>>>>]>>]<<<<[->>+>>+>>[-<<->>]<<[-<<[<<<<]<<[<<<]>+<<<<[<<<]+[>>>]<<<->>>>>>[>>>]>>>[>>>>]<<]]<<[<<<<]<<[<<<]<<<[<<<]>[-<+>>>[>>>]>>>[>>>]>>>[>>>>]>[<+<<<<->]<+>+>+>[<->[>>>+<<<-]>[-]>[-]<<]>>>[<<<+>>>-]<<<<[-<[<<<<]<<<[<<<]>+<<<<[<<<]+[>>>]<<<->>>>>>[>>>]>>>>[>>>>]<<<]<[<<<<]<<<[<<<]<<<[<<<]>]<<[>+<[>>+<<-]]>>[<<+>>-]>>]<+>>[-< |
This file contains 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
[>]<[-]<[[>+>+<<-]>>[<<+>>-]<<<[>->>+<<<-]>[[-]>[<<+>>-]<]>[-]<<]+>+>+>[-]>----------[++++++++++[>]>>>>[>>>]+[<<<]<<[<]>[[>]>>>>[>>>]<<<<+>[<<<]<<[<]>-]<+>>----------]>----------[++++++++++[>]>>>>[>>>]>>>[>>>]+[<<<]<<<[<<<]<<[<]>[[>]>>>>[>>>]>>>[>>>]<<<<+>[<<<]<<<[<<<]<<[<]>-]<+>>----------]>[[>]>>>>[>>>]>>>[>>>]>>>[>>>>]+>+<[<<<<]<<[<<<]<<<[<<<]<<[<]>[[>]>>>>[>>>]>>>[>>>]>>>[>>>>]<<<<<+>[<<<<]<<[<<<]<<<[<<<]<<[<]>-]<+>>]>>>>[>>>]>>>[>>>]>>>[>>>>]+>+<<<<<[<<<<]>>>>->-<<<<<<<[<<<]<<<[<<<]<+<<[-]<[-]<[-]>>>>[->>>>[-<[>>+>>[>>>]>>>[>>>]>>>[>>>>]>>+<<<<<<[<<<<]<<[<<<]<<<[<<<]<-]>>[<<+>>-]>>[>>>]>>>[>>>]>>>[>>>>]<[<+>>>>-<<<-]<[>+<-]+>>>>[[-]<<<<-<<[<<<<]<<[<<<]<<<[<<<]>+>>[>>>]>>>[>>>]>>>[>>>>]>>]<<<<[->>+>>+>>[-<<->>]<<[-<<[<<<<]<<[<<<]>+<<<<[<<<]+[>>>]<<<->>>>>>[>>>]>>>[>>>>]<<]]<<[<<<<]<<[<<<]<<<[<<<]>[-<+>>>[>>>]>>>[>>>]>>>[>>>>]>[<+<<<<->]<+>+>+>[<->[>>>+<<<-]>[-]>[-]<<]>>>[<<<+>>>-]<<<<[-<[<<<<]<<<[<<<]>+<<<<[<<<]+[>>>]<<<->>>>>>[>>>]>>>>[>>>>]<<<]<[<<<<]<<<[<<<]<<<[<<<]>]<<[>+<[>>+<<-]]>>[<<+>>-]>>]<+>>[-< |
This file contains 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
# -*- coding:utf-8 | |
for i in 0..100 | |
puts "#{(2009 + 3*i).to_s}年にWindows#{(7 + i*(i+1)/2).to_s}が発売されます" | |
end |
This file contains 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
++++++++++[>+>+++>++++++<<<-]>>++>++++< | |
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<.> | |
.>. . . . .<. . .>. . . . .<. . .>. .<. .>. .<. . . . .>. .<.<.> | |
.>. .<. .>. .<. .>. .<. .>. .<. .>. .<. .>. . .<. . .>. . .<.<.> | |
.>. .<. .>. .<. .>. .<. .>. .<. .>. .<. .>. . . .<.>. . . .<.<.> | |
.>. . . . .<. . .>. . . . .<. . .>. .<. .>. .<.>. . .<.>. .<.<.> | |
.>. .<. . . . . .>. .<.>. .<. . .>. .<. .>. .<. .>.<. .>. .<.<.> | |
.>. .<. . . . . .>. .<. .>. .<. .>. .<. .>. .<. . . . .>. .<.<.> | |
.>. .<. . . . . .>. .<. .>. .<. .>. .<. .>. .<. . . . .>. .<.<.> | |
.>. .<. . . . . .>. .<. .>. .<. .>. .<. .>. .<. . . . .>. .<.<.> |
This file contains 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
++++++++++[>+>+++>+++++<<<-]>>++>----< | |
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<.> | |
. .>. . . . . . . .<. . .>. . . . . . . .<. . . . . .>. . .<. . .>. . .<. . . . . . .>. . .<. . . . . . . .>. . .<. . . . . . . . .>. . . . . . . . . . .<. . . .>. . . . . . . . . . .<. . . . . . . .>. . .<. . . . . . .<.> | |
. .>. . . . . . . . .<. .>. . . . . . . . .<. . . . .>. . .<. . .>. . . .<. . . . .>. . . .<. . . . . . .>. . . . .<. . . . . . .>. . . . . . . . . . . . .<. . .>. . . . . . . . . . .<. . . . . . .>. . . . .<. . . . . .<.> | |
. .>. . .<. . .>. . .<. .>. . .<. . .>. . .<. . . . .>. . .<. . .>. . . . .<. . .>. . . . .<. . . . . . .>. . . . .<. . . . . . .>. . .<. . . . . . .>. . .<. . .>. . . . . . . . . . .<. . . . . . .>. . . . .<. . . . . .<.> | |
. .>. . .<. . .>. . .<. .>. . .<. . .>. . .<. . . . .>. . .<. . .>. . . . . .<.>. . . . . .<. |
This file contains 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
int main() { | |
while(1){ | |
int h; | |
cin>>h; | |
if(!h)break; | |
vector<vector<int>> t(h,vector<int>(5)); | |
REP(i,h)REP(j,5)cin>>t[i][j]; | |
int pt=0; | |
while(1){ | |
bool ch=false; |
This file contains 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
#-*- coding: utf-8 | |
Plugin.create(:tanzaku) do | |
filter_gui_postbox_post do |gui_postbox| | |
buf = Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer | |
text = buf.text | |
str = "┏┷┓\n┃ ┃\n┃" | |
text.each_char {|char| str += char + "┃\n┃"} |