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 8
values |
|---|---|---|---|---|---|---|---|
p03455
|
a, b = gets.strip.split.map(&:to_i)
(a*b)%2==0 ? 'Even' : 'Odd'
|
a, b = gets.strip.split.map(&:to_i)
puts (a*b).even? ? 'Even' : 'Odd'
|
[
"io.output.change",
"call.add",
"expression.operation.binary.remove"
] | 1,201,301
| 1,201,302
|
u168181447
|
ruby
|
p03455
|
(a,b)=STDIN.read.split
puts ((a.to_i*b.to_i)%2==0) ? 'even' : 'odd'
|
(a,b)=STDIN.read.split
puts ((a.to_i*b.to_i)%2==0) ? 'Even' : 'Odd'
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 1,201,312
| 1,201,313
|
u591609172
|
ruby
|
p03455
|
n,m = $stdin.gets.chomp.split(' ').map(&:to_i)
x = n * m
if(x % 2 == 1)
p 'Odd'
else
p 'Even'
end
|
n,m = $stdin.gets.chomp.split(' ').map(&:to_i)
x = n * m
if(x % 2 == 1)
puts "Odd"
else
puts "Even"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 1,201,349
| 1,201,350
|
u688809543
|
ruby
|
p03455
|
a, b = gets.chomp.split(" ").map(&:to_i)
(a*b)%2==0 ? 'Even' : 'Odd'
|
a, b = gets.chomp.split(" ").map(&:to_i)
puts (a*b)%2==0 ? 'Even' : 'Odd'
|
[
"io.output.change",
"call.add"
] | 1,201,445
| 1,201,446
|
u884511822
|
ruby
|
p03455
|
def num_handler(nums)
a = nums[0]
b = nums[1]
result = ((a * b) % 2) == 0
if result
return "Even"
else
return "0dd"
end
end
input = gets.chomp.split.map(&:to_i)
puts num_handler(input)
|
def num_handler(nums)
a = nums[0]
b = nums[1]
result = ((a * b) % 2) == 0
if result
return "Even"
else
return "Odd"
end
end
input = gets.chomp.split.map(&:to_i)
puts num_handler(input)
|
[
"literal.string.change",
"call.arguments.change",
"function.return_value.change"
] | 1,201,520
| 1,201,521
|
u414732171
|
ruby
|
p03455
|
a, b = gets.strip.split.map(&:to_i)
p (a * b).odd? ? "Odd" : "Even"
|
a, b = gets.strip.split.map(&:to_i)
puts (a * b).odd? ? "Odd" : "Even"
|
[
"call.function.change",
"io.output.change"
] | 1,201,570
| 1,201,571
|
u585539930
|
ruby
|
p03455
|
a, b = gets.strip.split.map(&:to_i)
p (a * b).odd? ? "Even" : "Odd"
|
a, b = gets.strip.split.map(&:to_i)
puts (a * b).odd? ? "Odd" : "Even"
|
[
"call.function.change",
"io.output.change",
"literal.string.change",
"call.arguments.change"
] | 1,201,572
| 1,201,571
|
u585539930
|
ruby
|
p03455
|
num = get.chomp.split(" ").map(&:to_i)
seki = num[0] * num[1]
if seki % 2 == 0
puts "Even"
else
puts "Odd"
end
|
num = gets.chomp.split(" ").map(&:to_i)
seki = num[0] * num[1]
if seki % 2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"assignment.value.change",
"identifier.change"
] | 1,201,575
| 1,201,576
|
u126404727
|
ruby
|
p03455
|
p gets.split.map(&:to_i).inject(:*)%2==0 ?'Even':'Odd'
|
puts gets.split.map(&:to_i).inject(:*)%2==0 ?'Even':'Odd'
|
[
"call.function.change",
"io.output.change"
] | 1,201,646
| 1,201,647
|
u630043039
|
ruby
|
p03455
|
x, y = gets.chop.split.map(&:to_i)
z = x * y
if z % 2 == 0
put 'Even'
else
put 'Odd'
end
|
x, y = gets.split.map(&:to_i)
z = x * y
if z % 2 == 0
puts 'Even'
else
puts 'Odd'
end
|
[
"call.remove",
"misc.typo",
"identifier.change"
] | 1,201,659
| 1,201,658
|
u195257137
|
ruby
|
p03455
|
a,b = gets.splite.map(&:to_i)
puts (a*b).odd? ? "Odd" : "Even"
|
a,b = gets.split.map(&:to_i)
puts (a*b).odd? ? "Odd" : "Even"
|
[
"assignment.value.change",
"identifier.change"
] | 1,201,687
| 1,201,688
|
u701312797
|
ruby
|
p03455
|
=begin
Problem https://atcoder.jp/contests/abc086/tasks/abc086_a
Reference https://qiita.com/Hayate_0807/items/2e9705091b181a104621
https://docs.ruby-lang.org/ja/search/version:2.3.0/query:even/#entry-1
=end
a,b = gets.chomp().split(" ").map(&:to_i)
=begin
p a
p b
=end
c = ( a * b ).even?
if c
p "Even"
else
p "Odd"
end
|
=begin
Problem https://atcoder.jp/contests/abc086/tasks/abc086_a
Reference https://qiita.com/Hayate_0807/items/2e9705091b181a104621
https://docs.ruby-lang.org/ja/search/version:2.3.0/query:even/#entry-1
=end
a,b = gets.chomp().split(" ").map(&:to_i)
=begin
p a
p b
=end
c = ( a * b ).even?
if c
puts("Even")
else
puts("Odd")
end
|
[
"call.function.change",
"io.output.change",
"call.arguments.change"
] | 1,201,764
| 1,201,765
|
u197300260
|
ruby
|
p03455
|
n = gets.split.map(&:to_i)
nn = n[0] * n[1]
print nn.even? "Even": "Odd"
|
n = gets.split.map(&:to_i)
nn = n[0] * n[1]
print nn.even? ? "Even": "Odd"
|
[
"call.arguments.change"
] | 1,201,916
| 1,201,917
|
u496979699
|
ruby
|
p03455
|
# frozen_string_literal: true
a, b = gets.chomp.strip(' ').map(&:to_i)
(a * b).even? ? puts('even') : puts('odd')
|
a, b = gets.chomp.split(' ').map(&:to_i)
(a * b).even? ? puts('Even') : puts('Odd')
|
[
"assignment.value.change",
"identifier.change",
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 1,201,969
| 1,201,970
|
u139629238
|
ruby
|
p03455
|
a, b = gets.chomp.split(" ").map(&:to_i);
if a*b % 2 == 0
p "Even"
else
p "Odd"
end
|
a, b = gets.chomp.split(" ").map(&:to_i)
if a*b%2==0
puts "Even"
else
puts "Odd"
end
|
[
"call.function.change",
"io.output.change"
] | 1,202,076
| 1,202,077
|
u973744316
|
ruby
|
p03455
|
a,b=gets.split.map(&:to_i)
puts a*b.odd? ? "Odd" : "Even"
|
a,b=gets.split.map(&:to_i)
puts (a*b).odd? ? "Odd" : "Even"
|
[
"control_flow.branch.if.condition.change"
] | 1,202,205
| 1,202,206
|
u585819925
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i)
if (a*b).even
puts "Even"
else
puts "Odd"
end
|
a,b = gets.chomp.split(" ").map(&:to_i)
if (a*b).even?
puts "Even"
else
puts "Odd"
end
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 1,202,249
| 1,202,250
|
u496981480
|
ruby
|
p03455
|
line = STDIN.gets.chomp.split(" ").map(&:to_i)
if (a * b) % 2 == 0
puts "Even"
else
puts "Odd"
end
|
a, b = STDIN.gets.chomp.split(" ").map(&:to_i)
if (a * b) % 2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"assignment.variable.change"
] | 1,202,304
| 1,202,305
|
u634969620
|
ruby
|
p03455
|
a, b = gets.chomp.split.map(&:to_i)
puts a*b.odd? ? "Odd" : "Even"
|
a, b = gets.chomp.split.map(&:to_i)
puts (a*b).odd? ? "Odd" : "Even"
|
[
"control_flow.branch.if.condition.change"
] | 1,202,371
| 1,202,372
|
u744908753
|
ruby
|
p03455
|
a = gets.split(' ').map(&:to_i)
b = a[0] * a[1]
if b % 2 == 0
puts Even
else b % 2 == 1
puts Odd
end
|
a = gets.split(' ').map(&:to_i)
b = a[0] * a[1]
if b % 2 == 0
puts "Even"
else b % 2 == 1
puts "Odd"
end
|
[
"call.arguments.change"
] | 1,202,390
| 1,202,389
|
u139321836
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i)
if a * b % 2 == 0
puts "even"
else
puts "odd"
end
|
a,b = gets.chomp.split(" ").map(&:to_i)
if a * b % 2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 1,202,453
| 1,202,454
|
u217283930
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i);
if a * b / 2 == 0
puts "Even"
else
puts "Odd"
end
|
a,b = gets.chomp.split(" ").map(&:to_i)
if a * b % 2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 1,202,458
| 1,202,454
|
u217283930
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i)
if a * b / 2 == 0
puts "Even"
else
puts "Odd"
end
|
a,b = gets.chomp.split(" ").map(&:to_i)
if a * b % 2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 1,202,456
| 1,202,461
|
u217283930
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i);
if a * b / 2 == 0
puts "Even"
else
puts "Odd"
end
|
a,b = gets.chomp.split(" ").map(&:to_i)
if a * b % 2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 1,202,458
| 1,202,461
|
u217283930
|
ruby
|
p03455
|
a, b = gets.split.map{ |i| i&.to_i }
x = a * b
p x
if x % 2 == 0
puts 'Even'
else
puts 'Odd'
end
|
a, b = gets.split.map{ |i| i&.to_i }
x = a * b
if x % 2 == 0
puts 'Even'
else
puts 'Odd'
end
|
[
"call.remove"
] | 1,202,516
| 1,202,517
|
u239218660
|
ruby
|
p03455
|
a, b = gets.split.map{ |i| i&.to_i }
x = a * b
p x
if x % 2 == 0
'Even'
else
'Odd'
end
|
a, b = gets.split.map{ |i| i&.to_i }
x = a * b
if x % 2 == 0
puts 'Even'
else
puts 'Odd'
end
|
[
"call.remove",
"io.output.change",
"call.add"
] | 1,202,518
| 1,202,517
|
u239218660
|
ruby
|
p03455
|
input = $stdin.read
a = input.split("")[0].to_i
b = input.split("")[2].to_i
result = a * b
if (result % 2 == 0)
puts("Even")
else
puts ("Odd")
end
|
input = $stdin.read
a = input.split(" ")[0].to_i
b = input.split(" ")[1].to_i
result = a * b
if (result % 2 == 0)
puts("Even")
else
puts ("Odd")
end
|
[
"literal.string.change",
"assignment.value.change",
"call.arguments.change",
"literal.number.integer.change",
"variable_access.subscript.index.change"
] | 1,202,523
| 1,202,524
|
u106770596
|
ruby
|
p03455
|
a, b = gets.chomp.split.map(&:to_i)
mul = a * b
p mul.odd? ? "Odd" : "Even"
|
a, b = gets.chomp.split.map(&:to_i)
mul = a * b
puts mul.odd? ? "Odd" : "Even"
|
[
"call.function.change",
"io.output.change"
] | 1,202,665
| 1,202,666
|
u618706993
|
ruby
|
p03455
|
a, b = gets.chomp.split.map(&:to_i)
if a % b == 0
puts "Even"
else
puts "Odd"
end
|
a, b = gets.chomp.split.map(&:to_i)
if (a * b) % 2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"control_flow.branch.if.condition.change",
"expression.operator.arithmetic.change"
] | 1,202,668
| 1,202,669
|
u618706993
|
ruby
|
p03455
|
a, b = gets.split(' ').map(&:to_i)
if a * b % 2 == 0
p "Even"
else
p "Odd"
end
|
a, b = gets.split(' ').map(&:to_i)
if a * b % 2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"call.function.change",
"io.output.change"
] | 1,202,702
| 1,202,703
|
u499544409
|
ruby
|
p03455
|
b,c=gets.chomp.split(" ").map(&:to_i);
if b*c.odd?
puts 'Odd'
else
puts 'Even'
end
|
b,c=gets.chomp.split(" ").map(&:to_i);
if (b*c).odd?
puts 'Odd'
else
puts 'Even'
end
|
[
"control_flow.branch.if.condition.change"
] | 1,202,743
| 1,202,742
|
u891506774
|
ruby
|
p03455
|
b,c=gets.strip.split(" ").map(&:to_i);
if b*c.odd?
puts 'Odd'
else
puts 'Even'
end
|
b , c = gets.strip.split(" ").map(&:to_i);
if (b*c).odd?
puts 'Odd'
else
puts 'Even'
end
|
[
"control_flow.branch.if.condition.change"
] | 1,202,741
| 1,202,744
|
u891506774
|
ruby
|
p03455
|
b,c=gets.chomp.split(" ").map(&:to_i);
if b*c.odd?
puts 'Odd'
else
puts 'Even'
end
|
b , c = gets.strip.split(" ").map(&:to_i);
if (b*c).odd?
puts 'Odd'
else
puts 'Even'
end
|
[
"assignment.value.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 1,202,743
| 1,202,744
|
u891506774
|
ruby
|
p03455
|
a,b = gets.split.map(&:to_i)
p a * b % 2 == 0 ? 'Even' : 'Odd'
|
a,b = gets.split.map(&:to_i)
puts a * b % 2 == 0 ? 'Even' : 'Odd'
|
[
"call.function.change",
"io.output.change"
] | 1,202,776
| 1,202,777
|
u889261386
|
ruby
|
p03455
|
a, b = gets.chomp.split(" ").map(&:to_i)
if a*b.odd?
puts "Odd"
else
puts "Even"
end
|
a, b = gets.split(" ").map(&:to_i)
if (a*b).odd?
puts "Odd"
else
puts "Even"
end
|
[
"call.remove",
"control_flow.branch.if.condition.change"
] | 1,202,838
| 1,202,839
|
u512524057
|
ruby
|
p03455
|
a,b = gets.strip.split.map(&to_i)
puts (a * b).odd? ? 'Odd' : 'Even'
|
a,b = gets.strip.split.map(&:to_i)
puts (a * b).odd? ? 'Odd' : 'Even'
|
[
"assignment.value.change",
"call.arguments.change"
] | 1,202,857
| 1,202,858
|
u874549552
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i)
seki = a*b
ans = (seki/2).zero? ? "Even" : "Odd"
print ans
|
a,b = gets.chomp.split(" ").map(&:to_i)
seki = a*b
ans = (seki%2).zero? ? "Even" : "Odd"
print ans
|
[
"expression.operator.arithmetic.change",
"assignment.value.change",
"control_flow.branch.if.condition.change"
] | 1,202,890
| 1,202,891
|
u545760065
|
ruby
|
p03455
|
a,b=gets.split.to_i
n=a*b
if n.odd?
puts "Odd"
else
puts "Even"
end
|
a,b=gets.split.map(&:to_i)
n=a*b
if n.odd?
puts "Odd"
else
puts "Even"
end
|
[
"assignment.value.change",
"identifier.change",
"call.arguments.add"
] | 1,202,940
| 1,202,941
|
u069859306
|
ruby
|
p03455
|
arr = gets.chomp.split(" ")
puts (arr[0].to_i + arr[1].to_i) % 2 == 0 ? "Even" : "Odd"
|
arr = gets.chomp.split(" ")
puts (arr[0].to_i * arr[1].to_i) % 2 == 0 ? "Even" : "Odd"
|
[
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 1,203,141
| 1,203,142
|
u422581886
|
ruby
|
p03455
|
a = gets
splited = a.split(" ")
jadge = splited[0].to_i * splited[1].to_i
puts jadge
if (jadge.to_i%2) == 0 then
puts "Even"
else
puts "Odd"
end
|
a = gets
splited = a.split(" ")
jadge = splited[0].to_i * splited[1].to_i
#puts jadge
if (jadge.to_i%2) == 0 then
puts "Even"
else
puts "Odd"
end
|
[
"call.remove"
] | 1,203,211
| 1,203,212
|
u021593636
|
ruby
|
p03455
|
a = gets
splited = a.split(" ")
jadge = splited[0].to_i * splited[1].to_i
puts jadge
if (jadge.to_i%2) == 0 then
puts "Even"
else
puts "Odd"
end
|
a = gets
splited = a.split(" ")
jadge = splited[0].to_i * splited[1].to_i
#puts jadge
if (jadge.to_i%2) == 0 then
puts "Even"
else
puts "Odd"
end
|
[
"call.remove"
] | 1,203,213
| 1,203,212
|
u021593636
|
ruby
|
p03455
|
a, b = gets.strip.split.map(&:to_i)
p (a * b).even? ? 'Even' : 'Odd'
|
a, b = gets.strip.split.map(&:to_i)
puts (a * b).even? ? 'Even' : 'Odd'
|
[
"call.function.change",
"io.output.change"
] | 1,203,228
| 1,203,229
|
u616199845
|
ruby
|
p03455
|
a, b = gets.strip.split.map(&:to_i)
p (a * b).even? ? 'even' : 'odd'
|
a, b = gets.strip.split.map(&:to_i)
puts (a * b).even? ? 'Even' : 'Odd'
|
[
"call.function.change",
"io.output.change",
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 1,203,230
| 1,203,229
|
u616199845
|
ruby
|
p03455
|
a,b = get.chomp.sprit(" ")
if (a.to_i * b.to_i ).even?
puts "Even"
else
puts "Odd"
end
|
a,b=gets.chop.split(" ")
if (a.to_i * b.to_i).even?
puts "Even"
else
puts "Odd"
end
|
[
"assignment.value.change",
"identifier.change",
"call.remove",
"call.add"
] | 1,203,271
| 1,203,272
|
u197037765
|
ruby
|
p03455
|
a,b=gets.chop.split(" ")
if (a.to_i*b.co_i).even?
puts "Even"
else
puts "Odd"
end
|
a,b=gets.chop.split(" ")
if (a.to_i * b.to_i).even?
puts "Even"
else
puts "Odd"
end
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 1,203,277
| 1,203,278
|
u272287743
|
ruby
|
p03455
|
a = gets
a.split(" ")
if (a[0].to_i * a[2].to_i).odd?
puts "Odd"
else
puts "Even"
end
|
a = gets
a = a.split(" ")
if (a[0].to_i * a[1].to_i).odd?
puts "Odd"
else
puts "Even"
end
|
[
"literal.number.integer.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 1,203,283
| 1,203,284
|
u330349345
|
ruby
|
p03455
|
a = gets
a.split(" ")
if (a[0].to_i * a[1].to_i).odd?
puts "Odd"
else
puts "Even"
end
|
a = gets
a = a.split(" ")
if (a[0].to_i * a[1].to_i).odd?
puts "Odd"
else
puts "Even"
end
|
[
"assignment.add"
] | 1,203,285
| 1,203,284
|
u330349345
|
ruby
|
p03455
|
a,b = gets.split("").map(&:to_i)
if (a * b)%2 == 0
print "Even"
else
print "Odd"
end
|
a,b = gets.split.map(&:to_i)
if (a * b)%2 == 0
print "Even"
else
print"Odd"
end
|
[
"call.arguments.change"
] | 1,203,337
| 1,203,338
|
u750429254
|
ruby
|
p03455
|
a,b = gets.split("").map(&:to_i)
if (a * b)%2 == 0
print "Even"
else
print"Odd"
end
|
a,b = gets.split.map(&:to_i)
if (a * b)%2 == 0
print "Even"
else
print"Odd"
end
|
[
"call.arguments.change"
] | 1,203,339
| 1,203,338
|
u750429254
|
ruby
|
p03455
|
a,b = gets.split("").map(&:to_i)
if (a * b)%2 == 0
print "Even"
else
print "Odd"
end
|
a,b = gets.split(" ").map(&:to_i)
if (a * b)%2 == 0
print "Even"
else
print "Odd"
end
|
[
"literal.string.change",
"assignment.value.change",
"call.arguments.change"
] | 1,203,337
| 1,203,340
|
u750429254
|
ruby
|
p03455
|
a,b = gets.split("").map(&:to_i)
if (a * b)%2 == 0
print "Even"
else
print"Odd"
end
|
a,b = gets.split(" ").map(&:to_i)
if (a * b)%2 == 0
print "Even"
else
print "Odd"
end
|
[
"literal.string.change",
"assignment.value.change",
"call.arguments.change"
] | 1,203,339
| 1,203,340
|
u750429254
|
ruby
|
p03455
|
a,b = gets.spilit("").map(&:to_i)
ans = a * b
puts ans.even? ? Even : Odd
|
a,b = gets.split(" ").map(&:to_i)
ans = a * b
puts ans.even? ? "Even" : "Odd"
|
[
"assignment.value.change",
"identifier.change",
"literal.string.change",
"call.arguments.change"
] | 1,203,428
| 1,203,429
|
u296101474
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i)
ans = (a*b)/2
if ans.even?
puts "Even"
else
puts "Odd"
end
|
a,b = gets.chomp.split(" ").map(&:to_i)
ans = (a*b)%2
if ans == 0
puts "Even"
else
puts "Odd"
end
|
[
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 1,203,430
| 1,203,431
|
u296101474
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i)
ans = (a*b)/2
if ans.even?
puts "even"
else
puts "odd"
end
|
a,b = gets.chomp.split(" ").map(&:to_i)
ans = (a*b)%2
if ans == 0
puts "Even"
else
puts "Odd"
end
|
[
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 1,203,432
| 1,203,431
|
u296101474
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i)
if (a*b)%2==1
puts('Even')
else
puts('Odd')
end
|
a,b = gets.chomp.split(" ").map(&:to_i)
if (a*b)%2==0
puts('Even')
else
puts('Odd')
end
|
[
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 1,203,453
| 1,203,454
|
u546157297
|
ruby
|
p03455
|
a,b=gets.chomp.split(" ").map(&:to_i);puts a*b%2==0 ? :Odd: :Even
|
a,b=gets.chomp.split(" ").map(&:to_i);puts a*b%2==0 ? :Even: :Odd
|
[] | 1,203,627
| 1,203,628
|
u274530567
|
ruby
|
p03455
|
#!/usr/bin/env ruby
ARGV.each do |v|
if v.to_i % 2 == 0
print "Even"
exit 0
end
end
print "Odd"
|
gets.split.each do |v|
if (v.to_i % 2) == 0
print "Even"
exit 0
end
end
print "Odd"
|
[
"call.add",
"control_flow.branch.if.condition.change"
] | 1,203,681
| 1,203,682
|
u765524040
|
ruby
|
p03455
|
a,b = gets.split(" ").map(&:to_i)
if a.even? || b.even?
p "Even"
else
p "Odd"
end
|
a,b = gets.split(" ").map(&:to_i)
if a.even? || b.even?
print "Even"
else
print "Odd"
end
|
[
"call.function.change",
"io.output.change"
] | 1,203,740
| 1,203,741
|
u301050616
|
ruby
|
p03455
|
gets.split(" ").map(&:to_i).any?(&:even?) ? put('Even') : puts('Odd')
|
gets.split(" ").map(&:to_i).any?(&:even?) ? puts('Even') : puts('Odd')
|
[
"misc.typo",
"identifier.change"
] | 1,203,764
| 1,203,765
|
u941522668
|
ruby
|
p03455
|
a, b = gets.split.map(&:to_i)
result = (a * b).odd? ? 'Even' : 'Odd'
puts result
|
a, b = gets.split.map(&:to_i)
result = (a * b).odd? ? 'Odd' : 'Even'
puts result
|
[
"literal.string.change",
"assignment.value.change"
] | 1,203,783
| 1,203,784
|
u610761300
|
ruby
|
p03455
|
a, b = gets.strip.split.map(&:to_i)
puts (a*b).odd? ? "Even":"Odd"
|
a, b = gets.strip.split.map(&:to_i)
puts (a*b).odd? ? "Odd":"Even"
|
[
"literal.string.change",
"call.arguments.change"
] | 1,203,785
| 1,203,786
|
u336011173
|
ruby
|
p03455
|
words=gets.split(" ")
p words
a=words[0].to_i
b=words[1].to_i
if 0 == (a*b)%2
print "Even\n"
else
print "Odd\n"
end
|
words=gets.split(" ")
a=words[0].to_i
b=words[1].to_i
if 0 == (a*b)%2
print "Even\n"
else
print "Odd\n"
end
|
[
"call.remove"
] | 1,203,809
| 1,203,810
|
u492425106
|
ruby
|
p03455
|
a,b=gets.chomp.split(" ").map { |e| e.to_i }
if a%2 == 0 || b%2 == 0
puts "Even"
else
puts "Yes"
end
|
a,b=gets.chomp.split(" ").map { |e| e.to_i }
if a%2 == 0 || b%2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 1,203,944
| 1,203,945
|
u267552846
|
ruby
|
p03455
|
a,b = gets.chomp.split(" ").map(&:to_i)
if a*b % 2 == 0
puts "even"
else
puts "odd"
end
|
a,b = gets.chomp.split(" ").map(&:to_i)
if a*b % 2 == 0
puts "Even"
else
puts "Odd"
end
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 1,204,049
| 1,204,050
|
u574326823
|
ruby
|
p03455
|
puts Gets.split.map(&:to_i).inject(:*).even? ? 'Even' : 'Odd'
|
puts gets.split.map(&:to_i).inject(:*).even? ? 'Even' : 'Odd'
|
[
"control_flow.branch.if.condition.change"
] | 1,204,113
| 1,204,114
|
u304198114
|
ruby
|
p03455
|
a, b = gets.chomp.map(&:to_i)
if a * b.odd?
puts "Odd"
else
puts "Even"
end
|
a, b = gets.split.map(&:to_i)
if (a * b).odd?
puts "Odd"
else
puts "Even"
end
|
[
"assignment.value.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 1,204,326
| 1,204,327
|
u501869915
|
ruby
|
p03455
|
a, b = gets.split.map(&:to_i)
puts (a * b).odd? ? "dd" : "Even"
|
a, b = gets.split.map(&:to_i)
puts (a * b).odd? ? "Odd" : "Even"
|
[
"literal.string.change",
"call.arguments.change"
] | 1,204,342
| 1,204,343
|
u172773620
|
ruby
|
p03455
|
a, b = gets.split.map(&:to_i)
p (a * b).odd? ? "Odd" : "Even"
|
a, b = gets.split.map(&:to_i)
puts (a * b).odd? ? "Odd" : "Even"
|
[
"call.function.change",
"io.output.change"
] | 1,204,344
| 1,204,343
|
u172773620
|
ruby
|
p03455
|
a, b = gets.chomp.split(" ").map(&:to_i)
total = a + b
if total.even?
puts 'Even'
else
puts 'Odd'
end
|
a, b = gets.chomp.split(" ").map(&:to_i)
total = a * b
if total.even?
puts 'Even'
else
puts 'Odd'
end
|
[
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 1,204,597
| 1,204,598
|
u464387808
|
ruby
|
p03456
|
a,b = gets.split
ar = []
(0..100100).to_a.each do |v|
ar << v**2
end
if ar.include?((a+b).to_i)
"Yes"
else
"No"
end
|
a,b = gets.split
ar = []
(0..100100).to_a.each do |v|
ar << v**2
end
if ar.include?((a+b).to_i)
puts "Yes"
else
puts "No"
end
|
[
"io.output.change",
"call.add"
] | 1,205,592
| 1,205,593
|
u012110567
|
ruby
|
p03456
|
n=gets.split.inject(:+).to_i;r=Math.sqrt(n);puts r**2==n ?'Yes':'No'
|
n=gets.split.inject(:+).to_i;r=Math.sqrt(n).to_i;puts r**2==n ?'Yes':'No'
|
[
"call.add"
] | 1,205,766
| 1,205,767
|
u630043039
|
ruby
|
p03456
|
a, b = gets.chomp.split(" ").map(&:to_s)
c = (a + b).to_i
sqc = Math.sqrt(c)
if (sqc*sqc) == c
puts "Yes"
else
puts "No"
end
|
a, b = gets.chomp.split(" ").map(&:to_s)
c = (a + b).to_i
sqc = Math.sqrt(c).floor
if (sqc*sqc) == c
puts "Yes"
else
puts "No"
end
|
[
"call.add"
] | 1,206,591
| 1,206,592
|
u512524057
|
ruby
|
p03456
|
n = gets.chomp.tr(" ","").to_i
m = ((n**(1/2.0)).to_i)**2
if n == m then
puts "YES"
else
puts "NO"
end
|
n = gets.chomp.tr(" ","").to_i
s = ((n**(1/2.0)).to_i)**2
if n == s then
puts "Yes"
else
puts "No"
end
|
[
"assignment.variable.change",
"identifier.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 1,206,636
| 1,206,637
|
u606976120
|
ruby
|
p03456
|
n = Math.sqrt(gets().chomp.split( ).join().to_i)
p n == n.to_i ? 'Yes' : 'No'
|
n = Math.sqrt(gets().chomp.split(' ').join().to_i)
puts n == n.to_i ? 'Yes' : 'No'
|
[
"call.function.change",
"io.output.change"
] | 1,206,657
| 1,206,658
|
u246054039
|
ruby
|
p03456
|
ab = gets.split.join.to_i
puts ab == Math::sqrt(a).to_i**2 ? 'Yes' : 'No'
|
ab = gets.split.join.to_i
puts ab == Math::sqrt(ab).to_i**2 ? 'Yes' : 'No'
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 1,207,046
| 1,207,047
|
u124214522
|
ruby
|
p03456
|
puts Math.sqrt(a=gets.split.join.to_i)**2==a ? :Yes: :No
|
puts Math.sqrt(a=gets.split.join.to_i).to_i**2==a ? :Yes: :No
|
[
"call.add"
] | 1,207,253
| 1,207,254
|
u657913472
|
ruby
|
p03456
|
n = gets.split.join.to_i
tmp = Math.sqrt(n)
p tmp == tmp.truncate ? "Yes" : "No"
|
n = gets.split.join.to_i
tmp = Math.sqrt(n)
puts tmp == tmp.truncate ? "Yes" : "No"
|
[
"call.function.change",
"io.output.change"
] | 1,207,668
| 1,207,669
|
u592423934
|
ruby
|
p03456
|
n = gets.split.join.to_i
tmp = Math.sqrt(n)
p tmp == tmp.truncate ? "Yes" : "No"
|
n = gets.split.join.to_i
tmp = Math.sqrt(n)
puts tmp == tmp.truncate ? "Yes" : "No"
|
[
"call.function.change",
"io.output.change"
] | 1,207,670
| 1,207,669
|
u592423934
|
ruby
|
p03457
|
count = gets.chomp.to_i
data = count.times.map { gets.strip.split.map(&:to_i) }
current = [0, 0, 0]
def is_reachable?(current, next_data)
tc, xc, yc = current
tn, xn, yn = next_data
dt = tc - tn
dist = (xn - xc).abs + (yn - yc).abs
return false if dist > dt
(dist - dt).even?
end
data.each do |d|
unless is_reachable?(current, d)
puts 'No'
exit 0
end
current = d
end
puts 'Yes'
|
count = gets.chomp.to_i
data = count.times.map { gets.strip.split.map(&:to_i) }
current = [0, 0, 0]
def is_reachable?(current, next_data)
tc, xc, yc = current
tn, xn, yn = next_data
dt = tn - tc
dist = (xn - xc).abs + (yn - yc).abs
return false if dist > dt
(dist - dt).even?
end
data.each do |d|
unless is_reachable?(current, d)
puts 'No'
exit 0
end
current = d
end
puts 'Yes'
|
[
"expression.operation.binary.remove"
] | 1,208,121
| 1,208,122
|
u856154762
|
ruby
|
p03457
|
count = gets.chomp.to_i
data = count.times.map { gets.strip.split.map(&:to_i) }
current = [0, 0, 0]
def is_reachable?(current, next_data)
tc, xc, yc = current
tn, xn, yn = next_data
dt = tc - tn
dist = (xn - xc).abs + (yn - yc).abs
return false if dist > dt
(dist - dt).even?
end
data.each do |d|
unless is_reachable?(current, d)
puts 'NO'
exit 0
end
current = d
end
puts 'Yes'
|
count = gets.chomp.to_i
data = count.times.map { gets.strip.split.map(&:to_i) }
current = [0, 0, 0]
def is_reachable?(current, next_data)
tc, xc, yc = current
tn, xn, yn = next_data
dt = tn - tc
dist = (xn - xc).abs + (yn - yc).abs
return false if dist > dt
(dist - dt).even?
end
data.each do |d|
unless is_reachable?(current, d)
puts 'No'
exit 0
end
current = d
end
puts 'Yes'
|
[
"expression.operation.binary.remove",
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 1,208,123
| 1,208,122
|
u856154762
|
ruby
|
p03457
|
def move?(current_point, next_point)
current_time, current_x, current_y = current_point
next_time, next_x, next_y = next_point
distance = (current_x - next_x).abs + (current_y - next_y).abs
time = next_time - current_time
return false if distance > time
(distance - time).even?
end
count = gets.chomp.to_i
point_data = count.times.map { gets.chomp.split.map(&:to_i) }
current_point = [0, 0, 0]
point_data.each do |point|
unless move?(current_point, point)
puts 'NO'
exit true
end
current_point = point
end
puts 'Yes'
|
def move?(current_point, next_point)
current_time, current_x, current_y = current_point
next_time, next_x, next_y = next_point
distance = (current_x - next_x).abs + (current_y - next_y).abs
time = next_time - current_time
return false if distance > time
(distance - time).even?
end
count = gets.chomp.to_i
point_data = count.times.map { gets.chomp.split.map(&:to_i) }
current_point = [0, 0, 0]
point_data.each do |point|
unless move?(current_point, point)
puts 'No'
exit true
end
current_point = point
end
puts 'Yes'
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 1,208,370
| 1,208,371
|
u785659943
|
ruby
|
p03457
|
def move?(current_point, next_point)
current_time, current_x, current_y = current_point
next_time, next_x, next_y = next_point
distance = (current_x - next_x).abs + (current_y - next_y).abs
time = next_time - current_time
return false if distance > time
(distance - time).even?
end
count = gets.chomp.to_i
point_data = count.times.map { gets.chomp.split.map(&:to_i) }
current_point = [0, 0, 0]
movable = false
point_data.each do |point|
unless move?(current_point, point)
puts 'NO'
exit true
end
current_point = point
end
puts 'Yes'
|
def move?(current_point, next_point)
current_time, current_x, current_y = current_point
next_time, next_x, next_y = next_point
distance = (current_x - next_x).abs + (current_y - next_y).abs
time = next_time - current_time
return false if distance > time
(distance - time).even?
end
count = gets.chomp.to_i
point_data = count.times.map { gets.chomp.split.map(&:to_i) }
current_point = [0, 0, 0]
point_data.each do |point|
unless move?(current_point, point)
puts 'No'
exit true
end
current_point = point
end
puts 'Yes'
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 1,208,372
| 1,208,371
|
u785659943
|
ruby
|
p03456
|
n=`tr -d ' '`.to_i;puts n==Math.sqrt(n)**2?:Yes: :No
|
n=`tr -d ' '`.to_i;puts n==Math.sqrt(n).to_i**2?:Yes: :No
|
[
"control_flow.branch.if.condition.change",
"call.add"
] | 1,208,518
| 1,208,519
|
u280667879
|
ruby
|
p03456
|
input = gets.split.join.to_i
output = Math.sqrt(input).to_i
if output ** 2 == input
puts 'yes'
else
puts 'No'
end
|
input = gets.split.join.to_i
output = Math.sqrt(input).to_i
if output ** 2 == input
puts 'Yes'
else
puts 'No'
end
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 1,208,520
| 1,208,521
|
u137910698
|
ruby
|
p03456
|
input = gets.split.join.to_i
output = Math.sqrt(input).to_i
if output ** 2 == input
puts output
else
puts 'No'
end
|
input = gets.split.join.to_i
output = Math.sqrt(input).to_i
if output ** 2 == input
puts 'Yes'
else
puts 'No'
end
|
[
"call.arguments.change"
] | 1,208,522
| 1,208,521
|
u137910698
|
ruby
|
p03457
|
n = gets.to_i
line = []
n.times do |i|
line[i] = gets.split.map(&:to_i)
end
old = [0, 0, 0]
line.each do |l|
check = l[0] - old[0] - (old[1] - l[1]).abs - (old[2] - l[2]).abs
if check < 0 || walk.odd?
puts 'No'
exit
end
old = l
end
puts 'Yes'
|
n = gets.to_i
line = []
n.times do |i|
line[i] = gets.split.map(&:to_i)
end
old = [0, 0, 0]
line.each do |l|
check = l[0] - old[0] - (old[1] - l[1]).abs - (old[2] - l[2]).abs
if check < 0 || check.odd?
puts 'No'
exit
end
old = l
end
puts 'Yes'
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 1,208,645
| 1,208,646
|
u104886851
|
ruby
|
p03457
|
# ENV[Z = 'RUBY_THREAD_VM_STACK_SIZE'] || exec( { Z => '50000000' },'ruby',$0)
# readlines.map(&:chomp!).map { |e| e.split.map(&:to_i) }
# gets.split.map(&:to_i)
require "pry"
n = gets.to_i
t = []
x = []
y = []
n.times do ||
line = gets.split.map(&:to_i)
t << line[0]
x << line[1]
y << line[2]
end
current_time = 0
current_pos = [0,0]
flag = true
t.each_with_index do |time, index|
move_time = time - current_time
move_distance = ((current_pos[0] - x[index]) + (current_pos[1] - y[index])).abs
if move_time % 2 == 0 && move_distance % 2 == 0 && move_distance <= time
elsif move_time % 2 == 1 && move_distance % 2 == 1 && move_distance <= time
else
flag = false
end
end
puts flag ? "Yes" : "No"
|
# ENV[Z = 'RUBY_THREAD_VM_STACK_SIZE'] || exec( { Z => '50000000' },'ruby',$0)
# readlines.map(&:chomp!).map { |e| e.split.map(&:to_i) }
# gets.split.map(&:to_i)
n = gets.to_i
t = []
x = []
y = []
n.times do ||
line = gets.split.map(&:to_i)
t << line[0]
x << line[1]
y << line[2]
end
current_time = 0
current_pos = [0,0]
flag = true
t.each_with_index do |time, index|
move_time = time - current_time
move_distance = ((current_pos[0] - x[index]) + (current_pos[1] - y[index])).abs
if move_time % 2 == 0 && move_distance % 2 == 0 && move_distance <= time
elsif move_time % 2 == 1 && move_distance % 2 == 1 && move_distance <= time
else
flag = false
end
end
puts flag ? "Yes" : "No"
|
[
"call.remove"
] | 1,208,682
| 1,208,683
|
u219902564
|
ruby
|
p03457
|
n = gets.chomp.to_i
x = 0; y = 0; t = 0
n.times do
tt, xx, yy = gets.chomp.split(" ").map(&:to_i)
if (xx-x).abs + (yy-y).abs > tt - t || ((xx-x).abs + (yy-y).abs).even? == (tt-t).even? then
puts "No"
exit
end
t = tt
x = xx
y = yy
end
puts "Yes"
|
n = gets.chomp.to_i
x = 0; y = 0; t = 0
n.times do
tt, xx, yy = gets.chomp.split(" ").map(&:to_i)
if (xx-x).abs + (yy-y).abs > tt - t || ((xx-x).abs + (yy-y).abs).even? != (tt-t).even? then
puts "No"
exit
end
t = tt
x = xx
y = yy
end
puts "Yes"
|
[
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 1,208,799
| 1,208,800
|
u409390792
|
ruby
|
p03457
|
n = gets.to_i
points = n.times.map{ gets.strip.split(' ').map(&:to_i) }
dist = points[0][1] + points[0][2]
_t = 0
_x = 0
_y = 0
points.each do |p|
t, x, y = p
dt = t - _t
dist = (x - _x).abs + (y - _y).abs
if dt >= dist && dt.odd? == dist.odd?
_t = t
_x = x
_y = y
else
puts 'NO'
exit
end
end
puts 'YES'
|
n = gets.to_i
points = n.times.map{ gets.strip.split(' ').map(&:to_i) }
dist = points[0][1] + points[0][2]
_t = 0
_x = 0
_y = 0
points.each do |p|
t, x, y = p
dt = t - _t
dist = (x - _x).abs + (y - _y).abs
if dt >= dist && dt.odd? == dist.odd?
_t = t
_x = x
_y = y
else
puts 'No'
exit
end
end
puts 'Yes'
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 1,208,815
| 1,208,816
|
u308460366
|
ruby
|
p03457
|
n = gets.to_i
def judge(t,x,y)
x.abs + y.abs <= t && (x+y)%2 == t%2
end
ans = "YES"
s = 0
a = 0
b = 0
(1..n).each do |i|
t,x,y = gets.chomp.split(" ").map(&:to_i)
if judge(t-s,x-a,y-b)
s = t
a = x
b = y
else
ans = "NO"
break
end
end
puts ans
|
n = gets.to_i
def judge(t,x,y)
x.abs + y.abs <= t && (x+y)%2 == t%2
end
ans = "Yes"
s = 0
a = 0
b = 0
(1..n).each do |i|
t,x,y = gets.chomp.split(" ").map(&:to_i)
if judge(t-s,x-a,y-b)
s = t
a = x
b = y
else
ans = "No"
break
end
end
puts ans
|
[
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 1,209,220
| 1,209,221
|
u058568575
|
ruby
|
p03457
|
n = gets.to_i
def judge(t,x,y)
x + y <= t && (x+y)%2 == t%2
end
ans = "YES"
s = 0
a = 0
b = 0
(1..n).each do |i|
t,x,y = gets.chomp.split(" ").map(&:to_i)
if judge(t-s,x-a,y-b)
s = t
a = x
b = y
else
ans = "NO"
break
end
end
puts ans
|
n = gets.to_i
def judge(t,x,y)
x.abs + y.abs <= t && (x+y)%2 == t%2
end
ans = "Yes"
s = 0
a = 0
b = 0
(1..n).each do |i|
t,x,y = gets.chomp.split(" ").map(&:to_i)
if judge(t-s,x-a,y-b)
s = t
a = x
b = y
else
ans = "No"
break
end
end
puts ans
|
[
"call.add",
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 1,209,222
| 1,209,221
|
u058568575
|
ruby
|
p03457
|
n=gets.chomp.to_i
f=true
n.times do |i|
t,x,y=gets.chomp.split.map &:to_i
z=t-x-y
f=false if z<0 && z.odd?
end
puts f ? 'Yes' : 'No'
|
n=gets.chomp.to_i
f=true
n.times do |i|
t,x,y=gets.chomp.split.map &:to_i
z=t-x-y
f=false if z<0 || z.odd?
end
puts f ? 'Yes' : 'No'
|
[
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 1,209,563
| 1,209,564
|
u854471099
|
ruby
|
p03457
|
n = gets.chomp.to_i
t = []
x = []
y = []
n.times do |i|
array = gets.chomp.split(' ').map(&:to_i)
t << array[0]
x << array[1]
y << array[2]
end
ans = true
n.times do |i|
if i == 0
time = t[i]
dist = x[i] + y[i]
else
time = t[i] - t[i - 1]
dist = (x[i] - x[i - 1]).abs + (y[i] - y[i - 1]).abs
end
ans = false unless time >= dist && time % 2 == dist % 2
end
p ans ? "Yes" : "No"
|
n = gets.chomp.to_i
t = []
x = []
y = []
n.times do |i|
array = gets.chomp.split(' ').map(&:to_i)
t << array[0]
x << array[1]
y << array[2]
end
ans = true
n.times do |i|
if i == 0
time = t[i]
dist = x[i] + y[i]
else
time = t[i] - t[i - 1]
dist = (x[i] - x[i - 1]).abs + (y[i] - y[i - 1]).abs
end
ans = false unless time >= dist && time % 2 == dist % 2
end
puts ans ? "Yes" : "No"
|
[
"call.function.change",
"io.output.change"
] | 1,209,637
| 1,209,638
|
u764011970
|
ruby
|
p03457
|
plan=gets.to_i
t,x,y=[],[],[]
x_n,y_n,t_n=0,0,0
plan.times do |i|
t[i],x[i],y[i]=gets.split.map(&:to_i)
if (t[i]-t_n)>=(x[i]-x_n).abs+(y[i]-y_n).abs && (t[i].even? == (x[i]+y[i]).even?)
@result="YES"
x_n=x[i]
y_n=y[i]
t_n=t[i]
else
@result="NO"
break
end
end
puts @result
|
plan=gets.to_i
t,x,y=[],[],[]
x_n,y_n,t_n=0,0,0
plan.times do |i|
t[i],x[i],y[i]=gets.split.map(&:to_i)
if (t[i]-t_n)>=(x[i]-x_n).abs+(y[i]-y_n).abs && (t[i].even? == (x[i]+y[i]).even?)
@result="Yes"
x_n=x[i]
y_n=y[i]
t_n=t[i]
else
@result="No"
break
end
end
puts @result
|
[
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 1,209,647
| 1,209,648
|
u728923182
|
ruby
|
p03457
|
plan = [{t: 0, x: 0, y: 0}]
gets.to_i.times do
input = gets.split(' ').map(&:to_i)
plan += [{ t: input[0], x: input[1], y: input[2] }]
end
ans = nil
(plan.size - 1).times do |i|
time = plan[i + 1][:t] - plan[i][:t]
x_distance = (plan[i + 1][:x] - plan[i][:x]).abs
y_distance = (plan[i + 1][:y] - plan[i][:y]).abs
if (x_distance + y_distance <= time) && ((x_distance + y_distance) % 2 == time % 2)
ans = 'YES'
else
ans = 'NO'
break
end
end
puts ans
|
plan = [{t: 0, x: 0, y: 0}]
gets.to_i.times do
input = gets.split(' ').map(&:to_i)
plan.push({ t: input[0], x: input[1], y: input[2] })
end
ans = nil
(plan.size - 1).times do |i|
time = plan[i + 1][:t] - plan[i][:t]
x_distance = (plan[i + 1][:x] - plan[i][:x]).abs
y_distance = (plan[i + 1][:y] - plan[i][:y]).abs
if (x_distance + y_distance <= time) && ((x_distance + y_distance) % 2 == time % 2)
ans = 'Yes'
else
ans = 'No'
break
end
end
puts ans
|
[
"call.arguments.change",
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 1,209,665
| 1,209,664
|
u071557846
|
ruby
|
p03457
|
n = gets.to_i
s, x, y = 0, 0, 0
n.times do
n_s, n_x, n_y = gets.chomp.split.map(&:to_i)
d_x = (n_x - x).abs
d_y = (n_y - y).abs
diff = (d_x + d_y) - (n_s - s)
p diff
if diff > 0 or diff % 2 != 0
puts "No"
exit 0
end
s, x, y = n_s, n_x, n_y
end
puts "Yes"
|
n = gets.to_i
s, x, y = 0, 0, 0
n.times do
n_s, n_x, n_y = gets.chomp.split.map(&:to_i)
d_x = (n_x - x).abs
d_y = (n_y - y).abs
diff = (d_x + d_y) - (n_s - s)
if diff > 0 or diff % 2 != 0
puts "No"
exit 0
end
s, x, y = n_s, n_x, n_y
end
puts "Yes"
|
[
"call.remove"
] | 1,209,737
| 1,209,738
|
u427155858
|
ruby
|
p03457
|
n = gets.to_i
t = [], x = [], y = []
n.times do |i|
t[i], x[i], y[i] = gets.split.map(&:to_i)
end
n.times do |i|
if x[i]+y[i] > t[0]
puts "No"
exit
end
if (x[i]+y[i])%2 != 0 && t[i]%2 == 0
puts "No"
exit
end
if (x[i]+y[i])%2 == 0 && t[i]%2 != 0
puts "No"
exit
end
end
puts "Yes"
|
n = gets.to_i
t = [], x = [], y = []
n.times do |i|
t[i], x[i], y[i] = gets.split.map(&:to_i)
end
n.times do |i|
if x[i]+y[i] > t[i]
puts "No"
exit
end
if (x[i]+y[i])%2 != 0 && t[i]%2 == 0
puts "No"
exit
end
if (x[i]+y[i])%2 == 0 && t[i]%2 != 0
puts "No"
exit
end
end
puts "Yes"
|
[
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 1,209,813
| 1,209,814
|
u475329018
|
ruby
|
p03457
|
a = gets.chomp.to_i
c = [[0, 0, 0]]
while s = gets
c.push(s.split.map(&:to_i))
end
t = 0
for i in 1..a
t = 0
for j in 0..((c[i][0] - c[i - 1][0]) / 2)
if (c[i][1] - c[i - 1][1]).abs + (c[i][2] - c[i - 1][2]).abs + 2 * j == (c[i][0] - c[i - 1][0])
t = 1
end
if t == 0
puts "No"
exit
end
end
end
puts "Yes"
#p a
#p c
|
a = gets.chomp.to_i
c = [[0, 0, 0]]
while s = gets
c.push(s.split.map(&:to_i))
end
t = 0
for i in 1..a
t = 0
for j in 0..(c[i][0] - c[i - 1][0])
if (c[i][1] - c[i - 1][1]).abs + (c[i][2] - c[i - 1][2]).abs + 2 * j == (c[i][0] - c[i - 1][0])
t = 1
end
end
#puts "#{t} #{j}"
if t == 0
puts "No"
exit
end
#end
end
puts "Yes"
#p a
#p c
|
[
"expression.operation.binary.remove"
] | 1,209,883
| 1,209,884
|
u614043796
|
ruby
|
p03457
|
a = gets.chomp.to_i
c = [[0, 0, 0]]
while s = gets
c.push(s.split.map(&:to_i))
end
t = 0
for i in 1..a
for j in 0..(c[i][0] - c[i - 1][0])
if (c[i][1] - c[i - 1][1]).abs + (c[i][2] - c[i - 1][2]).abs + 2 * j == (c[i][0] - c[i - 1][0])
t = 1
end
if t == 0
puts "No"
exit
end
end
end
puts "Yes"
|
a = gets.chomp.to_i
c = [[0, 0, 0]]
while s = gets
c.push(s.split.map(&:to_i))
end
t = 0
for i in 1..a
t = 0
for j in 0..(c[i][0] - c[i - 1][0])
if (c[i][1] - c[i - 1][1]).abs + (c[i][2] - c[i - 1][2]).abs + 2 * j == (c[i][0] - c[i - 1][0])
t = 1
end
end
#puts "#{t} #{j}"
if t == 0
puts "No"
exit
end
#end
end
puts "Yes"
#p a
#p c
|
[
"assignment.add"
] | 1,209,885
| 1,209,884
|
u614043796
|
ruby
|
p03457
|
n = gets.to_i
flag = true
old_t, old_a, old_b = 0, 0, 0
n.times do
t,a,b = gets.split.map(&:to_i)
diff_t = (t - old_t)
diff_a = (a - old_a)
diff_b = (b - old_b)
distance = diff_a+diff_b
if diff_t < distance || (distance+diff_t).odd?
flag = false
end
old_t = t
old_t = a
old_b = b
end
if flag
puts 'Yes'
else
puts 'No'
end
|
n = gets.to_i
flag = true
old_t, old_a, old_b = 0, 0, 0
n.times do
t,a,b = gets.split.map(&:to_i)
diff_t = (t - old_t)
diff_a = (a - old_a)
diff_b = (b - old_b)
distance = diff_a+diff_b
if diff_t < distance || (distance+diff_t).odd?
flag = false
end
old_t = t
old_a = a
old_b = b
end
if flag
puts 'Yes'
else
puts 'No'
end
|
[
"assignment.variable.change",
"identifier.change"
] | 1,210,158
| 1,210,159
|
u137910698
|
ruby
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.