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> | |
using namespace std; | |
int main (){ | |
int a, b; | |
while (cin >> a >> b) { | |
cout << a + b << endl; | |
} | |
return 0; | |
} |
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
using namespace std; | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <sstream> | |
#include <fstream> | |
#include <cassert> | |
#include <climits> | |
#include <cstdlib> | |
#include <cstring> |
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
description "nginx http daemon" | |
start on runlevel [2] | |
stop on runlevel [016] | |
env NGINX_BIN=/usr/sbin/nginx | |
console owner | |
pre-start exec $NGINX_BIN -t |
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
// Code written by Andrés Mejía | |
using namespace std; | |
#include <iostream> | |
#include <vector> | |
#include <set> | |
int main(){ | |
int n, m; | |
while (cin >> n >> m) { | |
if (n == 0 and m == 0) break; |
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
using namespace std; | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <numeric> | |
#include <sstream> | |
#include <fstream> | |
#include <cassert> | |
#include <climits> | |
#include <cstdlib> |
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
using namespace std; | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <numeric> | |
#include <sstream> | |
#include <fstream> | |
#include <cassert> | |
#include <climits> | |
#include <cstdlib> |
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
// Problem statement: http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1747 | |
using namespace std; | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <numeric> | |
#include <sstream> | |
#include <fstream> | |
#include <cassert> |
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
// Problem statement: http://livearchive.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1519 | |
using namespace std; | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <numeric> | |
#include <sstream> | |
#include <fstream> | |
#include <cassert> |
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
ruby-1.9.2-p290 :005 > Norman.welcome_email | |
NoMethodError: undefined method `asdf?' for nil:NilClass | |
from /Users/wack-a-mole/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/whiny_nil.rb:48:in `method_missing' | |
from /private/tmp/bang/app/mailers/norman.rb:5:in `welcome_email' | |
from /Users/wack-a-mole/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/base.rb:167:in `process_action' | |
from /Users/wack-a-mole/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/base.rb:121:in `process' | |
from /Users/wack-a-mole/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/rendering.rb:45:in `process' | |
from /Users/wack-a-mole/.rvm/gems/ruby-1.9.2-p290/gems/actionmailer-3.1.3/lib/action_mailer/old_api.rb:65:in `process' | |
from /Users/wack-a-mole/.rvm/gems/ruby-1.9.2-p290/gems/actionmailer-3.1.3/lib/action_mailer/base.rb:474:in `process' | |
from /Users/wack-a-mole/.rvm/gems/ruby-1.9.2-p290/gems/actionmailer-3.1.3/lib/action_mailer/base.rb:469:in `i |
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
#!/usr/bin/env ruby | |
require 'scanf' | |
if ARGV.size < 3 | |
puts "Usage: #{__FILE__} <testdata.in> <program.out> <testdata.out>" | |
exit 1 | |
end | |
def wrong_answer(reason) |