View arc047-b.rb
N = gets.chomp.to_i
x = []
y = []
xx = []
yy = []
N.times do
x_, y_ = gets.chomp.split(" ").map(&:to_i)
x << x_
y << y_
xx << x_ + y_
View arc046-b.rb
n = gets.chomp.to_i
a, b = gets.chomp.split(" ").map(&:to_i)
if n <= a
puts "Takahashi"
else
if a == b
if n % (a + 1) == 0
puts "Aoki"
else
puts "Takahashi"
View arc044-b.rb
R = 10**9+7
N = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
if a[0] != 0
puts 0
exit
end
amax = a.max
h = Array.new(amax+1, 0)
a.each do |i|
View arc044-b.py
def main():
R = 10**9+7
N = int(input())
a = list(map(int, input().split(" ")))
if a[0] != 0:
return 0
amax = max(a)
h = [0] * (amax+1)
View arc043-b.rb
N = gets.chomp.to_i
d = []
N.times do
d << gets.chomp.to_i
end
d.sort!
R = 10**9 + 7
a = Array.new(N, 0)
i = N - 4
View arc042-b.rb
x0, y0 = gets.chomp.split(" ").map(&:to_f)
N = gets.chomp.to_i
points = []
N.times do
points << gets.chomp.split(" ").map(&:to_f)
end
points << points[0]
ans = (2<<17).to_f
View arc041-b-editorial.rb
# Editorial ver.
N, M = gets.chomp.split(" ").map(&:to_i)
@m = []
N.times do
@m << gets.chomp.split("").map(&:to_i)
end
@ans = Array.new(N){Array.new(M, 0)}
(N-2).times do |i|
View arc075-d.rs
use std::io;
use std::cmp;
fn gets() -> String {
let mut buf = String::new();
io::stdin().read_line(&mut buf).ok();
return buf
}
fn main() {
View abc075-a.rb
a, b, c = gets.chomp.split(" ").map(&:to_i)
if a == b
puts c
elsif b == c
puts a
else
puts b
end
View arc040-b.rb
N, R = gets.chomp.split(" ").map(&:to_i)
field = gets.chomp.split("")
i = field.rindex(".")
if i.nil?
puts 0
exit
else
ans = [i + 1 - R, 0].max
end