problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k ⌀ | fixed_code stringlengths 12 526k ⌀ | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M ⌀ | fixed_submission_id int64 2 1.54M ⌀ | user_id stringlengths 10 10 ⌀ | language stringclasses 9
values |
|---|---|---|---|---|---|---|---|
p02772 | n = gets.chomp.to_i
array = gets.chomp.split(' ').map(&:to_i)
for i in 0..(n - 1)
if (array[i] % 2 == 0) && (array[i] % 3 != 0 && array[i] % 5 != 0)
isApproved = false
break
end
end
if isApproved
puts 'APPROVED'
else
puts 'DENIED'
end | n = gets.chomp.to_i
array = gets.chomp.split(' ').map(&:to_i)
isApproved = true
for i in 0..(n - 1)
if (array[i] % 2 == 0) && (array[i] % 3 != 0 && array[i] % 5 != 0)
isApproved = false
break
end
end
if isApproved
puts 'APPROVED'
else
puts 'DENIED'
end | [
"assignment.add"
] | 569,236 | 569,237 | u704658587 | ruby |
p02772 | gets
puts gets.split.map(&:to_i).all?{|e|e%2==1 || (e%3==0 && e%5==0)} ? "APPROVED" : "DENIED" | gets
puts gets.split.map(&:to_i).all?{|e|e%2==1 || (e%3==0 || e%5==0)} ? "APPROVED" : "DENIED" | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 569,585 | 569,586 | u926099741 | ruby |
p02772 | # 入力
_ = gets.to_i
a = gets.chomp.split.map(&:to_i)
# 配列から偶数をだす
even = a.select{|x|x%2==0}
# 3と5で割れるかの判定
flag = true
even.each do|i|
if i%3==0 || i%5==0
flag = true
else
flag = false
end
end
if flag
puts "APPROVED"
else
puts "DENIED"
end
| # 入力
n = gets.to_i
a = gets.chomp.split.map(&:to_i)
# 配列から偶数をだす
even = a.select{|x|x%2==0}
# 3と5で割れるかの判定
flag = true
even.each do|i|
if i%3==0 || i%5==0
next
else
flag = false
break
end
end
if flag
puts "APPROVED"
else
puts "DENIED"
end | [
"assignment.variable.change",
"identifier.change",
"control_flow.break.add"
] | 569,605 | 569,606 | u610801172 | ruby |
p02772 | # 入力
_ = gets.to_i
a = gets.chomp.split.map(&:to_i)
# 配列から偶数をだす
even = a.select{|x|x%2==0}
# 3と5で割れるかの判定
flag = true
even.each do|i|
if i%3==0 || i%5==0
flag = true
else
flag = false
end
end
if flag
puts "APPROVED"
else
puts "DENIED"
end
| # 入力
n = gets.to_i
a = gets.chomp.split.map(&:to_i)
# 配列から偶数をだす
even = a.select{|x|x%2==0}
# 3と5で割れるかの判定
flag = true
even.each do|i|
if i%3==0 || i%5==0
flag = true
else
flag = false
break
end
end
if flag
puts "APPROVED"
else
puts "DENIED"
end
| [
"assignment.variable.change",
"identifier.change",
"control_flow.break.add"
] | 569,605 | 569,608 | u610801172 | ruby |
p02772 | n = gets.to_i
a = gets.split.map(&:to_i)
flag = 1
a.each do |an|
if an % 2 == 0
if an % 3 != 0 || an % 5 != 0
flag = 0
break
end
end
end
(flag == 1) ? (puts "APPROVED"):(puts "DENIED")
| n = gets.to_i
a = gets.split.map(&:to_i)
flag = 1
a.each do |an|
if an % 2 == 0
if an % 3 != 0 && an % 5 != 0
flag = 0
break
end
end
end
(flag == 1) ? (puts "APPROVED"):(puts "DENIED")
| [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 569,833 | 569,834 | u326891688 | ruby |
p02772 | n = gets.to_i
a = gets.split.map(&:to_i)
flag = 1
a.each do |an|
if an % 2 == 0 && (an % 3 != 0 || an % 5 != 0)
flag = 0
break
end
end
(flag == 1) ? (puts "APPROVED"):(puts "DENIED") | n = gets.to_i
a = gets.split.map(&:to_i)
flag = 1
a.each do |an|
if an % 2 == 0
if an % 3 != 0 && an % 5 != 0
flag = 0
break
end
end
end
(flag == 1) ? (puts "APPROVED"):(puts "DENIED")
| [
"control_flow.branch.if.condition.change",
"misc.opposites"
] | 569,835 | 569,834 | u326891688 | ruby |
p02772 | N = gets.to_i
A = gets.split.map!(&:to_i).select!(&:even?)
puts A.all? {|a| a % 3 == 0 || a % 5 == 0 } ? 'APPROVED' : 'DENIED' | N = gets.to_i
A = gets.split.map(&:to_i).select(&:even?)
puts A.all? {|a| a % 3 == 0 || a % 5 == 0 } ? 'APPROVED' : 'DENIED' | [
"assignment.value.change",
"identifier.change"
] | 569,943 | 569,944 | u064100484 | ruby |
p02772 | n = gets.chomp.to_i
a_array = gets.split(' ').map(&:to_i)
even_array = a_array.select{|num| num.even?}
result = 0
even_array.each{|num|
if num%3 == 0 and num%5 == 0
result += 1
end
}
if even_array.length == result
puts "APPROVED"
else
puts "DENIED"
end | n = gets.chomp.to_i
a_array = gets.split(' ').map(&:to_i)
even_array = a_array.select{|num| num.even?}
result = 0
even_array.each{|num|
if num%3 == 0 or num%5 == 0
result += 1
end
}
if even_array.length == result
puts "APPROVED"
else
puts "DENIED"
end | [
"control_flow.branch.if.condition.change"
] | 570,008 | 570,009 | u900624743 | ruby |
p02772 | n = gets
a = gets.split.map(&:to_i)
a.each do |i|
if a % 2 != 0
next
end
if a % 3 == 0
next
end
if a % 5 == 0
next
end
puts "DENIED"
exit
end
puts "APPROVED"
| n = gets
a = gets.split.map(&:to_i)
a.each do |i|
if i % 2 != 0
next
end
if i % 3 == 0
next
end
if i % 5 == 0
next
end
puts "DENIED"
exit
end
puts "APPROVED"
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 570,052 | 570,053 | u649331810 | ruby |
p02772 | n = gets.to_i
A = gets.split.map(&:to_i)
A.each do |a|
if a.even?
next if a % 3 == 0 or a % 5 == 0
puts "DINIED"
exit
end
end
puts "APPROVED" | n = gets.to_i
A = gets.split.map(&:to_i)
A.each do |a|
if a.even?
next if a % 3 == 0 or a % 5 == 0
puts "DENIED"
exit
end
end
puts "APPROVED" | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 570,087 | 570,088 | u693378622 | ruby |
p02772 | gets.chomp.to_i
gets.chomp.split(' ').map{|i|
ii = i.to_i
if ii % 2 == 0
if (ii % 3 != 0) && (ii % 5 != 0)
puts 'DENIED'
exit 0
end
end
}
if approved
puts 'APPROVED'
end
| gets.chomp.to_i
gets.chomp.split(' ').each{|i|
ii = i.to_i
if ii % 2 == 0
if (ii % 3 != 0) && (ii % 5 != 0)
puts 'DENIED'
exit 0
end
end
}
puts 'APPROVED'
| [
"identifier.change"
] | 570,113 | 570,114 | u208362438 | ruby |
p02772 | N = gets.chomp.to_i
p A = gets.chomp.split(' ').map(&:to_i)
puts A.any? { |a| a.even? && (a % 3 != 0 && a % 5 != 0)} ? 'DENIED' : 'APPROVED'
| N = gets.chomp.to_i
A = gets.chomp.split(' ').map(&:to_i)
puts A.any? { |a| a.even? && (a % 3 != 0 && a % 5 != 0)} ? 'DENIED' : 'APPROVED'
| [
"io.output.change",
"call.remove"
] | 570,117 | 570,118 | u484832756 | ruby |
p02773 | N = gets.to_i
hash = {}
N.times do |i|
str = gets.chomp.to_s
if hash[str]
hash[str] += 1
else
hash[str] = 1
end
end
best = hash.values.max
hash = hash.select!{|k,v| v == best}.sort
hash.map{|k,v| puts k} | N = gets.to_i
hash = {}
N.times do |i|
str = gets.chomp.to_s
if hash[str]
hash[str] += 1
else
hash[str] = 1
end
end
best = hash.values.max
hash = hash.select{|k,v| v == best}.sort
hash.map{|k,v| puts k} | [
"assignment.value.change",
"identifier.change"
] | 570,282 | 570,283 | u021866120 | ruby |
p02772 | input_num = gets.to_i
nums = gets.split(' ').map { |num| num.to_i }
flag = false
input_num.times do |i|
if nums[i] % 2 == 0
if nums[i] % 3 == 0 || nums[i] % 5 == 0
flag = true
else
flag = false
break
end
end
end
if flag
puts 'APPROVED'
else
puts 'DENIED'
end
| input_num = gets.to_i
nums = gets.split(' ').map { |num| num.to_i }
flag = true
input_num.times do |i|
if nums[i] % 2 == 0
if nums[i] % 3 == 0 || nums[i] % 5 == 0
flag = true
else
flag = false
break
end
end
end
if flag
puts 'APPROVED'
else
puts 'DENIED'
end
| [
"misc.opposites",
"assignment.value.change"
] | 570,465 | 570,466 | u647061136 | ruby |
p02772 | input_num = gets.to_i
nums = gets.split(' ').map { |num| num.to_i }
flag = false
input_num.times do |i|
if nums[i].even?
if nums[i] % 3 == 0 || nums[i] % 5 == 0
flag = true
else
flag = false
break
end
end
end
if flag
puts 'APPROVED'
else
puts 'DENIED'
end
| input_num = gets.to_i
nums = gets.split(' ').map { |num| num.to_i }
flag = true
input_num.times do |i|
if nums[i] % 2 == 0
if nums[i] % 3 == 0 || nums[i] % 5 == 0
flag = true
else
flag = false
break
end
end
end
if flag
puts 'APPROVED'
else
puts 'DENIED'
end
| [
"misc.opposites",
"assignment.value.change",
"control_flow.branch.if.condition.change"
] | 570,467 | 570,466 | u647061136 | ruby |
p02772 | n = gets.to_i # 単一整数
ary = gets.chomp.split.map(&:to_i) # スペースで区切られた複数の整数
ary.sort!
fl = 0 #フラグ
for num in 0..n-1 do
if ary[num] % 2 == 0 then
if (ary[num] % 3 == 0) || (ary[num] % 5 == 0) then
fl = 1
else
fl = 0
break
end
end
end
if fl == 0 then
puts "DENIED"
elsif fl == 1 then
puts "APPROVED"
else
puts "DENIED"
end | n = gets.to_i # 単一整数
ary = gets.chomp.split.map(&:to_i) # スペースで区切られた複数の整数
ary.sort!
fl = 1 #フラグ
for num in 0..n-1 do
if ary[num] % 2 == 0 then
if (ary[num] % 3 == 0) || (ary[num] % 5 == 0) then
fl = 1
else
fl = 0
break
end
end
end
if fl == 0 then
puts "DENIED"
elsif fl == 1 then
puts "APPROVED"
else
puts "APPROVED"
end | [
"literal.number.integer.change",
"assignment.value.change",
"literal.string.change",
"call.arguments.change"
] | 570,473 | 570,474 | u308495541 | ruby |
p02772 | n = gets.to_i # 単一整数
ary = gets.chomp.split.map(&:to_i) # スペースで区切られた複数の整数
ary.sort!
fl = 0 #フラグ
for num in 0..n-1 do
if ary[num] % 2 == 0 then
if (ary[num] % 3 == 0) || (ary[num] % 5 == 0) then
fl = 1
else
fl = 0
end
end
end
if fl == 0 then
puts "DENIED"
elsif fl == 1 then
puts "APPROVED"
else
puts "DENIED"
end | n = gets.to_i # 単一整数
ary = gets.chomp.split.map(&:to_i) # スペースで区切られた複数の整数
ary.sort!
fl = 1 #フラグ
for num in 0..n-1 do
if ary[num] % 2 == 0 then
if (ary[num] % 3 == 0) || (ary[num] % 5 == 0) then
fl = 1
else
fl = 0
break
end
end
end
if fl == 0 then
puts "DENIED"
elsif fl == 1 then
puts "APPROVED"
else
puts "APPROVED"
end | [
"literal.number.integer.change",
"assignment.value.change",
"control_flow.break.add",
"literal.string.change",
"call.arguments.change"
] | 570,475 | 570,474 | u308495541 | ruby |
p02773 | n = gets.to_i
ss = n.times.map { gets.chomp }
counts = ss.each_with_object(Hash.new(0)) do |s, h|
h[s] += 1
end
max = counvs.values.max
puts counts.select { |_, v| v == max }.keys.sort
| n = gets.to_i
ss = n.times.map { gets.chomp }
counts = ss.each_with_object(Hash.new(0)) do |s, h|
h[s] += 1
end
max = counts.values.max
puts counts.select { |_, v| v == max }.keys.sort
| [
"assignment.value.change",
"identifier.change"
] | 570,893 | 570,894 | u889326464 | ruby |
p02773 | S = {}
(gets.to_i).times do
key = gets.chomp
if S.key?(key)
S[key] += 1
else
S.store(key, 1)
end
end
max = S.values.max
puts S.keep_if {|_, v| v == max}
puts S.keys.sort | S = {}
(gets.to_i).times do
key = gets.chomp
if S.key?(key)
S[key] += 1
else
S.store(key, 1)
end
end
max = S.values.max
S.keep_if {|_, v| v == max}
puts S.keys.sort | [
"io.output.change",
"call.remove"
] | 571,094 | 571,095 | u729911058 | ruby |
p02773 | s = gets.to_i.times.map{gets.chomp}
h = {}
max = 0
s.each do |_s|
h[_s] += 1
max = h[_s] if max < h[_s]
end
puts h.select { |k, v| v == max }.keys.sort | s = gets.to_i.times.map{gets.chomp}
h = Hash.new(0)
max = 0
s.each do |_s|
h[_s] += 1
max = h[_s] if max < h[_s]
end
puts h.select { |k, v| v == max }.keys.sort | [
"call.add"
] | 571,103 | 571,104 | u542197477 | ruby |
p02773 | s = gets.to_i.times.map{gets.chomp}
h = {}
max = 0
s.each do |_s|
# c = s.count(_s)
h[_s] += 1
max = h[_s] if max < h[_s]
end
puts h.select { |k, v| v == max }.keys.sort | s = gets.to_i.times.map{gets.chomp}
h = Hash.new(0)
max = 0
s.each do |_s|
h[_s] += 1
max = h[_s] if max < h[_s]
end
puts h.select { |k, v| v == max }.keys.sort | [
"call.add"
] | 571,105 | 571,104 | u542197477 | ruby |
p02773 | n = gets.to_i
x = []
n.times do
x << gets.chomp.to_s
end
x = x.group_by(&:itself).map{ |key, value| [key, value.count]}.to_h
max = x.values.max
x.each { |key, value|
if (value == max) then
puts "#{key}"
end
}
| n = gets.to_i
x = []
n.times do
x << gets.chomp.to_s
end
x = x.sort
x = x.group_by(&:itself).map{ |key, value| [key, value.count]}.to_h
max = x.values.max
x.each { |key, value|
if (value == max) then
puts "#{key}"
end
}
| [
"assignment.add"
] | 571,127 | 571,128 | u571003347 | ruby |
p02773 | count = gets.to_i
strs = Hash.new(0)
count.times do
strs[gets.chomp] += 1
end
strs = strs.sort_by{ | k, v | v }.reverse
dic_strs = Array.new
max = strs[0][1]
strs.each do |str|
if max == str[1]
dic_strs.push(str[0])
else
break
end
end
dic_strs.sort
puts(dic_strs)
| count = gets.to_i
strs = Hash.new(0)
count.times do
strs[gets.chomp] += 1
end
strs = strs.sort_by{ | k, v | v }.reverse
dic_strs = Array.new
max = strs[0][1]
strs.each do |str|
if max == str[1]
dic_strs.push(str[0])
else
break
end
end
dic_strs.sort!
puts(dic_strs)
| [
"call.suffix.change"
] | 571,170 | 571,171 | u463397049 | ruby |
p02773 | h=Hash.new(0)
gets.to_i.times do
s=gets.chomp
h[s]+=1
end
m=h.values.max
puts h.select{|k,v|v==2}.keys.sort | h=Hash.new(0)
gets.to_i.times do
s=gets.chomp
h[s]+=1
end
m=h.values.max
puts h.select{|k,v|v==m}.keys.sort | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"expression.operation.binary.change"
] | 571,266 | 571,267 | u630043039 | ruby |
p02773 | N = gets.to_i
S = Hash.new
m = 0
N.times {
b = gets.chomp
S[b] = S[b].nil? ? 0 : (S[b] + 1)
if S[b] > m then m = S[b] end
}
AR = []
for k in S.keys do
if S[k] == m then AR.push(k) end
end
AR.sort!
for e in AR do
p e
end | N = gets.to_i
S = Hash.new
m = 0
N.times {
b = gets.chomp
S[b] = S[b].nil? ? 0 : (S[b] + 1)
if S[b] > m then m = S[b] end
}
AR = []
for k in S.keys do
if S[k] == m then AR.push(k) end
end
AR.sort!
for e in AR do
puts e
end | [
"call.function.change",
"io.output.change"
] | 571,459 | 571,460 | u839719695 | ruby |
p02773 | N=gets.to_i
L=Hash.new
N.times{
S=gets.chomp
L[S]+=1
}
MX=L.max_by{|k,v|v}[1]
puts L.select{|k,v|v==MX}.keys.sort | N=gets.to_i
L=Hash.new{0}
N.times{
S=gets.chomp
L[S]+=1
}
MX=L.max_by{|k,v|v}[1]
puts L.select{|k,v|v==MX}.keys.sort | [] | 571,519 | 571,520 | u041282550 | ruby |
p02773 | N=gets.to_i
cnt=Hash.new{0}
N.times{
S=gets.chomp
cnt[S]+=1
}
MX=count.max_by{|k,v|v}[1]
puts count.select{|k,v|v==MX}.keys.sort | N=gets.to_i
L=Hash.new{0}
N.times{
S=gets.chomp
L[S]+=1
}
MX=L.max_by{|k,v|v}[1]
puts L.select{|k,v|v==MX}.keys.sort | [
"assignment.variable.change",
"assignment.value.change",
"call.arguments.change"
] | 571,521 | 571,520 | u041282550 | ruby |
p02773 | n = gets.strip.to_i
array = []
n.times do
array << gets.strip.to_s
end
hash = Hash.new(0)
array.each { |word| hash[word] += 1 }
highest_count = hash.max_by {|k, v| v}[1]
output_hash = hash.select{|k, v| v == highest_count}
output_hash.keys.each do |key|
puts key
end
| n = gets.strip.to_i
array = []
n.times do
array << gets.strip.to_s
end
hash = Hash.new(0)
array.sort.each { |word| hash[word] += 1 }
highest_count = hash.max_by {|k, v| v}[1]
output_hash = hash.select{|k, v| v == highest_count}
output_hash.keys.each do |key|
puts key
end
| [
"call.add"
] | 571,610 | 571,611 | u443793571 | ruby |
p02773 | require 'pp'
n = gets.to_i
s = {}
n.times do
ss = gets.chomp
s[ss].nil? ? s[ss] = 1 : s[ss] += 1
end
sss = s.sort_by{|x|x[1]}
a = sss[-1][1]
hoge = s.to_a.select{|x|x[1] == a}
puts hoge.reverse.map{|x|x[0]}.join("\n")
| require 'pp'
n = gets.to_i
s = {}
n.times do
ss = gets.chomp
s[ss].nil? ? s[ss] = 1 : s[ss] += 1
end
sss = s.sort_by{|x|x[1]}
a = sss[-1][1]
hoge = s.to_a.select{|x|x[1] == a}
puts hoge.map{|x|x[0]}.sort.join("\n")
| [
"call.remove",
"call.add"
] | 571,666 | 571,667 | u315597999 | ruby |
p02777 | s,t=gets.chomp.split(" ")
a,b=gets.chomp.split(" ").map(&:to_i)
if gets == s then
a = a-1
else
b = b-1
end
print("#{a} #{b}") | s,t=gets.chomp.split(" ")
a,b=gets.chomp.split(" ").map(&:to_i)
if gets == s+"\n" then
a = a-1
else
b = b-1
end
print("#{a} #{b}") | [
"control_flow.branch.if.condition.change"
] | 573,235 | 573,236 | u141968173 | ruby |
p02777 | s, t = gets.split
a, b = gets.split.map(&:to_i)
u = gets.chomp
if u == s
p "#{a - 1} #{b}"
else
p "#{a} #{b - 1}"
end
| s, t = gets.split
a, b = gets.split.map(&:to_i)
u = gets.chomp
if u == s
puts "#{a - 1} #{b}"
else
puts "#{a} #{b - 1}"
end | [
"call.function.change",
"io.output.change"
] | 573,531 | 573,532 | u062655521 | ruby |
p02777 | s,t=gets.split
a,b=gets.split.map(&:to_i)
if s==gets
puts "#{a-1} #{b}"
else
puts "#{a} #{b-1}"
end | s,t=gets.split
a,b=gets.split.map(&:to_i)
if s==gets.chomp
puts "#{a-1} #{b}"
else
puts "#{a} #{b-1}"
end | [
"control_flow.branch.if.condition.change",
"call.add"
] | 573,642 | 573,643 | u604693716 | ruby |
p02777 | s, t = gets.chomp.split
a, b = gets.chomp.split.map(&:to_i)
u = gets.chomp
puts u == s ? "#{a - 1} #{num2}" : "#{a} #{b - 1}" | s, t = gets.chomp.split
a, b = gets.chomp.split.map(&:to_i)
u = gets.chomp
puts u == s ? "#{a - 1} #{b}" : "#{a} #{b - 1}" | [
"literal.string.change",
"call.arguments.change"
] | 573,701 | 573,702 | u641383521 | ruby |
p02777 | s,t = gets.chomp.split.map(&:to_s)
a,b = gets.chomp.split.map(&:to_i)
u = gets.to_s
if s == u
a -= 1
elsif t == u
b -= 1
end
puts "#{a} #{b}" | s,t = gets.chomp.split.map(&:to_s)
a,b = gets.chomp.split.map(&:to_i)
u = gets.chomp.to_s
if s == u
a -= 1
else t == u
b -= 1
end
puts "#{a} #{b}" | [
"call.add"
] | 573,767 | 573,768 | u575740023 | ruby |
p02777 | s,t = gets.chomp.split.map(&:to_s)
a,b = gets.chomp.split.map(&:to_i)
u = gets.to_s
if s == u
a -= 1
else t == u
b -= 1
end
puts "#{a} #{b}" | s,t = gets.chomp.split.map(&:to_s)
a,b = gets.chomp.split.map(&:to_i)
u = gets.chomp.to_s
if s == u
a -= 1
else t == u
b -= 1
end
puts "#{a} #{b}" | [
"call.add"
] | 573,769 | 573,768 | u575740023 | ruby |
p02777 | a, b = gets.split.map(:chomp)
n, m = gets.split.map(&:to_i)
s = gets.chomp
puts a==s ? "#{n-1} #{m}" : "#{n} #{m-1}" | a, b = gets.split.map(&:chomp)
n, m = gets.split.map(&:to_i)
s = gets.chomp
puts a==s ? "#{n-1} #{m}" : "#{n} #{m-1}" | [
"call.arguments.change"
] | 573,790 | 573,791 | u358554431 | ruby |
p02777 | s, t = gets.chomp
a,b = gets.chomp.split(" ").map(&:to_i)
u = gets.chomp
if u == s
print "#{a-1} #{b}"
else
print "#{a} #{b-1}"
end | s, t = gets.split
a,b = gets.chomp.split(" ").map(&:to_i)
u = gets.chomp
print u == s ? "#{a-1} #{b}" : "#{a} #{b-1}"
| [
"assignment.value.change",
"identifier.change",
"io.output.change",
"call.remove"
] | 573,933 | 573,934 | u889326464 | ruby |
p02777 | s, t = gets.chomp
a,b = gets.chomp.split(" ").map(&:to_i)
u = gets.chomp
print u == s ? "#{a-1} #{b}" : "#{a} #{b-1}" | s, t = gets.split
a,b = gets.chomp.split(" ").map(&:to_i)
u = gets.chomp
print u == s ? "#{a-1} #{b}" : "#{a} #{b-1}"
| [
"assignment.value.change",
"identifier.change"
] | 573,935 | 573,934 | u889326464 | ruby |
p02777 | s, t = gets.chomp
a,b = gets.chomp.split(" ").map(&:to_i)
u = gets.chomp
print u == s ? "#{s-1} #{t}" : "#{s} #{t-1}"
| s, t = gets.split
a,b = gets.chomp.split(" ").map(&:to_i)
u = gets.chomp
print u == s ? "#{a-1} #{b}" : "#{a} #{b-1}"
| [
"assignment.value.change",
"identifier.change",
"literal.string.change",
"call.arguments.change"
] | 573,936 | 573,934 | u889326464 | ruby |
p02777 | s = gets.split[0]
a, b = gets.split.map(&:to_i)
u = gets
if u == s
a -= 1
else
b -= 1
end
puts "#{a} #{b}" | s = gets.chomp.split[0]
a, b = gets.chomp.split.map(&:to_i)
u = gets.chomp
if u == s
a -= 1
else
b -= 1
end
puts "#{a} #{b}" | [
"call.add"
] | 574,042 | 574,043 | u413815532 | ruby |
p02777 | s, t = gets.chomp.split(' ')
a, b = gets.chomp.split(' ').map(&:to_i)
u = gets
if (s == u)
a -= 1
else
b -= 1
end
puts "#{a} #{b}"
| s, t = gets.chomp.split(' ')
a, b = gets.chomp.split(' ').map(&:to_i)
u = gets.chomp
if (s == u)
a -= 1
else
b -= 1
end
puts "#{a} #{b}"
| [
"call.add"
] | 574,056 | 574,057 | u546441021 | ruby |
p02777 | arr_ball_str = gets.chomp.split(' ').map(&:to_s)
arr_ball_cnt = gets.chomp.split(' ').map(&:to_i)
ball_str = gets.chomp.to_s
arr_output = []
arr_ball_str.each_with_index do |str, index|
if str == ball_str
arr_output[index] = arr_ball_cnt[index] - 1
else
arr_output[index] = arr_ball_cnt[index]
end
end
p arr_output.inject {|output, item| output.to_s + ' ' + item.to_s} | arr_ball_str = gets.chomp.split(' ').map(&:to_s)
arr_ball_cnt = gets.chomp.split(' ').map(&:to_i)
ball_str = gets.chomp.to_s
arr_output = []
arr_ball_str.each_with_index do |str, index|
if str == ball_str
arr_output[index] = arr_ball_cnt[index] - 1
else
arr_output[index] = arr_ball_cnt[index]
end
end
puts arr_output.inject {|output, item| output.to_s + ' ' + item.to_s} | [
"call.function.change",
"io.output.change"
] | 574,182 | 574,183 | u728823690 | ruby |
p02777 | balls = gets.chomp.split(" ")
ball_counts = gets.chomp.split(" ").map(&:to_i)
ball_hash = {}
balls.length.times do |i|
ball_hash[balls[i]] = ball_counts[i]
end
remove_ball_name = gets
ball_hash[remove_ball_name] -= 1
puts ball_hash.map {|k, v| v}.join(" ") | balls = gets.chomp.split(" ")
ball_counts = gets.chomp.split(" ").map(&:to_i)
ball_hash = {}
balls.length.times do |i|
ball_hash[balls[i]] = ball_counts[i]
end
remove_ball_name = gets.chomp
ball_hash[remove_ball_name] -= 1
puts ball_hash.map {|k, v| v}.join(" ") | [
"call.add"
] | 574,243 | 574,244 | u249327445 | ruby |
p02777 | # Your code here!
strArr = gets.split(" ")
cntArr = gets.split(" ")
strHash = {}
for i in 0..1 do
strHash.store(strArr[i], cntArr[i].to_i)
end
declementStr = gets
strHash[declementStr] = strHash[declementStr] - 1
outputArr = []
strHash.map do |k, v|
outputArr.push(v)
end
puts outputArr.join(" ") | # Your code here!
strArr = gets.chop.split(" ")
cntArr = gets.chop.split(" ")
strHash = {}
for i in 0..1 do
strHash.store(strArr[i], cntArr[i].to_i)
end
declementStr = gets.chop
strHash[declementStr] = strHash[declementStr] - 1
outputArr = []
strHash.map do |k, v|
outputArr.push(v)
end
puts outputArr.join(" ") | [
"call.add"
] | 574,245 | 574,246 | u249327445 | ruby |
p02777 | strArr = gets.split(" ")
cntArr = gets.split(" ")
strHash = {}
for i in 0..1 do
strHash.store(strArr[i], cntArr[i].to_i)
end
declementStr = gets
strHash[declementStr] = strHash[declementStr] - 1
outputArr = []
strHash.map do |k, v|
outputArr.push(v)
end
puts outputArr.join(" ") | # Your code here!
strArr = gets.chop.split(" ")
cntArr = gets.chop.split(" ")
strHash = {}
for i in 0..1 do
strHash.store(strArr[i], cntArr[i].to_i)
end
declementStr = gets.chop
strHash[declementStr] = strHash[declementStr] - 1
outputArr = []
strHash.map do |k, v|
outputArr.push(v)
end
puts outputArr.join(" ") | [
"call.add"
] | 574,247 | 574,246 | u249327445 | ruby |
p02777 | a,b = gets.split
x,y = gets.split.map(&:to_i)
u = gets
if a == u
puts "#{x-1} #{y}"
elsif b == u
puts "#{x} #{y-1}"
end | a,b = gets.split
x,y = gets.split.map(&:to_i)
u = gets.chomp!
if a == u
puts "#{x-1} #{y}"
elsif b == u
puts "#{x} #{y-1}"
end
| [
"call.add"
] | 574,356 | 574,357 | u911373146 | ruby |
p02777 | a,b = gets.split
x,y = gets.split.map(&:to_i)
u = gets.to_s
if a == u
puts "#{x-1} #{y}"
elsif b == u
puts "#{x} #{y-1}"
end | a,b = gets.split
x,y = gets.split.map(&:to_i)
u = gets.chomp!
if a == u
puts "#{x-1} #{y}"
elsif b == u
puts "#{x} #{y-1}"
end
| [
"assignment.value.change",
"identifier.change"
] | 574,358 | 574,357 | u911373146 | ruby |
p02777 | S,T = gets.chomp!.split(" ")
x,y = gets.chomp!.split(" ").map(&:to_i)
choice = gets.chomp!
puts S
if choice.eql?(S)
x -= 1
else
y -= 1
end
puts "#{x} #{y}" | S,T = gets.chomp!.split(" ")
x,y = gets.chomp!.split(" ").map(&:to_i)
choice = gets.chomp!
if choice.eql?(S)
x -= 1
else
y -= 1
end
puts "#{x} #{y}" | [
"call.remove"
] | 574,380 | 574,381 | u201441274 | ruby |
p02777 | S,T = gets.chomp!.split(" ")
x,y = gets.chomp!.split(" ").map(&:to_i)
choice = gets
if choice.eql?(S)
x -= 1
else
y -= 1
end
print "#{x} #{y}" | S,T = gets.chomp!.split(" ")
x,y = gets.chomp!.split(" ").map(&:to_i)
choice = gets.chomp!
if choice.eql?(S)
x -= 1
else
y -= 1
end
puts "#{x} #{y}" | [
"call.add",
"identifier.change"
] | 574,382 | 574,381 | u201441274 | ruby |
p02777 | S,T = gets.chomp!.split(" ")
x,y = gets.chomp!.split(" ").map(&:to_i)
choice = gets
if choice.eql?(S)
x -= 1
else
y -= 1
end
puts "#{x} #{y}" | S,T = gets.chomp!.split(" ")
x,y = gets.chomp!.split(" ").map(&:to_i)
choice = gets.chomp!
if choice.eql?(S)
x -= 1
else
y -= 1
end
puts "#{x} #{y}" | [
"call.add"
] | 574,383 | 574,381 | u201441274 | ruby |
p02777 | color=[]
color=gets.chomp.split(" ")
nums=[]
nums=gets.chomp.split(" ").map{|i| i.to_i}
u=gets.chomp
if u==color[0]
nums[0]-=1
else
nums[1]-=1
end
p "#{nums[0]} #{nums[1]}"
| color=[]
color=gets.chomp.split(" ")
nums=[]
nums=gets.chomp.split(" ").map{|i| i.to_i}
u=gets.chomp
if u==color[0]
nums[0]-=1
else
nums[1]-=1
end
puts "#{nums[0]} #{nums[1]}"
| [
"call.function.change",
"io.output.change"
] | 574,390 | 574,391 | u224392861 | ruby |
p02777 | line = readlines.map(&:chomp)
line[0] = line[0].split(" ")
line[1] = line[1].split(" ")
line[2] = line[2].split(" ")
red_nums = line[1][0].to_i
blue_nums = line[1][1].to_i
choice = line[2]
if choice == line[0][0]
red_nums -= 1
else
blue_nums -= 1
end
puts "#{red_nums} #{blue_nums}"
| line = readlines.map(&:chomp)
line[0] = line[0].split(" ")
line[1] = line[1].split(" ")
line[2] = line[2].split(" ")
red_nums = line[1][0].to_i
blue_nums = line[1][1].to_i
choice = line[2]
if choice[0] == line[0][0]
red_nums -= 1
else
blue_nums -= 1
end
puts "#{red_nums} #{blue_nums}"
| [
"control_flow.branch.if.condition.change"
] | 574,409 | 574,410 | u542064352 | ruby |
p02777 | #!/usr/bin/env ruby
attrs = Array.new
while line = $stdin.gets
attrs << line.chomp.split
end
S = attrs[0][0]
T = attrs[0][1]
numS = attrs[1][0].to_i
numT = attrs[1][1].to_i
U = attrs[2][0]
if S == U then
puts = "#{numS - 1} #{numT}"
else
puts = "#{numS} #{numT - 1}"
end | #!/usr/bin/env ruby
attrs = Array.new
while line = $stdin.gets
attrs << line.chomp.split
end
S = attrs[0][0]
T = attrs[0][1]
numS = attrs[1][0].to_i
numT = attrs[1][1].to_i
U = attrs[2][0]
if S == U then
puts "#{numS - 1} #{numT}"
else
puts "#{numS} #{numT - 1}"
end | [] | 574,417 | 574,418 | u244257825 | ruby |
p02777 | #!/usr/bin/env ruby
attrs = Array.new
while line = $stdin.gets
attrs << line.chomp.split
end
S = attrs[0][0]
T = attrs[0][1]
numS = attrs[1][0].to_i
numT = attrs[1][1].to_i
U = attrs[2][0]
if S == U then
return "#{numS - 1} #{numT}"
else
return "#{numS} #{numT - 1}"
end | #!/usr/bin/env ruby
attrs = Array.new
while line = $stdin.gets
attrs << line.chomp.split
end
S = attrs[0][0]
T = attrs[0][1]
numS = attrs[1][0].to_i
numT = attrs[1][1].to_i
U = attrs[2][0]
if S == U then
puts "#{numS - 1} #{numT}"
else
puts "#{numS} #{numT - 1}"
end | [
"function.return_value.change"
] | 574,419 | 574,418 | u244257825 | ruby |
p02777 | #!/usr/bin/env ruby
attrs = Array.new
while line = $stdin.gets
attrs << line.chomp.split
end
S = attrs[0][0]
T = attrs[0][1]
numS = attrs[1][0].to_i
numT = attrs[1][1].to_i
U = attrs[2][0]
if S == U then
return "#{numS-1} #{numT}"
else
return "#{numS} #{numT -1}"
end | #!/usr/bin/env ruby
attrs = Array.new
while line = $stdin.gets
attrs << line.chomp.split
end
S = attrs[0][0]
T = attrs[0][1]
numS = attrs[1][0].to_i
numT = attrs[1][1].to_i
U = attrs[2][0]
if S == U then
puts "#{numS - 1} #{numT}"
else
puts "#{numS} #{numT - 1}"
end | [
"function.return_value.change",
"literal.string.change",
"call.arguments.change"
] | 574,420 | 574,418 | u244257825 | ruby |
p02777 | s,_ = gets.split.map(&:to_s)
a,b = gets.split.map(&:to_i)
u = gets.to_s
if u == s
puts"#{a - 1} #{b}"
else
puts"#{a} #{b - 1}"
end | s,_ = gets.split.map(&:to_s)
a,b = gets.split.map(&:to_i)
u = gets.chomp
if u == s
puts"#{a - 1} #{b}"
else
puts"#{a} #{b - 1}"
end | [
"assignment.value.change",
"identifier.change"
] | 574,435 | 574,436 | u523351024 | ruby |
p02777 | s,t = gets.split.map(&:to_s)
a,b = gets.split.map(&:to_i)
u = gets.to_s
if u == s
puts"#{a - 1} #{b}"
else
puts"#{a} #{b - 1}"
end | s,_ = gets.split.map(&:to_s)
a,b = gets.split.map(&:to_i)
u = gets.chomp
if u == s
puts"#{a - 1} #{b}"
else
puts"#{a} #{b - 1}"
end | [
"assignment.variable.change",
"identifier.change",
"assignment.value.change"
] | 574,437 | 574,436 | u523351024 | ruby |
p02777 | s,t = gets.split.map(&:to_s)
a,b = gets.split.map(&:to_i)
u = gets.to_i
if u === s
puts"#{a - 1} #{b}"
else
puts"#{a} #{b - 1}"
end | s,_ = gets.split.map(&:to_s)
a,b = gets.split.map(&:to_i)
u = gets.chomp
if u == s
puts"#{a - 1} #{b}"
else
puts"#{a} #{b - 1}"
end | [
"assignment.variable.change",
"identifier.change",
"assignment.value.change",
"control_flow.branch.if.condition.change"
] | 574,438 | 574,436 | u523351024 | ruby |
p02777 | s, t = gets.split(" ")
a, b = gets.split(" ").map(&:to_i)
u = gets
if s == u
puts "#{a - 1} #{b}"
else
puts "#{a} #{b - 1}"
end | s, t = gets.split(" ")
a, b = gets.split(" ").map(&:to_i)
u = gets.chomp
if s == u
puts "#{a - 1} #{b}"
else
puts "#{a} #{b - 1}"
end
| [
"call.add"
] | 574,484 | 574,485 | u379710681 | ruby |
p02777 | s,t = gets.split(' ').map(&:chomp)
a,b = gets.split(' ').map(&:to_i)
u = gets.chomp
p s
p u
if s == u
a -= 1
elsif t == u
b -= 1
end
puts "#{a} #{b}" | s,t = gets.split(' ').map(&:chomp)
a,b = gets.split(' ').map(&:to_i)
u = gets.chomp
if s == u
a -= 1
elsif t == u
b -= 1
end
puts "#{a} #{b}"
| [
"call.remove"
] | 574,486 | 574,487 | u634482428 | ruby |
p02777 | a, b = gets.split
c_a, c_b = gets.split.map(&:to_i)
if a == gets
c_a -= 1
else
c_b -= 1
end
puts [c_a, c_b].join(" ")
| a, b = gets.split
c_a, c_b = gets.split.map(&:to_i)
if a == gets.chomp
c_a -= 1
else
c_b -= 1
end
puts [c_a, c_b].join(" ")
| [
"control_flow.branch.if.condition.change",
"call.add"
] | 574,597 | 574,598 | u017002583 | ruby |
p02777 | s, t = gets.split(" ").map(&:to_s)
a, b = gets.split(" ").map(&:to_i)
u = gets.chomp!
hs = { s => a, t => b }
hs[u] -= 1
print("#{hs[0]} #{hs[1]}\n") | s, t = gets.split(" ").map(&:to_s)
a, b = gets.split(" ").map(&:to_i)
u = gets.chomp!
hs = { s => a, t => b }
hs[u] -= 1
print("#{hs[s]} #{hs[t]}\n") | [
"literal.string.change",
"call.arguments.change"
] | 574,746 | 574,747 | u911815052 | ruby |
p02777 | a,b = gets.split(" ")
c,d = gets.chomp.split(" ").map(&:to_i)
e = gets
if a == e
c -= 1
else
d -= 1
end
puts "#{c} #{d}" | a,b = gets.chomp.split(" ")
c,d = gets.chomp.split(" ").map(&:to_i)
e = gets.chomp
if a == e
c -= 1
else
d -= 1
end
puts "#{c} #{d}" | [
"call.add"
] | 574,762 | 574,763 | u599631096 | ruby |
p02777 | (s, t) = STDIN.gets.split(' ')
(a, b) = STDIN.gets.split(' ').map{|n| n.to_i}
u = STDIN.gets.chomp
p u
if u == s
puts "#{a-1} #{b}"
elsif u == t
puts "#{a} #{b-1}"
end | (s, t) = STDIN.gets.split(' ')
(a, b) = STDIN.gets.split(' ').map{|n| n.to_i}
u = STDIN.gets.chomp
if u == s
puts "#{a-1} #{b}"
elsif u == t
puts "#{a} #{b-1}"
end | [
"call.remove"
] | 574,776 | 574,777 | u101112282 | ruby |
p02777 | (s, t) = STDIN.gets.split(' ')
(a, b) = STDIN.gets.split(' ').map{|n| n.to_i}
u = STDIN.gets
if u == s
puts "#{a-1} #{b}"
elsif u == t
puts "#{a} #{b-1}"
end | (s, t) = STDIN.gets.split(' ')
(a, b) = STDIN.gets.split(' ').map{|n| n.to_i}
u = STDIN.gets.chomp
if u == s
puts "#{a-1} #{b}"
elsif u == t
puts "#{a} #{b-1}"
end | [
"call.add"
] | 574,778 | 574,777 | u101112282 | ruby |
p02778 | s = gets.chomp
puts = "x"*s.size | s = gets.chomp
puts "x"*s.size | [] | 574,872 | 574,873 | u844000954 | ruby |
p02778 | puts "x"*gets.size | puts "x"*(gets.size-1) | [
"call.arguments.change"
] | 574,900 | 574,901 | u091810847 | ruby |
p02778 | # 文字列Sが与えられます。Sのすべての文字を x で置き換えて出力してください。
s = gets
s.length.times do
print "x"
end | # 文字列Sが与えられます。Sのすべての文字を x で置き換えて出力してください。
s = gets.chomp
s.length.times do
print "x"
end
print "\n" | [
"call.add"
] | 575,122 | 575,124 | u139850627 | ruby |
p02778 | # 文字列Sが与えられます。Sのすべての文字を x で置き換えて出力してください。
s = gets
s.length.times do
print "x"
end
print "\n" | # 文字列Sが与えられます。Sのすべての文字を x で置き換えて出力してください。
s = gets.chomp
s.length.times do
print "x"
end
print "\n" | [
"call.add"
] | 575,126 | 575,124 | u139850627 | ruby |
p02778 | S = $stdin.read
puts 'x' * S.length
| S = $stdin.read.strip
puts 'x' * S.length | [
"call.add"
] | 575,219 | 575,220 | u690200667 | ruby |
p02778 | imput = gets.chomp
imput.length.times do
print("×")
end
print("\n") | imput = gets.chomp
imput.length.times do
print("x")
end
print("\n") | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 575,224 | 575,225 | u999905658 | ruby |
p02778 | imput = gets.chomp
imput.length.times do
print("*")
end
print("\n") | imput = gets.chomp
imput.length.times do
print("x")
end
print("\n") | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 575,226 | 575,225 | u999905658 | ruby |
p02778 | U = gets.chomp
N = U.size
A = ""
for i in 1..7 do
A += "x"
end
puts A | U = gets.chomp
N = U.size
A = ""
for i in 1..N do
A += "x"
end
puts A | [] | 575,264 | 575,265 | u621884137 | ruby |
p02778 | a=gets.to_s
b= a.length.to_i
puts ('x' * b).to_s | a=gets.to_s.chomp
b= a.length.to_i
puts ('x' * b)
| [
"call.add",
"call.remove"
] | 575,338 | 575,339 | u562148988 | ruby |
p02778 | a=gets.to_s
b= a.length.to_i
puts ('x' * b).chomp | a=gets.to_s.chomp
b= a.length.to_i
puts ('x' * b)
| [
"call.add",
"call.remove"
] | 575,340 | 575,339 | u562148988 | ruby |
p02778 | a=gets.to_s
b= a.length.to_i
puts 'x' * b | a=gets.to_s.chomp
b= a.length.to_i
puts ('x' * b)
| [
"call.add",
"call.arguments.change"
] | 575,341 | 575,339 | u562148988 | ruby |
p02778 | s = gets.split('').map(&:to_s)
ans = []
s.each do |c|
ans << 'x'
end
puts ans.join | s = gets.chomp.split('').map(&:to_s)
ans = []
s.map do |c|
ans << 'x'
end
puts ans.join | [
"call.add",
"identifier.change"
] | 575,346 | 575,347 | u802039083 | ruby |
p02778 | s = gets.split('').map(&:to_s)
ans = []
s.map do |c|
ans << 'x'
end
puts ans.join | s = gets.chomp.split('').map(&:to_s)
ans = []
s.map do |c|
ans << 'x'
end
puts ans.join | [
"call.add"
] | 575,348 | 575,347 | u802039083 | ruby |
p02778 | word = gets
print "x"*word.length | word = gets.chomp!
print "x"*word.length | [
"call.add"
] | 575,351 | 575,350 | u201441274 | ruby |
p02778 | word = gets
puts "x"*word.length | word = gets.chomp!
print "x"*word.length | [
"assignment.value.change",
"call.add",
"io.output.change"
] | 575,352 | 575,350 | u201441274 | ruby |
p02778 | puts "x" * gets.length | puts "x" * gets.chomp.length | [
"call.add"
] | 575,390 | 575,391 | u585539930 | ruby |
p02778 | s = gets
x = 'x' * s.length
print x | s = gets.chomp
print 'x' * s.length | [
"io.output.change",
"call.add",
"call.remove"
] | 575,393 | 575,394 | u979444096 | ruby |
p02778 | line = gets.split(' ')
length = line[0].length
ans = ''
0.upto(length - 1) do
ans += 'x'
end
p ans
| line = gets.split(' ')
length = line[0].length
ans = ''
0.upto(length - 1) do
ans += 'x'
end
puts ans
| [
"call.function.change",
"io.output.change"
] | 575,398 | 575,399 | u542064352 | ruby |
p02778 | S = gets.chomp.split(" ")
r = S.map{|s| "x"}
r = r.join
puts r | S = gets.chomp.split("")
r = S.map{|s| "x"}
r = r.join
puts r | [
"literal.string.change",
"assignment.value.change",
"call.arguments.change"
] | 575,455 | 575,456 | u403537991 | ruby |
p02778 | puts '*' * gets.chop.length | puts 'x' * gets.chop.length | [
"literal.string.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 575,491 | 575,492 | u604352408 | ruby |
p02779 | n = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
size = a.size
a = a.sort
i = 1
while true
if a[i] == a[i-1]
puts "NO"
break
else
i += 1
end
if size - 1 == i
puts "YES"
break
end
end | n = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
size = a.size
a = a.sort
i = 1
while true
if a[i] == a[i-1]
puts "NO"
break
else
i += 1
end
if size == i - 1
puts "YES"
break
end
end | [
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 575,710 | 575,711 | u412789323 | ruby |
p02779 | n = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
size = a.size
a = a.sort
i = 1
while true
if a[i] == a[i-1]
puts "NO"
break
else
i += 1
end
if size - 1 >= i
puts "YES"
break
end
end | n = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
size = a.size
a = a.sort
i = 1
while true
if a[i] == a[i-1]
puts "NO"
break
else
i += 1
end
if size == i - 1
puts "YES"
break
end
end | [
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 575,712 | 575,711 | u412789323 | ruby |
p02779 | n = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
size = a.size
a = a.sort
i = 1
while true
if a[i] == a[i-1]
puts "No"
break
else
i += 1
end
if size-1 == i
puts "Yes"
break
end
end | n = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
size = a.size
a = a.sort
i = 1
while true
if a[i] == a[i-1]
puts "NO"
break
else
i += 1
end
if size == i - 1
puts "YES"
break
end
end | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 575,713 | 575,711 | u412789323 | ruby |
p02779 | n = gets.to_i
a = gets.split.map(&:to_i)
a_sum= a.size
a_uniq = a.uniq.size
puts a_sum == a_uniq ? "Yes": "No" | n = gets.to_i
a = gets.split.map(&:to_i)
a_sum= a.size
a_uniq = a.uniq.size
puts a_sum == a_uniq ? "YES": "NO"
| [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 575,920 | 575,921 | u684458716 | ruby |
p02779 | n = gets.to_i
a = gets.split.map(&:to_i)
a_sum= a.size
a_uniq = a.uniqi.size
puts a_sum == a_uniq ? "Yes": "No" | n = gets.to_i
a = gets.split.map(&:to_i)
a_sum= a.size
a_uniq = a.uniq.size
puts a_sum == a_uniq ? "YES": "NO"
| [
"assignment.value.change",
"identifier.change",
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 575,922 | 575,921 | u684458716 | ruby |
p02779 | n = gets.to_i
a = gets.split.map(&:to_i)
a_sum= a.size
a_uniq = a.uniq
puts a_sum == a_uniq ? "Yes": "No"
| n = gets.to_i
a = gets.split.map(&:to_i)
a_sum= a.size
a_uniq = a.uniq.size
puts a_sum == a_uniq ? "YES": "NO"
| [
"call.add",
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 575,923 | 575,921 | u684458716 | ruby |
p02779 | puts gets.to_i==gets.chomp.split.uniq.size ? 'Yes' : 'No'
| puts gets.to_i==gets.chomp.split.uniq.size ? 'YES' : 'NO'
| [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 575,969 | 575,970 | u966810027 | ruby |
p02779 | gets
a = gets.split.map(&:to_i)
if a.size == a.uniq.size
puts 'Yes'
else
puts 'No'
end | gets
a = gets.split.map(&:to_i)
if a.size == a.uniq.size
puts 'YES'
else
puts 'NO'
end | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 576,090 | 576,091 | u714769076 | ruby |
p02779 | n = gets.to_i
a = gets.split.map(&:to_i)
if a.uniq.length == n
puts "Yes"
else
puts "No"
end | n = gets.to_i
a = gets.split.map(&:to_i)
if a.uniq.length == n
puts "YES"
else
puts "NO"
end | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 576,092 | 576,093 | u561507564 | ruby |
p02779 | n = gets.to_i
a = gets.split.map(&:to_i)
if a.uniq.length == a.length
puts "Yes"
else
puts "No"
end | n = gets.to_i
a = gets.split.map(&:to_i)
if a.uniq.length == n
puts "YES"
else
puts "NO"
end | [
"control_flow.branch.if.condition.change",
"call.remove",
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 576,094 | 576,093 | u561507564 | ruby |
p02779 | _n = gets.to_i
a = gets.split.map(&:to_i)
puts a.size == a.uniq.size ? 'Yes':'No' | _n = gets.to_i
a = gets.split.map(&:to_i)
puts a.size == a.uniq.size ? 'YES':'NO' | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 576,245 | 576,246 | u781354194 | ruby |
p02779 | n = gets.to_i
aNUniqNumbers=(gets.split.map(&:to_i)).uniq.size
puts n == aNUniqNumbers ? "Yes" : "No" | n = gets.to_i
aNUniqNumbers=(gets.split.map(&:to_i)).uniq.size
puts n == aNUniqNumbers ? "YES" : "NO" | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 576,282 | 576,283 | u802371628 | ruby |
p02779 | n = gets.to_i
a = gets.split().map(&:to_i)
puts a.uniq.size == n ? "Yes" : "No" | n = gets.to_i
a = gets.split().map(&:to_i)
puts a.uniq.size == n ? "YES" : "NO" | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 576,323 | 576,324 | u620219777 | ruby |
p02779 | n = gets
arr = gets.chomp.split(" ")
if arr == arr.uniq
puts "Yes"
else
puts "No"
end | n = gets
arr = gets.chomp.split(" ")
if arr == arr.uniq
puts "YES"
else
puts "NO"
end | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 576,644 | 576,645 | u409390792 | ruby |
p02779 | n = gets.chomp.to_i
a = gets.chomp.split(' ').map(&:to_i)
a.uniq.size == n ? print('Yes') : print('No') | n = gets.chomp.to_i
a = gets.chomp.split(' ').map(&:to_i)
a.uniq.size == n ? print('YES') : print('NO') | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 576,876 | 576,877 | u882179152 | ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.