Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <set>
#include <map>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <set>
#include <map>
#include <algorithm>
#include <cassert>
#include <cmath>
- Turn 1 -
*----------*
|Pcs sasw >|
*----------*
The warrior rescued a cute cat. Good Job!
- Turn 2 -
*----------*
|P s sasw >|
- Turn 1 -
*----------*
|P sa >|
*----------*
The warrior walks East
- Turn 2 -
*----------*
| P sa >|
import Data.Char (toUpper)
import Control.Monad (liftM)
upper = map toUpper
main = do
putStrLn "Please enter your name: "
name <- liftM upper getLine
putStrLn $ "Hello " ++ name ++ " with liftM!"
@miaout17
miaout17 / SRM515-550-Correct.cpp
Created August 23, 2011 01:01
SRM515-550-Correct.cpp
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
@miaout17
miaout17 / config.yaml.erb
Created August 22, 2011 11:09
simple yaml+erb
production:
name: <%= name %>
password: <%= password %>
class A; end
class B; end
A.class_eval { Y=3 }
B.class_eval " Z=3 "
puts Object.const_defined? :Y #true
puts A.const_defined? :Y #false
puts Object.const_defined? :Z #false
puts B.const_defined? :Z #true
class A
end
puts A::Object
# tst.rb:3: warning: toplevel constant Object referenced by A::Object
# true