View abc062-d.py
import heapq
N = int(input())
a = list(map(int, input().split()))
left = []
for i in a[:N]:
heapq.heappush(left, i)
right = []
for i in a[(2 * N):(3 * N)]:
heapq.heappush(right, -i)
View abc062-a.rb
g1 = [1,3,5,7,8,10,12]
g2 = [4,6,9,11]
g3 = [2]
x, y = gets.chomp.split(" ").map(&:to_i)
if (g1.include?(x) && g1.include?(y)) || (g2.include?(x) && g2.include?(y)) || (g3.include?(x) && g3.include?(y)) then
puts "Yes"
else
puts "No"
end
View abc061-a.rb
a, b, c = gets.chomp.split(" ").map(&:to_i)
if c >= a && c <= b then
puts "Yes"
else
puts "No"
end
View cf414-a.rb
a, b, c = gets.chomp.split(" ").map(&:to_i)
n = gets.chomp.to_i
xx = gets.chomp.split(" ").map(&:to_i)
ret = 0
xx.each do |x|
if x > b && x < c then
ret += 1
View ant-2-1-p35.cpp
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
const int MAX_N = 100;
const int MAX_M = 100;
int N, M;
View cf412-div2-a.rb
n = gets.chomp.to_i
ratings = []
n.times do
a, b = gets.chomp.split(" ").map(&:to_i)
if a != b then
puts "rated"
exit
else
View agc014-a.rb
a, b, c = gets.chomp.split(" ").map(&:to_i)
ret = 0
while true
break if a.odd? || b.odd? || c.odd?
if ret > 30 then
puts -1
exit
end
aa = (b + c) / 2
View ant-2-1-p34.cpp
#include <iostream>
#include <algorithm>
using namespace std;
const int MAX_N = 20;
int n, k;
int a[MAX_N];
View ant-1-6-p23.cpp
#include <iostream>
#include <algorithm>
using namespace std;
const int MAX_N = 10 ^ 6;
int N;
int L, n;
int x[MAX_N];
View ant-1-6-p21.cpp
#include <cstdio>
#include <algorithm>
using namespace std;
const int MAX_N = 50;
int n, a[MAX_N];
void solve(){