buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
def Suit2Num(s) return 0 if s == "S" return 1 if s == "H" return 2 if s == "C" return 3 if s == "D" nil end def Num2Suit(n) return "S" if n == 0 return "H" if n == 1 return "C" if n == 2 return "D" if n == 3 nil end s = Array.new(4) 4.times { |i| s[i] = Array.new(13) } n = gets.to_i n.times { cs...
def Suit2Num(s) return 0 if s == "S" return 1 if s == "H" return 2 if s == "C" return 3 if s == "D" nil end def Num2Suit(n) return "S" if n == 0 return "H" if n == 1 return "C" if n == 2 return "D" if n == 3 nil end s = Array.new(4) 4.times { |i| s[i] = Array.new(13) } n = gets.to_i n.times { cs...
[["-", 196, 196, 8, 734, 0, 662, 31, 761, 0, 22], ["+", 196, 196, 8, 734, 0, 662, 31, 761, 0, 22], ["-", 0, 662, 31, 742, 0, 738, 31, 652, 486, 22], ["+", 0, 662, 31, 742, 0, 738, 31, 652, 486, 22], ["-", 196, 196, 8, 734, 0, 662, 12, 557, 0, 6], ["+", 196, 196, 8, 734, 0, 662, 12, 557, 0, 6]]
4
190
n = gets.to_i allmk = ["S","H","D","C"] arr = Array.new(52) n.times{ card = STDIN.gets.split(" ") mk = allmk.index(card[0]) ## 入力したカードがどのマークか探し、何番目のマークかを出力 num = card[1].to_i-1 arr[mk*13+num] = 1 ## 52の配列のうち、カードが入力された配列番号に1を入力 } 0.upto(3){|i| 0.upto(12){|j| if arr[i*13+j] != 1 ## 1が配列番号に入力されていない場合 ...
n = gets.to_i allmk = ["S","H","C","D"] arr = Array.new(52) n.times{ card = STDIN.gets.split(" ") mk = allmk.index(card[0]) ## 入力したカードがどのマークか探し、何番目のマークかを出力 num = card[1].to_i-1 arr[mk*13+num] = 1 ## 52の配列のうち、カードが入力された配列番号に1を入力 } 0.upto(3){|i| 0.upto(12){|j| if arr[i*13+j] != 1 ## 1が配列番号に入力されていない場合 ...
[["-", 0, 493, 0, 662, 12, 516, 0, 557, 0, 6], ["+", 0, 493, 0, 662, 12, 516, 0, 557, 0, 6]]
4
137
n = gets.to_i spade, heart, club, diamond = [], [], [], [] suits = ["S", "H", "C", "D"] num = 1..13 n.times do |i| suit, number = gets.split case suit when suits[0] spade << number.to_i when suits[1] heart << number.to_i when suits[2] club << number.to_i when suits[3] diamond << number.to_i ...
n = gets.to_i spade, heart, club, diamond = [], [], [], [] suits = ["S", "H", "C", "D"] num = 1..13 n.times do |i| suit, number = gets.split case suit when suits[0] spade << number.to_i when suits[1] heart << number.to_i when suits[2] club << number.to_i when suits[3] diamond << number.to_i ...
[["+", 196, 737, 8, 736, 0, 121, 15, 748, 17, 111]]
4
161
def r(a,s) (1..13).each{|i| if !(a.include?(s+" #{i}")) puts s+" #{i}" end } end n=gets.to_i a=[] n.times{ a.push(gets) } r(a,"S") r(a,"H") r(a,"D") r(a,"C")
def r(a,s) (1..13).each{|i| if !(a.include?(s+" #{i}\n")) puts s+" #{i}" end } end n=gets.to_i a=[] n.times{a.push(gets)} r(a,"S") r(a,"H") r(a,"C") r(a,"D")
[["+", 0, 652, 3, 4, 0, 738, 12, 557, 0, 44], ["-", 0, 493, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 493, 0, 652, 3, 4, 0, 557, 0, 6]]
4
99
s = [1,2,3,4,5,6,7,8,9,10,11,12,13] h = [1,2,3,4,5,6,7,8,9,10,11,12,13] c = [1,2,3,4,5,6,7,8,9,10,11,12,13] d = [1,2,3,4,5,6,7,8,9,10,11,12,13] n = gets.to_i for i in 1..n mark, num = gets.split mark = mark.to_s num = num.to_i if mark == "S" s.delete(num) elsif mark == "H" h.delete(num) ...
s = [1,2,3,4,5,6,7,8,9,10,11,12,13] h = [1,2,3,4,5,6,7,8,9,10,11,12,13] c = [1,2,3,4,5,6,7,8,9,10,11,12,13] d = [1,2,3,4,5,6,7,8,9,10,11,12,13] n = gets.to_i for i in 1..n mark, num = gets.split mark = mark.to_s num = num.to_i if mark == "S" s.delete(num) elsif mark == "H" h.delete(num) ...
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 486, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 486, 22]]
4
254
n=gets.to_i h={} n.times do a=gets h[a.chomp] = 1 end for m in ["S","H","C","D"] do for i in 1..13 do puts "#{m} #{i}" if !h.select?(m+" "+i.to_s) end end
n=gets.to_i h={} n.times do a=gets h[a.chomp] = 1 end for m in ["S","H","C","D"] do for i in 1..13 do puts "#{m} #{i}" if !h.has_key?(m+" "+i.to_s) end end
[["-", 8, 170, 0, 751, 15, 748, 439, 652, 735, 22], ["+", 8, 170, 0, 751, 15, 748, 439, 652, 735, 22]]
4
81
n = gets.to_i cards = [] %W(S H C D).each do |suit| 1.upto(13) {|i| cards << "#{suit} #{i}"} end n.times {cards -= [gets]} puts cards
n = gets.to_i cards = [] %W(S H C D).each do |suit| 1.upto(13) {|i| cards << "#{suit} #{i}"} end n.times {cards -= [gets.chomp]} puts cards
[["+", 8, 734, 0, 755, 12, 516, 0, 652, 17, 131], ["+", 8, 734, 0, 755, 12, 516, 0, 652, 735, 22]]
4
56
readlines.map(&:split) cards.shift picture = ["S","H","C","D"] number = [*1..13] 4.times do |timesloop| newarray = [] temparray = cards.select{|sel| sel[0] == picture[(timesloop)]} temparray = temparray.map{|a,b| b.to_i} newarray = number - temparray if newarray.count > 0 for put in ...
cards = readlines.map(&:split) cards.shift picture = ["S","H","C","D"] number = [*1..13] 4.times do |timesloop| newarray = [] temparray = cards.select{|sel| sel[0] == picture[(timesloop)]} temparray = temparray.map{|a,b| b.to_i} newarray = number - temparray if newarray.count > 0 f...
[["+", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 0, 32]]
4
119
n = gets.to_i obj = {} obj['S'] = [false]*13 obj['H'] = [false]*13 obj['C'] = [false]*13 obj['D'] = [false]*13 n.times do |i| k, v = gets.split obj[k][v.to_i - 1] = true end obj.each do |key, val| (val.length - 1).times do |i| puts "#{key} #{i + 1}" unless val[i] end end
n = gets.to_i obj = {} obj['S'] = [false]*13 obj['H'] = [false]*13 obj['C'] = [false]*13 obj['D'] = [false]*13 n.times do |i| k, v = gets.split obj[k][v.to_i - 1] = true end obj.each do |key, val| val.length.times do |i| puts "#{key} #{i + 1}" unless val[i] end end
[["-", 196, 737, 8, 736, 0, 652, 486, 739, 0, 24], ["-", 8, 736, 0, 652, 486, 739, 0, 738, 17, 33], ["-", 8, 736, 0, 652, 486, 739, 0, 738, 12, 612], ["-", 196, 737, 8, 736, 0, 652, 486, 739, 0, 25]]
4
126
n=int(input()) card=[] for suit in ["S","H","C","D"]: for rank in list(map(str,range(1,14))): card.append(suit+" "+rank+" ") for i in range(n): card.remove(input()) for c in card: print(c)
n=int(input()) card=[] for suit in ["S","H","C","D"]: for rank in list(map(str,range(1,14))): card.append(suit+" "+rank) for i in range(n): card.remove(input()) for c in card: print(c)
[["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 652, 3, 4, 0, 657, 12, 557, 0, 654], ["-", 0, 652, 3, 4, 0, 657, 12, 557, 0, 6], ["-", 0, 652, 3, 4, 0, 657, 12, 557, 0, 655]]
5
92
suit = {"S": 0, "H": 1, "C": 2, "D": 3} suit_keys = list(suit.keys()) deck = [[suit_keys[i] + " " + str(j + 1) for j in range(13)] for i in range(4)] for _ in range(int(input())): card = input().split() deck[suit[card[0]]][int(card[1])] = "" for i in range(4): for j in deck[i]: if j != "": ...
suit = {"S": 0, "H": 1, "C": 2, "D": 3} suit_keys = list(suit.keys()) deck = [[suit_keys[i] + " " + str(j + 1) for j in range(13)] for i in range(4)] for _ in range(int(input())): card = input().split() deck[suit[card[0]]][int(card[1]) - 1] = "" for i in range(4): for j in deck[i]: if j != "": ...
[["+", 0, 1, 0, 662, 31, 206, 206, 657, 17, 33], ["+", 0, 1, 0, 662, 31, 206, 206, 657, 12, 612]]
5
142
sCard = [0] * 13 hCard = [0] * 13 cCard = [0] * 13 dCard = [0] * 13 callNum = int(input()) for cardLoop in range(callNum): symbol, cardNum = input().split() cardNum = int(cardNum) if symbol == "S": sCard[cardNum-1] = cardNum elif symbol == "H": hCard[cardNum-1] = cardNum elif symb...
sCard = [0] * 13 hCard = [0] * 13 cCard = [0] * 13 dCard = [0] * 13 callNum = int(input()) for cardLoop in range(callNum): symbol, cardNum = input().split() cardNum = int(cardNum) if symbol == "S": sCard[cardNum-1] = cardNum elif symbol == "H": hCard[cardNum-1] = cardNum elif symb...
[["-", 8, 196, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 51, 22]]
5
249
n=input() lst=[(a,b) for a in ['S','H','C','D'] for b in range(1,14)] for i in range(n): a,b =input().split() lst.remove((a,int(b))) for (a,b) in lst: print(a,b)
n= int(input()) lst=[(a,b) for a in ['S','H','C','D'] for b in range(1,14)] for i in range(n): a,b =input().split() lst.remove((a,int(b))) for (a,b) in lst: print(a,b)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
90
n_cards = int(eval(input())) taro_cards = [] for i in range(n_cards): taro_card = eval(input()) taro_cards.append(taro_card) full_cards = [] for mark in ['S', 'H', 'C', 'D']: for card_number in range(13): full_cards.append(mark + " " + str(card_number+1)) missing_cards = [] for card in full_cards: ...
n_cards = int(input()) taro_cards = [] for i in range(n_cards): taro_card = input() taro_cards.append(taro_card) full_cards = [] for mark in ['S', 'H', 'C', 'D']: for card_number in range(13): full_cards.append(mark + " " + str(card_number+1)) missing_cards = [] for card in full_cards: if card ...
[["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
117
count = int(input()) cards = [] for i in range(count): cards.append(input()) capitals = "SHCD" for j in capitals: for k in range(1,14): if (j + " " + str(k)) in cards == False: print(j + " " + str(k))
count = int(input()) cards = [] for i in range(count): cards.append(input()) capitals = "SHCD" for j in capitals: for k in range(1,14): if ((j + " " + str(k)) in cards) == False: print(j + " " + str(k))
[["+", 15, 666, 0, 23, 0, 666, 0, 23, 0, 24], ["+", 8, 196, 0, 57, 15, 666, 0, 23, 0, 25]]
5
79
table = [[ 0 for i in range(13)] for j in range(4)] n = int(input()) i = 0 while i < n: s,num = input().split() num = int(num) if s == "S": table[0][n-1] = 1 elif s == "H": table[1][n-1] = 1 elif s == "C": table[2][n-1] = 1 else: # D table[3][n-1]...
table = [[ 0 for i in range(13)] for j in range(4)] n = int(input()) i = 0 while i < n: s,num = input().split() num = int(num) if s == "S": table[0][num-1] = 1 elif s == "H": table[1][num-1] = 1 elif s == "C": table[2][num-1] = 1 else: # D table[3][n...
[["-", 0, 1, 0, 662, 31, 206, 206, 657, 31, 22], ["+", 0, 1, 0, 662, 31, 206, 206, 657, 31, 22]]
5
203
cards = [[0 for i in range(13)] for j in range(4)] pattern = ["S", "H", "C", "D"] n = int(input()) ch_list=[] rank_list_0=[] while n > 0: ch, rank = input().split() ch_list.append(ch) rank_list_0.append(rank) n = n - 1 rank_list = [int(rank_list) for rank_list in rank_list_0] for (chlist, ranklist) in zip(...
cards = [[0 for i in range(13)] for j in range(4)] pattern = ["S", "H", "C", "D"] n = int(input()) ch_list=[] rank_list_0=[] while n > 0: ch, rank = input().split() ch_list.append(ch) rank_list_0.append(rank) n = n - 1 rank_list = [int(rank_list) for rank_list in rank_list_0] for (chlist, ranklist) in zip(...
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
173
n = int(input()) cards = {} #空の辞書 for i in range(n): card = input() cards[card] = 1 for c in ['S', 'H', 'C', 'D']: for n in range(1,13): key = c + ' ' + str(n) if not key in cards: print(key)
n = int(input()) cards = {} #空の辞書 for i in range(n): card = input() cards[card] = 1 for c in ['S', 'H', 'C', 'D']: for n in range(1,14): key = c + ' ' + str(n) if not key in cards: print(key)
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
85
a=gets.to_i a.times{ |i| if i%3 != 0 && /3/ !~ i.to_s then next end print " #{i}" } puts
a=gets.to_i 1.upto(a){ |i| if i%3 != 0 && /3/ !~ i.to_s then next end print " #{i}" } puts
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 486, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 486, 612], ["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 24], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0,...
4
38
a = gets.to_i for num in 1..a if num.to_s =~ /3/|| num%3 == 0 print "#{num}" end end puts
a = gets.to_i for num in 1..a if num.to_s =~ /3/ || num%3 == 0 print " #{num}" end end puts
[["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6]]
4
34
n = gets.to_i 1.upto(n) do |i| x = i if (x % 3 == 0) print " #{i}" next end while x <= 0 if x % 10 == 3 print " #{i}" break end x /= 10 end end puts
n = gets.to_i 1.upto(n) do |i| x = i if (x % 3 == 0) print " #{i}" next end while x > 0 if x % 10 == 3 print " #{i}" break end x /= 10 end end puts
[["-", 196, 737, 8, 736, 0, 89, 15, 738, 17, 19], ["+", 196, 737, 8, 736, 0, 89, 15, 738, 17, 47]]
4
60
n = gets.to_i for i in 1..n do x = i if x % 3 == 0 print(" ",i) else while x>0 do if x % 10 == 3 print(" ",i) end x /= 10 end end end puts
n = gets.to_i for i in 1..n do x = i if x % 3 == 0 print(" ",i) else while x>0 do if x % 10 == 3 print(" ",i) break end x /= 10 end end end puts
[["+", 8, 170, 0, 121, 64, 749, 0, 94, 0, 94]]
4
57
n = STDIN.gets.to_i i = 1 check1 = true check2 = true check3 = true while true do x = i if x % 3 == 0 && check1 then print " " + i.to_s check2 = false cehck3 = false end if x % 10 == 3 && check2 then print " " + i.to_s check3 = false end if check3 then while true do x /= ...
n = STDIN.gets.to_i i = 1 check1 = true check2 = true check3 = true while true do x = i if x % 3 == 0 && check1 then print " " + i.to_s check2 = false check3 = false end if x % 10 == 3 && check2 then print " " + i.to_s check3 = false end if check3 then while true do x /= ...
[["-", 8, 170, 0, 121, 64, 749, 0, 662, 31, 22], ["+", 8, 170, 0, 121, 64, 749, 0, 662, 31, 22], ["+", 0, 121, 64, 749, 0, 121, 64, 749, 0, 749], ["+", 64, 749, 0, 121, 64, 749, 0, 94, 0, 94]]
4
127
def call(n) for i in 1..n do if i%3==0 print " ",i else x = i while x > 0 do if x%10==3 break end x /= 10 end end end puts end n = gets.to_i call(n)
def call(n) for i in 1..n do if i%3==0 print " ",i else x = i while x > 0 do if x%10==3 print " ",i break end x /= 10 end end end puts end n = get...
[["+", 8, 170, 0, 121, 64, 749, 0, 652, 735, 22], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 62], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 121, 64, 749, 0, 652, 3, 4, 0, 21], ["+", 0, 121, 64, 749, 0, 652, 3, 4, 0, 22]]
4
58
n = gets.to_i for i in 3.n do print i % 3 ==0 || i.to_s =~ /3/ ? " #{i}" : "" end
n = gets.to_i for i in 3..n do print i % 3 ==0 || i.to_s =~ /3/ ? " #{i}" : "" end puts
[["-", 0, 493, 0, 88, 51, 267, 0, 652, 17, 131], ["+", 0, 493, 0, 88, 51, 267, 0, 475, 17, 757], ["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 22]]
4
37
n=gets.to_i for i in 1..n if i%3==0 printf(" %d",i) end if i.to_s.split("").include?("3") then printf(" %d",i) end end puts ""
n=gets.to_i for i in 1..n if i%3==0 printf(" %d",i) next end if i.to_s.split("").include?("3") then printf(" %d",i) end end puts ""
[["+", 8, 170, 0, 121, 64, 749, 0, 746, 0, 746]]
4
57
n = gets.chomp.to_i 3.upto(n) do |i| if i % 3 == 0 print " ", i else x = i loop do if x == 0; break; end if x % 10 == 3 print " ", i end x /= 10 end end if i == n; break; end end puts
n = gets.chomp.to_i 3.upto(n) do |i| if i % 3 == 0 print " ", i else x = i loop do if x == 0; break; end if x % 10 == 3 print " ", i break end x /= 10 end end if i == n; break; end end puts
[["+", 8, 736, 0, 121, 64, 749, 0, 94, 0, 94]]
4
71
puts ' '+(1..gets.to_i).select{|i|i%3==0||i.to_s.include?(3)}
puts ' '+(1..gets.to_i).select{|i|i%3==0||i.to_s.include?('3')}*' '
[["+", 0, 738, 12, 652, 3, 4, 0, 557, 0, 62], ["+", 0, 652, 3, 4, 0, 738, 12, 738, 17, 48], ["+", 3, 4, 0, 738, 12, 738, 12, 557, 0, 62], ["+", 3, 4, 0, 738, 12, 738, 12, 557, 0, 6]]
4
33
n = int(input()) for i in range(1, n + 1): x = i if x % 3 == 0: print("", i, end = "") continue while True: if x % 10 == 3: print("", i, end = "") break x /= 10 if x != 0: continue break print()
n = int(input()) for i in range(1, n + 1): x = i if x % 3 == 0: print("", i, end = "") continue while True: if x % 10 == 3: print("", i, end = "") break x //= 10 if x != 0: continue break print()
[["-", 0, 52, 8, 196, 0, 1, 0, 677, 17, 90], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 691]]
5
79
n = int(input()) for i in range(n + 1): if i % 3 == 0 or str(i).find("3") != -1: print(" {}".format(i), end = '') print()
n = int(input()) for i in range(1, n + 1): if i % 3 == 0 or str(i).find("3") != -1: print(" {}".format(i), end = '') print()
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
59
import math x = int(input()) for i in range(x+1): if i%3==0: print(f" {i}",end="") continue r=i while True: if r<=0: break if r%10==3: print(f" {i}",end="") break r//=10 print("")
import math x = int(input()) for i in range(1,x+1): if i%3==0: print(f" {i}",end="") continue r=i while True: if r<=0: break if r%10==3: print(f" {i}",end="") break r//=10 print("")
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
84
n = int(input()) x = 1 y = "" z = 1 while True: z = 1 x += 1 if x % 3 == 0: y += " " y += str(x) else: while True: b = int(x % 10 ** (z - 1)) a = int((x - b) / 10 ** z) c = a % 10 ** z d = a % 10 ** (z - 1) if a == 3 or ...
n = int(input()) x = 1 y = "" z = 1 while True: z = 1 x += 1 if x % 3 == 0: y += " " y += str(x) else: while True: b = int(x % 10 ** (z - 1)) a = int((x - b) / 10 ** z) c = a % 10 ** z d = a % 10 ** (z - 1) if a == 3 or ...
[["+", 0, 52, 8, 196, 0, 57, 15, 679, 17, 355], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612]]
5
144
num = int(input()) for i in range(1, num + 1): if i % 3 == 0: print(f' {i}', end='') else: x = i while x: if x % 10 == 3: print(f' {i}', end='') break x /= 10 print()
num = int(input()) for i in range(1, num + 1): if i % 3 == 0: print(f' {i}', end='') else: x = i while x: if x % 10 == 3: print(f' {i}', end='') break x //= 10 # 切り捨て除算 print()
[["-", 0, 52, 8, 196, 0, 1, 0, 677, 17, 90], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 691]]
5
77
n = int(input()) for i in range(1,n+1): if i % 3 == 0 or str(i).find("3"): print(" " + str(i),end = "") print()
n = int(input()) for i in range(1,n+1): if i % 3 == 0 or str(i).find("3") != -1: print(" " + str(i),end = "") print()
[["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 79], ["+", 0, 57, 15, 679, 12, 666, 0, 664, 17, 33], ["+", 0, 57, 15, 679, 12, 666, 0, 664, 28, 612]]
5
58
n=int(input()) for i in range(1, n + 1): if i%3==0 or str(i).find('3') == True: print(" {}".format(i), end='') print()
n=int(input()) for i in range(1, n+1): if i%3==0 or str(i).find('3') != -1: print(" {}".format(i), end='') print()
[["-", 8, 196, 0, 57, 15, 679, 12, 666, 667, 60], ["-", 8, 196, 0, 57, 15, 679, 12, 666, 0, 146], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 79], ["+", 0, 57, 15, 679, 12, 666, 0, 664, 17, 33], ["+", 0, 57, 15, 679, 12, 666, 0, 664, 28, 612]]
5
60
a = int(input()) for i in range(1,a+1): x = i if i % 3 == 0 or i % 10 == 3: print(" {}".format(i), end = "") else: while int(x) > 0: x /= 10 if int(x) % 10 == 3: print(" {}".format(i), end = "") print()
a = int(input()) for i in range(1,a+1): x = i if i % 3 == 0 or i % 10 == 3: print(" {}".format(i), end = "") else: while int(x) > 0: x /= 10 if int(x) % 10 == 3: print(" {}".format(i), end = "") break print()
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
94
n = int(input()) i = 1 ret = "" while True: x = i if x % 3 == 0: ret += " " + str(i) elif x % 10 == 3: ret += " " + str(i) else: x //= 10 while x > 0: if x % 10 == 3: ret += " " + str(i) x //= 10 i+=1 if i > n: brea...
n = int(input()) i = 1 ret = "" while True: x = i if x % 3 == 0: ret += " " + str(i) elif x % 10 == 3: ret += " " + str(i) else: x //= 10 while x != 0: if x % 10 == 3: ret += " " + str(i) break x //= 10 i+=1 ...
[["-", 75, 76, 8, 196, 0, 52, 15, 666, 667, 47], ["+", 75, 76, 8, 196, 0, 52, 15, 666, 667, 79], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
98
n = int(input()) y = 1 while y <= n : if(y % 3 == 0): print(' %d'%y,end='') else: p = y while(p != 0): if(p % 10 == 3): print(' %d'%y,end='') p //= 10 y+=1 print()
n = int(input()) y = 1 while y <= n : if(y % 3 == 0): print(' %d'%y,end='') else: p = y while(p != 0): if(p % 10 == 3): print(' %d'%y,end='') break p //= 10 y+=1 print()
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
81
def call(n): ans = [] for i, x in enumerate(range(1, n + 1), 1): if x % 3 == 0: ans.append(i) continue while x: if x % 10 == 3: ans.append(i) x //= 10 print(" " + " ".join(map(str, ans))) if __name__ == '__main__': from...
def call(n): ans = [] for i, x in enumerate(range(1, n + 1), 1): if x % 3 == 0: ans.append(i) continue while x: if x % 10 == 3: ans.append(i) break x //= 10 print(" " + " ".join(map(str, ans))) if __name__ =...
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
111
n = int(input()) i = 1 #end_check_num while i <= n: x = i if x % 3 == 0: print(" %d" % x, end = "") else: while x != 0: if x % 10 == 3: print(" %d" % x, end = "") break x /= 10 i += 1 print()
n = int(input()) i = 1 #end_check_num while i <= n: #check_num x = i if x % 3 == 0: print(" %d" % i, end = "") else: #INCLUDE3 while x != 0: if x % 10 == 3: print(" %d" % i, end = "") break x //= 10 i += 1 print()
[["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22], ["-", 0, 52, 8, 196, 0, 1, 0, 677, 17, 90], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 691]]
5
77
from sys import stdin n = int(stdin.readline()) for i in range(1,n+1): x = i if x % 3 == 0 or x % 10 == 3: print('', i, end='') continue x //= 10 while x != 0: if x % 10 == 3: print(''.format(i),end='') break x /...
from sys import stdin n = int(stdin.readline()) for i in range(1,n+1): x = i if x % 3 == 0 or x % 10 == 3: print('', i, end='') continue x //= 10 while x != 0: if x % 10 == 3: print('', i, end='') break x /...
[["-", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
92
import sys n = int( sys.stdin.readline() ) output = [] for i in range( 1, n+1 ): x = i if x%3 == 0: output.append( " {:d}".format( i ) ) else: while x != 0: if x%10 == 3: output.append( " {:d}".format( i ) ) break x /= 10 print( "".join( output ) )
import sys n = int( sys.stdin.readline() ) output = [] for i in range( 1, n+1 ): x = i if x%3 == 0: output.append( " {:d}".format( i ) ) else: while x != 0: if x%10 == 3: output.append( " {:d}".format( i ) ) break x = x//10 print( "".join( output ) )
[["-", 0, 52, 8, 196, 0, 1, 0, 677, 17, 90], ["+", 0, 52, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 676]]
5
94
n = int(input()) for i in range(1,n+1): x = i if x % 3 == 0: print('', i, end='') else: while True: if x % 10 == 3: print('', i, end='') x //= 10 if x == 0: break print()
n = int(input()) for i in range(1,n+1): x = i if x % 3 == 0: print('', i, end='') else: while True: if x % 10 == 3: print('', i, end='') break x //= 10 if x == 0: break print()
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
78
# coding:utf-8 import sys # ??\??? n = int(input()) display = [] for i in range(n): num = i + 1 # 3??§?????????????????´??? if (num % 3 == 0): display.append(num) continue # ????????????????????????3????????????????????´??? while (num != 0): last_digit = int(num % 10) ...
# coding:utf-8 import sys # ??\??? n = int(input()) display = [] for i in range(n): num = i + 1 # 3??§?????????????????´??? if (num % 3 == 0): display.append(num) continue # ????????????????????????3????????????????????´??? original = num while (num != 0): last_digit ...
[["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 12, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22]]
5
111
n=eval(input()) print("", end=' ') for i in range(1,n+1): if i%3==0 or str(i).count('3'): print(i)
n=eval(input()) print("", end=' ') for i in range(1,n+1): if i%3==0 or str(i).count('3'): print(i, end=' ')
[["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]]
5
54
n = int(input()) cout = "" for i in range(1,n+1): x = i if x%3 == 0: cout += " " + str(i) else: while x > 0: if x%10 == 3: cout += " " + str(i) x //= 10 print (cout)
n = int(input()) cout = "" for i in range(1,n+1): x = i if x%3 == 0: cout += " " + str(i) else: while x > 0: if x%10 == 3: cout += " " + str(i) break x //= 10 print (cout)
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
75
n = int(input()) o = "" for i in range(1, n+1): if (i % 3) == 0: o = o + " " + str(i) else: while i >0: if (i % 10) == 3: o = o + " " + str(i) break i //= 10 print(o)
n = int(input()) o = "" for i in range(1, n+1): if (i % 3) == 0: o = o + " " + str(i) else: x = i while x >0: if (x % 10) == 3: o = o + " " + str(i) break x //= 10 print(o)
[["-", 0, 57, 75, 76, 8, 196, 0, 52, 0, 89], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 57, 75, 76, 8, 196, 0, 52, 0, 89], ["+", 75, 76, 8, 196, 0, 52, 15, 666, 0, 22], ["-", 0, 57, 15, 666, 0, 23, 0, 657, 31, 22], ["+", 0, 57, 15, 666, 0, 23, 0, 657, 31, 22], ["-"...
5
81
#coding:utf-8 #3????????°??????????????? n = eval(input()) print("", end=' ') for i in range(1, n+1): if i % 3 == 0: print(i, end=' ') elif "3" in str(i): print(i)
#coding:utf-8 #3????????°??????????????? n = eval(input()) print("", end=' ') for i in range(1, n+1): if i % 3 == 0: print(i, end=' ') elif "3" in str(i): print(i, end=' ')
[["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]]
5
64
import sys def call(n): i = 1 while i <= n: x = i if x % 3 == 0: print(' ', i, sep='', end='') else: while x: if x % 10 == 3: print(' ', i, sep='', end='') x //= 10 i += 1 prin...
import sys def call(n): i = 1 while i <= n: x = i if x % 3 == 0: print(' ', i, sep='', end='') else: while x: if x % 10 == 3: print(' ', i, sep='', end='') break x //= 10 ...
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
112
n = int(input()) i = 1 for i in range(1, n + 1): if i % 3 == 0: print(' {0}'.format(i), end = '') else: st = str(i) for x in range(0, len(st)): if st[x] == '3': print(' {0}'.format(i), end = '') print()
n = int(input()) i = 1 for i in range(1, n + 1): if i % 3 == 0: print(' {0}'.format(i), end = '') else: st = str(i) for x in range(0, len(st)): if st[x] == '3': print(' {0}'.format(i), end = '') break print()
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
96
# get line input split by space def getLnInput(): return input().split() # ceil(a / b) for a > b def ceilDivision(a, b): return (a - 1) // b + 1 def call(n): i = 1 while i < n: i += 1 x = i if not x % 3: print(" " + str(i), end="") else: while ...
# get line input split by space def getLnInput(): return input().split() # ceil(a / b) for a > b def ceilDivision(a, b): return (a - 1) // b + 1 def call(n): i = 1 while i < n: i += 1 x = i if not x % 3: print(" " + str(i), end="") else: while ...
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
138
#coding:utf-8 def call(n): i=1 for i in range(1,n+1): x=i if x%3==0: print(" "+str(x),end="") else: while x!=0: if x%10==3: print(" "+str(x),end="") break else: x/=10 ...
#coding:utf-8 def call(n): for i in range(1,n+1): x=i if x%3==0: print(" "+str(i),end="") else: while x!=0: if x%10==3: print(" "+str(i),end="") break else: x//=10 ...
[["-", 0, 14, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 14, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612], ["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 22], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 22], ["-", 75, 76, 8, 196, 0, 1, 0, 677, 17, 90], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 17, 691]]
5
101
x = int(input()) for i in range(1,x+1): y = i if y % 3 == 0: print(" %d" % i, end="") continue while True: if y % 10 == 3: print(" %d" % i, end="") break y /= 10 if int(y == 0): break print("")
x = int(input()) for i in range(1,x+1): y = i if y % 3 == 0: print(" %d" % i, end="") continue while True: if int(y) % 10 == 3: print(" %d" % i, end="") break y /= 10 if int(y) == 0: break print("")
[["+", 0, 57, 15, 666, 0, 657, 31, 652, 63, 22], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 25], ["-", 8, 196, 0, 57, 15, 652, 3, 4, 0, 25]]
5
85
n = int(input()) output = "" for i in range(1,n+1): if i % 3 == 0: output += " %s" % (i,) continue elif i % 10 == 3: output += " %s" % (i,) continue x = i while x > 1: x = int(x/10) if x % 10 == 3: output += " %s" % (i,) print(output)
n = int(input()) output = "" for i in range(1,n+1): if i % 3 == 0: output += " %s" % (i,) continue elif i % 10 == 3: output += " %s" % (i,) continue x = i while x > 1: x = int(x/10) if x % 10 == 3: output += " %s" % (i,) break print(output)
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
97
'use strict'; (function(stdin) { var lines = stdin.toString().split('\n'); var result = (function(data) { var result = []; var apartment = buildArray(); data.map(function(v) { var info = v.split(' '); apartment[info[0] - 1][info[1] - 1][info[2] - 1] += parseInt(info[3]); }); apartment.forEach(functio...
'use strict'; (function(stdin) { var lines = stdin.toString().split('\n'); var result = (function(data) { var result = []; var apartment = buildArray(); data.map(function(v) { var info = v.split(' '); apartment[info[0] - 1][info[1] - 1][info[2] - 1] += parseInt(info[3]); }); apartment.forEach(functio...
[["+", 8, 556, 0, 1, 0, 2, 63, 558, 500, 22], ["+", 8, 556, 0, 1, 0, 2, 63, 558, 0, 131], ["+", 8, 556, 0, 1, 0, 2, 63, 558, 559, 560], ["+", 8, 556, 0, 1, 0, 2, 3, 3, 0, 24], ["+", 8, 556, 0, 1, 0, 2, 3, 3, 0, 25], ["+", 0, 2, 63, 63, 8, 556, 0, 1, 0, 35]]
2
313
(function(input) { var a = parse(input); a = a.map(function(e) { return e.map(Number); }); var rooms = makeRooms(); for (var i = 1; i < a.length; i++) { var args = a[i]; var b = args[0]; var f = args[1]; var r = args[2]; var v = args[3]; rooms[b - 1][f - 1][r - 1] = v; } for (var i = 0; i < rooms.length; i+...
(function(input) { var a = parse(input); a = a.map(function(e) { return e.map(Number); }); var rooms = makeRooms(); for (var i = 1; i < a.length; i++) { var args = a[i]; var b = args[0]; var f = args[1]; var r = args[2]; var v = args[3]; rooms[b - 1][f - 1][r - 1] += v; } for (var i = 0; i < rooms.length; i...
[["-", 0, 7, 8, 556, 0, 1, 0, 11, 0, 32], ["+", 0, 7, 8, 556, 0, 1, 0, 564, 17, 107], ["+", 0, 2, 3, 3, 0, 16, 31, 557, 0, 104], ["+", 0, 2, 3, 3, 0, 16, 31, 557, 0, 491], ["+", 0, 1, 0, 2, 3, 3, 0, 16, 17, 72]]
2
415
line = require('fs').readFileSync('/dev/stdin', 'ascii').split('\n'); line = line.slice(1, parseInt(line[0]) + 1); bld = []; for (i = 0; i < 4; i++) { floor = []; for (j = 0; j < 3; j++) { room = []; for (k = 0; k < 10; k++) room[k] = 0; floor.push(room); } bld.push(floor); } line.forEach(fu...
line = require('fs').readFileSync('/dev/stdin', 'ascii').split('\n'); line = line.slice(1, parseInt(line[0]) + 1); bld = []; for (i = 0; i < 4; i++) { floor = []; for (j = 0; j < 3; j++) { room = []; for (k = 0; k < 10; k++) room[k] = 0; floor.push(room); } bld.push(floor); } line.forEach(fu...
[["-", 0, 63, 8, 556, 0, 1, 0, 11, 0, 32], ["+", 0, 63, 8, 556, 0, 1, 0, 564, 17, 107]]
2
259
<?php $n = trim(fgets(STDIN)); $nyukyo = array_fill(0, 4, array_fill(0, 3, array_fill(0, 10, 0))); for ($i = 0; $i < $n; $i++) { $line = trim(fgets(STDIN)); $arr = explode(" ", $line); $nyukyo[$arr[0]-1][$arr[1]-1][$arr[2]-1] = $arr[3]; } for ($i = 0; $i < 4; $i++) { for ($j = 0; $j < 3; $j++) { echo...
<?php $n = trim(fgets(STDIN)); $nyukyo = array_fill(0, 4, array_fill(0, 3, array_fill(0, 10, 0))); for ($i = 0; $i < $n; $i++) { $line = trim(fgets(STDIN)); $arr = explode(" ", $line); $nyukyo[$arr[0]-1][$arr[1]-1][$arr[2]-1] += $arr[3]; } for ($i = 0; $i < 4; $i++) { for ($j = 0; $j < 3; $j++) { ech...
[["-", 0, 7, 0, 9, 0, 1, 0, 11, 0, 32], ["+", 0, 7, 0, 9, 0, 1, 0, 564, 17, 107]]
6
203
<?php $rooms = array_fill_keys(range(1, 10), 0); $floors = array_fill_keys(range(1, 3), $rooms); $buildings = array_fill_keys(range(1, 4), $floors); fscanf(STDIN, '%d', $n); for ($i = 0; $i < $n; $i++) { fscanf(STDIN, '%d %d %d %d', $b, $f, $r, $v); $buildings[$b][$f][$r] += $v; } foreach ($building...
<?php $rooms = array_fill_keys(range(1, 10), 0); $floors = array_fill_keys(range(1, 3), $rooms); $buildings = array_fill_keys(range(1, 4), $floors); fscanf(STDIN, '%d', $n); for ($i = 0; $i < $n; $i++) { fscanf(STDIN, '%d %d %d %d', $b, $f, $r, $v); $buildings[$b][$f][$r] += $v; } foreach ($building...
[["-", 12, 613, 3, 3, 0, 28, 0, 557, 0, 610], ["+", 12, 613, 3, 3, 0, 28, 0, 557, 0, 610], ["-", 0, 613, 3, 3, 0, 28, 0, 557, 0, 610], ["+", 0, 613, 3, 3, 0, 28, 0, 557, 0, 610]]
6
209
<?php $room = array_pad(array(),10,0); for($i = 0; $i < 4; $i++){ for($j = 0; $j < 3; $j++){ $building[$i][$j] = $room; } } $bar = str_repeat("#",20); $record_num = trim(fgets(STDIN)); for($i = 0; $i < $record_num; $i++){ list($b, $f, $r, $v) = explo...
<?php $room = array_pad(array(),10,0); for($i = 0; $i < 4; $i++){ for($j = 0; $j < 3; $j++){ $building[$i][$j] = $room; } } $bar = str_repeat("#",20); $record_num = trim(fgets(STDIN)); for($i = 0; $i < $record_num; $i++){ list($b, $f, $r, $v) = explo...
[["-", 15, 23, 0, 16, 12, 16, 31, 606, 0, 607], ["-", 15, 23, 0, 16, 12, 16, 31, 606, 0, 141], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 33], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 12, 612], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 612]]
6
223
import java.util.Scanner; public class Main { public static void main(String[] args) { int[][][] room = new int[4][3][10]; @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); for (int i = 0; i < 4; i++) { for (int j = 0; j < 3; j++) { for (int k = 0; k < 10; k++) { ...
import java.util.Scanner; public class Main { public static void main(String[] args) { int[][][] room = new int[4][3][10]; @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); for (int i = 0; i < 4; i++) { for (int j = 0; j < 3; j++) { for (int k = 0; k < 10; k++) { ...
[["+", 0, 492, 3, 4, 0, 16, 31, 5, 0, 62], ["+", 0, 492, 3, 4, 0, 16, 31, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72]]
3
295
import java.util.Scanner; public class Main { public static void main(String[] args) { int home[][][] = new int[4][3][10]; int b = 0; int f = 0; int r = 0; int v = 0; int i = 0; int j = 0; int k = 0; Scanner sc = new Scanner(System.in); for (i = 0; i < 4; i++) { for (j = ...
import java.util.Scanner; public class Main { public static void main(String[] args) { int home[][][] = new int[4][3][10]; int b = 0; int f = 0; int r = 0; int v = 0; int i = 0; int j = 0; int k = 0; Scanner sc = new Scanner(System.in); for (i = 0; i < 4; i++) { for (j = ...
[["+", 31, 504, 516, 504, 516, 504, 71, 16, 17, 33], ["+", 31, 504, 516, 504, 516, 504, 71, 16, 12, 499], ["+", 0, 11, 31, 504, 516, 504, 71, 16, 17, 33], ["+", 0, 11, 31, 504, 516, 504, 71, 16, 12, 499], ["+", 0, 1, 0, 11, 31, 504, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 504, 71, 16, 12, 499]]
3
308
import java.lang.*; import java.util.*; /** * OfficialHouse */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[][][] list = new int[4][3][10]; for (int i = 0; i < n; i++) { int b = sc.nextInt(); int f = sc.nex...
import java.lang.*; import java.util.*; /** * OfficialHouse */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[][][] list = new int[4][3][10]; for (int i = 0; i < n; i++) { int b = sc.nextInt(); int f = sc.nex...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107], ["+", 0, 492, 3, 4, 0, 16, 31, 5, 0, 62], ["+", 0, 492, 3, 4, 0, 16, 31, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72]]
3
235
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); int count = scn.nextInt(); int[][][] array; array = new int[4][3][10]; for (int i = 0; i < count; i++) { int b = scn.nextInt(); int f = scn.nextInt(); ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); int count = scn.nextInt(); int[][][] array; array = new int[4][3][10]; for (int i = 0; i < count; i++) { int b = scn.nextInt(); int f = scn.nextInt(); ...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
237
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[][] tow1 = new int[3][10]; int[][] tow2 = new int[3][10]; int[][] tow3 = new int[3][10]; int[][] tow4 = new int[3][10]; int b = 0, f = 0, r = 0, v = 0; int num =...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[][] tow1 = new int[3][10]; int[][] tow2 = new int[3][10]; int[][] tow3 = new int[3][10]; int[][] tow4 = new int[3][10]; int b = 0, f = 0, r = 0, v = 0; int num =...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
527
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner x = new Scanner(System.in); int room1[][] = new int[3][10]; int room2[][] = new int[3][10]; int room3[][] = new int[3][10]; int room4[][] = new int[3][10]; int n = x.nextInt(); for (int a = 0; a ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner x = new Scanner(System.in); int room1[][] = new int[3][10]; int room2[][] = new int[3][10]; int room3[][] = new int[3][10]; int room4[][] = new int[3][10]; int n = x.nextInt(); for (int a = 0; a ...
[["-", 0, 57, 64, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 17, 107], ["-", 75, 57, 64, 196, 0, 1, 0, 11, 17, 32], ["+", 75, 57, 64, 196, 0, 1, 0, 11, 17, 107], ["-", 75, 57, 75, 196, 0, 1, 0, 11, 17, 32], ["+", 75, 57, 75, 196, 0, 1, 0, 11, 17, 107]]
3
594
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int b, f, r, v; int[][][] num = new int[4][3][10]; for (int a = 0; a < 4; a++) { for (int c = 0; c < 3; c++) { for (int d = 0; d < 10; d...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int b, f, r, v; int[][][] num = new int[4][3][10]; for (int a = 0; a < 4; a++) { for (int c = 0; c < 3; c++) { for (int d = 0; d < 10; d...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 22], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499]]
3
299
import java.util.Scanner; class Main { int n, x, y, c; public void solve() { Scanner sc = new Scanner(System.in); sc.useDelimiter("\\s"); n = sc.nextInt(); int a[][] = new int[12][10]; for (x = 0; x < 12; x++) { for (y = 0; y < 10; y++) { a[x][y] = 0; } } for (x = 0;...
import java.util.Scanner; class Main { int n, x, y, c; public void solve() { Scanner sc = new Scanner(System.in); sc.useDelimiter("\\s"); n = sc.nextInt(); int a[][] = new int[12][10]; for (x = 0; x < 12; x++) { for (y = 0; y < 10; y++) { a[x][y] = 0; } } for (x = 0;...
[["-", 0, 57, 64, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 17, 107], ["-", 75, 57, 64, 196, 0, 1, 0, 11, 17, 32], ["+", 75, 57, 64, 196, 0, 1, 0, 11, 17, 107]]
3
362
import java.io.*; class Main { public static void main(String[] args) { BufferedReader kb = new BufferedReader(new InputStreamReader(System.in)); try { String str = kb.readLine(); int n = Integer.parseInt(str); int[][][] oHouse = new int[5][4][11]; int[] tnum = new int[5]; Stri...
import java.io.*; class Main { public static void main(String[] args) { BufferedReader kb = new BufferedReader(new InputStreamReader(System.in)); try { String str = kb.readLine(); int n = Integer.parseInt(str); int[][][] oHouse = new int[5][4][11]; int[] tnum = new int[5]; Stri...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
310
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[][] house = new int[12][10]; for (int[] rooms : house) { for (int room : r...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[][] house = new int[12][10]; for (int[] rooms : house) { for (int room : r...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
334
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[][][] house = new int[3][10][4]; String count = br.re...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[][][] house = new int[3][10][4]; String count = br.re...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107], ["-", 15, 16, 12, 509, 500, 504, 516, 504, 71, 499], ["+", 15, 16, 12, 509, 500, 504, 516, 504, 71, 499]]
3
300
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int intNum = scan.nextInt(); int b; int f; int r; int v; int[][] intArray1 = new int[3][10]; int[][] intArray2 = new int[3][10]; int[][] intArray3 = new in...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int intNum = scan.nextInt(); int b; int f; int r; int v; int[][] intArray1 = new int[3][10]; int[][] intArray2 = new int[3][10]; int[][] intArray3 = new in...
[["-", 64, 196, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 196, 0, 1, 0, 11, 12, 11, 17, 107], ["-", 0, 11, 12, 16, 31, 504, 516, 504, 516, 22], ["+", 0, 11, 12, 16, 31, 504, 516, 504, 516, 22]]
3
582
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int count = scan.nextInt(); int[][][] house = new int[4][3][10]; int b = 0; int f = 0; int r = 0; int v = 0; for (int i = 0; i < count; i++) { b = scan.n...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int count = scan.nextInt(); int[][][] house = new int[4][3][10]; int b = 0; int f = 0; int r = 0; int v = 0; for (int i = 0; i < count; i++) { b = scan.n...
[["+", 31, 504, 516, 504, 516, 504, 71, 16, 17, 33], ["+", 31, 504, 516, 504, 516, 504, 71, 16, 12, 499], ["+", 0, 11, 31, 504, 516, 504, 71, 16, 17, 33], ["+", 0, 11, 31, 504, 516, 504, 71, 16, 12, 499], ["+", 0, 1, 0, 11, 31, 504, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 504, 71, 16, 12, 499]]
3
245
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main { static InputReader in; static PrintWriter out; static class Solution { void solve() throws IOException { ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main { static InputReader in; static PrintWriter out; static class Solution { void solve() throws IOException { ...
[["-", 0, 7, 8, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 7, 8, 196, 0, 7, 15, 16, 12, 499]]
3
533
import java.util.Scanner; public class Main { public static void main(String[] args) { int v[][][] = new int[4][3][10]; Scanner scan = new Scanner(System.in); int n = scan.nextInt(); for (int i = 0; i < n; i++) { int b = scan.nextInt() - 1; int f = scan.nextInt() - 1; int r = scan.n...
import java.util.Scanner; public class Main { public static void main(String[] args) { int v[][][] = new int[4][3][10]; Scanner scan = new Scanner(System.in); int n = scan.nextInt(); for (int i = 0; i < n; i++) { int b = scan.nextInt() - 1; int f = scan.nextInt() - 1; int r = scan.n...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
234
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int count[][][] = new int[4][3][10]; for (int i = 0; i <= 3; i++) { for (int j = 0; j <= 2; j++) { for (int e = 0; e <= 9; e++) { count[i][...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int count[][][] = new int[4][3][10]; for (int i = 0; i <= 3; i++) { for (int j = 0; j <= 2; j++) { for (int e = 0; e <= 9; e++) { count[i][...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
293
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); // [house] [floor] [room] int[][][] bldgs = new int[4][3][10]; for (int b, f, r, v, i = 0; i < n; i++) { b = sc.nextInt() - 1; f = sc.nex...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); // [house] [floor] [room] int[][][] bldgs = new int[4][3][10]; for (int b, f, r, v, i = 0; i < n; i++) { b = sc.nextInt() - 1; f = sc.nex...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107], ["-", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22]]
3
245
import java.util.*; public class Main { private static final Scanner scan = new Scanner(System.in); public static void main(String[] args) { int[][][] house = new int[4][3][10]; int n = scan.nextInt(); for (int i = 0; i < n; i++) { int b = scan.nextInt(); int f = scan.nextInt(); int ...
import java.util.*; public class Main { private static final Scanner scan = new Scanner(System.in); public static void main(String[] args) { int[][][] house = new int[4][3][10]; int n = scan.nextInt(); for (int i = 0; i < n; i++) { int b = scan.nextInt(); int f = scan.nextInt(); int...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 0, 57, 64, 196, 0, 1, 0, 492, 141, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 492, 141, 22]]
3
262
import java.io.*; class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[][][] house = new int[4][3][10]; int i, j, k; for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 10; k+...
import java.io.*; class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[][][] house = new int[4][3][10]; int i, j, k; for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 10; k+...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
347
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String args[]) throws IOException { Scanner sc = new Scanner(System.in); StringBuffer sb = new StringBuffer(); int[][][] r = new int[4][3][10]; int n = sc.nextInt(); for (int i = 0; i < n; i++) { ...
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String args[]) throws IOException { Scanner sc = new Scanner(System.in); StringBuffer sb = new StringBuffer(); int[][][] r = new int[4][3][10]; int n = sc.nextInt(); for (int i = 0; i < n; i++) { ...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
250
import java.util.Scanner; public class Main { public static void main(String[] args) { int[][][] man_num; man_num = new int[4][3][10]; Scanner scan = new Scanner(System.in); int n = scan.nextInt(); for (int i = 0; i < n; i++) { int b = scan.nextInt(); int f = scan.nextInt(); ...
import java.util.Scanner; public class Main { public static void main(String[] args) { int[][][] man_num; man_num = new int[4][3][10]; Scanner scan = new Scanner(System.in); int n = scan.nextInt(); for (int i = 0; i < n; i++) { int b = scan.nextInt(); int f = scan.nextInt(); ...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499]]
3
556
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int bmax = 4; int fmax = 3; int rmax = 10; int n = scan.nextInt(); int b; int f; int r; int v; int[][][] build = new int[4][3][10]; // build[b][f][r] ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int bmax = 4; int fmax = 3; int rmax = 10; int n = scan.nextInt(); int b; int f; int r; int v; int[][][] build = new int[4][3][10]; // build[b][f][r] ...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
257
import java.util.Scanner; class Main { public static void main(String[] args) { int b, f, r, v; int[][][] room = new int[4][3][10]; // b-1,f-1,r-1 for (int i = 0; i < 4; i++) { for (int j = 0; j < 3; j++) { for (int t = 0; t < 10; t++) { room[i][j][t] = 0; } } }...
import java.util.Scanner; class Main { public static void main(String[] args) { int b, f, r, v; int[][][] room = new int[4][3][10]; // b-1,f-1,r-1 for (int i = 0; i < 4; i++) { for (int j = 0; j < 3; j++) { for (int t = 0; t < 10; t++) { room[i][j][t] = 0; } } }...
[["-", 8, 196, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 8, 196, 0, 1, 0, 11, 12, 16, 12, 499], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
357
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in));...
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in));...
[["-", 0, 52, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 17, 107]]
3
298
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count[][][] = new int[4][3][10]; int i, j, k; int n = sc.nextInt(); for (i = 0; i < n; i++) { int b = sc.nextInt(); int f = sc.nextInt(); int r = sc.nextInt()...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count[][][] = new int[4][3][10]; int i, j, k; int n = sc.nextInt(); for (i = 0; i < n; i++) { int b = sc.nextInt(); int f = sc.nextInt(); int r = sc.nextInt()...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
234
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[][][] residents = new int[4][3][10]; int n, b, f, r, v; n = sc.nextInt(); for (int i = 0; i < n; i++) { b = sc.nextInt() - 1; f = sc.nextInt() - 1; r =...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[][][] residents = new int[4][3][10]; int n, b, f, r, v; n = sc.nextInt(); for (int i = 0; i < n; i++) { b = sc.nextInt() - 1; f = sc.nextInt() - 1; r =...
[["+", 0, 492, 3, 4, 0, 16, 31, 5, 0, 62], ["+", 0, 492, 3, 4, 0, 16, 31, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72]]
3
260
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int size = sc.nextInt(); int b, f, r, v; int[][][] info = new int[4][3][10]; for (int i = 0; i < size; i++) { b = sc.nextInt() - 1; f = sc.nextInt() - 1; r = sc...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int size = sc.nextInt(); int b, f, r, v; int[][][] info = new int[4][3][10]; for (int i = 0; i < size; i++) { b = sc.nextInt() - 1; f = sc.nextInt() - 1; r = sc...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
245
import java.util.Scanner; class exe17 { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int n, b, f, r, v; n = scan.nextInt(); int a[][][] = new int[4][3][10]; for (int i = 0; i < n; i++) { b = scan.nextInt(); f = scan.nextInt(); r = scan.nextInt()...
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int n, b, f, r, v; n = scan.nextInt(); int a[][][] = new int[4][3][10]; for (int i = 0; i < n; i++) { b = scan.nextInt(); f = scan.nextInt(); r = scan.nextInt();...
[["-", 36, 36, 36, 36, 0, 493, 0, 235, 141, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 235, 141, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
246
import java.util.Scanner; public class Main { public static void main(String[] args) { int[][][] count = new int[4][3][10]; Scanner scan = null; try { scan = new Scanner(System.in); int n = scan.nextInt(); int b, f, r, v; for (int i = 0; i < n; i++) { b = scan.nextInt(); ...
import java.util.Scanner; public class Main { public static void main(String[] args) { int[][][] count = new int[4][3][10]; Scanner scan = null; try { scan = new Scanner(System.in); int n = scan.nextInt(); int b, f, r, v; for (int i = 0; i < n; i++) { b = scan.nextInt(); ...
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]]
3
299
#include <stdio.h> int main(void) { // Your code here! int i, n, j, k; int b, f, r, v; int count[4][3][10] = {0}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); count[b - 1][f - 1][r - 1] += v; } for (k = 0; k < 4; k++) { for (j = 0; j < 3; j++) { f...
#include <stdio.h> int main(void) { // Your code here! int i, n, j, k; int b, f, r, v; int count[4][3][10] = {0}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); count[b - 1][f - 1][r - 1] += v; } for (k = 0; k < 4; k++) { for (j = 0; j < 3; j++) { f...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
196
#include <stdio.h> int main(void) { int n, i, j, k, b, f, r, v, nyuukyosya[4][3][10] = {{0}}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); nyuukyosya[b - 1][f - 1][r - 1] = nyuukyosya[b - 1][f - 1][r - 1] + v; } for (i = 0; i < 4; i++) { for (j = 0; j < 3; j...
#include <stdio.h> int main(void) { int n, i, j, k, b, f, r, v, nyuukyosya[4][3][10] = {{0}}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); nyuukyosya[b - 1][f - 1][r - 1] = nyuukyosya[b - 1][f - 1][r - 1] + v; } for (i = 0; i < 4; i++) { for (j = 0; j < 3; j...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46]]
0
212
#include <stdio.h> void array_reset(int *, int); int main() { int n; int b, f, r, v; int i, j, k; int house[4][3][10]; for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { array_reset(&house[i][j][0], 10); } } scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, ...
#include <stdio.h> void array_reset(int *, int); int main() { int n; int b, f, r, v; int i, j, k; int house[4][3][10]; for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { array_reset(&house[i][j][0], 10); } } scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, ...
[["+", 31, 69, 28, 69, 28, 69, 71, 16, 17, 33], ["+", 31, 69, 28, 69, 28, 69, 71, 16, 12, 13], ["+", 0, 11, 31, 69, 28, 69, 71, 16, 17, 33], ["+", 0, 11, 31, 69, 28, 69, 71, 16, 12, 13], ["+", 0, 1, 0, 11, 31, 69, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 69, 71, 16, 12, 13]]
0
301
#include <stdio.h> void phouse(int s[15][10]) { int i, j; for (i = 0; i < 15; i++) { for (j = 0; j < 10; j++) { if (i % 4 == 3) printf("##"); else printf(" %d", s[i][j]); } printf("\n"); } } int main(void) { int house[15][10] = {{0}}; int n, b, f, r, v; scanf("%d", ...
#include <stdio.h> void phouse(int s[15][10]) { int i, j; for (i = 0; i < 15; i++) { for (j = 0; j < 10; j++) { if (i % 4 == 3) printf("##"); else printf(" %d", s[i][j]); } printf("\n"); } } int main(void) { int house[15][10] = {{0}}; int n, b, f, r, v; scanf("%d", ...
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107]]
0
214
#include <stdio.h> int main(void) { int n, i, j, k; int b, f, r, v; int count[4][3][10] = {0}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); count[b - 1][f - 1][r - 1] += v; } for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 10; k++...
#include <stdio.h> int main(void) { int n, i, j, k; int b, f, r, v; int count[4][3][10] = {0}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); count[b - 1][f - 1][r - 1] += v; } for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 10; k++...
[["+", 15, 23, 0, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 23, 0, 16, 31, 16, 31, 16, 17, 79], ["+", 15, 23, 0, 16, 31, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 98]]
0
203
#include <stdio.h> int main() { int a, b, c, d, n, i, j; int count[4][3][10] = {}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &a, &b, &c, &d); count[a - 1][b - 1][c - 1] = d; } for (a = 0; a < 4; a++) { for (b = 0; b < 3; b++) { for (c = 0; c < 10; c++) { if (c...
#include <stdio.h> int main() { int a, b, c, d, n, i, j; int count[4][3][10] = {}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &a, &b, &c, &d); count[a - 1][b - 1][c - 1] += d; } for (a = 0; a < 4; a++) { for (b = 0; b < 3; b++) { for (c = 0; c < 10; c++) { if (...
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107]]
0
246
#include <stdio.h> int main() { int b, f, r, v, n, i, j, w[3][10] = {0}, x[3][10] = {0}, y[3][10] = {0}, z[3][10] = {0}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); switch (b) { case 1: w[f - 1][r - 1] = v; break; case 2: ...
#include <stdio.h> int main() { int b, f, r, v, n, i, j, w[3][10] = {0}, x[3][10] = {0}, y[3][10] = {0}, z[3][10] = {0}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); switch (b) { case 1: w[f - 1][r - 1] += v; break; case 2:...
[["-", 8, 9, 0, 100, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 100, 0, 1, 0, 11, 17, 107]]
0
432
#include <stdio.h> #define build 4 #define floor 3 #define room 10 int main(void) { int n, b, f, r, v, i, j, k; int house[build][floor][room] = {0}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); house[b - 1][f - 1][r - 1] = v; } for (i = 0; i < build; i++) { f...
#include <stdio.h> #define build 4 #define floor 3 #define room 10 int main(void) { int n, b, f, r, v, i, j, k; int house[build][floor][room] = {0}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); house[b - 1][f - 1][r - 1] += v; } for (i = 0; i < build; i++) { ...
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107]]
0
222
#include <stdio.h> void input_data(int a[][3][10]); void display(int a[][3][10]); int main(void) { int A[4][3][10] = {0}; input_data(A); display(A); return 0; } void input_data(int a[][3][10]) { int n, i, j, k, b, f, r, v; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &...
#include <stdio.h> void input_data(int a[][3][10]); void display(int a[][3][10]); int main(void) { int A[4][3][10] = {0}; input_data(A); display(A); return 0; } void input_data(int a[][3][10]) { int n, i, j, k, b, f, r, v; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &...
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
275
#include <stdio.h> int main(void) { int N, Btou, Fkai, Rban, Vnin; int array[5][4][11] = {0}; int i, j, k; scanf("%d", &N); for (i = 1; i < N; ++i) { scanf("%d %d %d %d", &Btou, &Fkai, &Rban, &Vnin); array[Btou][Fkai][Rban] += Vnin; } for (i = 1; i < 5; ++i) { for (j = 1; j < 4; ++j) { ...
#include <stdio.h> int main(void) { int N, Btou, Fkai, Rban, Vnin; int array[5][4][11] = {0}; int i, j, k; scanf("%d", &N); for (i = 0; i < N; ++i) { scanf("%d %d %d %d", &Btou, &Fkai, &Rban, &Vnin); array[Btou][Fkai][Rban] += Vnin; } for (i = 1; i < 5; ++i) { for (j = 1; j < 4; ++j) { ...
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
0
187
#include <stdio.h> int main() { int a[4][3][10] = {0}; int i, j, k; int n, b, f, r, v; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); a[b - 1][f - 1][r - 1] += v; } for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 10; k++) { pr...
#include <stdio.h> int main() { int a[4][3][10] = {0}; int i, j, k; int n, b, f, r, v; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); a[b - 1][f - 1][r - 1] += v; } for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 10; k++) { pr...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
194