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 | change_count int64 0 100 |
|---|---|---|---|---|---|
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vect... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vect... | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 258 | 4 |
#include <iostream>
using namespace std;
int day(int month) {
switch (month) {
case 4:
case 6:
case 9:
case 11:
return 30;
break;
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
return 31;
break;
case 2:
return 18;
break;
}
}
int main() {
int m, d, num;
... | #include <iostream>
using namespace std;
int day(int month) {
switch (month) {
case 4:
case 6:
case 9:
case 11:
return 30;
break;
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
return 31;
break;
case 2:
return 29;
break;
}
}
int main() {
int m, d, num;
... | [["-", 0, 99, 8, 9, 0, 100, 0, 37, 0, 13], ["+", 0, 99, 8, 9, 0, 100, 0, 37, 0, 13]] | 1 | 226 | 2 |
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int MNUM = 12, leapMNUM = 12;
const int ML[] = {31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31}; // day/month in usual year
const int leapML[] = {31, 29, 31, 30, 31, 30,
31, 3... | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int MNUM = 12, leapMNUM = 12;
const int ML[] = {31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31}; // day/month in usual year
const int leapML[] = {31, 29, 31, 30, 31, 30,
31, 3... | [["-", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6], ["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6]] | 1 | 712 | 2 |
#include <iostream>
using namespace std;
main() {
int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
string day[7] = {"Wednesday", "Thursday", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"};
int n[2];
while (cin >> n[0] >> n[1], n[0], n[1]) {
int sum = 0;
for... | #include <iostream>
using namespace std;
main() {
int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
string day[7] = {"Wednesday", "Thursday", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"};
int n[2];
while (cin >> n[0] >> n[1], n[0], n[1]) {
int sum = 0;
for... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 166 | 4 |
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <complex>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define li long... | #include <fstream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <complex>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define li long... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 284 | 4 |
#include <iostream>
using namespace std;
int main(void) {
int month;
int day;
int day2;
while (1) {
day2 = 0;
cin >> month >> day;
if (month == 0 && day == 0)
break;
for (int i = 1; i < month; i++) {
switch (i) {
case 1:
case 3:
case 5:
case 7:
ca... | #include <iostream>
using namespace std;
int main(void) {
int month;
int day;
int day2;
while (1) {
day2 = 0;
cin >> month >> day;
if (month == 0 && day == 0)
break;
for (int i = 1; i < month; i++) {
switch (i) {
case 1:
case 3:
case 5:
case 7:
ca... | [["+", 8, 9, 0, 99, 8, 9, 0, 100, 51, 13], ["+", 8, 9, 0, 99, 8, 9, 0, 100, 0, 102], ["+", 8, 9, 0, 99, 8, 9, 0, 100, 0, 173]] | 1 | 227 | 3 |
#include <iostream>
using namespace std;
const string str[] = {"Wednesday", "Thursday", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"};
const int m[] = {0, 31, 29, 31, 29, 31, 30, 31, 31, 30, 31, 30, 31};
int main() {
int mon, day;
while (cin >> mon >> day, mon + day) {
for (in... | #include <iostream>
using namespace std;
const string str[] = {"Wednesday", "Thursday", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"};
const int m[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int main() {
int mon, day;
while (cin >> mon >> day, mon + day) {
for (in... | [["-", 0, 30, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 83, 0, 13]] | 1 | 138 | 2 |
#include <iostream>
using namespace std;
int main(void) {
while (1) {
int mon, day;
cin >> mon;
if (cin.eof())
break;
cin >> day;
for (int i = 1; i < mon; i++) {
switch (i) {
case 2:
day += 29;
break;
case 4:
case 6:
case 9:
case 11:
... | #include <iostream>
using namespace std;
int main(void) {
while (1) {
int mon, day;
cin >> mon;
if (mon == 0)
break;
cin >> day;
for (int i = 1; i < mon; i++) {
switch (i) {
case 2:
day += 29;
break;
case 4:
case 6:
case 9:
case 11:
... | [["-", 0, 57, 15, 339, 51, 2, 63, 118, 28, 22], ["-", 0, 57, 15, 339, 51, 2, 63, 118, 17, 131], ["-", 0, 57, 15, 339, 51, 2, 63, 118, 119, 120], ["-", 0, 57, 15, 339, 51, 2, 3, 4, 0, 24], ["-", 0, 57, 15, 339, 51, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60],... | 1 | 201 | 8 |
#include <stdio.h>
int main() {
int y, d, m;
int h;
char *date[] = {"Saturday", "Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday"};
for (;;) {
int Y, C, G;
y = 2004;
scanf("%d %d", &m, &d);
if (d == 0 || m == 0)
break;
if (m == 1 || m == 2) {
... | #include <stdio.h>
int main() {
int y, d, m;
int h;
char *date[] = {"Saturday", "Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday"};
for (;;) {
int Y, C, G;
y = 2004;
scanf("%d %d", &m, &d);
if (d == 0 || m == 0)
break;
if (m == 1 || m == 2) {
... | [["-", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["-", 0, 11, 12, 16, 31, 23, 0, 16, 31, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["-", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]] | 1 | 186 | 6 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string youbi[7] = {"Wednesday", "Thursday", "Friday", "Suturday",
"Sunday", "Monday", "Tuesday"};
int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int gathu, nichi;
while (cin >> gathu >> nichi, ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string youbi[7] = {"Wednesday", "Thursday", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"};
int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int gathu, nichi;
while (cin >> gathu >> nichi, ... | [["-", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6], ["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6]] | 1 | 147 | 2 |
#include <iostream>
#include <string>
int day(int m, int d) {
if (m == 1)
return d;
if (m == 2)
return 31 + d;
if (m == 3)
return 60 + d;
if (m == 4)
return 91 + d;
if (m == 5)
return 121 + d;
if (m == 6)
return 152 + d;
if (m == 7)
return 182 + d;
if (m == 8)
return 213... | #include <iostream>
#include <string>
int day(int m, int d) {
if (m == 1)
return d;
if (m == 2)
return 31 + d;
if (m == 3)
return 60 + d;
if (m == 4)
return 91 + d;
if (m == 5)
return 121 + d;
if (m == 6)
return 152 + d;
if (m == 7)
return 182 + d;
if (m == 8)
return 213... | [["-", 8, 9, 0, 57, 64, 37, 0, 16, 31, 13], ["-", 8, 9, 0, 57, 64, 37, 0, 16, 17, 33], ["+", 8, 9, 0, 57, 64, 37, 0, 16, 31, 13], ["+", 8, 9, 0, 57, 64, 37, 0, 16, 17, 72]] | 1 | 327 | 4 |
#include <cstdio>
#include <iostream>
int main(int argc, const char *argv[]) {
int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int m, d;
while (scanf("%d %d", &m, &d) != 0) {
int cnt = 0;
if (m == 0 && d == 0) {
return 0;
}
for (int i = 0; i < m - 1; i++) {
cnt += mo... | #include <cstdio>
#include <iostream>
int main(int argc, const char *argv[]) {
int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int m, d;
while (scanf("%d %d", &m, &d) != 0) {
int cnt = 0;
if (m == 0 && d == 0) {
return 0;
}
for (int i = 0; i < m - 1; i++) {
cnt += mo... | [["-", 0, 11, 12, 69, 341, 342, 0, 16, 31, 22], ["-", 0, 11, 12, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 11, 12, 69, 341, 342, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22]] | 1 | 255 | 4 |
#include <stdio.h>
int main() {
int m, d;
int i;
int Days;
while (1) {
Days = 0;
scanf("%d %d", &m, &d);
if (m == 0 && d == 0)
break;
for (i = 1, Days += d; i < m; i++) {
if (i == 2) {
Days += 29;
} else if (i == 4 || i == 6 || i == 9 || i == 11) {
Days += 30... | #include <stdio.h>
int main() {
int m, d;
int i;
int Days;
while (1) {
Days = 0;
scanf("%d %d", &m, &d);
if (m == 0 && d == 0)
break;
for (i = 1, Days += d; i < m; i++) {
if (i == 2) {
Days += 29;
} else if (i == 4 || i == 6 || i == 9 || i == 11) {
Days += 30... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 219 | 2 |
loop{
input = gets.chomp
h = 20.0
y = 4.0
m,d = input.split(" ").map{|e| e.to_f}
exit if m==0 and d==0
if m==1 or m==2 then
m+=12
y-=1
end
w=y+(y/4).floor+(h/4).floor-2*h+(13*(m+1)/5).floor+d
w=w.to_i
r=w % 7
case r
when 1 then
puts "Sunday"
when 2 then
puts "Monday"
when 3 then
puts "Trueday"
when 4 then
... | loop{
input = gets.chomp
h = 20.0
y = 4.0
m,d = input.split(" ").map{|e| e.to_f}
exit if m==0 and d==0
if m==1 or m==2 then
m+=12
y-=1
end
w=y+(y/4).floor+(h/4).floor-2*h+(13*(m+1)/5).floor+d
w=w.to_i
r=w % 7
case r
when 1 then
puts "Sunday"
when 2 then
puts "Monday"
when 3 then
puts "Tuesday"
when 4 then
... | [["-", 8, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 749, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 162 | 2 |
require "date"
YEAR = 2004
WDAY = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
while true
m, d = gets.split.map(&:to_i)
break if m == 0 && d == 0
puts WDAY[Date.new(YEAR, m, d).wday]
end | require "date"
YEAR = 2004
WDAY = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
while true
m, d = gets.split.map(&:to_i)
break if m == 0 && d == 0
puts WDAY[Date.new(YEAR, m, d).wday]
end | [["+", 0, 493, 0, 662, 12, 516, 0, 557, 0, 6], ["+", 0, 493, 0, 662, 12, 516, 0, 557, 0, 62], ["+", 36, 36, 0, 493, 0, 662, 12, 516, 0, 21], ["-", 0, 493, 0, 662, 12, 516, 0, 557, 0, 62], ["-", 36, 36, 0, 493, 0, 662, 12, 516, 0, 21], ["-", 0, 493, 0, 662, 12, 516, 0, 557, 0, 6]] | 4 | 79 | 8 |
class WhatDayIsToday
def initialize
init_ndays
init_week
init_calendar
end
def init_ndays
@ndays = Array.new(12, 31)
@ndays[1] = 29
@ndays[3] = @ndays[5] = @ndays[8] = @ndays[10] = 31
end
def init_week
@week = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "... | class WhatDayIsToday
def initialize
init_ndays
init_week
init_calendar
end
def init_ndays
@ndays = Array.new(12, 31)
@ndays[1] = 29
@ndays[3] = @ndays[5] = @ndays[8] = @ndays[10] = 30
end
def init_week
@week = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "... | [["-", 0, 662, 12, 662, 12, 662, 12, 662, 12, 612], ["+", 0, 662, 12, 662, 12, 662, 12, 662, 12, 612]] | 4 | 196 | 2 |
#!/usr/bin/ruby
Time.new(2004, *$_.split.map(&:to_i)).strftime("%A") while gets != "0 0\n" | #!/usr/bin/ruby
puts Time.new(2004, *$_.split.map(&:to_i)).strftime("%A") while gets != "0 0\n" | [["+", 36, 36, 0, 493, 0, 740, 8, 652, 735, 22]] | 4 | 32 | 1 |
require "date"
arr = Array.new
until (line = gets) == "0 0\n"
arr << line
end
arr.each do |i|
a = i.split(" ")
a.map!{|j| j.to_i}
m = a[0]
d = a[1]
wday = ["Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Satarday"]
day = Date::... | require "date"
arr = Array.new
until (line = gets) == "0 0\n"
arr << line
end
arr.each do |i|
a = i.split(" ")
a.map!{|j| j.to_i}
m = a[0]
d = a[1]
wday = ["Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"]
day = Date::... | [["-", 8, 736, 0, 662, 12, 516, 0, 557, 0, 6], ["+", 8, 736, 0, 662, 12, 516, 0, 557, 0, 6]] | 4 | 115 | 2 |
# AOJ 0027 What day is today?
days_in_a_month = [31, 29, 30, 30, 31, 30, 31, 31, 30, 31, 30, 31]
offset = []
days_in_a_month.each.with_index do |d, m|
offset[m] = m.zero? ? 0 : days_in_a_month[0..(m - 1)].reduce(0, :+)
end
the_day = %w[Thursday Friday Saturday Sunday Monday Tuesday Wednesday]
loop do
month, day ... | # AOJ 0027 What day is today?
days_in_a_month = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
offset = []
days_in_a_month.each.with_index do |d, m|
offset[m] = m.zero? ? 0 : days_in_a_month[0..(m - 1)].reduce(0, :+)
end
the_day = %w[Thursday Friday Saturday Sunday Monday Tuesday Wednesday]
loop do
month, day ... | [["-", 36, 36, 0, 493, 0, 662, 12, 516, 0, 612], ["+", 36, 36, 0, 493, 0, 662, 12, 516, 0, 612]] | 4 | 129 | 2 |
days=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
dom=[31,29,31,30,31,60,31,31,30,31,30,31]
while True:
try:
try:
(m,d)=list(map(int,input().split()))
except: break
if m==0 and d==0: break
day=4-1
for i in range(m-1):
day+=d... | days=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
dom=[31,29,31,30,31,30,31,31,30,31,30,31]
while True:
try:
try:
(m,d)=list(map(int,input().split()))
except: break
if m==0 and d==0: break
day=4-1
for i in range(m-1):
day+=d... | [["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 612]] | 5 | 136 | 2 |
days_sum={1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,
10:31,11:30,12:31}
days2month={1:'Thursday',2:'Friday',3:'Saturday',4:'Sunday',
5:'Monday',6:'Tuesday',7:'Wednesday'}
while True:
month,day=list(map(int,input().split(" ")))
if month==0 and day==0:
break
keika=0
for i... | days_sum={1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,
10:31,11:30,12:31}
days2month={1:'Thursday',2:'Friday',3:'Saturday',4:'Sunday',
5:'Monday',6:'Tuesday',0:'Wednesday'}
while True:
month,day=list(map(int,input().split(" ")))
if month==0 and day==0:
break
keika=0
for i... | [["-", 0, 1, 0, 662, 12, 680, 0, 569, 448, 612], ["+", 0, 1, 0, 662, 12, 680, 0, 569, 448, 612]] | 5 | 162 | 2 |
import sys
import math
dayy = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
def days(a, day):
if a == 0:
return day
else:
return days(a-1, day + dayy[a])
while True:
inp = input().split()
ii = int(inp[0])
jj = int(inp[1])
if ii == 0 and jj== 0:
break
ans = ... |
import sys
import math
dayy = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
def days(a, day):
if a == 0:
return day
else:
return days(a-1, day + dayy[a])
while True:
inp = input().split()
ii = int(inp[0])
jj = int(inp[1])
if ii == 0 and jj== 0:
break
ans = ... | [["-", 0, 52, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 209 | 6 |
month = [31, 30, 29, 30, 31, 30, 31, 31, 30, 31, 30, 31]
day = ['Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', 'Monday', 'Tuesday']
while True:
m, d = map(int, input().split())
if m == 0:
break
print(day[(sum(month[:m - 1]) + d) % 7]) | month = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30]
day = ['Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', 'Monday', 'Tuesday']
while True:
m, d = map(int, input().split())
if m == 0:
break
print(day[(sum(month[:m - 1]) + d) % 7]) | [["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 612], ["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 612]] | 5 | 105 | 6 |
# -*- coding: utf-8 -*-
import sys
days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Satday"]
while True:
ans = 3
m, d = list(map(int, input().split()))
if m == 0:
break
for i in range(1, m):
if i == 2:
ans = (ans+1)%7
elif i == 4 or i == 6 ... | # -*- coding: utf-8 -*-
import sys
days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
while True:
ans = 3
m, d = list(map(int, input().split()))
if m == 0:
break
for i in range(1, m):
if i == 2:
ans = (ans+1)%7
elif i == 4 or i == ... | [["-", 0, 1, 0, 662, 12, 634, 0, 557, 0, 6], ["+", 0, 1, 0, 662, 12, 634, 0, 557, 0, 6]] | 5 | 142 | 2 |
days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
nums = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
while True:
try:
m, d = map(int, input().split())
if not m:
break
except:
break
print(days[(sum(nums[:m - 1]) + d) % 7 + 2]) | days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
nums = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
while True:
try:
m, d = map(int, input().split())
if not m:
break
except:
break
print(days[(sum(nums[:m - 1]) + d + 2) % 7]) | [["+", 0, 206, 206, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 206, 206, 657, 31, 23, 0, 657, 12, 612], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 17, 72], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 12, 612]] | 5 | 111 | 4 |
import math
def Wit(y,m,d):
if m == 1 or m == 2:
y -= 1
m += 12
e = math.floor((26 * (m + 1)) / 10)
Y = y % 100
C = math.floor(y / 100)
f = math.floor(C / 4)
g = math.floor(Y / 4)
h = d + e + Y + f + g - 2 * C
h = int(h % 7)
return h
while True:
y = 2004
m,d ... | import math
def Wit(y,m,d):
if m == 1 or m == 2:
y -= 1
m += 12
e = math.floor((26 * (m + 1)) / 10)
Y = y % 100
C = math.floor(y / 100)
f = math.floor(C / 4)
g = math.floor(Y / 4)
h = d + e + Y + f + g + 5 * C
h = int(h % 7)
return h
while True:
y = 2004
m,d ... | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 1, 0, 662, 12, 657, 12, 657, 31, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 612], ["-", 8, 196, 0, 57, 75, 665, 15, 666, 0, 612], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 0, 612]] | 5 | 224 | 8 |
from datetime import date
week=["Monday","Trueday","Wednesday","Thursday","Friday","Saturday","Sunday"]
while True:
a,b=map(int,input().split())
if a==0:
break
print(week[date(2004,a,b).weekday()]) | from datetime import date
week=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
while True:
a,b=map(int,input().split())
if a==0:
break
print(week[date(2004,a,b).weekday()]) | [["-", 0, 1, 0, 662, 12, 634, 0, 557, 0, 6], ["+", 0, 1, 0, 662, 12, 634, 0, 557, 0, 6]] | 5 | 78 | 2 |
month, day = list(map(int, input().split()))
days = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
youbi = ["Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday"]
while month != 0:
Days = 0
for i in range(month - 1):
Days += days[i]
Days += day
print(youbi[(Days... | month, day = list(map(int, input().split()))
days = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
youbi = ["Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday"]
while month != 0:
Days = 0
for i in range(month - 1):
Days += days[i]
Days += day
print(youbi[(Days... | [["-", 0, 206, 206, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 206, 206, 657, 31, 23, 0, 657, 12, 612]] | 5 | 136 | 2 |
import datetime
date_list = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
while True:
m, d = map(int, input().split())
if m == 0 and d == 0:
break
print(date_list[datetime.date(204, m, d).weekday()])
| import datetime
date_list = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
while True:
m, d = map(int, input().split())
if m == 0 and d == 0:
break
print(date_list[datetime.date(2004, m, d).weekday()])
| [["-", 206, 652, 63, 319, 500, 652, 3, 4, 0, 612], ["+", 206, 652, 63, 319, 500, 652, 3, 4, 0, 612]] | 5 | 82 | 2 |
s = (0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30)
w = ("Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday")
while True:
m, d = map(int, input().split())
if m == 0:break
print(w[(d + sum(s[:m])) % 7])
| s = (0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30)
w = ("Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday")
while True:
m, d = map(int, input().split())
if m == 0:break
print(w[(d + sum(s[:m])) % 7])
| [["+", 0, 656, 0, 1, 0, 662, 12, 660, 0, 21], ["+", 0, 1, 0, 662, 12, 660, 0, 557, 0, 654], ["+", 0, 1, 0, 662, 12, 660, 0, 557, 0, 6], ["+", 0, 1, 0, 662, 12, 660, 0, 557, 0, 655]] | 5 | 99 | 4 |
def day(Y, m, d, Gregorian=True):
from math import floor
# ツェラーの公式
if m <= 2:
Y -= 1
m += 12
y = Y%100
c = Y//100
g = 5*c+floor(c/4) if Gregorian else 5-c
return (d + floor(26*(m+1)/10) + y + floor(y/4) + g) %7 # 0->土曜, 6->金曜
day_en = ["Saturday", "Sunday", "Minday", "Tues... | def day(Y, m, d, Gregorian=True):
from math import floor
# ツェラーの公式
if m <= 2:
Y -= 1
m += 12
y = Y%100
c = Y//100
g = 5*c+floor(c/4) if Gregorian else 5-c
return (d + floor(26*(m+1)/10) + y + floor(y/4) + g) %7 # 0->土曜, 6->金曜
day_en = ["Saturday", "Sunday", "Monday", "Tues... | [["-", 0, 1, 0, 662, 12, 634, 0, 557, 0, 6], ["+", 0, 1, 0, 662, 12, 634, 0, 557, 0, 6]] | 5 | 159 | 2 |
day = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"]
month = [31, 29, 30, 31, 30, 31, 31, 30, 31, 30, 31]
while True:
m, d = list(map(int, input().split()))
if m == d == 0: break
print(day[(sum(month[0:m-1]) + d - 1) % 7]) | day = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"]
month = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
while True:
m, d = list(map(int, input().split()))
if m == d == 0: break
print(day[(sum(month[0:m-1]) + d - 1) % 7]) | [["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 21]] | 5 | 111 | 2 |
wd=["Mon","Tues","Wednes","Thurs","Fri","Satur","Sun"]
md=[0,31,29,31,30,31,30,31,31,30,31,30,31]
while True:
m,d = list(map(int, input().split()))
if m==0: break
s = sum([md[i] for i in range(month)]) + day + 2
s = wd[s % 7]+"day"
print(s) | wd=["Mon","Tues","Wednes","Thurs","Fri","Satur","Sun"]
md=[0,31,29,31,30,31,30,31,31,30,31,30,31]
while True:
m,d = list(map(int, input().split()))
if m==0: break
s = sum([md[i] for i in range(m)]) + d + 2
s = wd[s % 7]+"day"
print(s) | [["-", 0, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["+", 0, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22]] | 5 | 126 | 4 |
y = [31,29,31,30,31,30,31,31,30,31,30,31]
dow = {0:"Monday", 1:"Thuesday", 2:"Wednesday", 3:"Thursday", 4:"Friday", 5:"Saturday", 6:"Sunday"}
while True:
m, d = list(map(int, input().split()))
if m == 0 and d == 0:
break
n = 0
for i in range(m):
n += y[i]
n -= (y[m-1]-d+1)
print... | y = [31,29,31,30,31,30,31,31,30,31,30,31]
dow = {0:"Monday", 1:"Tuesday", 2:"Wednesday", 3:"Thursday", 4:"Friday", 5:"Saturday", 6:"Sunday"}
while True:
m, d = list(map(int, input().split()))
if m == 0 and d == 0:
break
n = 0
for i in range(m):
n += y[i]
n -= (y[m-1]-d+1)
print(... | [["-", 0, 662, 12, 680, 0, 569, 51, 557, 0, 6], ["+", 0, 662, 12, 680, 0, 569, 51, 557, 0, 6]] | 5 | 148 | 2 |
#include <stdio.h>
int main() {
char ch;
int num, max;
int p[10] = {0};
int q[2][10] = {0};
while (scanf("%d", &num) != EOF) {
p[num] += 1;
}
max = 0;
for (int i = 0; i < 10; i++) {
if (max < p[i])
max = p[i];
}
for (int i = 0; i < 10; i++) {
if (max == p[i])
printf("%d\n", ... | #include <stdio.h>
int main() {
char ch;
int num, max;
int p[101] = {0};
int q[2][10] = {0};
while (scanf("%d", &num) != EOF) {
p[num] += 1;
}
max = 0;
for (int i = 0; i < 101; i++) {
if (max < p[i])
max = p[i];
}
for (int i = 0; i < 101; i++) {
if (max == p[i])
printf("%d\n... | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 136 | 6 |
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int a[100];
int main(void) {
int n;
int max = 0;
for (int i = 0; i < 100; i++)
a[i] = 0;
while (scanf("%d", &n) != EOF) {
a[n]++;
}
for (int i = 0; i < 100; i++) {
if (a[i] > max)
max = a[i];
}
for (int ... | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int a[100];
int main(void) {
int n;
int max = 0;
for (int i = 0; i < 100; i++)
a[i] = 0;
while (scanf("%d", &n) != EOF) {
a[n]++;
}
for (int i = 0; i < 100; i++) {
if (a[i] > max)
max = a[i];
}
for (int... | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 31, 22], ["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32]] | 1 | 146 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t[101] = {}, tmp, k = 0, i;
while (cin >> tmp) {
t[tmp + 1]++;
if (t[tmp] > k) {
k = t[tmp];
}
}
for (i = 1; i <= 101; i++) {
if (t[i] == k) {
cout << i - 1 << endl;
}
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int t[102] = {}, tmp, k = 0, i;
while (cin >> tmp) {
t[tmp + 1]++;
if (t[tmp + 1] > k) {
k = t[tmp + 1];
}
}
for (i = 1; i <= 102; i++) {
if (t[i] == k) {
cout << i - 1 << endl;
}
}
return 0;
} | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 0, 11, 12, 69, 341, 342, 0, 16, 17, 72], ["+", 0, 11, 12, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13],... | 1 | 100 | 8 |
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <... | [["-", 31, 16, 12, 23, 0, 16, 31, 69, 28, 22], ["-", 12, 23, 0, 16, 31, 69, 341, 342, 0, 70], ["-", 12, 23, 0, 16, 31, 69, 341, 342, 0, 73]] | 1 | 299 | 3 |
#include <cstdio>
using namespace std;
int main() {
int data[101] = {0};
int n, max;
while (scanf("%d", &n) != EOF) {
data[n]++;
}
for (int i = 0; i < 101; i++) {
if (max < data[i]) {
max = data[i];
}
}
for (int i = 0; i < 101; i++) {
if (max == data[i]) {
printf("%d", i);
... | #include <cstdio>
using namespace std;
int main() {
int data[101] = {0};
int n, max = 0;
while (scanf("%d", &n) != EOF) {
data[n]++;
}
for (int i = 0; i < 101; i++) {
if (max < data[i]) {
max = data[i];
}
}
for (int i = 0; i < 101; i++) {
if (max == data[i]) {
printf("%d\n"... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 124 | 3 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, a, n) for (int i = a; i < n; i++)
using namespace std;
int main(void) {
int n, a[101], m = 0;
rep(i, 1, 101) { a[i] = 0; }
while (cin >> n) {
a[n]++;
}
rep(i, 1, 101) {
if (m... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, a, n) for (int i = a; i < n; i++)
using namespace std;
int main(void) {
int n, a[101], m = 0;
rep(i, 1, 101) { a[i] = 0; }
while (cin >> n) {
a[n]++;
}
rep(i, 1, 101) {
if (m... | [["-", 0, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 73]] | 1 | 142 | 3 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, m;
int a[100] = {0};
while (cin >> n)
a[n - 1]++;
m = *max_element(a, a + 100);
for (int i = 0; i < 10; i++) {
if (m == a[i])
cout << i + 1 << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, m;
int a[100] = {0};
while (cin >> n)
a[n - 1]++;
m = *max_element(a, a + 100);
for (int i = 0; i < 100; i++) {
if (m == a[i])
cout << i + 1 << endl;
}
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 91 | 2 |
#include <iostream>
using namespace std;
int main() {
int count[101] = {0};
int a;
while (cin >> a)
count[a]++;
int max_freq = 0;
for (int i = 1; i <= 100; i++) {
if (max_freq < count[i])
max_freq = count[i];
}
for (int i = 1; i <= 100; i++) {
if (count[i] == max_freq)
cout << ... | #include <iostream>
using namespace std;
int main() {
int count[101] = {0};
int a;
while (cin >> a)
count[a]++;
int max_freq = 0;
for (int i = 1; i <= 100; i++) {
if (max_freq < count[i])
max_freq = count[i];
}
for (int i = 1; i <= 100; i++) {
if (count[i] == max_freq)
cout << ... | [["-", 64, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 73]] | 1 | 111 | 3 |
#include <stdio.h>
int main() {
int i;
int seed, max = 0;
int data[100] = {0};
int maxnum[100];
while ((scanf("%d", &seed)) != EOF) {
data[seed] += 1;
}
for (i = 0; i < 100; i++) {
if (data[i] > max)
max = data[i];
}
for (i = 0; i < 100; i++) {
if (data[i] == max)
printf("%d\... | #include <stdio.h>
int main() {
int i;
int seed, max = 0;
int data[100] = {0};
int maxnum[100];
while ((scanf("%d", &seed)) != EOF) {
data[seed - 1] += 1;
}
for (i = 0; i < 100; i++) {
if (data[i] > max)
max = data[i];
}
for (i = 0; i < 100; i++) {
if (data[i] == max)
printf("... | [["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 129 | 2 |
#include <iostream>
using namespace std;
int list[101];
int main() {
int n, i, max = 101;
while (cin >> n) {
list[n] += 1;
}
for (i = 1; i < 101; i++) {
if (list[i] >= max)
max = list[i];
}
for (i = 1; i < 101; i++) {
if (list[i] == max)
cout << i << endl;
}
} | #include <iostream>
using namespace std;
int list[101];
int main() {
int n, i, max = 0;
while (cin >> n) {
list[n] += 1;
}
for (i = 1; i < 101; i++) {
if (list[i] >= max)
max = list[i];
}
for (i = 1; i < 101; i++) {
if (list[i] == max)
cout << i << endl;
}
} | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 103 | 2 |
#include <bits/stdc++.h>
using namespace std;
static const int MAX_N = 100;
int a[MAX_N];
int main(void) {
for (int i = 0; i < MAX_N; i++) {
a[i] = 0;
}
int input;
while (scanf("%d", &input) != EOF) {
a[input]++;
}
int max_a = 0;
for (int i = 0; i < MAX_N; i++) {
if (a[i] > max_a)
ma... | #include <bits/stdc++.h>
using namespace std;
static const int MAX_N = 100;
int a[MAX_N];
int main(void) {
for (int i = 0; i <= MAX_N; i++) {
a[i] = 0;
}
int input;
while (scanf("%d", &input) != EOF) {
a[input]++;
}
int max_a = 0;
for (int i = 0; i < MAX_N; i++) {
if (a[i] > max_a)
m... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 64, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 70], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 73]] | 1 | 152 | 5 |
#include <stdio.h>
int main() {
int v, b[100] = {0}, c = 0;
while (scanf("%d", &v) != EOF) {
b[v - 1] += v;
}
for (int i = 0; i < 100; i++) {
if (b[i] > c) {
c = b[i];
}
}
for (int i = 0; i < 100; i++) {
if (c == b[i]) {
printf("%d\n", i + 1);
}
}
return 0;
} | #include <stdio.h>
int main() {
int v, b[100] = {0}, c = 0;
while (scanf("%d", &v) != EOF) {
b[v - 1] += 1;
}
for (int i = 0; i < 100; i++) {
if (b[i] > c) {
c = b[i];
}
}
for (int i = 0; i < 100; i++) {
if (c == b[i]) {
printf("%d\n", i + 1);
}
}
return 0;
} | [["-", 0, 52, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13]] | 1 | 125 | 2 |
#include <iostream>
using namespace std;
int main() {
int datas[100] = {0};
int num, biggest_num = 0;
while (cin >> num) {
datas[num + 1]++;
}
for (int i = 0; i < 100; i++) {
if (biggest_num < datas[i]) {
biggest_num = datas[i];
}
}
for (int i = 0; i < 100; i++) {
if (biggest_num ==... | #include <iostream>
using namespace std;
int main() {
int datas[100] = {0};
int num, biggest_num = 0;
while (cin >> num) {
datas[num - 1]++;
}
for (int i = 0; i < 100; i++) {
if (biggest_num < datas[i]) {
biggest_num = datas[i];
}
}
for (int i = 0; i < 100; i++) {
if (biggest_num ==... | [["-", 0, 27, 28, 69, 341, 342, 0, 16, 17, 72], ["+", 0, 27, 28, 69, 341, 342, 0, 16, 17, 33]] | 1 | 117 | 2 |
#include <iostream>
int main() {
int l[9999], i, f;
for (i = 0; i < 999; i++)
l[i] = 0;
while (std::cin >> i)
l[i - 1]++;
for (i = 0, f = 0; i < 9999; i++)
if (f < l[i])
f = l[i];
for (i = 0; i < 9999; i++)
if (l[i] == f)
std::cout << i + 1 << "\n";
} | #include <iostream>
int main() {
int l[999], i, f;
for (i = 0; i < 999; i++)
l[i] = 0;
while (std::cin >> i)
l[i - 1]++;
for (i = 0, f = 0; i < 999; i++)
if (f < l[i])
f = l[i];
for (i = 0; i < 999; i++)
if (l[i] == f)
std::cout << i + 1 << "\n";
} | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 121 | 6 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int input = 0;
int a[100];
int b[100][2];
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 2; j++) {
b[i][j] = 0;
}
}
int n = 0;
while (cin >> input) {
a[n] = input;
n++;
}
sort(a, a + n);
int i = 0... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int input = 0;
int a[100];
int b[100][2];
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 2; j++) {
b[i][j] = 0;
}
}
int n = 0;
while (cin >> input) {
a[n] = input;
n++;
}
sort(a, a + n);
int i = 0... | [["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13]] | 1 | 353 | 2 |
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
int bucket[101];
int ma = 0;
int main() {
int a;
memset(bucket, 0, sizeof(bucket));
while (cin >> a, !cin.eof()) {
cin >> a;
bucket[a]++;
ma = max(bucket[a], ma);
}
for (int i = 0; i < 101; i++) {
if (bucket[i... | #include <cstring>
#include <iostream>
#include <vector>
using namespace std;
int bucket[101];
int ma = 0;
int main() {
int a;
memset(bucket, 0, sizeof(bucket));
while (cin >> a, !cin.eof()) {
bucket[a]++;
ma = max(bucket[a], ma);
}
for (int i = 0; i < 101; i++) {
if (bucket[i] == ma)
... | [["-", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 113 | 4 |
#include <iostream>
using namespace std;
int main(void) {
int n;
int a[10] = {0};
while (cin >> n) {
a[n]++;
}
int max = 0;
for (int i = 0; i < 10; i++) {
if (a[i] > max) {
max = a[i];
}
}
for (int i = 0; i < 10; i++) {
if (a[i] == max) {
cout << i << endl;
}
}
retu... | #include <iostream>
using namespace std;
int main(void) {
int n;
int a[101] = {0};
while (cin >> n) {
a[n]++;
}
int max = 0;
for (int i = 0; i < 101; i++) {
if (a[i] > max) {
max = a[i];
}
}
for (int i = 0; i < 101; i++) {
if (a[i] == max) {
cout << i << endl;
}
}
r... | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 115 | 6 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[101] = {0};
int input;
while (cin >> input) {
a[input]++;
int m = 0;
for (int i = 1; i < 101; i++) {
if (m < a[i])
m = a[i];
// m = max(m, a[i]);
}
for (int i = 1; i < 101; i++) {
if (m =... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[101] = {0};
int input;
while (cin >> input) {
a[input]++;
}
int m = 0;
for (int i = 1; i < 101; i++) {
if (m < a[i])
m = a[i];
// m = max(m, a[i]);
}
for (int i = 1; i < 101; i++) {
if (m == a[i]) {
... | [["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 115 | 2 |
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int counter[10] = {0};
int a;
int MAX = 0;
int i = 0;
while (cin >> a) {
counter[a]++;
}
for (int j = 1; j < 10; j++) {
MAX = max(MAX, counter[j]);
}
for (int k = 1; k < 10; k++) {
if (MAX == c... | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int counter[101] = {0};
int a;
int MAX = 0;
int i = 0;
while (cin >> a) {
counter[a]++;
}
for (int j = 1; j < 101; j++) {
MAX = max(MAX, counter[j]);
}
for (int k = 1; k < 101; k++) {
if (MAX =... | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 117 | 6 |
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <map>
#include <utility>
using namespace std;
int main() {
map<int, int> iData;
int iBuff, maxCount, maxElement[100];
pair<map<int, int>::iterator, bool> flag;
while (cin >> iBuff) {
flag = iData.insert(map<int, int>::value_type(iBuff, 1)... | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <map>
#include <utility>
using namespace std;
int main() {
map<int, int> iData;
int iBuff, maxCount = 0, maxElement[100];
pair<map<int, int>::iterator, bool> flag;
while (cin >> iBuff) {
flag = iData.insert(map<int, int>::value_type(iBuff... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 160 | 2 |
#include <stdio.h>
int main(void) {
int i, n, num[101] = {0};
int max = 0;
while (scanf("%d", &n) != EOF) {
num[n]++;
}
for (i = 0; i < 101; i++) {
if (num[i] > num[max]) {
max = num[i];
}
}
for (i = 0; i < 101; i++) {
if (num[i] == max) {
printf("%d\n", i);
}
}
ret... | #include <stdio.h>
int main(void) {
int i, n, num[101] = {0};
int max = 0;
while (scanf("%d", &n) != EOF) {
num[n]++;
}
for (i = 0; i < 101; i++) {
if (num[i] > max) {
max = num[i];
}
}
for (i = 0; i < 101; i++) {
if (num[i] == max) {
printf("%d\n", i);
}
}
return (... | [["-", 0, 57, 15, 23, 0, 16, 12, 69, 28, 22], ["-", 0, 57, 15, 23, 0, 16, 12, 69, 0, 70], ["-", 0, 57, 15, 23, 0, 16, 12, 69, 0, 73]] | 0 | 127 | 3 |
#include <stdio.h>
int count[10];
int main(void) {
int i = 0;
int j;
int n[100];
int mc;
while (scanf("%d", &n[i]) != EOF) {
count[n[i]]++;
i++;
}
mc = count[0];
for (j = 1; j < 10; j++) {
if (count[j] > mc) {
mc = count[j];
}
}
for (i = 0; i < 10; i++) {
if (mc == count... | #include <stdio.h>
int count[100];
int main(void) {
int i = 0;
int j;
int n[100];
int mc;
while (scanf("%d", &n[i]) != EOF) {
count[n[i]]++;
i++;
}
mc = count[0];
for (j = 1; j < 100; j++) {
if (count[j] > mc) {
mc = count[j];
}
}
for (i = 0; i < 100; i++) {
if (mc == co... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 0 | 144 | 6 |
#include <stdio.h>
#define N 100
int main(void) {
int a[101], i = 0, j, max;
// initializing
for (j = 1; j <= N; j++) {
a[j] = 0;
}
while (scanf("%d", &i) != EOF) {
a[i] += 1;
}
for (i = 1; i < N; i++) {
if (a[i] > max)
max = a[i];
}
for (i = 1; i < N; i++) {
if (max == a[i]... | #include <stdio.h>
#define N 100
int main(void) {
int a[101], i = 0, j, max = 0;
// initializing
for (j = 1; j <= N; j++) {
a[j] = 0;
}
while (scanf("%d", &i) != EOF) {
a[i] += 1;
}
for (i = 1; i < N; i++) {
if (a[i] > max)
max = a[i];
}
for (i = 1; i < N; i++) {
if (max == ... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 64, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["-", 64, 1, 0, 2, 3, 4, 0, 69, 0, 70], ["-", 64, 1, 0, 2, 3, 4, 0, 69, 0, 73]] | 0 | 143 | 5 |
#include <stdio.h>
int main(void) {
int count[100] = {0};
int mode_n = 0;
int data;
int i;
while (scanf("%d", &data) != EOF)
count[data - 1]++;
for (i = 0; i < 100; i++)
if (mode_n < count[i])
mode_n = count[i];
for (i = 0; i < 100; i++)
if (mode_n == count[i])
printf("%d", i + 1)... | #include <stdio.h>
int main(void) {
int count[100] = {0};
int mode_n = 0;
int data;
int i;
while (scanf("%d", &data) != EOF)
count[data - 1]++;
for (i = 0; i < 100; i++)
if (mode_n < count[i])
mode_n = count[i];
for (i = 0; i < 100; i++)
if (mode_n == count[i])
printf("%d\n", i + ... | [["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 117 | 1 |
#include <stdio.h>
int main() {
int M[101] = {0}, cou, a, max = 0;
while (scanf("%d", &a) != EOF) {
M[a]++;
}
for (cou = 0; cou < 100; cou++) {
if (M[a] > max) {
max = M[a];
}
}
for (cou = 0; cou < 100; cou++) {
if (M[cou] == max) {
printf("%d\n", a + 1);
}
}
return 0... | #include <stdio.h>
int main() {
int M[101] = {0}, cou, a, max = 0;
while (scanf("%d", &a) != EOF) {
M[a]++;
}
for (cou = 0; cou < 100; cou++) {
if (M[cou] > max) {
max = M[cou];
}
}
for (cou = 0; cou < 100; cou++) {
if (M[cou] == max) {
printf("%d\n", cou);
}
}
return... | [["-", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 69, 71, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 69, 71, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 2... | 0 | 122 | 8 |
#include <stdio.h>
int main(void) {
int a, i;
int count[101] = {0};
int max = 0;
while (scanf("%d", a) != EOF)
count[a]++;
for (i = 1; i <= 100; i++) {
if (max < count[i])
max = count[i];
}
for (i = 0; i <= 100; i++) {
if (max == count[i])
printf("%d\n", i);
}
return 0;
} | #include <stdio.h>
int main(void) {
int a, i;
int count[101] = {0};
int max = 0;
while (scanf("%d", &a) != EOF)
count[a]++;
for (i = 1; i <= 100; i++) {
if (max < count[i])
max = count[i];
}
for (i = 0; i <= 100; i++) {
if (max == count[i])
printf("%d\n", i);
}
return 0;
} | [["+", 0, 16, 31, 2, 3, 4, 0, 66, 17, 67]] | 0 | 116 | 1 |
#include <stdio.h>
int num[101] = {0};
int data = 0;
int max = 0;
int i = 0;
int main(void) {
while ((scanf("%d", &data)) != EOF) {
num[data]++;
if (max < num[data])
max = num[data];
}
for (i = 1; i <= 100; i++) {
if (num[i] == max)
printf("\n%d\n", i);
}
return 0;
} | #include <stdio.h>
int num[100] = {0};
int data = 0;
int max = 0;
int i = 0;
int main(void) {
while ((scanf("%d", &data)) != EOF) {
num[data]++;
if (max < num[data])
max = num[data];
}
for (i = 0; i < 100; i++) {
if (num[i] == max)
printf("%d\n", i);
}
return 0;
} | [["-", 0, 30, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 0, 30, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 112 | 7 |
#include <stdio.h>
int log[110] = {0};
int main() {
int inp_d;
int current_max = 0;
while ((scanf("%d", &inp_d)) == 1) {
if (++log[inp_d] > current_max)
current_max = log[inp_d];
}
for (int i = 1; i <= 100; i++) {
if (log[inp_d] == current_max)
printf("%d\n", i);
}
return 0;
}
| #include <stdio.h>
int log[110] = {0};
int main() {
int inp_d;
int current_max = 0;
while ((scanf("%d", &inp_d)) == 1) {
if (++log[inp_d] > current_max)
current_max = log[inp_d];
}
for (int i = 1; i <= 100; i++) {
if (log[i] == current_max)
printf("%d\n", i);
}
return 0;
}
| [["-", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22]] | 0 | 99 | 2 |
#include <stdio.h>
void swap(int *a, int *b) {
int tmp;
tmp = *a;
*a = *b;
*b = tmp;
}
int main() {
int data[100];
int count[100];
int i, j, youso, tmp;
for (i = 0; i < 100; i++) {
count[i] = 0;
}
i = 0;
while (scanf("%d", data + i) != EOF) {
i++;
}
youso = i;
for (i = 0; i < you... | #include <stdio.h>
void swap(int *a, int *b) {
int tmp;
tmp = *a;
*a = *b;
*b = tmp;
}
int main() {
int data[100];
int count[100];
int i, j, youso, tmp;
for (i = 0; i < 100; i++) {
count[i] = 0;
}
i = 0;
while (scanf("%d", data + i) != EOF) {
i++;
}
youso = i;
for (i = 0; i < you... | [["-", 8, 9, 0, 7, 15, 16, 31, 69, 28, 22], ["+", 8, 9, 0, 7, 15, 16, 31, 69, 28, 22], ["-", 8, 9, 0, 7, 15, 16, 12, 69, 28, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 69, 28, 22]] | 0 | 374 | 4 |
#include <iostream>
using namespace std;
int main() {
int a[105] = {}, b, c = 0;
while (cin >> b) {
a[b]++;
}
for (int i = 0; i < 101; i++) {
if (c < a[b]) {
c = a[b];
}
}
for (int i = 0; i < 101; i++) {
if (a[b] == c)
cout << b << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a[105] = {}, b, c = 0;
while (cin >> b) {
a[b]++;
}
for (int i = 0; i < 101; i++) {
if (c < a[i]) {
c = a[i];
}
}
for (int i = 0; i < 101; i++) {
if (a[i] == c)
cout << i << endl;
}
return 0;
}
| [["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22], ["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["-", 0, 57, 64, 1, 0, 16, 31, 16... | 1 | 109 | 8 |
//↓template↓
#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n) n.begin(), n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}, alp[30];
long long fac[200005], finv[20... | //↓template↓
#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n) n.begin(), n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}, alp[30];
long long fac[200005], finv[20... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 338 | 2 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define FOR(i, c) \
for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#de... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define FOR(i, c) \
for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#de... | [["-", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13]] | 1 | 472 | 2 |
#include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {... | [["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 21], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 279 | 6 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
int sdy[] = {-1, 0, 0, 1, 0};
int sdx[] = {0, -1, 1, 0, 0};
int mdy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1};
int mdx[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
int ldy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1, 2, 0, 0, -2};
int ldx[] = {-... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
int sdy[] = {-1, 0, 0, 1, 0};
int sdx[] = {0, -1, 1, 0, 0};
int mdy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1};
int mdx[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
int ldy[] = {0, 0, 0, -1, -1, -1, 1, 1, 1, 2, 0, 0, -2};
int ldx[] = {-... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13]] | 1 | 518 | 2 |
#include <iostream>
using namespace std;
int main() {
int cell[10][10] = {{0}}, x, y, size, i, j, max = 0, num = 0;
char c;
while (1) {
cin >> x;
if (cin.eof())
break;
cin >> c >> y >> c >> size;
switch (size) {
case 1:
for (i = y - 1; i <= y + 1; i++) {
for (j = ((i == y -... | #include <iostream>
using namespace std;
int main() {
int cell[10][10] = {{0}}, x, y, size, i, j, max = 0, num = 0;
char c;
while (1) {
cin >> x;
if (cin.eof())
break;
cin >> c >> y >> c >> size;
switch (size) {
case 1:
for (i = y - 1; i <= y + 1; i++) {
for (j = ((i == y -... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 498 | 6 |
#include <iostream>
using namespace std;
main() {
int map[10][10];
int x, y, size;
// initialize
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
map[i][j] = 0;
}
}
int white = 0, Max = 0;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
if (size == 1) {
if (y >= ... | #include <iostream>
using namespace std;
main() {
int map[10][10];
int x, y, size;
// initialize
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
map[i][j] = 0;
}
}
int white = 0, Max = 0;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
if (size == 1) {
if (y >= ... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22]] | 1 | 1,226 | 4 |
#include <cstdio>
#include <iostream>
using namespace std;
int board[10][10];
void fill(int x, int y) {
if (0 <= x && x < 10 && 0 <= y && y < 10) {
board[y][x]++;
}
}
int main() {
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size) + 1) {
if (size >= 1) { // small
fill(x, y);
fill(x +... | #include <cstdio>
#include <iostream>
using namespace std;
int board[10][10];
void fill(int x, int y) {
if (0 <= x && x < 10 && 0 <= y && y < 10) {
board[y][x]++;
}
}
int main() {
int x, y, size;
while (~scanf("%d,%d,%d", &x, &y, &size)) {
if (size >= 1) { // small
fill(x, y);
fill(x + 1,... | [["+", 8, 9, 0, 52, 15, 339, 51, 91, 17, 92], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 72], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33]] | 1 | 340 | 5 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int x, y, t;
int field[30][30] = {0};
for (;;) {
if (scanf("%d,%d,%d", &x, &y, &t) == EOF) {
break;
}
field[x + 10][y + 10]++;
field[x + 9][y + 10]++;
field[x + 11][y + 10]++;
field[x + 10][y + 9]++;
field[x ... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int x, y, t;
int field[30][30] = {0};
for (;;) {
if (scanf("%d,%d,%d", &x, &y, &t) == EOF) {
break;
}
field[x + 10][y + 10]++;
field[x + 9][y + 10]++;
field[x + 11][y + 10]++;
field[x + 10][y + 9]++;
field[x ... | [["-", 51, 91, 28, 69, 341, 342, 0, 16, 31, 22], ["+", 51, 91, 28, 69, 341, 342, 0, 16, 31, 22], ["-", 51, 16, 31, 69, 341, 342, 0, 16, 31, 22], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 31, 22]] | 1 | 372 | 4 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int board[10][10] = {0};
fill(board[0], board[0] + 10 * 10, 0);
const int INK[3][14][2] = {{{6}, {0, -1}, {-1, 0}, {0, 0}, {1, 0}, {0, 1}},
{{10},
{-1, -1},
... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int board[10][10] = {0};
fill(board[0], board[0] + 10 * 10, 0);
const int INK[3][14][2] = {{{6}, {0, -1}, {-1, 0}, {0, 0}, {1, 0}, {0, 1}},
{{10},
{-1, -1},
... | [["-", 49, 50, 51, 83, 0, 83, 0, 83, 0, 13], ["+", 49, 50, 51, 83, 0, 83, 0, 83, 0, 13]] | 1 | 430 | 2 |
#include <stdio.h>
int main() {
int RB[10][10], i, j, k;
for (i = 0; i < 10; i++)
for (j = 0; j < 10; RB[i][j++] = 0)
;
while (scanf("%d,%d,%d", &i, &j, &k) != EOF) {
RB[i][j]++;
if (i)
RB[i - 1][j]++;
if (i < 9)
RB[i + 1][j]++;
if (j)
RB[i][j - 1]++;
if (j < 9)
... | #include <stdio.h>
int main() {
int RB[10][10], i, j, k;
for (i = 0; i < 10; i++)
for (j = 0; j < 10; RB[i][j++] = 0)
;
while (scanf("%d,%d,%d", &i, &j, &k) != EOF) {
RB[i][j]++;
if (i)
RB[i - 1][j]++;
if (i < 9)
RB[i + 1][j]++;
if (j)
RB[i][j - 1]++;
if (j < 9)
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 439 | 2 |
#include <iostream>
using namespace std;
int main() {
int grid[14][14];
int s[4][2] = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}};
int m[4][2] = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}};
int l[4][2] = {{0, -2}, {0, 2}, {-2, 0}, {2, 0}};
int x, y, size;
int i, j;
int max = 0;
int blank = 0;
char comma;
for (i = ... | #include <iostream>
using namespace std;
int main() {
int grid[14][14];
int s[4][2] = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}};
int m[4][2] = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}};
int l[4][2] = {{0, -2}, {0, 2}, {-2, 0}, {2, 0}};
int x, y, size;
int i, j;
int max = 0;
int blank = 0;
char comma;
for (i = ... | [["-", 75, 76, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 452 | 2 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int dec[10][10];
int x, y, size, num, max;
char a;
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
dec[i][j] = 0;
}
}
while (cin >> y >> a >> x >> a >> size) {
if (size == 1) {
if (x + 1 < 10 && x... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int dec[10][10];
int x, y, size, num, max;
char a;
num = 0;
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
dec[i][j] = 0;
}
}
while (cin >> y >> a >> x >> a >> size) {
if (size == 1) {
if (x + ... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 637 | 4 |
#include <iostream>
#include <string>
#include <vector>
enum InkSize { small = 0, middle, large };
InkSize Next(int x) {
if (x < 0 || 2 < x) {
std::cout << "Input Error.\n";
return small;
}
const InkSize ink[3] = {small, middle, large};
return ink[x];
}
struct Board {
Board(int a) {
for (siz... | #include <iostream>
#include <string>
#include <vector>
enum InkSize { small = 0, middle, large };
InkSize Next(int x) {
if (x < 0 || 2 < x) {
std::cout << "Input Error.\n";
return small;
}
const InkSize ink[3] = {small, middle, large};
return ink[x];
}
struct Board {
Board(int a) {
for (siz... | [["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["+", 0, 16, 31, 16, 31, 16, 12, 103, 0, 44]] | 1 | 678 | 2 |
#include <cstdio>
int ds[][2] = {{0, 0}, {1, 0}, {0, 1}, {-1, 0}, {0, -1}, {1, 1}, {1, -1},
{-1, 1}, {-1, -1}, {2, 0}, {0, 2}, {-2, 0}, {0, -2}};
int map[10][10], kosa, rest = 100;
int max(int a, int b) { return a > b ? a : b; }
int drop(int x, int y) {
if (x >= 0 && x < 10 && y >= 0 && y < 10) ... | #include <cstdio>
int ds[][2] = {{0, 0}, {1, 0}, {0, 1}, {-1, 0}, {0, -1}, {1, 1}, {1, -1},
{-1, 1}, {-1, -1}, {2, 0}, {0, 2}, {-2, 0}, {0, -2}};
int map[10][10], kosa, rest = 100;
int max(int a, int b) { return a > b ? a : b; }
int drop(int x, int y) {
if (x >= 0 && x < 10 && y >= 0 && y < 10) ... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 270 | 4 |
#include <iostream>
#include <stdio.h>
int paper[10][10];
int vecx[] = {0, 1, 0, -1}, vecy[] = {-1, 0, 1, 0};
int main() {
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
switch (size) {
case 1:
paper[x][y]++;
for (int i = 0; i < 4; i++) {
int nx = x + vecx[i], ny = ... | #include <iostream>
#include <stdio.h>
int paper[10][10];
int vecx[] = {0, 1, 0, -1}, vecy[] = {-1, 0, 1, 0};
int main() {
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
switch (size) {
case 1:
paper[x][y]++;
for (int i = 0; i < 4; i++) {
int nx = x + vecx[i], ny = ... | [["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]] | 1 | 485 | 8 |
#include <cstring>
#include <iostream>
using namespace std;
int f[10][10];
void solve() {}
int dx[] = {1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0};
int dy[] = {0, 1, 0, -1, 1, -1, 1, -1, 0, 2, 0, -2};
int cnt, d;
void ink(int x, int y, int s) {
for (int i = 0; i < 4 * s; i++) {
int nx = dx[i] + x;
int ny = dy[i]... | #include <cstring>
#include <iostream>
using namespace std;
int f[10][10];
void solve() {}
int dx[] = {0, 1, 0, -1, 0, 1, 1, -1, -1, 2, 0, -2, 0};
int dy[] = {0, 0, 1, 0, -1, 1, -1, 1, -1, 0, 2, 0, -2};
int cnt, d;
void ink(int x, int y, int s) {
for (int i = 0; i <= 4 * s; i++) {
int nx = dx[i] + x;
int ny ... | [["+", 0, 30, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 83, 0, 21], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 275 | 6 |
#include <ctype.h>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int a[10][10] = {0};
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
// size=1
if (size >= 1) {
a[x][y]++;
if (x - 1 > -1) {
a[x - 1][y]++... | #include <ctype.h>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int a[10][10] = {0};
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
// size=1
if (size >= 1) {
a[x][y]++;
if (x - 1 > -1) {
a[x - 1][y]++... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22]] | 1 | 480 | 4 |
#include <cstdio>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int x, y, s, count = 0;
int paper[14][14] = {0};
while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
if (s == 1 || s == 2 || s == 3) {
paper[x + 2][y + 2]++;
paper[x + 1][y + 2]++;
paper[x + 3][y + 2]++;
... | #include <cstdio>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int x, y, s, count = 0;
int paper[14][14] = {0};
while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
if (s == 1 || s == 2 || s == 3) {
paper[x + 2][y + 2]++;
paper[x + 1][y + 2]++;
paper[x + 3][y + 2]++;
... | [["-", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]] | 1 | 354 | 2 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
#define XAXIS 10
#define YAXIS 10
int main() {
int paper[XAXIS][YAXIS];
int x, y, s;
int white = 0, most = 0;
// initialize
for (int i = 0; i < XAXIS; i++)
for (int j = 0; j < YAXIS; j++)
paper[i][j] = 0;
while (s... |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
#define XAXIS 10
#define YAXIS 10
int main() {
int paper[XAXIS][YAXIS];
int x, y, s;
int white = 0, most = 0;
for (int i = 0; i < XAXIS; i++)
for (int j = 0; j < YAXIS; j++)
paper[i][j] = 0;
while (scanf("%d,%d,%d"... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18]] | 1 | 492 | 4 |
#include <algorithm>
#include <cstdio>
#include <iostream>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int p[10][10];
int cnt = 0, Max = 0;
void ink(int x, int y) {
if (0 <= x && x < 10 || 0 <= y && y < 10)
p[x][y]++;
}
int main() {
rep(i, 10) rep(j, 10) { p[i][j] = 0; }
int x, y, s... | #include <algorithm>
#include <cstdio>
#include <iostream>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int p[10][10];
int cnt = 0, Max = 0;
void ink(int x, int y) {
if (0 <= x && x < 10 && 0 <= y && y < 10)
p[x][y]++;
}
int main() {
rep(i, 10) rep(j, 10) { p[i][j] = 0; }
int x, y, s... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 1, 0, 11, 12, 11, 12, 13]] | 1 | 478 | 6 |
#include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int pos[10][10];
/*void p(){
for(int i=0;i<10;++i){
for(int j=0;j<10;++j){
cout<<pos[i][j]<<" ";
}
cout<<endl;
}
cout<<endl;
}*/
main() {
int... | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int pos[10][10];
/*void p(){
for(int i=0;i<10;++i){
for(int j=0;j<10;++j){
cout<<pos[i][j]<<" ";
}
cout<<endl;
}
cout<<endl;
}*/
main() {
int... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22]] | 1 | 549 | 4 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int xy[10][10];
void set(int x, int y) {
if (x >= 0 && y >= 0 && x <= 9 && y <= 9)
xy[x][y]++;
}
int main(void) {
int size, x, y, white, deep;
while (~scanf("%d,%d,... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int xy[10][10];
void set(int x, int y) {
if (x >= 0 && y >= 0 && x <= 9 && y <= 9)
xy[x][y]++;
}
int main(void) {
int size, x, y, white, deep;
while (~scanf("%d,%d,... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33]] | 1 | 328 | 2 |
#include <iostream>
using namespace std;
int ds[3] = {4, 9, 13};
int dx[13] = {0, -1, 0, 1, 0, -1, 1, -1, 1, 0, -2, 2, 0};
int dy[13] = {-1, 0, 0, 0, 1, -1, -1, 1, 1, -2, 0, 0, 2};
int main() {
int x, y, size;
char c;
int map[14][14] = {0};
int cnt = 0;
int map_max = 0;
while (cin >> x >> c >> y >> c >... | #include <iostream>
using namespace std;
int ds[3] = {5, 9, 13};
int dx[13] = {0, -1, 0, 1, 0, -1, 1, -1, 1, 0, -2, 2, 0};
int dy[13] = {-1, 0, 0, 0, 1, -1, -1, 1, 1, -2, 0, 0, 2};
int main() {
int x, y, size;
char c;
int map[14][14] = {0};
int cnt = 0;
int map_max = 0;
while (cin >> x >> c >> y >> c >... | [["-", 0, 30, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 83, 0, 13]] | 1 | 262 | 2 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int x, y, s;
int p[14][14] = {0};
while (scanf("%d,%d,%d", &x, &y, &s) > 0) {
x += 2;
y += 2;
p[x][y] += 1;
p[x + 1][y] += 1;
p[x][y - 1] += 1;
p[x][y + 1] += 1;
p[x - 1][y] += 1;
if (s == 1)
continue;
... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int x, y, s;
int p[14][14] = {0};
while (scanf("%d,%d,%d", &x, &y, &s) > 0) {
x += 2;
y += 2;
p[x][y] += 1;
p[x + 1][y] += 1;
p[x][y - 1] += 1;
p[x][y + 1] += 1;
p[x - 1][y] += 1;
if (s == 1)
continue;
... | [["-", 0, 11, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33]] | 1 | 333 | 2 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int grid[14][14] = {0};
void small(int x, int y) {
grid[x][y]++;
grid[x - 1][y]++;
grid[x + 1][y]++;
grid[x][y - 1]++;
grid[x][y + 1]++;
}
void medium(int x, int y) {
small(x, y);
grid[x - 1][y - 1]++;
grid[x + 1][y - 1]... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int grid[14][14] = {0};
void small(int x, int y) {
grid[x][y]++;
grid[x - 1][y]++;
grid[x + 1][y]++;
grid[x][y - 1]++;
grid[x][y + 1]++;
}
void medium(int x, int y) {
small(x, y);
grid[x - 1][y - 1]++;
grid[x + 1][y - 1]... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 397 | 4 |
#include <iostream>
#include <vector>
using namespace std;
constexpr int paper_w = 10, paper_h = 10;
constexpr int ink_w = 5, ink_h = 5;
int inkarea[3][ink_h][ink_w] = {
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0,... | #include <iostream>
#include <vector>
using namespace std;
constexpr int paper_w = 10, paper_h = 10;
constexpr int ink_w = 5, ink_h = 5;
int inkarea[3][ink_h][ink_w] = {
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0,... | [["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 416 | 2 |
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
// int dx[] = {0,1,0,-1}, dy[] = {1,0,-1,0};
int main() {
int x, y, s;
int board[10][10] = {{0}};
while (~scanf("%d,%d,%d", &x, &y, &s)) {
if (s == 3) {
for (int i = -2; i < 3; i++) {
for (int j = -2; j < 3; j++) {
... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
// int dx[] = {0,1,0,-1}, dy[] = {1,0,-1,0};
int main() {
int x, y, s;
int board[10][10] = {{0}};
while (~scanf("%d,%d,%d", &x, &y, &s)) {
if (s == 3) {
for (int i = -2; i < 3; i++) {
for (int j = -2; j < 3; j++) {
... | [["-", 31, 16, 31, 16, 31, 16, 12, 16, 17, 18], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 19], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 18], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 19], ["-", 51, 16, 31, 16, 31, 16, 31, 16, 17, 18], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 17, 19]] | 1 | 400 | 12 |
// include
//------------------------------------------
#include <bits/stdc++.h> // only for GCC
using namespace std;
// typedef
//------------------------------------------
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, in... | // include
//------------------------------------------
#include <bits/stdc++.h> // only for GCC
using namespace std;
// typedef
//------------------------------------------
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, in... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 768 | 4 |
map = Array.new()
10.times do |i|
map << Array.new(10,0)
end
while line = gets
x,y,size = line.split(",").map(&:to_i)
map[x][y] += 1
map[x+1][y] += 1 if x < 9
map[x-1][y] += 1 if x > 0
map[x][y+1] += 1 if y < 9
map[x][y-1] += 1 if y > 0
next if size == 1
map[x+1][y+1] += 1 if x < 9 && y < 9
map[... | require "pp"
map = Array.new()
10.times do |i|
map << Array.new(10,0)
end
while line = gets
x,y,size = line.split(",").map(&:to_i)
map[x][y] += 1
map[x+1][y] += 1 if x < 9
map[x-1][y] += 1 if x > 0
map[x][y+1] += 1 if y < 9
map[x][y-1] += 1 if y > 0
next if size == 1
map[x+1][y+1] += 1 if x < 9 &&... | [["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 557, 0, 62], ["+", 0, 493, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 8, 170, 0, 751, 15, 738, 12, 738, 12, 612], ["+", 8, 170, 0, 751, 15, 738, 12, 738, 12, 612]] | 4 | 311 | 6 |
# Paper
class Paper
def initialize(x, y)
@x, @y, @grids = x, y, Array.new(x) { Array.new(y, 0) }
end
def dye(x, y, size)
case size
when 1
dense(x, y)
dense(x, y - 1)
dense(x + 1, y)
dense(x, y + 1)
dense(x - 1, y)
when 2
dense(x, y)
dense(x, y - 1)
... | # Paper
class Paper
def initialize(x, y)
@x, @y, @grids = x, y, Array.new(x) { Array.new(y, 0) }
end
def dye(x, y, size)
case size
when 1
dense(x, y)
dense(x, y - 1)
dense(x + 1, y)
dense(x, y + 1)
dense(x - 1, y)
when 2
dense(x, y)
dense(x, y - 1)
... | [["+", 0, 269, 8, 736, 0, 735, 8, 736, 0, 22]] | 4 | 470 | 33 |
#!/usr/bin/ruby
@paper = Array.new(10)
@paper.map!{|c| c = Array.new(10, 0) }
@patt = [[[-1,0],[0,-1],[0,0],[0,1],[1,0]], \
[[-1,-1],[-1,1],[1,1],[1,-1]], \
[[0,-2],[-2,0],[2,0],[0,2]]]
def drop(x, y, num)
@patt[num].each do |xa, ya|
next unless [x+xa, y+ya].any?{|x| (0...10) === x}
@paper[... | #!/usr/bin/ruby
@paper = Array.new(10)
@paper.map!{|c| c = Array.new(10, 0) }
@patt = [[[-1,0],[0,-1],[0,0],[0,1],[1,0]], \
[[-1,-1],[-1,1],[1,1],[1,-1]], \
[[0,-2],[-2,0],[2,0],[0,2]]]
def drop(x, y, num)
@patt[num].each do |xa, ya|
next unless [x+xa, y+ya].all?{|x| (0...10) === x}
@paper[... | [["-", 196, 737, 8, 736, 0, 745, 15, 652, 735, 22], ["+", 196, 737, 8, 736, 0, 745, 15, 652, 735, 22]] | 4 | 255 | 2 |
# -*- coding: utf-8 -*-
import sys
def small_inc(x, y, cells):
cells[x][y] += 1
if y > 0:
cells[x][y-1] += 1
if x > 0:
cells[x-1][y] += 1
if x < MAPSIZE-1:
cells[x+1][y] += 1
if y < MAPSIZE-1:
cells[x][y+1] += 1
def medium_inc(x, y, cells):
if y > 0:
ce... | # -*- coding: utf-8 -*-
import sys
def small_inc(x, y, cells):
cells[x][y] += 1
if y > 0:
cells[x][y-1] += 1
if x > 0:
cells[x-1][y] += 1
if x < MAPSIZE-1:
cells[x+1][y] += 1
if y < MAPSIZE-1:
cells[x][y+1] += 1
def medium_inc(x, y, cells):
if y > 0:
ce... | [["-", 0, 1, 0, 677, 31, 206, 206, 657, 17, 33], ["+", 0, 1, 0, 677, 31, 206, 206, 657, 17, 72]] | 5 | 644 | 4 |
d = [[0] * 10 for i in range(10)]
def b(x, y):
for i in range(x - 2, x + 3):
a = 3 - abs(x - i)
for a in range(y - a + 1, y + a):
if 0 <= i < 10 and 0 <= a < 10:
d[a][i] += 1
def m(x, y):
for i in range(x - 1, x + 2):
for j in range(y - 1, y + 2):
... | d = [[0] * 10 for i in range(10)]
def b(x, y):
for i in range(x - 2, x + 3):
a = 3 - abs(x - i)
for a in range(y - a + 1, y + a):
if 0 <= i < 10 and 0 <= a < 10:
d[a][i] += 1
def m(x, y):
for i in range(x - 1, x + 2):
for j in range(y - 1, y + 2):
... | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 333 | 4 |
a = [[0] * 14 for _ in range(14)]
while True:
try:
x, y, s = map(int, input().split(','))
except:
break
x += 2
y += 2
for d in [(0, 0), (0, -1), (0, 1), (-1, 0), (1, 0)]:
a[x + d[0]][y + d[1]] += 1
if s >= 2:
for d in [(1, 1), (1, -1), (-1, 1), (-1, -1)]:
... | a = [[0] * 14 for _ in range(14)]
while True:
try:
x, y, s = map(int, input().split(','))
except:
break
x += 2
y += 2
for d in [(0, 0), (0, -1), (0, 1), (-1, 0), (1, 0)]:
a[x + d[0]][y + d[1]] += 1
if s >= 2:
for d in [(1, 1), (1, -1), (-1, 1), (-1, -1)]:
... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 279 | 4 |
Masu = []
def access(x,y):
if x < 0 or y < 0 or x > 9 or y > 9:
return
Masu[y][x] += 1
for i in range(10):
Masu.append([0,0,0,0,0,0,0,0,0,0])
kosu = 0
komax = 0
while True:
try:
x,y,s = map(int,input().split(","))
if s == 1:
for j in range(3):
... | Masu = []
def access(x,y):
if x < 0 or y < 0 or x > 9 or y > 9:
return
Masu[y][x] += 1
for i in range(10):
Masu.append([0,0,0,0,0,0,0,0,0,0])
kosu = 0
komax = 0
while True:
try:
x,y,s = map(int,input().split(","))
if s == 1:
for j in range(3):
... | [["-", 0, 246, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 313 | 4 |
board=[[0]*10 for i in range(10)]
ink=[[[0,0,0,0,0],[0,0,1,0,0],[0,1,1,1,0],[0,0,1,0,0],[0,0,0,0,0]],
[[0,0,0,0,0],[0,1,1,1,0],[0,1,1,1,0],[0,1,1,1,0],[0,0,0,0,0]],
[[0,0,1,0,0],[0,1,1,1,0],[1,1,1,1,1],[0,1,1,1,0],[0,0,1,0,0]]]
while True:
try:
x,y,s=map(int,input().split(","))
except:
break
... |
board=[[0]*10 for i in range(10)]
ink=[[[0,0,0,0,0],[0,0,1,0,0],[0,1,1,1,0],[0,0,1,0,0],[0,0,0,0,0]],
[[0,0,0,0,0],[0,1,1,1,0],[0,1,1,1,0],[0,1,1,1,0],[0,0,0,0,0]],
[[0,0,1,0,0],[0,1,1,1,0],[1,1,1,1,1],[0,1,1,1,0],[0,0,1,0,0]]]
while True:
try:
x,y,s=map(int,input().split(","))
except:
break
... | [["-", 0, 652, 3, 4, 0, 652, 63, 319, 500, 22], ["-", 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], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 329 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.