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 |
|---|---|---|---|---|---|
import sys
n1 = [[0, 1], [1, 0], [-1, 0], [0, -1]]
n2 = n1 + [[a, b] for a in [-1, 1] for b in [-1, 1]]
n3 = n2 + [[a*2, b*2] for a, b in n1]
mas = [[0]*10 for i in range(10)]
for i in sys.stdin:
try:
x, y, a = list(map(int, i.split(",")))
mas[y][x] += 1
for k,l in eval("n"+str(a)):
... | import sys
n1 = [[0, 1], [1, 0], [-1, 0], [0, -1]]
n2 = n1 + [[a, b] for a in [-1, 1] for b in [-1, 1]]
n3 = n2 + [[a*2, b*2] for a, b in n1]
mas = [[0]*10 for i in range(10)]
for i in sys.stdin:
try:
x, y, a = list(map(int, i.split(",")))
mas[y][x] += 1
for k,l in eval("n"+str(a)):
... | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 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 | 230 | 4 |
#sheet...紙全体、sheet[x][y]は(x, y)のインクの濃さ
sheet = [[0 for _ in range(10)] for _ in range(10)]
#小、中、大のインクの範囲
small_range = ((0, 0), (1, 0), (0, 1), (-1, 0), (0, 1))
middle_range = ((0, 0), (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1))
large_range = ((0, 0), (1, 0), (2, 0), (1, 1), (0, 1), (0, 2), (... | #sheet...紙全体、sheet[x][y]は(x, y)のインクの濃さ
sheet = [[0 for _ in range(10)] for _ in range(10)]
#小、中、大のインクの範囲
small_range = ((0, 0), (1, 0), (0, 1), (-1, 0), (0, -1))
middle_range = ((0, 0), (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1))
large_range = ((0, 0), (1, 0), (2, 0), (1, 1), (0, 1), (0, 2), ... | [["+", 0, 662, 12, 660, 0, 660, 0, 664, 17, 33]] | 5 | 383 | 1 |
def drop(x,y):
global paper
if 0<=x<10 and 0<=y<10: paper[y][x]+=1
return
def ink(x,y,size):
drop(x-1,y)
drop(x+1,y)
drop(x,y-1)
drop(x,y+1)
if size==1: return
drop(x-1,y-1)
drop(x-1,y+1)
drop(x+1,y-1)
drop(x+1,y+1)
if size==2: return
drop(x-2,y)
drop(x+2,y)
... | def drop(x,y):
global paper
if 0<=x<10 and 0<=y<10: paper[y][x]+=1
return
def ink(x,y,size):
drop(x,y)
drop(x-1,y)
drop(x+1,y)
drop(x,y-1)
drop(x,y+1)
if size==1: return
drop(x-1,y-1)
drop(x-1,y+1)
drop(x+1,y-1)
drop(x+1,y+1)
if size==2: return
drop(x-2,y)
... | [["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["+", 0, 14, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22]] | 5 | 255 | 6 |
i = require("fs").readFileSync("/dev/stdin", "utf8").split(/\s/);
for (a = 0; + i[a]; a += 2)
console.log([ 'Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri',
'Satur' ][new Date(16, i[a] - 1, i[a + 1]).getDay()] +
'day') | i = require("fs").readFileSync("/dev/stdin", "utf8").split(/\s/);
for (a = 0; + i[a]; a += 2)
console.log([ 'Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri',
'Satur' ][new Date(804, i[a] - 1, i[a + 1]).getDay()] +
'day') | [["-", 71, 2, 63, 558, 500, 350, 3, 3, 0, 555], ["+", 71, 2, 63, 558, 500, 350, 3, 3, 0, 555]] | 2 | 106 | 2 |
i = require("fs").readFileSync("/dev/stdin", "utf8").split(/\s/);
for (a = 0; b = +i[a]; a += 2)
console.log([ 'Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri',
'Satur' ][new Date(3, b - 1, i[a + 1]).getDay()] +
'day') | i = require("fs").readFileSync("/dev/stdin", "utf8").split(/\s/);
for (a = 0; b = +i[a]; a += 2)
console.log([ 'Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri',
'Satur' ][new Date(76, b - 1, i[a + 1]).getDay()] +
'day') | [["-", 71, 2, 63, 558, 500, 350, 3, 3, 0, 555], ["+", 71, 2, 63, 558, 500, 350, 3, 3, 0, 555]] | 2 | 105 | 2 |
function Main(input) {
var week = [
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
];
inputLine = input.split("\n");
for (var i = 0;; i++) {
var dateObj = new Date();
dateObj.setFullYear(2004);
var date = inputLine[i].split(" ");
var month = Int(date[0]);
va... | function Main(input) {
var week = [
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
];
inputLine = input.split("\n");
for (var i = 0;; i++) {
var dateObj = new Date();
dateObj.setFullYear(2004);
var date = inputLine[i].split(" ");
var month = int(date[0]);
va... | [["-", 8, 556, 0, 198, 0, 200, 51, 2, 63, 22], ["+", 8, 556, 0, 198, 0, 200, 51, 2, 63, 22]] | 2 | 329 | 4 |
x = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split(/\s/);
yobi = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday");
for (i = 0; i < x.length - 1;) {
if (x[i] === 0)
break;
console.log(yobi[new Date('2004/0' + x[i++] + '/0' + x[i++]).getDay()]... | x = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split(/\s/);
yobi = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday");
for (i = 0; i < x.length - 1;) {
if (x[i] == 0)
break;
console.log(yobi[new Date('2004/0' + x[i++] + '/0' + x[i++]).getDay()])... | [["-", 8, 556, 0, 57, 15, 23, 0, 16, 17, 565], ["+", 8, 556, 0, 57, 15, 23, 0, 16, 17, 60]] | 2 | 129 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] w = {"Wednesday", "Thursday", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"};
int[] d = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] w = {"Wednesday", "Thursday", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"};
int[] d = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
... | [["+", 0, 52, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 12, 499], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35]] | 3 | 189 | 4 |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
// BufferedReader reader=new BufferedReader(new
// InputStreamReader(System.in));
Scanner reader = new Scanner(System.in);
// int in=reader.nextInt();
int[] tmp = {31, 29, 31, 30, ... | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
// BufferedReader reader=new BufferedReader(new
// InputStreamReader(System.in));
Scanner reader = new Scanner(System.in);
// int in=reader.nextInt();
int[] tmp = {31, 29, 31, 30, ... | [["-", 8, 196, 0, 503, 49, 200, 51, 518, 0, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 518, 0, 499]] | 3 | 200 | 2 |
import java.util.Scanner;
class Main {
static final int[] monthDay = {31, 29, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31};
static final String[] dayOfTheWeek = {"Wednesday", "Thursday", "Friday",
"Saturday", "Sunday", "Monday",
... | import java.util.Scanner;
class Main {
static final int[] monthDay = {31, 29, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31};
static final String[] dayOfTheWeek = {"Wednesday", "Thursday", "Friday",
"Saturday", "Sunday", "Monday",
... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 229 | 2 |
import java.util.Calendar;
import java.util.Scanner;
class Main {
private static final int YEAR = 2004;
private static final String SUNDAY = "Sunday";
private static final String MONDAY = "Monday";
private static final String TUESDAY = "Tuesday";
private static final String WEDNESDAY = "Wednesday";
privat... | import java.util.Calendar;
import java.util.Scanner;
class Main {
private static final int YEAR = 2004;
private static final String SUNDAY = "Sunday";
private static final String MONDAY = "Monday";
private static final String TUESDAY = "Tuesday";
private static final String WEDNESDAY = "Wednesday";
privat... | [["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499]] | 3 | 310 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws java.io.IOException {
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
int h = scan.nextInt();
String M[] = new String[366];
for (int i = 0; i < 366; i++) {
if (i % 7 == 0) {
M[i... | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws java.io.IOException {
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
int h = scan.nextInt();
String M[] = new String[366];
for (int i = 0; i < 366; i++) {
if (i % 7 == 0) {
M[i... | [["+", 0, 492, 3, 4, 0, 504, 71, 16, 17, 72], ["+", 0, 492, 3, 4, 0, 504, 71, 16, 12, 22]] | 3 | 508 | 2 |
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[] days = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
... | 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[] days = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
... | [["+", 3, 4, 0, 504, 71, 16, 31, 23, 0, 24], ["-", 3, 4, 0, 504, 71, 16, 31, 16, 17, 109], ["-", 3, 4, 0, 504, 71, 16, 31, 16, 12, 499], ["+", 3, 4, 0, 504, 71, 16, 31, 23, 0, 25], ["+", 0, 492, 3, 4, 0, 504, 71, 16, 17, 109], ["+", 0, 492, 3, 4, 0, 504, 71, 16, 12, 499]] | 3 | 252 | 6 |
import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
void run() {
int[] map = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int[] dp = new int[12];
String[] str = {
"Monday", "Tuesday", "Wednesday", "Thursday",
"Friday"... | import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
void run() {
int[] map = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int[] dp = new int[12];
String[] str = {
"Monday", "Tuesday", "Wednesday", "Thursday",
"Friday... | [["-", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491], ["+", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491]] | 3 | 255 | 2 |
import java.util.Scanner;
class Main {
private static void solve() {
Scanner scanner = new Scanner(System.in);
int[] days = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
String[] map = {"Wednesday", "Thursady", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"};
while ... | import java.util.Scanner;
class Main {
private static void solve() {
Scanner scanner = new Scanner(System.in);
int[] days = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
String[] map = {"Wednesday", "Thursday", "Friday", "Saturday",
"Sunday", "Monday", "Tuesday"};
while ... | [["-", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491], ["+", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491]] | 3 | 197 | 2 |
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
static final List<String> WEEK_STR = Collections.unmodifiableList(
Arrays.asList("Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday", "Sunday"));
sta... |
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
static final List<String> WEEK_STR = Collections.unmodifiableList(
Arrays.asList("Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday", "Sunday"));
sta... | [["-", 51, 492, 3, 4, 0, 492, 3, 4, 0, 499], ["+", 51, 492, 3, 4, 0, 492, 3, 4, 0, 499]] | 3 | 236 | 2 |
import java.util.*;
public class Main {
private void doit() {
Scanner sc = new Scanner(System.in);
int[] month = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
String[] date = {"Thursday", "Friday", "Saturday", "Sunday",
"Monday", "Tuesday", "wednesday"};
int[] monthAcc ... | import java.util.*;
public class Main {
private void doit() {
Scanner sc = new Scanner(System.in);
int[] month = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
String[] date = {"Thursday", "Friday", "Saturday", "Sunday",
"Monday", "Tuesday", "Wednesday"};
int[] monthAcc ... | [["-", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491], ["+", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491]] | 3 | 239 | 2 |
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayList<Integer> ans = new ArrayList<Integer>();
while (true) {
StringTokenizer st = new StringTokenizer(br... | import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayList<Integer> ans = new ArrayList<Integer>();
while (true) {
StringTokenizer st = new StringTokenizer(br... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 330 | 2 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
boolean exit = true;
while (exit == true) {
int a = sc.nextInt();
int b = sc.nextInt();
if (a == 0 && b == 0)
exit = false;
if (exit == true) {
in... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
boolean exit = true;
while (exit == true) {
int a = sc.nextInt();
int b = sc.nextInt();
if (a == 0 && b == 0)
exit = false;
if (exit == true) {
in... | [["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 106], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 499]] | 3 | 306 | 4 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int[][] paper = new int[10][10];
int max = 0;
int counter = 0;
for (int i = 0; i < paper.length; i++) {
for (int j = 0; j < paper[i].length; j++) {
paper[i][j... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int[][] paper = new int[10][10];
int max = 0;
int counter = 0;
for (int i = 0; i < paper.length; i++) {
for (int j = 0; j < paper[i].length; j++) {
paper[i][j]... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["-", 0, 27, 0, 504, 516, 504, 71, 16, 17, 33], ["+", 0, 27, 0, 504, 516, 504, 71, 16, 17, 72]] | 3 | 628 | 4 |
#include <stdio.h>
int max2(int a, int b);
int main(void) {
int area[10][10];
int x, y, size;
int a, b, c;
int white, max;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
area[a][b] = 0;
}
}
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
if (size == 1) {
for (a = -1; a... | #include <stdio.h>
int max2(int a, int b);
int main(void) {
int area[100][100] = {0};
int x, y, size;
int a, b, c;
int white, max;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
area[a][b] = 0;
}
}
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
if (size == 1) {
for (a... | [["-", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 0, 43, 49, 50, 49, 80, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 45], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0,... | 0 | 441 | 8 |
#include <stdio.h>
int main() {
int x, y, size, i, j, count = 0, max = 0;
int grid[10][10] = {};
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
grid[x][y]++;
grid[x - 1][y]++;
grid[x + 1][y]++;
grid[x][y - 1]++;
grid[x][y + 1]++;
if (size > 1) {
grid[x + 1][y + 1]++;
grid[... | #include <stdio.h>
int main() {
int x, y, size, i, j, count = 0, max = 0;
int grid[12][12] = {};
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
grid[x][y]++;
grid[x - 1][y]++;
grid[x + 1][y]++;
grid[x][y - 1]++;
grid[x][y + 1]++;
if (size > 1) {
grid[x + 1][y + 1]++;
grid[... | [["-", 0, 43, 49, 50, 49, 80, 49, 80, 81, 13], ["+", 0, 43, 49, 50, 49, 80, 49, 80, 81, 13], ["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13]] | 0 | 311 | 4 |
#include <stdio.h>
int main(void) {
int i, j, x, y, s, max, count;
int board[14][14] = {0};
int sibuki_x[3][13] = {{0, 1, 0, -1, 0},
{0, 1, 1, 1, 0, -1, -1, -1, 0},
{0, 1, 1, 1, 0, -1, -1, -1, 0, 0, 2, 0, -2}};
int sibuki_y[3][13] = {{-1, 0, 1, 0, 0},
... | #include <stdio.h>
int main(void) {
int i, j, x, y, s, max, count;
int board[14][14] = {0};
int sibuki_x[3][13] = {{0, 1, 0, -1, 0},
{0, 1, 1, 1, 0, -1, -1, -1, 0},
{0, 1, 1, 1, 0, -1, -1, -1, 0, 0, 2, 0, -2}};
int sibuki_y[3][13] = {{-1, 0, 1, 0, 0},
... | [["+", 71, 16, 12, 69, 28, 69, 71, 16, 17, 33], ["+", 71, 16, 12, 69, 28, 69, 71, 16, 12, 13]] | 0 | 373 | 4 |
#include <stdio.h>
int board[10][10];
int main(void) {
int i, j, size, x, y, count = 0, max = 0;
int dx[12] = {-1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};
int dy[12] = {0, 1, 0, -1, 1, -1, 1, -1, 0, -2, 0, 2};
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
board[i][j] = 0;
}
}
while (sca... | #include <stdio.h>
int board[10][10];
int main(void) {
int i, j, size, x, y, count = 0, max = 0;
int dx[12] = {-1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};
int dy[12] = {0, 1, 0, -1, 1, -1, 1, -1, 0, -2, 0, 2};
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
board[i][j] = 0;
}
}
while (sca... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 106], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 98]] | 0 | 507 | 6 |
main() {
int i, j, x, y, s, a[14][14], b = 0, c = 0;
for (i = 0; i < 14; i++)
for (j = 0; j < 14; j++)
a[i][j] = 0;
while (scanf("%d,%d,%d", &x, &y, &s) != -1)
switch (s) {
case 3:
a[x + 2][y]++;
a[x + 3][y + 1]++;
a[x + 4][y]++;
a[x + 3][y + 3]++;
a[x + 2][y + 4]++... | main() {
int i, j, x, y, s, a[14][14], b = 0, c = 0;
for (i = 0; i < 14; i++)
for (j = 0; j < 14; j++)
a[i][j] = 0;
while (scanf("%d,%d,%d", &x, &y, &s) != -1)
switch (s) {
case 3:
a[x + 2][y]++;
a[x + 3][y + 1]++;
a[x + 4][y + 2]++;
a[x + 3][y + 3]++;
a[x + 2][y + ... | [["+", 0, 1, 0, 27, 28, 69, 71, 16, 17, 72], ["+", 0, 1, 0, 27, 28, 69, 71, 16, 12, 13]] | 0 | 395 | 2 |
#define a(x, y) a[x][y]++
a[99][99], x, y, z, i;
main() {
for (; ~scanf("%d,%d,%d", &x, &y, &z);) {
x += 10;
y += 10;
a(x, y);
a(x - 1, y);
a(x, y - 1);
a(x + 1, y);
a(x, y + 1);
if (z > 1)
a(x + 1, y + 1), a(x + 1, y - 1), a(x - 1, y + 1), a(x - 1, y - 1);
if (z > 2)
a... | #define a(x, y) a[x][y]++
a[99][99], x, y, z, i;
main() {
for (; ~scanf("%d,%d,%d", &x, &y, &z);) {
x += 10;
y += 10;
a(x, y);
a(x - 1, y);
a(x, y - 1);
a(x + 1, y);
a(x, y + 1);
if (z > 1)
a(x + 1, y + 1), a(x + 1, y - 1), a(x - 1, y + 1), a(x - 1, y - 1);
if (z > 2)
a... | [["-", 0, 30, 0, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 30, 0, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 9, 0, 7, 8, 7, 15, 16, 12, 13], ["+", 0, 9, 0, 7, 8, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 16, 31, 91, 17, 111]] | 0 | 278 | 5 |
#include <math.h>
#include <stdio.h>
int f[168], z[] = {23, 25, 12, 36, 11, 13, 35, 37, 22, 26, 48, 0}, x, y, s;
int main(void) {
for (; ~scanf("%d,%d,%d", &x, &y, &s);)
for (s *= 4; s--; ++f[y * 12 + x + z[s]])
;
for (x = y = 0, s = 23; ++s < 144;
s % 12 < 10 ? y = fmax(y, f[s]), f[s] && ++x : 0)
... | #include <math.h>
#include <stdio.h>
int f[168], z[] = {24, 23, 25, 12, 36, 11, 13, 35, 37, 22, 26, 48, 0}, x, y, s;
int main(void) {
for (; ~scanf("%d,%d,%d", &x, &y, &s);)
for (s *= 4; s + 1; ++f[y * 12 + x + z[s--]])
;
for (x = y = 0, s = 23; ++s < 144;
s % 12 < 10 ? y = fmax(y, f[s]), f[s] && +... | [["+", 0, 30, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 83, 0, 21], ["-", 8, 9, 0, 7, 8, 7, 15, 27, 17, 68], ["+", 8, 9, 0, 7, 8, 7, 15, 16, 17, 72], ["+", 8, 9, 0, 7, 8, 7, 15, 16, 12, 13], ["+", 28, 69, 71, 16, 12, 69, 71, 27, 17, 68]] | 0 | 163 | 6 |
f[168], z[] = {23, 24, 25, 12, 36, 11, 13, 35, 37, 22, 26, 48}, x, s, m, i = 23,
c = 100;
main(y) {
for (; s ? ++f[y * 12 + x + z[--s]]
: ~scanf("%d,%d,%d", &x, &y, &s)
? s = s * 4 + 1
: ++i < 142
? i % 12 < 10
? m = fmax(m, f[i]),
f[... | f[168], z[] = {23, 24, 25, 12, 36, 11, 13, 35, 37, 22, 26, 48, 0}, x, s, m,
i = 23, c = 100;
main(y) {
for (; s ? ++f[y * 12 + x + z[--s]]
: ~scanf("%d,%d,%d", &x, &y, &s)
? s = s * 4 + 1
: ++i < 142
? i % 12 < 10
? m = fmax(m, f[i]),
... | [["+", 12, 34, 12, 34, 12, 34, 12, 34, 0, 21], ["+", 12, 34, 12, 34, 12, 34, 12, 34, 31, 13]] | 0 | 155 | 2 |
#include <stdio.h>
int main(void) {
int i, j, x, y, size, paper[14][14], white, max;
for (j = 0; j < 14; j++)
for (i = 0; i < 14; i++)
paper[i][j] = 0;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
x += 2;
y += 2;
switch (size) {
case 1:
paper[x - 1][y]++;
paper[x + 1][y... | #include <stdio.h>
int main(void) {
int i, j, x, y, size, paper[14][14], white, max;
white = max = 0;
for (j = 0; j < 14; j++)
for (i = 0; i < 14; i++)
paper[i][j] = 0;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
x += 2;
y += 2;
switch (size) {
case 1:
paper[x - 1][y]++;
... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 11, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 0 | 335 | 6 |
#include <stdio.h>
int main(void) {
int x, y, s;
int p[14][14];
int q[3][5][5] = {{
{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},
},
... | #include <stdio.h>
int main(void) {
int x, y, s;
int p[14][14] = {0};
int q[3][5][5] = {{
{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, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 45], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 46]] | 0 | 411 | 4 |
#include <math.h>
#include <stdio.h>
int p[10][10];
void drop(int x, int y) {
if (-1 < x < 10 && -1 < y < 10)
p[x][y]++;
}
int main(void) {
int i, j, x, y, size;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
p[i][j] = 0;
}
}
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
... | #include <math.h>
#include <stdio.h>
int p[10][10];
void drop(int x, int y) {
if (-1 < x && x < 10 && -1 < y && y < 10)
p[x][y]++;
}
int main(void) {
int i, j, x, y, size;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
p[i][j] = 0;
}
}
while (scanf("%d,%d,%d", &x, &y, &size) != E... | [["+", 15, 23, 0, 16, 31, 16, 31, 16, 17, 98], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 23, 0, 16, 31, 16, 12, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 98]] | 0 | 360 | 4 |
#include <stdio.h>
int main(void) {
int a[100][100], x, y, ink, i, j, noc, max;
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
a[i][j] = 0;
while (scanf("%d", &x) != EOF) {
scanf(",%d,%d", &y, &ink);
a[x][y]++;
a[x + 1][y]++;
a[x][y - 1]++;
if (x != 0)
a[x - 1][y]++;
if... |
#include <stdio.h>
int main(void) {
int a[100][100], x, y, ink, i, j, noc, max;
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
a[i][j] = 0;
while (scanf("%d", &x) != EOF) {
scanf(",%d,%d", &y, &ink);
a[x][y]++;
a[x + 1][y]++;
a[x][y + 1]++;
if (x != 0)
a[x - 1][y]++;
if... | [["-", 0, 1, 0, 27, 28, 69, 71, 16, 17, 33], ["+", 0, 1, 0, 27, 28, 69, 71, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 403 | 6 |
#include <cstdio>
#include <iostream>
using namespace std;
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) for (int i = 0; i < a; i++)
int maze[10][10];
int smallx[5] = {1, -1, 0, 0, 0};
int smally[5] = {0, 0, 0, 1, -1};
int midx[4] = {1, 1, -1, -1};
int midy[4] = {1, -1, 1, -1};
int largex[4] = {2... | #include <cstdio>
#include <iostream>
using namespace std;
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) for (int i = 0; i < a; i++)
int maze[10][10];
int smallx[5] = {1, -1, 0, 0, 0};
int smally[5] = {0, 0, 0, 1, -1};
int midx[4] = {1, 1, -1, -1};
int midy[4] = {1, -1, 1, -1};
int largex[4] = {2... | [["-", 8, 9, 0, 42, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 42, 0, 2, 3, 4, 0, 13]] | 1 | 490 | 2 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define reps(i, f, n) for (int i = f; i < int(n); i++)
#define rep(i, n) reps(i, 0, n)
#define X real... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define reps(i, f, n) for (int i = f; i < int(n); i++)
#define rep(i, n) reps(i, 0, n)
#define X real... | [["-", 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 | 358 | 4 |
#include <algorithm>
#include <cstdio>
using namespace std;
int field[10][10], x, y, s, cnt, ma;
void s1() {
if (y - 1 >= 0)
field[x][y - 1]++;
if (x - 1 >= 0)
field[x - 1][y]++;
if (y + 1 < 10)
field[x][y + 1]++;
if (x + 1 < 10)
field[x + 1][y]++;
}
void s2() {
s1();
if (x - 1 >= 0 && y ... | #include <algorithm>
#include <cstdio>
using namespace std;
int field[10][10], x, y, s, cnt, ma;
void s1() {
if (y - 1 >= 0)
field[x][y - 1]++;
if (x - 1 >= 0)
field[x - 1][y]++;
if (y + 1 < 10)
field[x][y + 1]++;
if (x + 1 < 10)
field[x + 1][y]++;
}
void s2() {
s1();
if (x - 1 >= 0 && y ... | [["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 461 | 2 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int area[10][10] = {0};
int x, nx, ny, y, size;
int count = 0;
int max = 0;
char ch1, ch2;
while (cin >> x >> ch1 >> y >> ch2 >> size) {
nx = x + 2;
ny = y + 2;
switch (size) {
case 3:
area[nx - 2][ny]++;
ar... | #include <iostream>
#include <string>
using namespace std;
int main() {
int area[14][14] = {0};
int x, nx, ny, y, size;
int count = 0;
int max = 0;
char ch1, ch2;
while (cin >> x >> ch1 >> y >> ch2 >> size) {
nx = x + 2;
ny = y + 2;
switch (size) {
case 3:
area[nx - 2][ny]++;
ar... | [["-", 0, 43, 49, 50, 49, 80, 49, 80, 81, 13], ["+", 0, 43, 49, 50, 49, 80, 49, 80, 81, 13], ["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13]] | 1 | 333 | 4 |
#include <algorithm>
#include <array>
#include <chrono>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <memory.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#pragma warning(disable : ... | #include <algorithm>
#include <array>
#include <chrono>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <memory.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#pragma warning(disable : ... | [["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 745 | 2 |
#include <stdio.h>
void tyu(int x, int y, int N[15][15]) {
int xt, yt;
xt = x - 1;
yt = y - 1;
for (int i = yt; i <= yt + 2; i++)
for (int j = xt; j <= xt + 2; j++)
N[i][j]++;
}
void syo(int x, int y, int N[15][15]) {
N[y][x]++;
N[y + 1][x]++;
N[y - 1][x]++;
N[y][x + 1]++;
N[y][x - 1]++;
}
v... | #include <stdio.h>
void tyu(int x, int y, int N[15][15]) {
int xt, yt;
xt = x - 1;
yt = y - 1;
for (int i = yt; i <= yt + 2; i++)
for (int j = xt; j <= xt + 2; j++)
N[i][j]++;
}
void syo(int x, int y, int N[15][15]) {
N[y][x]++;
N[y + 1][x]++;
N[y - 1][x]++;
N[y][x + 1]++;
N[y][x - 1]++;
}
v... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 509 | 2 |
#include <stdio.h>
#include <stdlib.h>
int main() {
int table[10][10] = {{0}};
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
switch (size) {
case 1: {
table[y][x]++;
if (x - 1 >= 0)
table[y][x - 1]++;
if (x + 1 <= 9)
table[y][x + 1]++;
if (y - 1... | #include <stdio.h>
#include <stdlib.h>
int main() {
int table[10][10] = {{0}};
int x, y, size;
while (scanf("%d,%d,%d", &x, &y, &size) != EOF) {
switch (size) {
case 1: {
table[y][x]++;
if (x - 1 >= 0)
table[y][x - 1]++;
if (x + 1 <= 9)
table[y][x + 1]++;
if (y - 1... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 688 | 4 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int x, y, s;
char com;
int a[10][10];
for (int i = 0; i < 100; i++)
a[i / 10][i % 10] = 0;
while (cin >> x >> com >> y >> com >> s) {
a[x][y]++;
if (x > 0)
a[x - 1][y]++;
if (x < 9)
a[x + 1][y]++;
if (y > 0... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int x, y, s;
char com;
int a[10][10];
for (int i = 0; i < 100; i++)
a[i / 10][i % 10] = 0;
while (cin >> x >> com >> y >> com >> s) {
a[x][y]++;
if (x > 0)
a[x - 1][y]++;
if (x < 9)
a[x + 1][y]++;
if (y > 0... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22]] | 1 | 402 | 6 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define fi first
#define se second
#define fcout(n) cout << fixed << setprecision((n... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define fi first
#define se second
#define fcout(n) cout << fixed << setprecision((n... | [["+", 0, 14, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 719 | 3 |
#include <algorithm>
#include <cctype>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int size(string x) {
string::size_type size = x.size();
return size;
}
#define fu(l, k) for (int i = l; i < k; i++)
... | #include <algorithm>
#include <cctype>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int size(string x) {
string::size_type size = x.size();
return size;
}
#define fu(l, k) for (int i = l; i < k; i++)
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 797 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i, n) for (i = 0; i < n; i++)
using namespace s... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i, n) for (i = 0; i < n; i++)
using namespace s... | [["-", 64, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 359 | 2 |
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
int i, j, k, l, m, n, o, x, y, z;
int max = 0;
int count = 0;
vector<vector<int>> s;
s.resize(10);
for (i = 0; i < 14; i++) {
s[i].resize(14);
}
for (j = 0; j < 14; j++) {
for (k = 0; k <... | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
int i, j, k, l, m, n, o, x, y, z;
int max = 0;
int count = 0;
vector<vector<int>> s;
s.resize(14);
for (i = 0; i < 14; i++) {
s[i].resize(14);
}
for (j = 0; j < 14; j++) {
for (k = 0; k <... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 57, 64, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 57, 64, 9, 0, 7, 8, 9, 0, 46]] | 1 | 483 | 6 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a[15][15] = {0}, b = 0, c = 0, x, y, t;
string s[50];
while (scanf("%d,%d,%d", &x, &y, &t) != EOF) {
if (t == 3) {
a[x + 2][y + 2]++;
a[x + 1][y + 2]++;
a[x][y + 2]++;
a[x + 3][y + 2]++;
a[x + 4][y + 2]++;
a[x +... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[15][15] = {0}, b = 0, c = 0, x, y, t;
string s[50];
while (scanf("%d,%d,%d", &x, &y, &t) != EOF) {
if (t == 3) {
a[x + 2][y + 2]++;
a[x + 1][y + 2]++;
a[x][y + 2]++;
a[x + 3][y + 2]++;
a[x + 4][y + 2]++;
a[x +... | [["+", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 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], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0... | 1 | 504 | 9 |
#include <iostream>
#include <map>
#include <vector>
class DrawAreaStrategy {
public:
DrawAreaStrategy() {}
virtual ~DrawAreaStrategy() {}
DrawAreaStrategy(const DrawAreaStrategy &) = delete;
DrawAreaStrategy &operator=(const DrawAreaStrategy &) = delete;
DrawAreaStrategy(DrawAreaStrategy &&) = delete;
D... | #include <iostream>
#include <map>
#include <vector>
class DrawAreaStrategy {
public:
DrawAreaStrategy() {}
virtual ~DrawAreaStrategy() {}
DrawAreaStrategy(const DrawAreaStrategy &) = delete;
DrawAreaStrategy &operator=(const DrawAreaStrategy &) = delete;
DrawAreaStrategy(DrawAreaStrategy &&) = delete;
D... | [["-", 0, 43, 49, 50, 51, 16, 31, 118, 119, 120], ["+", 0, 43, 49, 50, 51, 16, 31, 118, 119, 120]] | 1 | 992 | 6 |
#include "bits/stdc++.h"
using namespace std;
int main() {
int x, y, s;
char b;
int n = 10;
int x1[] = {1, 0, -1, 0};
int y1[] = {0, 1, 0, -1};
int x2[] = {1, 1, -1, -1};
int y2[] = {1, -1, 1, -1};
int x3[] = {2, 0, -2, 0};
int y3[] = {0, 2, 0, -2};
vector<vector<int>> a(n, vector<int>(n, 0));
w... | #include "bits/stdc++.h"
using namespace std;
int main() {
int x, y, s;
char b;
int n = 10;
int x1[] = {1, 0, -1, 0};
int y1[] = {0, 1, 0, -1};
int x2[] = {1, 1, -1, -1};
int y2[] = {1, -1, 1, -1};
int x3[] = {2, 0, -2, 0};
int y3[] = {0, 2, 0, -2};
vector<vector<int>> a(n, vector<int>(n, 0));
w... | [["-", 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 | 495 | 4 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int masu[13][13], x, y, s;
while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
x += 2, y += 2;
if (s == 1) {
for (int i = x - 1; i <= x + 1; i++)
masu[i][y]++;
masu[x][y - 1]++;
masu[x][y + 1]++;
} else if (s ==... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int masu[13][13] = {0}, x, y, s;
while (scanf("%d,%d,%d", &x, &y, &s) != EOF) {
x += 2, y += 2;
if (s == 1) {
for (int i = x - 1; i <= x + 1; i++)
masu[i][y]++;
masu[x][y - 1]++;
masu[x][y + 1]++;
} else if... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 45], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 46]] | 1 | 361 | 4 |
arg = []
while (get = gets)
arg << get
end
max = 0
suspection = []
temp = 0
count = 0
arg.sort.each{|i|
if temp == i
count += 1
if max < count
suspection = [i]
max = count
elsif max == count
suspection << i
end
else
temp = i
count = 1
end}
puts suspection | arg = []
while (get = gets)
arg << get.to_i
end
max = 0
suspection = []
temp = 0
count = 0
arg.sort.each{|i|
if temp == i
count += 1
if max < count
suspection = [i]
max = count
elsif max == count
suspection << i
end
else
temp = i
count = 1
end}
puts suspection | [["+", 0, 89, 8, 170, 0, 738, 12, 652, 17, 131], ["+", 0, 89, 8, 170, 0, 738, 12, 652, 735, 22]] | 4 | 74 | 2 |
count = Hash.new(0)
$<.each{|x| count[x] += 1}
max = count.values.max
puts count.select{|x, c| c == max}.map(&:first).sort | count = Hash.new(0)
$<.each{|x| count[x.to_i] += 1}
max = count.values.max
puts count.select{|x, c| c == max}.map(&:first).sort | [["+", 8, 734, 0, 755, 31, 742, 0, 652, 17, 131], ["+", 8, 734, 0, 755, 31, 742, 0, 652, 735, 22]] | 4 | 51 | 2 |
data = Array.new()
i = 0
while data[i] = gets do
i += 1
end
j = 0
number = Array.new()
while out = data[j]
out = out.chomp
number[j] = out.to_i
j += 1
end
ten = Array.new(100,0)
number = number.sort
score = number.uniq
i=0
j=0
k=0
for i in score do
for j in number do
if i == j
ten[k] = ten[k] + 1
e... | data = Array.new()
i = 0
while data[i] = gets do
i += 1
end
j = 0
number = Array.new()
while out = data[j]
out = out.chomp
number[j] = out.to_i
j += 1
end
ten = Array.new(100,0)
number = number.sort
score = number.uniq
i=0
j=0
k=0
for i in score do
for j in number do
if i == j
ten[k] = ten[k] + 1
e... | [["-", 0, 652, 3, 4, 0, 742, 0, 738, 17, 72], ["-", 0, 652, 3, 4, 0, 742, 0, 738, 12, 612]] | 4 | 149 | 2 |
arr = Array.new(100){0}
while gets do
arr[i-1]+=1
end
max = arr.max
arr.each_with_index {|v, n| puts(n+1) if v == max} | arr = Array.new(100){0}
while gets do
arr[$_.to_i-1]+=1
end
max = arr.max
arr.each_with_index {|v, n| puts(n+1) if v == max} | [["-", 8, 170, 0, 755, 31, 742, 0, 738, 31, 22], ["+", 0, 755, 31, 742, 0, 738, 31, 652, 486, 744], ["+", 0, 755, 31, 742, 0, 738, 31, 652, 17, 131], ["+", 0, 755, 31, 742, 0, 738, 31, 652, 735, 22]] | 4 | 48 | 4 |
h={};$<.map{|s|h[n==s.to_i]||=0;h[n]+=1};puts h.select{|x,y|y==h.values.max}.keys.sort | h={};$<.map{|s|h[n=s.to_i]||=0;h[n]+=1};puts h.select{|x,y|y==h.values.max}.keys.sort | [["-", 8, 734, 0, 755, 31, 742, 0, 738, 17, 60], ["+", 8, 734, 0, 755, 31, 742, 0, 662, 0, 32]] | 4 | 53 | 2 |
a=Array.new(10,0)
$<.map{|n|a[n.to_i]+=1}
a.map.with_index{|n,i|n==a.max&&p(i)} | a=Array.new(101,0)
$<.map{|n|a[n.to_i]+=1}
a.map.with_index{|n,i|n==a.max&&p(i)} | [["-", 0, 493, 0, 662, 12, 652, 3, 4, 0, 612], ["+", 0, 493, 0, 662, 12, 652, 3, 4, 0, 612]] | 4 | 48 | 2 |
count = (0..9).map{ 0 }
while (line = gets)
n = line.chop.to_i
count[n] += 1
end
max = count.max
puts (0..9).select{|k| count[k] == max} | count = (0..100).map{ 0 }
while (line = gets)
n = line.chop.to_i
count[n] += 1
end
max = count.max
puts (0..100).select{|k| count[k] == max} | [["-", 0, 662, 12, 652, 486, 739, 0, 475, 444, 612], ["+", 0, 662, 12, 652, 486, 739, 0, 475, 444, 612], ["-", 3, 4, 0, 652, 486, 739, 0, 475, 444, 612], ["+", 3, 4, 0, 652, 486, 739, 0, 475, 444, 612]] | 4 | 56 | 4 |
hist = [0 for i in range(100)]
l = []
while True:
try:
hist[eval(input()) - 1] += 1
except:
break;
for k in [x for x in enumlate(hist) if max(hist) == x[1]]:
print(k[0] + 1) |
hist = [0 for i in range(100)]
l = []
while True:
try:
hist[eval(input()) - 1] += 1
except:
break;
for k in [x for x in enumerate(hist) if max(hist) == x[1]]:
print(k[0] + 1) | [["-", 0, 7, 12, 658, 0, 659, 12, 652, 63, 22], ["+", 0, 7, 12, 658, 0, 659, 12, 652, 63, 22]] | 5 | 71 | 2 |
A=[]
while True:
try:
x=int(input())
A.append(x)
except EOFError:
break
num=[]
for i in range(10):
num.append((A.count(i),i))
num.sort(reverse=True)
mode_value=num[0][0]
B=[]
for i in num:
if i[0]==mode_value:
B.append(i[1])
B.sort()
for i in B:
print(i) | A=[]
while True:
try:
x=int(input())
A.append(x)
except EOFError:
break
num=[]
for i in range(101):
num.append((A.count(i),i))
num.sort(reverse=True)
mode_value=num[0][0]
B=[]
for i in num:
if i[0]==mode_value:
B.append(i[1])
B.sort()
for i in B:
print(i) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 111 | 2 |
import collections
import sys
cntr = collections.Counter
for line in sys.stdin:
cntr[int(line)] += 1
lst = []
for k,v in cntr.items():
lst.append((v,k))
lst.sort()
t = len(lst)-1
while t>0 and lst[t][0] == lst[t-1][0]:
t -= 1
for i in range(t,len(lst)):
print(lst[i][1]) | import collections
import sys
cntr = collections.Counter()
for line in sys.stdin:
cntr[int(line)] += 1
lst = []
for k,v in cntr.items():
lst.append((v,k))
lst.sort()
t = len(lst)-1
while t>0 and lst[t][0] == lst[t-1][0]:
t -= 1
for i in range(t,len(lst)):
print(lst[i][1]) | [["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 112 | 2 |
numdict = dict()
while True:
try:
num = input()
if num not in numdict:
numdict[num] = 0
else:
numdict[num] += 1
except EOFError:
break
most = max(numdict.values())
mostlist = list()
for key in numdict:
if most == numdict[key]:
mostlist.append(key)
mostlist.sort()
for item in mostlist:
print(item) | numdict = dict()
while True:
try:
num = input()
if num not in numdict:
numdict[num] = 0
else:
numdict[num] += 1
except EOFError:
break
most = max(numdict.values())
mostlist = list()
for key in numdict:
if most == numdict[key]:
mostlist.append(int(key))
mostlist.sort()
for item in mostlist:
print(ite... | [["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 87 | 3 |
kosu = [0] * 100
k = 1
while True:
try:
n = int(input())
kosu[n - 1] += 1
except (EOFError,ValueError):
ma = max(kosu)
num = kosu.index(ma) + k
print(num)
kosu.remove(max(kosu))
while True:
if ma > max(kosu):
b... | kosu = [0] * 100
k = 1
while True:
try:
n = int(input())
kosu[n - 1] += 1
except (EOFError,ValueError):
ma = max(kosu)
num = kosu.index(ma) + k
print(num)
kosu.remove(max(kosu))
while True:
if ma > max(kosu):
b... | [["+", 0, 246, 0, 671, 0, 196, 0, 93, 0, 94]] | 5 | 105 | 1 |
import sys
from collections import Counter
if __name__ == '__main__':
# ??????????????\???
# data = [5, 6, 3, 5, 8, 7, 5, 3, 9, 7, 3, 4]
data = []
for line in sys.stdin:
data.append(int(line.strip()))
print(data)
# ?????????????¢????
c = Counter(data)
max_freq = c.most_common(... | import sys
from collections import Counter
if __name__ == '__main__':
# ??????????????\???
# data = [5, 6, 3, 5, 8, 7, 5, 3, 9, 7, 3, 4]
data = []
for line in sys.stdin:
data.append(int(line.strip()))
# print(data)
# ?????????????¢????
c = Counter(data)
max_freq = c.most_commo... | [["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 107 | 4 |
import sys
c=[0 for i in range(101)]
for n in sys.stdin:
n=int(n)
counter[n]+=1
m=max(c)
for i in range(101):
if c[i]==m:
print(i) | import sys
c=[0 for i in range(101)]
for n in sys.stdin:
n=int(n)
c[n]+=1
m=max(c)
for i in range(101):
if c[i]==m:
print(i) | [["-", 8, 196, 0, 1, 0, 677, 31, 206, 51, 22], ["+", 8, 196, 0, 1, 0, 677, 31, 206, 51, 22]] | 5 | 59 | 11 |
import sys
from collections import defaultdict
d = defaultdict(int)
for i in sys.stdin:
d[i] +=1
m = max(v for v in d.values())
for _ in sorted([k for k, v in d.items() if v == m]):
print(_) | import sys
from collections import defaultdict
d = defaultdict(int)
for i in sys.stdin:
d[int(i)] +=1
m = max(v for v in d.values())
for i in sorted([k for k, v in d.items() if v == m]):
print(i) | [["+", 0, 1, 0, 677, 31, 206, 206, 652, 63, 22], ["+", 0, 677, 31, 206, 206, 652, 3, 4, 0, 24], ["+", 0, 677, 31, 206, 206, 652, 3, 4, 0, 25], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 67 | 7 |
import sys
a = {}
ma = 0
m = []
for u in sys.stdin:
i = int(u)
if not (i in a):
a[i] = 1
else:
a[i] += 1
if ma <= a[i]:
if ma < i:
ma = a[i]
m.clear()
m.append(i)
m = sorted(m)
for k in m:
print(k) | import sys
a = {}
ma = 0
m = []
for u in sys.stdin:
i = int(u)
if not (i in a):
a[i] = 1
else:
a[i] += 1
# ???????????§????????±???
if ma <= a[i]:
if ma < a[i]:
ma = a[i]
m.clear()
m.append(i)
m = sorted(m)
for k in m:
print(k) | [["+", 64, 196, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 64, 196, 0, 57, 15, 666, 0, 206, 0, 70], ["+", 64, 196, 0, 57, 15, 666, 0, 206, 0, 73]] | 5 | 93 | 3 |
import sys
def ModeValue():
mode=[0 for i in range(0,101)]
for n in sys.stdin:
mode[int(n)]+=1
maxN=max(mode)
for i in mode:
if mode[i]==maxN:
print(i)
ModeValue() | import sys
def ModeValue():
mode=[0 for i in range(0,101)]
for n in sys.stdin:
mode[int(n)]+=1
maxN=max(mode)
for i in range(0,101):
if mode[i]==maxN:
print(i)
ModeValue() | [["-", 0, 656, 0, 14, 8, 196, 0, 7, 12, 22], ["+", 0, 14, 8, 196, 0, 7, 12, 652, 63, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 25]] | 5 | 63 | 7 |
# 0028
array = []
while True:
try:
a = input()
array.append(int(a))
except EOFError:
break
s = set(array)
mx = max(list(map(lambda a: array.count(a), s)))
modes = list(filter(lambda a: array.count(a) == mx), sorted(s))
print(*modes, sep = '\n') | # 0028
array = []
while True:
try:
a = input()
array.append(int(a))
except EOFError:
break
s = set(array)
mx = max(list(map(lambda a: array.count(a), s)))
modes = list(filter(lambda a: array.count(a) == mx, sorted(s)))
print(*modes, sep = '\n') | [["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 91 | 2 |
# 0028
array = []
while True:
try:
a = input()
array.append(int(a))
except EOFError:
break
s = set(array)
count= list(map(lambda a: array.count(a), s))
mx = max(count)
modes = list(array[i] for i, x in enumerate(count) if x == mx)
print(*sorted(modes), sep = '\n') | # 0028
array = []
while True:
try:
a = input()
array.append(int(a))
except EOFError:
break
s = set(array)
count= list(map(lambda a: array.count(a), s))
mx = max(count)
modes = list(list(s)[i] for i, x in enumerate(count) if x == mx)
print(*sorted(modes), sep = '\n') | [["-", 0, 662, 12, 652, 3, 668, 8, 206, 51, 22], ["+", 12, 652, 3, 668, 8, 206, 51, 652, 63, 22], ["+", 3, 668, 8, 206, 51, 652, 3, 4, 0, 24], ["+", 3, 668, 8, 206, 51, 652, 3, 4, 0, 22], ["+", 3, 668, 8, 206, 51, 652, 3, 4, 0, 25]] | 5 | 95 | 8 |
a = [], m = l = 0, c = '';
require("fs")
.readFileSync("/dev/stdin", "utf8")
.trim()
.split(' ')
.some(function(i) {
a[j = i.toLowerCase()] ? (++a[j] > m ? m = a[j] : 0) : a[j] = 1;
(t = j.length) > l ? (c = j, l = t) : 0
});
console.log(m + ' ' + c) | a = [], m = l = 0, n = c = '';
require("fs")
.readFileSync("/dev/stdin", "utf8")
.trim()
.split(' ')
.some(function(i) {
a[j = i.toLowerCase()] ? (++a[j] > m ? m = a[n = j] : 0) : a[j] = 1;
(t = j.length) > l ? (c = j, l = t) : 0
});
console.log(n + ' ' + c) | [["+", 0, 1, 0, 563, 12, 563, 12, 11, 31, 22], ["+", 0, 1, 0, 563, 12, 563, 12, 11, 0, 32], ["+", 0, 510, 64, 11, 12, 69, 71, 11, 31, 22], ["+", 0, 510, 64, 11, 12, 69, 71, 11, 0, 32], ["-", 0, 2, 3, 3, 0, 16, 31, 16, 31, 22], ["+", 0, 2, 3, 3, 0, 16, 31, 16, 31, 22]] | 2 | 125 | 6 |
import java.io.*;
class Main {
public static void main(String args[]) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String str = input.readLine();
String str_ary[] = str.split(" ");
int a[] = new int[str_ary.length];
for (int i = 0; i < str_ary.... | import java.io.*;
class Main {
public static void main(String args[]) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String str = input.readLine();
String str_ary[] = str.split(" ");
int a[] = new int[str_ary.length];
for (int i = 0; i < str_ary.... | [["-", 0, 195, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 141, 22], ["-", 8, 498, 0, 195, 8, 196, 0, 1, 0, 35], ["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 8, 498, 0, 195, 8, 196, 0, 503, 0, 21], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 31, ... | 3 | 266 | 10 |
#include <stdio.h>
#include <string.h>
int main(void) {
int i = 0, j;
char word_list[501][33];
while (scanf("%s", word_list[i]) != EOF) {
i++;
}
int word_num = i;
int word_cnt[501] = {0};
int len;
int longest_len = 0;
char longest_word[33];
for (i = 0; i < word_num; i++) {
len = strlen(wo... | #include <stdio.h>
#include <string.h>
int main(void) {
int i = 0, j;
char word_list[501][33];
while (scanf("%s", word_list[i]) != EOF) {
i++;
}
int word_num = i;
int word_cnt[501] = {0};
int len;
int longest_len = 0;
char longest_word[33];
for (i = 0; i < word_num; i++) {
len = strlen(wo... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 235 | 4 |
#include <stdio.h>
#include <string.h>
struct s {
char *word;
int freq, len;
};
int main() {
int i = 0;
int Max_f, Max_l, f, l, j;
Max_f = 0;
Max_l = 0;
struct s w[500];
while (scanf("%s", w[i++].word) != EOF) {
w[i - 1].len = strlen(w[i - 1].word);
++(w[i - 1].freq);
if (Max_l < w[i - 1]... | #include <stdio.h>
#include <string.h>
struct s {
char word[32];
int freq, len;
};
int main() {
int i = 0;
int Max_f, Max_l, f, l, j;
Max_f = 0;
Max_l = 0;
struct s w[500];
while (scanf("%s", w[i++].word) != EOF) {
w[i - 1].len = strlen(w[i - 1].word);
++(w[i - 1].freq);
if (Max_l < w[i -... | [["-", 0, 122, 8, 123, 0, 124, 49, 84, 0, 48], ["+", 0, 122, 8, 123, 0, 124, 49, 80, 0, 70], ["+", 0, 122, 8, 123, 0, 124, 49, 80, 81, 13], ["+", 0, 122, 8, 123, 0, 124, 49, 80, 0, 73], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 242 | 5 |
#include <stdio.h>
#include <string.h>
int main() {
int i, j, k, count[200] = {0}, max, midx, lidx;
char s[1000], tmp[200][32];
fgets(s, 1000, stdin);
i = 0;
j = 0;
k = 0;
max = 0;
while (s[i] != '\0') {
if (s[i] == ' ') {
tmp[j][k] = '\0';
j++;
i++;
k = 0;
continue;... | #include <stdio.h>
#include <string.h>
int main() {
int i, j, k, count[200] = {0}, max, midx, lidx;
char s[1000], tmp[200][32];
fgets(s, 1000, stdin);
i = 0;
j = 0;
k = 0;
max = 0;
while (s[i] != '\0') {
if (s[i] == ' ') {
tmp[j][k] = '\0';
j++;
i++;
k = 0;
continue;... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 312 | 4 |
#include <algorithm>
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
string s, t;
map<string, int> p;
while (cin >> s) {
if (p.find(s) != p.end())
p[s]++;
else
p[s] = 1;
if (s.size() > t.size())
t = s;
}
int m = 0;
for (map<string, in... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
string s, t;
map<string, int> p;
while (cin >> s) {
if (p.find(s) != p.end())
p[s]++;
else
p[s] = 1;
if (s.size() > t.size())
t = s;
}
int m = 0;
for (map<string, in... | [["-", 0, 7, 8, 57, 64, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 7, 8, 57, 64, 1, 0, 35], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 185 | 6 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define reps(i, f, n) for (int i = f; i < int(n); i++)
#define rep(i, n) reps(i, 0, n)
#define X real... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define reps(i, f, n) for (int i = f; i < int(n); i++)
#define rep(i, n) reps(i, 0, n)
#define X real... | [["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 232 | 4 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double real;
typedef pair<int, int> duo;
#define TT template <typename T>
TT T sq(T x) { return x * x; }
TT int ubnd(vector<T> &v, T x) {
return upper_bound(v.begin(), v.end(), x) - v.begin();
}
TT int lbnd(vector<T> &v, T x) {
retu... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double real;
typedef pair<int, int> duo;
#define TT template <typename T>
TT T sq(T x) { return x * x; }
TT int ubnd(vector<T> &v, T x) {
return upper_bound(v.begin(), v.end(), x) - v.begin();
}
TT int lbnd(vector<T> &v, T x) {
retu... | [["+", 0, 57, 15, 339, 51, 16, 12, 74, 0, 24], ["+", 15, 339, 51, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 57, 15, 339, 51, 16, 12, 74, 0, 25]] | 1 | 682 | 3 |
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long Int;
#define REP(i, n) for (int i = 0; i < n; ++i)
using namespace std;
map<string, int> aa;
set<str... | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long Int;
#define REP(i, n) for (int i = 0; i < n; ++i)
using namespace std;
map<string, int> aa;
set<str... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 178 | 4 |
#include <cstring>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define rep2(x, from, to) for (int x = (from); x < (to); (x)++)
#define rep(x, to) rep2(x, 0, to)
int main() {
string s;
vector<string> str1;
set<string> str2;
while (cin >> s) {
str1.push_back(s);... | #include <cstring>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define rep2(x, from, to) for (int x = (from); x < (to); (x)++)
#define rep(x, to) rep2(x, 0, to)
int main() {
string s;
vector<string> str1;
set<string> str2;
while (cin >> s) {
str1.push_back(s);... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 289 | 4 |
#include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string p[1001], s;
int c;
int st[1001] = {0}, l = 0, i, maxl = 0, maxn = 0;
while ((c = getchar()) != '\n') {
if (c == ' ') {
for (i = 0; i < l; i++) {
if (p[i] == s) {
st[... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
string p[1001], s;
int c;
int st[1001] = {0}, l = 0, i, maxl = 0, maxn = 0;
while ((c = getchar()) != '\n') {
if (c == ' ') {
for (i = 0; i < l; i++) {
if (p[i] == s) {
st[... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 340 | 4 |
#include "bits/stdc++.h"
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
#define dump(x) cerr << #x << " = " << (x) << endl
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back
int main() {
map<string, int> mp;
... | #include "bits/stdc++.h"
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
#define dump(x) cerr << #x << " = " << (x) << endl
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back
int main() {
map<string, int> mp;
... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 317 | 6 |
#include <algorithm>
#include <iostream>
#include <map>
#include <string.h>
#include <vector>
using namespace std;
int main() {
map<string, int> m;
string s;
getline(cin, s);
string tem = "";
for (int i = 0; i < s.length(); i++) {
if (s[i] != ' ' && s[i] != '\n')
tem += s[i];
else {
if (m.... | #include <algorithm>
#include <iostream>
#include <map>
#include <string.h>
#include <vector>
using namespace std;
int main() {
map<string, int> m;
string s;
getline(cin, s);
string tem = "";
for (int i = 0; i < s.length(); i++) {
if (s[i] != ' ' && s[i] != '\n')
tem += s[i];
else {
if (m.... | [["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 297 | 4 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <stack>
#include <string.h>
#include <string>
#include <utility>
#define mp make_pair
#define pii pair<int, int>
#define ff first
#define ss second
#define ll long long
#define vi ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <stack>
#include <string.h>
#include <string>
#include <utility>
#define mp make_pair
#define pii pair<int, int>
#define ff first
#define ss second
#define ll long long
#define vi ... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 0, 52, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 52, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 250 | 4 |
//?\???°??????
// 10???
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
map<string, int> m;
string s;
vector<string> v;
while (cin >> s) {
if ('A' <= s[0] && s[0] <= 'Z') {
s[0] = s[0] - 'A' + 'a';
}
m[s]++;
v.push_back(s);
}
int... | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
map<string, int> m;
string s;
vector<string> v;
while (cin >> s) {
if ('A' <= s[0] && s[0] <= 'Z') {
s[0] = s[0] - 'A' + 'a';
}
m[s]++;
v.push_back(s);
}
int ans1 = -1;
int ans2 =... | [["+", 0, 57, 15, 339, 51, 16, 12, 74, 0, 24], ["+", 15, 339, 51, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 57, 15, 339, 51, 16, 12, 74, 0, 25]] | 1 | 210 | 3 |
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
map<string, int> str;
string word;
int big = 0;
int cnt = 0;
string keepword;
string keepstr = "";
string many = "";
while (!cin.eof()) {
cin >> word;
string kari(word);
... | #include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
map<string, int> str;
string word;
int big = 0;
int cnt = 0;
string keepword;
string keepstr = "";
string many = "";
while (!cin.eof()) {
cin >> word;
string kari(word);
... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 141 | 2 |
#include <iostream>
#include <map>
#include <string>
using namespace std;
map<string, int> table;
int main() {
string word, frequent, longest; // input, max frequency, and longest
size_t N = 0; // frequency of the string "frequent"
while (cin >> word) {
table["word"] += 1;
if (table["wor... | #include <iostream>
#include <map>
#include <string>
using namespace std;
map<string, int> table;
int main() {
string word, frequent, longest; // input, max frequency, and longest
size_t N = 0; // frequency of the string "frequent"
while (cin >> word) {
table[word] += 1;
if (table[word] ... | [["-", 0, 11, 31, 69, 341, 342, 0, 5, 0, 62], ["-", 51, 16, 31, 69, 341, 342, 0, 5, 0, 62], ["-", 0, 11, 12, 69, 341, 342, 0, 5, 0, 62]] | 1 | 111 | 6 |
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
string s, nmax, gmax;
map<string, int> m;
map<string, int>::iterator it;
int nm = -1, gm = -1;
while (cin >> s) {
if (nm < s.length()) {
nm = s.length();
nmax = s;
}
if (m.count(s))
m[s]++;
... | #include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
string s, nmax, gmax;
map<string, int> m;
map<string, int>::iterator it;
int nm = -1, gm = -1;
while (cin >> s) {
if (nm < (int)s.length()) {
nm = (int)s.length();
nmax = s;
}
if (m.count(s))
m... | [["+", 0, 57, 15, 339, 51, 16, 12, 74, 0, 24], ["+", 15, 339, 51, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 57, 15, 339, 51, 16, 12, 74, 0, 25], ["+", 64, 9, 0, 1, 0, 11, 12, 74, 0, 24], ["+", 0, 1, 0, 11, 12, 74, 39, 77, 39, 40], ["+", 64, 9, 0, 1, 0, 11, 12, 74, 0, 25]] | 1 | 162 | 23 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define PRINT(STR) cout << STR << endl;
#defi... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define PRINT(STR) cout << STR << endl;
#defi... | [["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22]] | 1 | 311 | 7 |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s[1000];
int n = 0;
while (cin >> s[n])
n++;
sort(s, s + n);
int m, c;
m = c = 0;
string t, ms, l;
ms = t = s[0];
for (int i = 0; i < n; i++) {
if (t == s[i])
c++;
else {
if (c ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s[1000];
int n = 0;
while (cin >> s[n])
n++;
sort(s, s + n);
int m, c;
m = c = 0;
string t, ms, l;
ms = t = s[0];
for (int i = 0; i < n + 1; i++) {
if (t == s[i])
c++;
else {
if... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 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, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 170 | 6 |
#include <bits/stdc++.h>
using namespace std;
typedef pair<string, int> p;
vector<p> ls(0);
int find(string s) {
for (int i = 0; i < (int)ls.size(); i++) {
if (s == ls[i].first)
return true;
}
return -1;
}
int main() {
string in;
int max = 0, indx = 0;
string maxs = "";
while (cin >> in) {
... | #include <bits/stdc++.h>
using namespace std;
typedef pair<string, int> p;
vector<p> ls(0);
int find(string s) {
for (int i = 0; i < (int)ls.size(); i++) {
if (s == ls[i].first) {
return i;
}
}
return -1;
}
int main() {
string in;
int max = 0, indx = 0;
string maxs = "";
while (cin >> i... | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 7, 8, 9, 0, 57, 64, 37, 0, 146], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 22], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 209 | 4 |
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
class Word {
public:
char w[33];
int length;
int freq;
public:
Word() {
strcpy(w, "");
length = 0;
freq = 0;
}
};
int main() {
char str[1001];
char buf[32];
char *p, *q;
fgets(str, 1001, stdin);
Word wl[32... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
class Word {
public:
char w[33];
int length;
int freq;
public:
Word() {
strcpy(w, "");
length = 0;
freq = 0;
}
};
int main() {
char str[1001];
char buf[32];
char *p, *q;
fgets(str, 1001, stdin);
Word wl[32... | [["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 460 | 4 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | [["-", 64, 9, 0, 1, 0, 11, 12, 69, 28, 22], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 70], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 73]] | 1 | 271 | 3 |
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
multiset<string> kk;
int ... |
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
multiset<string> kk;
int ... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 181 | 4 |
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
map<string, int> mymap;
i... |
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
map<string, int> mymap;
i... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 174 | 4 |
#include <iostream>
#include <map>
using namespace std;
int main(void) {
map<string, int> m;
map<string, int>::iterator it, cit, sit;
string s;
int maxS = 0, maxC = 0;
while (cin >> s) {
m[s] += 1;
}
for (it = m.begin(); it != m.end(); it++) {
int size = (*it).first.size();
if (size > maxS)
... | #include <iostream>
#include <map>
using namespace std;
int main(void) {
map<string, int> m;
map<string, int>::iterator it, cit, sit;
string s;
int maxS = 0, maxC = 0;
while (cin >> s) {
m[s] += 1;
}
for (it = m.begin(); it != m.end(); it++) {
int size = (*it).first.size();
if (size > maxS) {... | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 161 | 4 |
#include <iostream>
#include <map>
#include <string>
using namespace std;
map<string, int> table;
int main() {
string word, frequent, longest;
int frequent_length = 0;
while (cin >> word) {
table[word] += 1;
if (table[word] > frequent_length) {
frequent_length = table[word];
frequent = word;... | #include <iostream>
#include <map>
#include <string>
using namespace std;
map<string, int> table;
int main() {
string word, frequent, longest;
int frequent_length = 0;
while (cin >> word) {
table[word] += 1;
if (table[word] > frequent_length) {
frequent_length = table[word];
frequent = word;... | [["+", 0, 16, 31, 16, 31, 16, 12, 103, 0, 104], ["+", 0, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 104 | 4 |
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
map<string, int> table;
string word;
int k1 = 0;
int k2 = 0;
string answer1;
string answer2;
while (cin >> word) {
table[word] += 1;
if (table[word] > k1) {
k1 = table[word];
answer1 = word;
}
... | #include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
map<string, int> table;
string word;
int k1 = 0;
int k2 = 0;
string answer1;
string answer2;
while (cin >> word) {
table[word] += 1;
if (table[word] > k1) {
k1 = table[word];
answer1 = word;
}
... | [["-", 8, 9, 0, 43, 49, 50, 51, 105, 0, 150], ["-", 0, 43, 49, 50, 51, 105, 51, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 17, 131], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 119, 120], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24]] | 1 | 116 | 5 |
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
// word[s] Å ¶ñsÌo»ñªÔÁÄé
map<string, int> word;
vector<string> v;
string s;
while (cin >> s) {
v.push_back(s);
//ü͵½PꪷÅÉ é©T·
if (word.count(s)) {
... | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
// word[s] Å ¶ñsÌo»ñªÔÁÄé
map<string, int> word;
vector<string> v;
string s;
while (cin >> s) {
v.push_back(s);
//ü͵½PꪷÅÉ é©T·
if (word.count(s)) {
... | [["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 1 | 254 | 2 |
import java.io.*;
class Main {
static int count;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while (!(line = br.readLine()).equals("0 0")) {
String[] value = line.split(" ");
int n = Integ... | import java.io.*;
class Main {
static int count;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while (!(line = br.readLine()).equals("0 0")) {
String[] value = line.split(" ");
int n = Integ... | [["-", 0, 1, 0, 492, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 31, 22]] | 3 | 215 | 2 |
import java.util.*;
public class Main {
public static void main(String[] args) {
int n, s, max, count;
max = 100;
Scanner sc = new Scanner(System.in);
for (;;) {
n = sc.nextInt();
s = sc.nextInt();
if (n == 0 && s == 0)
break;
if (s > 864)
s = 864;
... | import java.util.*;
public class Main {
public static void main(String[] args) {
int n, s, max, count;
max = 9;
Scanner sc = new Scanner(System.in);
for (;;) {
n = sc.nextInt();
s = sc.nextInt();
if (n == 0 && s == 0)
break;
if (s > 864)
s = 864;
co... | [["-", 0, 195, 8, 196, 0, 1, 0, 11, 12, 499], ["+", 0, 195, 8, 196, 0, 1, 0, 11, 12, 499]] | 3 | 213 | 2 |
import java.util.*;
class Main {
static int cnt = 0;
private static void re(int i, int n, int v, int t, int s) {
// i????????¨????????°?????°,n?????????????±?,v????´??????°???,s???????¨???°,t???????????§??§?????§????????°
if (i == n) {
for (int j = t + 1; j <= 9; j++) {
int tempv = v + j;
... |
import java.util.*;
class Main {
static int cnt = 0;
private static void re(int i, int n, int v, int t, int s) {
// i????????¨????????°?????°,n?????????????±?,v????´??????°???,s???????¨???°,t???????????§??§?????§????????°
if (i == n) {
for (int j = t + 1; j <= 9; j++) {
int tempv = v + j;
... | [["+", 0, 52, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 12, 499], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35]] | 3 | 221 | 4 |
import java.util.*;
class Main {
static void main(String[] q) {
Scanner c = new Scanner(System.in);
for (;;) {
int n = c.nextInt(), s = c.nextInt();
if (n == 0 && s == 0)
break;
System.out.println(f(0, 0, s, n));
}
}
static int f(int x, int a, int t, int n) {
return n == ... | import java.util.*;
class Main {
public static void main(String[] q) {
Scanner c = new Scanner(System.in);
for (;;) {
int n = c.nextInt(), s = c.nextInt();
if (n == 0 && s == 0)
break;
System.out.println(f(0, 0, s, n));
}
}
static int f(int x, int a, int t, int n) {
retur... | [["+", 0, 235, 8, 498, 0, 195, 0, 494, 0, 259]] | 3 | 154 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.