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 <iostream>
using namespace std;
char field[14][14]; // 3~10
void bomb(int y, int x) {
field[y][x] = '0';
for (int i = -3; i <= 3; i++) {
if (field[y][x + i] == '1')
bomb(y, x + i);
if (field[y + i][x] == '1')
bomb(y + i, x);
}
}
int main() {
int n;
cin >> n;
for (int i = 1; i ... | #include <iostream>
using namespace std;
char field[14][14]; // 3~10
void bomb(int y, int x) {
field[y][x] = '0';
for (int i = -3; i <= 3; i++) {
if (field[y][x + i] == '1')
bomb(y, x + i);
if (field[y + i][x] == '1')
bomb(y + i, x);
}
}
int main() {
int n;
cin >> n;
for (int i = 1; i ... | [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 309 | 2 |
#include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
int dx[] = {-3, -2, -1, 0, 0, 0, 1, 2, 3, 0, 0, 0};
int dy[] = {0, 0, 0, 1, 2, 3, 0, 0, 0, -1, -2, -3};
char mas[8][8];
void solve(int, int);
int main() {
int n, x, y, HM = 1;
cin >> n;
while (n--) {
for (int i = 0; i < 8; i++) {... | #include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
int dx[] = {-3, -2, -1, 0, 0, 0, 1, 2, 3, 0, 0, 0};
int dy[] = {0, 0, 0, 1, 2, 3, 0, 0, 0, -1, -2, -3};
char mas[8][8];
void solve(int, int);
int main() {
int n, x, y, HM = 1;
cin >> n;
while (n--) {
for (int i = 0; i < 8; i++) {... | [["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151]] | 1 | 332 | 4 |
/*
0071:Bombs Chain
*/
#include <iostream>
#include <queue>
#include <utility>
using namespace std;
typedef pair<int, int> P;
char map[8][8];
int vx[4] = {1, 0, -1, 0};
int vy[4] = {0, 1, 0, -1};
void bomb(int sx, int sy);
int main(void) {
int dt;
cin >> dt;
for (int s = 0; s < dt; s++) {
int sx... | /*
0071:Bombs Chain
*/
#include <iostream>
#include <queue>
#include <utility>
using namespace std;
typedef pair<int, int> P;
char map[8][8];
int vx[4] = {1, 0, -1, 0};
int vy[4] = {0, 1, 0, -1};
void bomb(int sx, int sy);
int main(void) {
int dt;
cin >> dt;
for (int s = 0; s < dt; s++) {
int sx... | [["-", 0, 7, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 427 | 4 |
// include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include... | // include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include... | [["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 60], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 47], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12,... | 1 | 574 | 8 |
s=gets.to_i
for i in 1..s
num=[]
8.times do
num<<gets.chomp.split(//).map(&:to_i)
end
x=gets.to_i-1
y=gets.to_i-1
check=[x,y]
until check.empty?
y=check.pop
x=check.pop
(-3).upto(3) do |t|
if (x+t)<8 && 0<=(x+t) && num[y][x+t]==1
... | s=gets.to_i
for i in 1..s
gets.chomp
num=[]
8.times do
num<<gets.chomp.split(//).map(&:to_i)
end
x=gets.to_i-1
y=gets.to_i-1
check=[x,y]
until check.empty?
y=check.pop
x=check.pop
(-3).upto(3) do |t|
if (x+t)<8 && 0<=(x+t) && num[... | [["+", 36, 36, 36, 36, 0, 42, 0, 652, 486, 22], ["+", 36, 36, 36, 36, 0, 42, 0, 652, 17, 131], ["+", 36, 36, 36, 36, 0, 42, 0, 652, 735, 22]] | 4 | 41 | 3 |
#!/usr/bin/env ruby
def bomb(x, y)
return if @field[x][y] != 1
@field[x][y] = 0
-3.upto(3) do |i|
next if i.zero?
bomb(x + i, y) if (x + i) >= 0 && (x + i) < 8
bomb(x, y + i) if (y + i) >= 0 && (y + i) < 8
end
end
n = gets.chomp!.to_i
# skip empty line
gets
n.times do |i|
@field = []
8.time... | #!/usr/bin/env ruby
def bomb(x, y)
return if @field[x][y] != 1
@field[x][y] = 0
-3.upto(3) do |i|
next if i.zero?
bomb(x + i, y) if (x + i) >= 0 && (x + i) < 8
bomb(x, y + i) if (y + i) >= 0 && (y + i) < 8
end
end
n = gets.chomp!.to_i
# skip empty line
gets
n.times do |i|
@field = []
8.time... | [["-", 8, 736, 0, 652, 3, 4, 0, 738, 31, 22], ["+", 8, 736, 0, 652, 3, 4, 0, 738, 31, 22]] | 4 | 206 | 4 |
def solve(data,p):
L=[]
if data[p[1]-1][p[0]-1]=="1":
data[p[1]-1]=data[p[1]-1][:p[0]-1]+"0"+data[p[1]-1][p[0]:]
L+=p
else:
return []
bakuhu=[(p[0]-3,p[1]),(p[0]-2,p[1]),(p[0]-1,p[1]),(p[0]+1,p[1]),(p[0]+2,p[1]),(p[0]+3,p[1]),(p[0],p[1]-3),(p[0],p[1]-2),(p[0],p[1]-1),(p[0],p[1]+1... | def solve(data,p):
L=[]
if data[p[1]-1][p[0]-1]=="1":
data[p[1]-1]=data[p[1]-1][:p[0]-1]+"0"+data[p[1]-1][p[0]:]
L+=p
else:
return []
bakuhu=[(p[0]-3,p[1]),(p[0]-2,p[1]),(p[0]-1,p[1]),(p[0]+1,p[1]),(p[0]+2,p[1]),(p[0]+3,p[1]),(p[0],p[1]-3),(p[0],p[1]-2),(p[0],p[1]-1),(p[0],p[1]+1... | [["-", 3, 4, 0, 657, 31, 657, 31, 557, 0, 6], ["+", 3, 4, 0, 657, 31, 657, 31, 557, 0, 6]] | 5 | 502 | 2 |
def bomb(f,x,y):
rf=f[:][:]
rf[y][x]=0
for i in [-3,-2,-1,1,2,3]:
if 0<=x+i<=7:
if rf[y][x+i]==1:
rf=bomb(rf,x+i,y)
if 0<=y+i<=7:
if rf[y+i][x]==1:
rf=bomb(rf,x,y+i)
return rf
n=int(input())
for data in range(1,n+1):
input()
... | def bomb(f,x,y):
rf=f[:][:]
rf[y][x]=0
for i in [-3,-2,-1,1,2,3]:
if 0<=x+i<=7:
if rf[y][x+i]==1:
rf=bomb(rf,x+i,y)
if 0<=y+i<=7:
if rf[y+i][x]==1:
rf=bomb(rf,x,y+i)
return rf
n=int(input())
for data in range(1,n+1):
input()
... | [["-", 8, 196, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 8, 196, 0, 1, 0, 652, 63, 319, 500, 22]] | 5 | 237 | 2 |
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0071
"""
import sys
def check_bombs(map, pos, dir, range=3):
"""
????¢¨????±???????????????\??????????????????????????§???????????????
(?????°????????????????¢¨????±??????´?????§???????????????????????????????????????????... | # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0071
"""
import sys
def check_bombs(map, pos, dir, range=3):
"""
????¢¨????±???????????????\??????????????????????????§???????????????
(?????°????????????????¢¨????±??????´?????§???????????????????????????????????????????... | [["+", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 12, 612]] | 5 | 547 | 3 |
def e(x,y):
A[y][x]='0'
for dx,dy in[[-3,0],[-2,0],[-1,0],[1,0],[2,0],[3,0],[0,-3],[0,-2],[0,-1],[0,1],[0,2],[0,3]]:
if 0<=x+dx<8 and 0<=y+dy<8 and A[y+dy][x+dx]=='1':e(x+dx,y+dy)
for i in range(int(input())):
print(f'Data {i+1}')
input()
A=[list(input())for _ in[0]*8]
e(int(input())-1,int(input())-1)
for r i... | def e(x,y):
A[y][x]='0'
for dx,dy in[[-3,0],[-2,0],[-1,0],[1,0],[2,0],[3,0],[0,-3],[0,-2],[0,-1],[0,1],[0,2],[0,3]]:
if 0<=x+dx<8 and 0<=y+dy<8 and A[y+dy][x+dx]=='1':e(x+dx,y+dy)
for i in range(int(input())):
print(f'Data {i+1}:')
input()
A=[list(input())for _ in[0]*8]
e(int(input())-1,int(input())-1)
for r ... | [["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 227 | 11 |
#!/usr/bin/env python
# coding: utf-8
import sys
def board_to_string(board):
return "\n".join(["".join([str(i) for i in row]) for row in board])
def get_answer(board, positions):
x, y = positions.pop(0)
board[y][x] = 0
explode_range = []
for i in [j for j in range(-3, 4) if j]:
if (0 <... | #!/usr/bin/env python
# coding: utf-8
import sys
def board_to_string(board):
return "\n".join(["".join([str(i) for i in row]) for row in board])
def get_answer(board, positions):
x, y = positions.pop(0)
board[y][x] = 0
explode_range = []
for i in [j for j in range(-3, 4) if j]:
if (0 <... | [["-", 0, 7, 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 | 354 | 4 |
import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
static int V;
static... |
import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
static int V;
static... | [["+", 0, 195, 8, 196, 0, 1, 0, 492, 500, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 0, 131], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 25], ["+", 8, 498, 0, 195, 8, 196, 0, 1, 0, 35]] | 3 | 1,061 | 6 |
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
while (true) {
int n = sc.nextInt();
if (n == 0)
break;
int m = sc.nextInt();
sc.u... | import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
while (true) {
int n = sc.nextInt();
if (n == 0)
break;
int m = sc.nextInt();
sc.u... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 44]] | 3 | 552 | 1 |
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
final int INF = 1 << 30;
int adjacent[][];
Scanner sc;
int n;
int solve() {
int cost = 0;
Set<Integer> vertex = new HashSet<Integer>();
vertex.add(0);
for (int h = 0; h < ... | import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
final int INF = 1 << 30;
int adjacent[][];
Scanner sc;
int n;
int solve() {
int cost = 0;
Set<Integer> vertex = new HashSet<Integer>();
vertex.add(0);
for (int h = 0; h < ... | [["-", 0, 11, 12, 492, 3, 4, 0, 5, 0, 44]] | 3 | 387 | 1 |
#include <algorithm>
#include <ios>
#include <iostream>
#include <vector>
using namespace std;
#include <vector>
struct UF {
int n;
vector<int> parent, rank;
UF(int n_ = 0) : n(n_), parent(n_), rank(n_, 0) {
for (int i = 0; i < n_; i++)
parent[i] = i;
}
int find(int a) { return parent[a] != a ? pare... | #include <algorithm>
#include <ios>
#include <iostream>
#include <vector>
using namespace std;
#include <vector>
struct UF {
int n;
vector<int> parent, rank;
UF(int n_ = 0) : n(n_), parent(n_), rank(n_, 0) {
for (int i = 0; i < n_; i++)
parent[i] = i;
}
int find(int a) { return parent[a] != a ? pare... | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 424 | 2 |
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#inclu... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#inclu... | [["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["+", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78]] | 1 | 673 | 2 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct Road {
int a, b;
int dist;
bool operator<(const Road &other) const { return dist < other.dist; }
};
int getroot(int i, vector<int> &roots) {
if (roots[i] == i)
return i;
return roots[i] = getroot(roots[i], roots);
}... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct Road {
int a, b;
int dist;
bool operator<(const Road &other) const { return dist < other.dist; }
};
int getroot(int i, vector<int> &roots) {
if (roots[i] == i)
return i;
return roots[i] = getroot(roots[i], roots);
}... | [["+", 0, 11, 31, 69, 341, 342, 0, 2, 63, 22], ["+", 31, 69, 341, 342, 0, 2, 3, 4, 0, 24], ["+", 31, 69, 341, 342, 0, 2, 3, 4, 0, 21], ["+", 31, 69, 341, 342, 0, 2, 3, 4, 0, 22], ["+", 31, 69, 341, 342, 0, 2, 3, 4, 0, 25]] | 1 | 330 | 5 |
#include <iostream>
#include <stdio.h>
#include <vector>
#define INF 2147483647
using namespace std;
class Lantern {
public:
bool vector_find(vector<int> v, int key) {
for (int i = 0; i < v.size(); i++) {
if (v[i] == key) {
return 1;
}
}
return 0;
}
int Solve(int n, int roadlist[1... | #include <iostream>
#include <stdio.h>
#include <vector>
#define INF 2147483647
using namespace std;
class Lantern {
public:
bool vector_find(vector<int> v, int key) {
for (int i = 0; i < v.size(); i++) {
if (v[i] == key) {
return 1;
}
}
return 0;
}
int Solve(int n, int roadlist[1... | [["+", 31, 69, 28, 69, 341, 342, 0, 69, 28, 22], ["+", 28, 69, 341, 342, 0, 69, 341, 342, 0, 70], ["+", 28, 69, 341, 342, 0, 69, 341, 342, 0, 73], ["+", 0, 11, 12, 69, 28, 69, 341, 342, 0, 70], ["+", 12, 69, 28, 69, 341, 342, 0, 69, 28, 22]] | 1 | 398 | 6 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef vector<int> vi;
#define REP(i, n) for (i = 0; i < n; i++)
struct branch {
int n1, n2, w;
};
bool f(branch i, branch j) { return (i.w > j.w); }
int main() {
while (1) {
int n, i;
char c;
cin >> n;
if (n == 0)
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef vector<int> vi;
#define REP(i, n) for (i = 0; i < n; i++)
struct branch {
int n1, n2, w;
};
bool f(branch i, branch j) { return (i.w > j.w); }
int main() {
while (1) {
int n, i;
char c;
cin >> n;
if (n == 0)
... | [["-", 64, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["-", 64, 9, 0, 7, 10, 11, 12, 16, 17, 72], ["-", 64, 9, 0, 7, 10, 11, 12, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 10, 11, 12, 13]] | 1 | 286 | 42 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
double x = sc.nextDouble();
double h = sc.nextDouble();
if (x == 0 && h == 0) {
break;
}
System.out.printf("%.6f", Math.sqrt(h * h +... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
double x = sc.nextDouble();
double h = sc.nextDouble();
if (x == 0 && h == 0) {
break;
}
System.out.println(Math.sqrt(h * h + x * x ... | [["-", 0, 52, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 492, 141, 22], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 8, 196, 0, 1, 0, 492, 3, 4, 0, 21]] | 3 | 107 | 6 |
import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc;
static final int INF = 1 << 28;
static final double EPS = 1e-9;
void run() {
sc = new Scanner(System.in);
for (; sc.hasNext... | import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc;
static final int INF = 1 << 28;
static final double EPS = 1e-9;
void run() {
sc = new Scanner(System.in);
for (; sc.hasNext... | [["-", 51, 492, 3, 4, 0, 16, 12, 16, 12, 499], ["+", 51, 492, 3, 4, 0, 16, 12, 16, 12, 515]] | 3 | 228 | 2 |
#include <math.h>
#include <stdio.h>
int main(void) {
int x[100], h[100];
double s[100];
int i = 0, j;
while (1) {
scanf("%d", &x[i]);
scanf("%d", &h[i]);
if (x[i] == 0 && h[i] == 0)
break;
s[i] = (4 * h[i] * h[i] + x[i] * x[i]);
s[i] = x[i] * sqrt(s[i]) + x[i] * x[i];
i++;
}
... | #include <math.h>
#include <stdio.h>
int main(void) {
int x[100], h[100];
double s[100];
int i = 0, j;
while (1) {
scanf("%d", &x[i]);
scanf("%d", &h[i]);
if (x[i] == 0 && h[i] == 0)
break;
s[i] = (4 * h[i] * h[i] + x[i] * x[i]);
s[i] = x[i] * sqrt(s[i]) + x[i] * x[i];
i++;
}
... | [["-", 0, 1, 0, 2, 3, 4, 0, 69, 71, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 69, 71, 22]] | 0 | 176 | 2 |
#include <math.h>
#include <stdio.h>
int main(void) {
double x, h, S;
while (scanf("%d", &x) != EOF && scanf("%d", &h) != EOF) {
if (x == 0 && h == 0) {
break;
}
S = (x * x) + 4 * x * (sqrt(x * x / 4 + h * h) / 2);
printf("%f\n", S);
}
return 0;
} | #include <math.h>
#include <stdio.h>
int main(void) {
double x, h, S;
while (scanf("%lf", &x) != EOF && scanf("%lf", &h) != EOF) {
if (x == 0 && h == 0) {
break;
}
S = (x * x) + 4 * x * sqrt(x * x / 4 + h * h) / 2;
printf("%f\n", S);
}
return 0;
} | [["-", 31, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 31, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["-", 12, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 12, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 11, 12, 16, 12, 16, 12, 23, 0, 24], ["-", 0, 11, 12, 16, 12, 16, 12, 23, 0, 25]] | 0 | 102 | 6 |
#include <math.h>
#include <stdio.h>
int input(int *x, int *h);
int main() {
int x, h;
double l, s;
while (input(&x, &h) == 0) {
l = sqrt((double)x * x / 4 + h * h);
s = l * x * 2 + x * x;
printf("%lf", s);
}
return 0;
}
int input(int *x, int *h) {
scanf("%d", x);
scanf("%d", h);
if (*x ==... | #include <math.h>
#include <stdio.h>
int input(int *x, int *h);
int main() {
int x, h;
double l, s;
while (input(&x, &h) == 0) {
l = sqrt((double)x * x / 4 + h * h);
s = l * x * 2 + x * x;
printf("%lf\n", s);
}
return 0;
}
int input(int *x, int *h) {
scanf("%d", x);
scanf("%d", h);
if (*x ... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 143 | 1 |
#include <math.h>
#include <stdio.h>
int main(void) {
int n, m;
double x, h, s, t;
while (1) {
scanf("%d %d", &n, &m);
if (n == 0 && m == 0)
break;
s = 0.0;
x = (double)n;
h = (double)m;
t = sqrt(pow(x / 2.0, 2) + pow(h, 2));
s = x * x + 4 * x * t / 2;
printf("%.6lf", ... | #include <math.h>
#include <stdio.h>
int main(void) {
int n, m;
double x, h, s, t;
while (1) {
scanf("%d %d", &n, &m);
if (n == 0 && m == 0)
break;
s = 0.0;
x = (double)n;
h = (double)m;
t = sqrt(pow(x / 2.0, 2) + pow(h, 2));
s = x * x + 4 * x * t / 2;
printf("%.6lf\n"... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 121 | 1 |
#include <cstdio>
#include <math.h>
int main() {
int x, h;
double S;
for (;;) {
scanf("%d", &x);
scanf("%d", &h);
if (x == 0 && h == 0)
break;
double th = sqrt((x / 2 * x / 2) + (h * h));
S = x * x;
S += 4 * ((double)x * th / 2);
printf("%f\n", S);
}
return 0;
} | #include <cstdio>
#include <math.h>
int main() {
int x, h;
double S;
for (;;) {
scanf("%d", &x);
scanf("%d", &h);
if (x == 0 && h == 0)
break;
double th = sqrt(((double)x / 2 * (double)x / 2) + (h * h));
S = x * x;
S += 4 * ((double)x * th / 2);
printf("%f\n", S);
}
return... | [["+", 0, 16, 31, 16, 31, 16, 31, 74, 0, 24], ["+", 31, 16, 31, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 16, 31, 16, 31, 16, 31, 74, 0, 25], ["+", 31, 23, 0, 16, 31, 16, 12, 74, 0, 24], ["+", 0, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 31, 23, 0, 16, 31, 16, 12, 74, 0, 25]] | 1 | 113 | 6 |
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int main() {
int x, h;
double s;
while (1) {
cin >> x >> h;
if ((x == 0) && (h == 0))
break;
s = pow(x, 2.0) + x * sqrt(pow(h, 2.0) + pow(x, 2.0) / 4) * 2;
cout << setprecision(6) << s << endl;
... | #include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int main() {
int x, h;
double s;
while (1) {
cin >> x >> h;
if ((x == 0) && (h == 0))
break;
s = pow(x, 2.0) + x * sqrt(pow(h, 2.0) + pow(x, 2.0) / 4) * 2;
cout << fixed << setprecision(6) << s <... | [["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151]] | 1 | 100 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
typedef long long int ll;
using namespace std;
int x, h;
double y;
double ans;
int main() {
while (1) {
cin >> x >> h;
if (x == 0 && h ==... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
typedef long long int ll;
using namespace std;
int x, h;
double y;
double ans;
int main() {
while (1) {
cin >> x >> h;
if (x == 0 && h ==... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 107 | 1 |
#include <bits/stdc++.h>
using namespace std;
int main() {
double x, h;
while (1) {
scanf("%lf %lf", &x, &h);
if (x == 0 && h == 0)
break;
double soku =
sqrt(((double)x * 0.5) * ((double)x * 0.5) + (double)h * (double)h);
printf("%f", (double)x * (double)x + (double)4 * (soku * (double... | #include <bits/stdc++.h>
using namespace std;
int main() {
double x, h;
while (1) {
scanf("%lf %lf", &x, &h);
if (x == 0 && h == 0)
break;
double soku =
sqrt(((double)x * 0.5) * ((double)x * 0.5) + (double)h * (double)h);
printf("%f\n",
(double)x * (double)x + (double)4 * (s... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 115 | 1 |
#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++)
... | [["+", 3, 4, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 3, 4, 0, 16, 12, 16, 31, 23, 0, 25], ["-", 12, 2, 3, 4, 0, 16, 12, 16, 12, 13], ["+", 12, 2, 3, 4, 0, 16, 12, 16, 12, 13], ["-", 0, 11, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 11, 12, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22], ["+", 0, 1,... | 1 | 189 | 8 |
#include <math.h>
#include <stdio.h>
int main(void) {
double x, h, c;
while (1) {
scanf("%f %f", &x, &h);
if (x == 0.0 && h == 0.0)
break;
c = (x / 2.0) * (x / 2.0) + h * h;
c = sqrt(c);
c = x * x + x * c / 2.0 * 4.0;
printf("%f\n", c);
}
return 0;
} | #include <math.h>
#include <stdio.h>
int main(void) {
double x, h, c;
while (1) {
scanf("%lf %lf", &x, &h);
if (x == 0.0 && h == 0.0)
break;
c = (x / 2.0) * (x / 2.0) + h * h;
c = sqrt(c);
c = x * x + x * c / 2.0 * 4.0;
printf("%lf\n", c);
}
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 101 | 4 |
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
double x, h, seihou = 0, naname = 0, y = 0, sannkaku = 0, kotae = 0;
while (true) {
cin >> x >> h;
if (x == 0 && h == 0) {
break;
}
seihou = x * x;
y = x / 2;
naname = sqrt(y * y + h * h);
san... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
double x, h, seihou = 0, naname = 0, y = 0, sannkaku = 0, kotae = 0;
while (true) {
cin >> x >> h;
if (x == 0 && h == 0) {
break;
}
seihou = x * x;
y = x / 2;
naname = sqrt(y * y + h * h);
san... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 117 | 1 |
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define REP(i, j) for (int i = 0; i < j; i++)
#d... | #include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define REP(i, j) for (int i = 0; i < j; i++)
#d... | [["-", 0, 43, 49, 50, 51, 83, 0, 83, 0, 13], ["+", 0, 43, 49, 50, 51, 83, 0, 83, 0, 13]] | 1 | 272 | 2 |
#include <iostream>
#include <string>
int f(char a, char b, char c) {
return ((a != 's' && a == b && a == c) ? a : 0);
}
int main() {
std::string s;
int i, j;
while (getline(std::cin, s)) {
char c = (f(s[0], s[4], s[8]) || f(s[2], s[4], s[6])) ? s[4] : 0;
if (!c) {
for (i = 0; i < 3; i++) {
... | #include <iostream>
#include <string>
int f(char a, char b, char c) {
return ((a != 's' && a == b && a == c) ? a : 0);
}
int main() {
std::string s;
int i, j;
while (getline(std::cin, s)) {
char c = (f(s[0], s[4], s[8]) || f(s[2], s[4], s[6])) ? s[4] : 0;
if (!c) {
for (i = 0; i < 3; i++) {
... | [["-", 3, 4, 0, 69, 341, 342, 0, 16, 12, 13], ["+", 3, 4, 0, 69, 341, 342, 0, 16, 12, 13]] | 1 | 227 | 2 |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigDecimal;
class Main {
static int[][] map = new int[12][12];
static boolean[][] counted = new boolean[12][12];
public static void main(String args[]) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)... |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
class Main {
static int[][] map = new int[12][12];
static boolean[][] counted = new boolean[12][12];
public static void main(String args[]) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... | [["-", 0, 493, 0, 454, 0, 522, 345, 522, 141, 22], ["+", 0, 493, 0, 454, 0, 522, 345, 522, 141, 22], ["-", 36, 36, 0, 493, 0, 454, 0, 522, 141, 22], ["+", 36, 36, 0, 493, 0, 454, 0, 522, 141, 22], ["-", 3, 4, 0, 16, 31, 492, 3, 4, 0, 22], ["+", 3, 4, 0, 16, 31, 492, 3, 4, 0, 22]] | 3 | 493 | 6 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
BufferedReader reader =
... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
BufferedReader reader =
... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]] | 3 | 505 | 2 |
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
static boolean[][] judge;
static int[] fieldX = {-1, 0, 1, 0}, fieldY = {0, -1, 0, 1};
static void doing(int x, int y) {
judge[y][x] = false;
for (int i = 0; i < 4; i++) {
if (judge[y + fieldY[i]][x + fieldX[i]])
doing... | import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
static boolean[][] judge;
static int[] fieldX = {-1, 0, 1, 0}, fieldY = {0, -1, 0, 1};
static void doing(int x, int y) {
judge[y][x] = false;
for (int i = 0; i < 4; i++) {
if (judge[y + fieldY[i]][x + fieldX[i]])
doing... | [["-", 0, 52, 8, 196, 0, 503, 49, 200, 141, 22], ["+", 0, 52, 8, 196, 0, 503, 49, 200, 141, 22], ["-", 8, 196, 0, 57, 64, 1, 0, 27, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 0, 57, 64, 196, 0, 1, 0, 27, 0, 22], ["+", 0, 52, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 8, 196, 0, 1, 0, 492, 3, 4, 0, 22], ["+", 8,... | 3 | 317 | 8 |
import java.util.Scanner;
public class Main {
static Scanner scan = new Scanner(System.in);
static boolean[][] map;
static boolean[][] check;
static int island;
public static void main(String[] args) {
while (true) {
map = new boolean[12][12];
check = new boolean[12][12];
island = 0;
... | import java.util.Scanner;
public class Main {
static Scanner scan = new Scanner(System.in);
static boolean[][] map;
static boolean[][] check;
static int island;
public static void main(String[] args) {
while (scan.hasNext()) {
map = new boolean[12][12];
check = new boolean[12][12];
isla... | [["-", 0, 195, 8, 196, 0, 52, 15, 15, 0, 146], ["+", 8, 196, 0, 52, 15, 15, 0, 492, 500, 22], ["+", 8, 196, 0, 52, 15, 15, 0, 492, 0, 131], ["+", 8, 196, 0, 52, 15, 15, 0, 492, 141, 22], ["+", 0, 52, 15, 15, 0, 492, 3, 4, 0, 24], ["+", 0, 195, 8, 196, 0, 52, 15, 15, 0, 25], ["-", 8, 196, 0, 514, 51, 492, 500, 492, 141,... | 3 | 444 | 8 |
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[][] land = new int[12][12];
int count = 0;
ArrayList<Integer> islandCount = new ArrayList<>();
while (in.hasNext()) {
for (int i ... |
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[][] land = new int[12][12];
int count = 0;
ArrayList<Integer> islandCount = new ArrayList<>();
while (in.hasNext()) {
for (int i ... | [["+", 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 | 353 | 4 |
import java.util.Scanner;
class Main {
static Scanner sc;
static boolean ISCHK[][];
static int num, STATE[][];
public static void main(String[] args) {
sc = new Scanner(System.in);
ISCHK = new boolean[14][14];
STATE = new int[14][14];
String tmpstr = new String("");
while (sc.hasNext()) {
... | import java.util.Scanner;
class Main {
static Scanner sc;
static boolean ISCHK[][];
static int num, STATE[][];
public static void main(String[] args) {
sc = new Scanner(System.in);
ISCHK = new boolean[14][14];
STATE = new int[14][14];
String tmpstr = new String("");
while (sc.hasNext()) {
... | [["-", 0, 1, 0, 11, 31, 504, 71, 16, 17, 72], ["-", 0, 1, 0, 11, 31, 504, 71, 16, 12, 499]] | 3 | 575 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) { new Main().run(); }
char[][] map;
public void run() {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
String str = scan.nextLine();
if (str.equals(" ")) {
continue;
}
map ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) { new Main().run(); }
char[][] map;
public void run() {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
String str = scan.nextLine();
if (str.equals("")) {
continue;
}
map =... | [["-", 15, 15, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 359 | 1 |
#include <stdio.h>
char a[13][13];
int count;
int dx[] = {0, 0, 1, -1};
int dy[] = {-1, 1, 0, 0};
void lake(int i, int j) {
int newx, newy;
int k;
a[i][j] = '0';
// if (a[i][j] == '1'){
for (k = 0; k < 4; k++) {
newx = i + dx[k];
newy = j + dy[k];
if (newx >= 0 && newy >= 0 && newx < 12 && ne... | #include <stdio.h>
char a[13][13];
int count;
int dx[] = {0, 0, 1, -1};
int dy[] = {-1, 1, 0, 0};
void lake(int i, int j) {
int newx, newy;
int k;
a[i][j] = '0';
// if (a[i][j] == '1'){
for (k = 0; k < 4; k++) {
newx = i + dx[k];
newy = j + dy[k];
if (newx >= 0 && newy >= 0 && newx < 12 && ne... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 275 | 2 |
#include <iostream>
#include <math.h>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int map[12][12];
void SagasiteHappy(int i, int j) {
map[i][j] = 0;
if (i >= 0) {
if (map[i - 1][j] == 1) {
SagasiteHappy(i - 1, j);
}
}
if (i < 12) {
if (map[i + 1][j] == 1) {
... | #include <iostream>
#include <math.h>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int map[12][12];
void SagasiteHappy(int i, int j) {
map[i][j] = 0;
if (i > 0) {
if (map[i - 1][j] == 1) {
SagasiteHappy(i - 1, j);
}
}
if (i < 11) {
if (map[i + 1][j] == 1) {
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 350 | 8 |
#include <cstdio>
char field[12][12];
void rec(int i, int j) {
field[i][j] = '0';
if (field[i + 1][j] == '1' && i + 1 < 12)
rec(i + 1, j);
if (field[i - 1][j] == '1' && i - 1 > -1)
rec(i - 1, j);
if (field[i][j + 1] == '1' && j + 1 < 12)
rec(i, j + 1);
if (field[i][j - 1] == '1' && j - 1 > -1)
... | #include <cstdio>
char field[12][12];
void rec(int i, int j) {
field[i][j] = '0';
if (field[i + 1][j] == '1' && i + 1 < 12)
rec(i + 1, j);
if (field[i - 1][j] == '1' && i - 1 > -1)
rec(i - 1, j);
if (field[i][j + 1] == '1' && j + 1 < 12)
rec(i, j + 1);
if (field[i][j - 1] == '1' && j - 1 > -1)
... | [["-", 0, 52, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 103, 0, 104], ["-", 0, 1, 0, 2, 3, 4, 0, 103, 0, 44], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 305 | 7 |
#include <cstdio>
int sima(int x, int y);
char SIMA[14][14];
int main() {
while (scanf("%s", SIMA[1]) != EOF) {
int i, j, ans = 0;
for (i = 2; i < 13; i++) {
scanf("%s", SIMA[i] + 1);
}
for (i = 1; i < 13; i++) {
for (j = 1; j < 13; j++) {
if (SIMA[j][i] == '1') {
ans += ... | #include <cstdio>
int sima(int x, int y);
char SIMA[14][14];
int main() {
while (scanf("%s", SIMA[1] + 1) != EOF) {
int i, j, ans = 0;
for (i = 2; i < 13; i++) {
scanf("%s", SIMA[i] + 1);
}
for (i = 1; i < 13; i++) {
for (j = 1; j < 13; j++) {
if (SIMA[j][i] == '1') {
ans... | [["+", 51, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 51, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 239 | 17 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
char shima[13][13];
void tansaku(int ... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
char shima[13][13];
void tansaku(int ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 7, 8, 9, 0, 57, 64, 116, 0, 117], ["+", 0, 7, 8, 9, 0, 57, 64, 116, 0, 35], ["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 289 | 7 |
#include <algorithm>
#include <cstdio>
using namespace std;
int masu[14][14];
int cont;
void saiki(int x, int y) {
masu[x][y] = 0;
if (masu[x + 1][y] == 1) {
saiki(x + 1, y);
}
if (masu[x - 1][y] == 1) {
saiki(x - 1, y);
}
if (masu[x][y + 1] == 1) {
saiki(x, y + 1);
}
if (masu[x][y - 1] =... | #include <algorithm>
#include <cstdio>
using namespace std;
int masu[14][14];
int cont;
void saiki(int x, int y) {
masu[x][y] = 0;
if (masu[x + 1][y] == 1) {
saiki(x + 1, y);
}
if (masu[x - 1][y] == 1) {
saiki(x - 1, y);
}
if (masu[x][y + 1] == 1) {
saiki(x, y + 1);
}
if (masu[x][y - 1] =... | [["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 345 | 2 |
// 0067
#include <stdio.h>
const int N = 12;
const int P = 4;
char a[N + P][N + P];
void Sink(int x, int y) {
if (a[x][y] == '1') {
a[x][y] = '0';
Sink(x + 1, y);
Sink(x - 1, y);
Sink(x, y + 1);
Sink(x, y - 1);
}
}
int main(void) {
int i, j;
int count = 0;
for (;;) {
count = 0;
... | // 0067
#include <stdio.h>
const int N = 12;
const int P = 4;
char a[N + P][N + P];
void Sink(int x, int y) {
if (a[x][y] == '1') {
a[x][y] = '0';
Sink(x + 1, y);
Sink(x - 1, y);
Sink(x, y + 1);
Sink(x, y - 1);
}
}
int main(void) {
int i, j;
int count = 0;
for (;;) {
count = 0;
... | [["+", 51, 91, 28, 2, 3, 4, 0, 16, 17, 72], ["+", 51, 91, 28, 2, 3, 4, 0, 16, 12, 13], ["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13]] | 1 | 266 | 4 |
#include <cstdio>
#include <iostream>
using namespace std;
char a[12][12];
void irand(int i, int j) {
a[i][j] == '0';
if (i > 0 && a[i - 1][j] == '1')
irand(i - 1, j);
if (j > 0 && a[i][j - 1] == '1')
irand(i, j - 1);
if (i < 11 && a[i + 1][j] == '1')
irand(i + 1, j);
if (j < 11 && a[i][j + 1] == ... | #include <cstdio>
#include <iostream>
using namespace std;
char a[12][12];
void irand(int i, int j) {
a[i][j] = '0';
if (i > 0 && a[i - 1][j] == '1')
irand(i - 1, j);
if (j > 0 && a[i][j - 1] == '1')
irand(i, j - 1);
if (i < 11 && a[i + 1][j] == '1')
irand(i + 1, j);
if (j < 11 && a[i][j + 1] == '... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 281 | 2 |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
string str;
int xs[] = {0, 1, 0, -1}, ys[] = {1, 0, -1, 0};
bool m[10][10];
void dfs(int x, int y) {
for (int i = 0; i < 4; i++) {
int tx = x + xs[i], ty = y + ys[i];
if (tx < 0 || tx >= 12 || ty < 0 || ty >= 12)
continue;
... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
string str;
int xs[] = {0, 1, 0, -1}, ys[] = {1, 0, -1, 0};
bool m[20][20];
void dfs(int x, int y) {
for (int i = 0; i < 4; i++) {
int tx = x + xs[i], ty = y + ys[i];
if (tx < 0 || tx >= 12 || ty < 0 || ty >= 12)
continue;
... | [["-", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13]] | 1 | 288 | 4 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#... | [["+", 0, 52, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 390 | 5 |
#include <array>
#include <iostream>
using namespace std;
array<array<char, 12>, 12> maap;
void dfs(int x, int y) {
maap[x][y] = '0';
int dx[] = {0, -1, 1, 0}, dy[] = {1, 0, 0, -1};
for (int i = 0; i < 4; i++) {
int nx = x + dx[i], ny = y + dy[i];
if (nx >= 0 && nx < 12 && ny >= 0 && nx < 12 && maap[nx][... | #include <array>
#include <iostream>
using namespace std;
array<array<char, 12>, 12> maap;
void dfs(int x, int y) {
maap[x][y] = '0';
int dx[] = {0, -1, 1, 0}, dy[] = {1, 0, 0, -1};
for (int i = 0; i < 4; i++) {
int nx = x + dx[i], ny = y + dy[i];
if (nx >= 0 && nx < 12 && ny >= 0 && ny < 12 && maap[nx][... | [["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22]] | 1 | 260 | 2 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define l... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define l... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 117 | 1 |
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
double x, h;
while (1) {
scanf("%lf %lf", &x, &h);
if (x + h == 0)
break;
else
printf("%lf", (x * x) + 2 * x * sqrt((h * h) + ((x / 2) * (x / 2))));
}
return 0;
} | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
double x, h;
while (1) {
scanf("%lf %lf", &x, &h);
if (x + h == 0)
break;
else
printf("%lf\n", (x * x) + 2 * x * sqrt((h * h) + ((x / 2) * (x / 2))));
}
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 94 | 1 |
#!/usr/bin/env ruby
while (x = gets.to_f, h = gets.to_f) != [0, 0]
hh = (x / 2 * x / 2 + h * h) ** 0.5
puts format '%.6f', x * x + x * hh * 2
end | while (x, h = gets.to_f, gets.to_f) != [0, 0]
hh = (x / 2 * x / 2 + h * h) ** 0.5
puts format '%.6f', x * x + x * hh * 2
end | [["+", 15, 738, 31, 739, 0, 662, 31, 761, 0, 21], ["+", 15, 738, 31, 739, 0, 662, 31, 761, 0, 22], ["-", 31, 739, 0, 662, 12, 762, 0, 662, 31, 22], ["-", 31, 739, 0, 662, 12, 762, 0, 662, 0, 32]] | 4 | 54 | 4 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (true) {
int h = scanner.nextInt();
int m = scanner.nextInt();
int s = scanner.nextInt();
if (h == -1 && m == -1 && s == 0) {
break;
... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (true) {
int h = scanner.nextInt();
int m = scanner.nextInt();
int s = scanner.nextInt();
if (h == -1 && m == -1 && s == -1) {
break;
... | [["-", 0, 57, 15, 15, 0, 16, 12, 16, 12, 499], ["+", 15, 15, 0, 16, 12, 16, 12, 91, 17, 33], ["+", 15, 15, 0, 16, 12, 16, 12, 91, 439, 499]] | 3 | 172 | 3 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int h = sc.nextInt(), d = sc.nextInt(), s = sc.nextInt();
if (h == -1 & d == -1 & s == -1)
break;
int sum = h * 3600 + d * 60 + s;
int ans1 = 2 *... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int h = sc.nextInt(), d = sc.nextInt(), s = sc.nextInt();
if (h == -1 & d == -1 & s == -1)
break;
int sum = h * 3600 + d * 60 + s;
int ans1 = 2 *... | [["+", 0, 503, 49, 200, 51, 16, 31, 16, 17, 48], ["+", 0, 503, 49, 200, 51, 16, 31, 16, 12, 499], ["-", 0, 503, 49, 200, 51, 16, 12, 16, 17, 85], ["+", 0, 503, 49, 200, 51, 16, 12, 16, 17, 48]] | 3 | 170 | 4 |
import java.util.Scanner;
// Videotape
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int h = sc.nextInt();
int m = sc.nextInt();
int s = sc.nextInt();
if (h == -1)
break;
int x = h * 3600 + m * 60 + s;
... | import java.util.Scanner;
// Videotape
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int h = sc.nextInt();
int m = sc.nextInt();
int s = sc.nextInt();
if (h == -1)
break;
int x = h * 3600 + m * 60 + s;
... | [["+", 0, 503, 49, 200, 51, 16, 31, 16, 17, 48], ["+", 0, 503, 49, 200, 51, 16, 31, 16, 12, 499], ["-", 0, 503, 49, 200, 51, 16, 12, 16, 17, 85], ["+", 0, 503, 49, 200, 51, 16, 12, 16, 17, 48]] | 3 | 208 | 4 |
import java.util.Scanner;
// Videotape
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int h = sc.nextInt();
int m = sc.nextInt();
int s = sc.nextInt();
if (h == -1)
break;
int x = h * 3600 + m * 60 + s;
... | import java.util.Scanner;
// Videotape
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int h = sc.nextInt();
int m = sc.nextInt();
int s = sc.nextInt();
if (h == -1)
break;
int x = h * 3600 + m * 60 + s;
... | [["-", 8, 196, 0, 52, 8, 196, 0, 503, 0, 35], ["-", 0, 52, 8, 196, 0, 1, 0, 11, 31, 22], ["-", 0, 52, 8, 196, 0, 1, 0, 11, 17, 90], ["+", 0, 503, 49, 200, 51, 16, 12, 16, 17, 48]] | 3 | 163 | 4 |
import java.awt.geom.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
private void doit() {
Scanner sc = new Scanner(System.in);
int max = 2 * 3600;
while (true) {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();... | import java.awt.geom.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
private void doit() {
Scanner sc = new Scanner(System.in);
int max = 2 * 3600;
while (true) {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();... | [["-", 8, 196, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 8, 196, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22], ["-", 0, 1, 0, 11, 12, 16, 12, 16, 17, 85], ["+", 8, 196, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 16, 17, 48]] | 3 | 242 | 6 |
#include <stdio.h>
int main(void) {
int t, h, s, tmp, at, ah, as;
while (1) {
scanf("%d %d %d", &t, &h, &s);
if (t < 0)
break;
tmp = 2 * 3600 - (t * 3600 + h * 60 + s);
at = tmp / 3600;
tmp %= 3600;
ah = tmp / 60;
as = tmp % 60;
printf("%02d:%02d:%02d\n", at, ah, as);
tmp =... | #include <stdio.h>
int main(void) {
int t, h, s, tmp, at, ah, as;
while (1) {
scanf("%d %d %d", &t, &h, &s);
if (t < 0)
break;
tmp = 2 * 3600 - (t * 3600 + h * 60 + s);
at = tmp / 3600;
tmp %= 3600;
ah = tmp / 60;
as = tmp % 60;
printf("%02d:%02d:%02d\n", at, ah, as);
tmp =... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["-", 0, 11, 12, 16, 12, 16, 31, 23, 0, 24], ["-", 0, 1, 0, 11, 12, 16, 12, 16, 17, 85], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48]] | 0 | 169 | 4 |
#include <stdio.h>
int main(void) {
int t, h, s, m, h3, m3, s3;
while (1) {
scanf("%d %d %d", &t, &h, &s);
if ((t == -1) && (h == -1) && (s == -1))
break;
m = (t * 60 + h) * 60 + s;
m3 = 7200 - (m / 3);
s3 = m3 % 60;
h3 = (m3 / 60) / 60;
m3 = (m3 / 60) % 60;
m = 7200 - m;
... | #include <stdio.h>
int main(void) {
int t, h, s, m, h3, m3, s3;
while (1) {
scanf("%d %d %d", &t, &h, &s);
if ((t == -1) && (h == -1) && (s == -1))
break;
m = (t * 60 + h) * 60 + s;
m3 = (7200 - m) * 3;
s3 = m3 % 60;
h3 = (m3 / 60) / 60;
m3 = (m3 / 60) % 60;
m = 7200 - m;
... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 17, 85], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 0 | 181 | 6 |
main(h, m, s) {
for (; scanf("%d%d%d", &h, &m, &s), ~h;) {
int left = 7200 - 60 * (60 * h + m) + s;
printf("%02d:%02d:%02d\n", left / 3600, left % 3600 / 60, left % 60);
left *= 3;
printf("%02d:%02d:%02d\n", left / 3600, left % 3600 / 60, left % 60);
}
exit(0);
} | main(h, m, s) {
for (; scanf("%d%d%d", &h, &m, &s), ~h;) {
int left = 7200 - (60 * (60 * h + m) + s);
printf("%02d:%02d:%02d\n", left / 3600, left % 3600 / 60, left % 60);
left *= 3;
printf("%02d:%02d:%02d\n", left / 3600, left % 3600 / 60, left % 60);
}
exit(0);
} | [["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 25]] | 0 | 106 | 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)
int main() {
... | #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)
int main() {
... | [["+", 12, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 25]] | 1 | 205 | 2 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int H, M, S;
while (cin >> H >> M >> S, H != -1 && M != -1 && S != -1) {
S += M * 60 + H * 3600;
S = 2 * 3600 - S;
printf("%02d:%02d:%02d\n", S / 3600, S / 60, S % 60);
S *= 3;
printf("%02d:%02d:%02d\n"... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int H, M, S;
while (cin >> H >> M >> S, H != -1 && M != -1 && S != -1) {
S += M * 60 + H * 3600;
S = 2 * 3600 - S;
printf("%02d:%02d:%02d\n", S / 3600, S / 60 % 60, S % 60);
S *= 3;
printf("%02d:%02d:%0... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 114 | 2 |
#include <iostream>
using namespace std;
int main() {
int a, b, c;
while (cin >> a >> b >> c, a != -1 || b != -1 || c != -1) {
int now = a * 3600 + b * 60 + c;
int ans = 7200 - now;
cout << "0" << ans / 3600 << ":";
if (ans % 3600 / 60 < 10)
cout << "0";
cout << ans % 3600 / 60 << ":";
... | #include <iostream>
using namespace std;
int main() {
int a, b, c;
while (cin >> a >> b >> c, a != -1 || b != -1 || c != -1) {
int now = a * 3600 + b * 60 + c;
int ans = 7200 - now;
cout << "0" << ans / 3600 << ":";
if (ans % 3600 / 60 < 10)
cout << "0";
cout << ans % 3600 / 60 << ":";
... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 17, 85], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 204 | 6 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define rp(a) while (a--)
#define pb pus... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define rp(a) while (a--)
#define pb pus... | [["-", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22], ["-", 0, 1, 0, 11, 12, 16, 12, 16, 17, 85], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 108]] | 1 | 194 | 6 |
#include <cstdio>
using namespace std;
int main() {
int h, m, s;
while (1) {
int tmp;
int stan, stan_3;
scanf("%d %d %d", &h, &m, &s);
if (h == -1 && m == -1 && s == -1) {
break;
}
tmp = h * 3600 + m * 60 + s;
// printf("tmp=%d\n", tmp);
stan = 7200 - tmp;
stan_3 = 7... | #include <cstdio>
using namespace std;
int main() {
int h, m, s;
while (1) {
int tmp;
int stan, stan_3;
scanf("%d %d %d", &h, &m, &s);
if (h == -1 && m == -1 && s == -1) {
break;
}
tmp = h * 3600 + m * 60 + s;
// printf("tmp=%d\n", tmp);
stan = 7200 - tmp;
stan_3 = s... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 17, 85], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["-", 0, 1, 0, 11,... | 1 | 209 | 8 |
#include <cstdio>
#include <iostream>
using namespace std;
int s[3], t[3], u[3], _time, vtime;
void printtime(int sec) {
printf("%02d;%02d:%02d\n", sec / 3600, (sec / 60) % 60, sec % 60);
}
int main() {
while (true) {
cin >> s[0] >> s[1] >> s[2];
if (s[0] == -1) {
break;
}
_time = s[0] * 360... | #include <cstdio>
#include <iostream>
using namespace std;
int s[3], t[3], u[3], _time, vtime;
void printtime(int sec) {
printf("%02d:%02d:%02d\n", sec / 3600, (sec / 60) % 60, sec % 60);
}
int main() {
while (true) {
cin >> s[0] >> s[1] >> s[2];
if (s[0] == -1) {
break;
}
_time = s[0] * 360... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 145 | 2 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define FOR(i, a, b) fo... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define FOR(i, a, b) fo... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 31, 22], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 17, 85], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 48]] | 1 | 223 | 6 |
#include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repr(i, a, n) for (int i = a; i >= n; i--)
#define INF 999999999
#define INF_M 2147483647
#define pb(a) push_back(a)
using namespace std;
typedef pair<int, int> pii;
typedef long long int ll;
int main() {
int t, h, s;
while (cin >> t... | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repr(i, a, n) for (int i = a; i >= n; i--)
#define INF 999999999
#define INF_M 2147483647
#define pb(a) push_back(a)
using namespace std;
typedef pair<int, int> pii;
typedef long long int ll;
int main() {
int t, h, s;
while (cin >> t... | [["-", 8, 9, 0, 52, 8, 9, 0, 52, 0, 89], ["+", 8, 9, 0, 52, 8, 9, 0, 57, 0, 121]] | 1 | 193 | 2 |
#include <cstdio>
using namespace std;
int main() {
int t, h, s, max = 2 * 60 * 60;
while (scanf("%d %d %d", &t, &h, &s) && t != -1) {
int ss = max - (s + h * 60 + t * 60 * 60);
printf("%02d:%02d:%02d\n", ss / 60 / 60, ss / 60, ss % 60);
ss *= 3;
printf("%02d:%02d:%02d\n", ss / 60 / 60, ss / 60 % ... | #include <cstdio>
using namespace std;
int main() {
int t, h, s, max = 2 * 60 * 60;
while (scanf("%d %d %d", &t, &h, &s) && t != -1) {
int ss = max - (s + h * 60 + t * 60 * 60);
printf("%02d:%02d:%02d\n", ss / 60 / 60, ss / 60 % 60, ss % 60);
ss *= 3;
printf("%02d:%02d:%02d\n", ss / 60 / 60, ss / ... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 123 | 2 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define vi vector<int>
#define vvi vector<vector<int>>
#define ll long long int
#def... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define vi vector<int>
#define vvi vector<vector<int>>
#define ll long long int
#def... | [["-", 0, 52, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 22]] | 1 | 240 | 2 |
#include "bits/stdc++.h"
using namespace std;
using namespace std;
int main() {
int a, b, c;
while (cin >> a >> b >> c) {
if (a == -1 || b == -1 || c == -1)
break;
int second = 7200 - (a * 3600 + b * 60 + c);
printf("%02d:%02d:%02d\n", second / 3600, second / 60, second % 60);
second = second... | #include "bits/stdc++.h"
using namespace std;
using namespace std;
int main() {
int a, b, c;
while (cin >> a >> b >> c) {
if (a == -1 || b == -1 || c == -1)
break;
int second = 7200 - (a * 3600 + b * 60 + c);
printf("%02d:%02d:%02d\n", second / 3600, second / 60 % 60, second % 60);
second = s... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 118 | 2 |
#include <stdio.h>
int main() {
int t, h, s, sum;
while (scanf("%d %d %d", &t, &h, &s), t != -1 && h != -1 && s != -1) {
sum = 120 * 60 - t * 3600 - h * 60 - s;
printf("%02d:%02d:%02d\n", sum / 3600, sum / 60, sum % 60);
sum *= 3;
printf("%02d:%02d:%02d\n", sum / 3600, (sum / 60) % 60, sum % 60);
... | #include <stdio.h>
int main() {
int t, h, s, sum;
while (scanf("%d %d %d", &t, &h, &s), t != -1 && h != -1 && s != -1) {
sum = 120 * 60 - t * 3600 - h * 60 - s;
printf("%02d:%02d:%02d\n", sum / 3600, (sum / 60) % 60, sum % 60);
sum *= 3;
printf("%02d:%02d:%02d\n", sum / 3600, (sum / 60) % 60, sum % ... | [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109]] | 1 | 118 | 4 |
#include <cstdio>
using namespace std;
int main() {
int h, m, s, r1, r3;
while (scanf("%d %d %d", &h, &m, &s), h != -1 && m != -1 && s != -1) {
r1 = 120 * 60 - ((h * 60) + m) * 60 + s;
r3 = r1 * 3;
printf("%02d:%02d:%02d\n", r1 / 3600, (r1 / 60) % 60, r1 % 60);
printf("%02d:%02d:%02d\n", r3 / 3600... | #include <cstdio>
using namespace std;
int main() {
int h, m, s, r1, r3;
while (scanf("%d %d %d", &h, &m, &s), h != -1 && m != -1 && s != -1) {
r1 = 120 * 60 - (((h * 60) + m) * 60 + s);
r3 = r1 * 3;
printf("%02d:%02d:%02d\n", r1 / 3600, (r1 / 60) % 60, r1 % 60);
printf("%02d:%02d:%02d\n", r3 / 36... | [["+", 31, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]] | 1 | 129 | 2 |
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
void printTime(int sec) {
printf("%02d:%02d:%02... | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
void printTime(int sec) {
printf("%02d:%02d:%02... | [["+", 0, 2, 3, 4, 0, 16, 31, 16, 17, 48], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["-", 0, 2, 3, 4, 0, 16, 12, 16, 17, 85], ["+", 0, 2, 3, 4, 0, 16, 12, 16, 17, 48]] | 1 | 154 | 4 |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int toSec(int h, int m, int s) { return (h * 60 + m) * 60 + s; }
vector<int> toHms(int sec) {
vector<int> v;
v.push_back(sec / (60 * 60));
sec -= v[0] * 60 * 60;
v.push_back(sec / 60);
v.push_back(sec - v[1] * ... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int toSec(int h, int m, int s) { return (h * 60 + m) * 60 + s; }
vector<int> toHms(int sec) {
vector<int> v;
v.push_back(sec / (60 * 60));
sec -= v[0] * 60 * 60;
v.push_back(sec / 60);
v.push_back(sec - v[1] * ... | [["+", 12, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["-", 3, 4, 0, 16, 31, 2, 3, 4, 0, 13], ["+", 31, 23, 0, 16, 31, 2, 3, 4, 0, 13], ["+", 12, 2, 3, 4, 0, 16, 31, 23, 0, 25], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 48], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 257 | 6 |
#include <cstdio>
int h, m, s;
main() {
while (scanf("%d%d%d", &h, &m, &s) && h != -1) {
int r = 7200 - (h * 60 + m) * 60 + s;
for (int i = 0; i < 2; i++, r *= 3) {
printf("%02d:%02d:%02d\n", r / 60 / 60, (r / 60) % 60, r % 60);
}
}
return 0;
} | #include <cstdio>
int h, m, s;
main() {
while (scanf("%d%d%d", &h, &m, &s) && h != -1) {
int r = 7200 - (h * 60 + m) * 60 - s;
for (int i = 0; i < 2; i++, r *= 3) {
printf("%02d:%02d:%02d\n", r / 60 / 60, (r / 60) % 60, r % 60);
}
}
return 0;
} | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33]] | 1 | 104 | 2 |
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <vector>
#define all(n... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <vector>
#define all(n... | [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["-", 0, 2, 3, 4, 0, 16, 12, 16, 17, 85], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 48]] | 1 | 467 | 4 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, -1, 1};
void print_hms(int sec) {
i... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, -1, 1};
void print_hms(int sec) {
i... | [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["-", 0, 2, 3, 4, 0, 16, 12, 16, 17, 85], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 48]] | 1 | 180 | 4 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int h, m, s, total, h1, m1, s1, total1;
while (1) {
cin >> h >> m >> s;
if (h == -1 && m == -1 && s == -1) {
break;
}
total1 = h * 3600 + m * 60 + s;
total1 = 120 * 60 - total1;
total1 *= 3;
total = h * 3600 ... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int h, m, s, total, h1, m1, s1, total1;
while (1) {
cin >> h >> m >> s;
if (h == -1 && m == -1 && s == -1) {
break;
}
total1 = h * 3600 + m * 60 + s;
total1 = 120 * 60 - total1;
total1 *= 3;
total = h * 3600 ... | [["-", 0, 52, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 22]] | 1 | 183 | 2 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int h, m, s;
int time;
int nokori, nokori3;
while (1) {
cin >> h >> m >> s;
if (h == -1 && m == -1 && s == -1) {
break;
}
time = 3600 * h + 60 * m + s;
nokori = 7200 - time;
nokori3 = 7200 - (time / 3);
... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int h, m, s;
int time;
int nokori, nokori3;
while (1) {
cin >> h >> m >> s;
if (h == -1 && m == -1 && s == -1) {
break;
}
time = 3600 * h + 60 * m + s;
nokori = 7200 - time;
nokori3 = nokori * 3;
printf(... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 17, 85], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["-", 0, 1, 0, 11,... | 1 | 172 | 8 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#... | [["-", 0, 52, 8, 9, 0, 1, 0, 11, 17, 90], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 108], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13]] | 1 | 330 | 4 |
loop do
record_time=2*3600#????????§???????§???°
time=gets.chomp.split(nil).map(&:to_i)
break if time.all?{|x|x==-1}
t=time[2]
t+=time[1]*60
t+=time[0]*3600
#?¨??????????
rest_of_time=record_time-t
h=rest_of_time/3600#hour
m=(rest_of_time%3600)/60#minute
s=rest_of_t... | loop do
record_time=2*3600#????????§???????§???°
time=gets.chomp.split(nil).map(&:to_i)
break if time.all?{|x|x==-1}
t=time[2]
t+=time[1]*60
t+=time[0]*3600
#?¨??????????
rest_of_time=record_time-t
h=rest_of_time/3600#hour
m=(rest_of_time%3600)/60#minute
s=rest_of_time%60#sec... | [["-", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 736, 0, 662, 12, 738, 31, 739, 0, 24], ["-", 8, 736, 0, 662, 12, 738, 12, 738, 17, 85], ["+", 8, 736, 0, 662, 12, 738, 31, 739, 0, 25], ["+", 196, 737, 8, 736, 0, 662, 12, 738, 17, 48]] | 4 | 145 | 8 |
MAX = 120 * 60
def print_remaining_time(diff)
min, ans_second = diff.divmod(60)
ans_hour, ans_minite = min.divmod(60)
printf "%02d:%02d:%02d\n", ans_hour, ans_minite, ans_second
end
readlines.each do |line|
t, h, s = line.chomp.split.map(&:to_i)
break if t == -1 && h == -1 && s == -1
second = t * 60 * 6... | MAX = 120 * 60
def print_remaining_time(diff)
min, ans_second = diff.divmod(60)
ans_hour, ans_minite = min.divmod(60)
printf "%02d:%02d:%02d\n", ans_hour, ans_minite, ans_second
end
readlines.each do |line|
t, h, s = line.chomp.split.map(&:to_i)
break if t == -1 && h == -1 && s == -1
second = t * 60 * 6... | [["+", 0, 652, 3, 4, 0, 738, 31, 739, 0, 24], ["-", 0, 652, 3, 4, 0, 738, 12, 738, 17, 85], ["+", 0, 652, 3, 4, 0, 738, 31, 739, 0, 25], ["+", 8, 736, 0, 652, 3, 4, 0, 738, 17, 48]] | 4 | 110 | 4 |
def zan(total, flag):
rest = 7200 - total if flag else 7200 - total // 3
t, rest = divmod(rest, 3600)
h, s = divmod(rest, 60)
print("{0:02d}:{1:02d}:{2:02d}".format(t, h, s))
while True:
T, H, S = map(int, input().split())
if T == -1:
break
total = T * 3600 + H * 60 + S
for i in... | def zan(total, flag):
rest = 7200 - total if flag else (7200 - total) * 3
t, rest = divmod(rest, 3600)
h, s = divmod(rest, 60)
print("{0:02d}:{1:02d}:{2:02d}".format(t, h, s))
while True:
T, H, S = map(int, input().split())
if T == -1:
break
total = T * 3600 + H * 60 + S
for i i... | [["+", 0, 662, 12, 41, 0, 657, 31, 23, 0, 24], ["-", 0, 662, 12, 41, 0, 657, 12, 657, 17, 676], ["+", 0, 662, 12, 41, 0, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 662, 12, 41, 0, 657, 17, 48]] | 5 | 110 | 4 |
while True:
t, h, s = map(int, input().split())
if t == -1:
break
rest = []
rest.append(7200 - (3600*t + 60*h + s))
rest.append(rest[0]*3)
for r in rest:
t = 0
h = 0
s = 0
if r >= 3600:
t = r//3600
r -= 3600*t
if r >= 60:
... | while True:
t, h, s = map(int, input().split())
if t == -1:
break
rest = []
rest.append(7200 - (3600*t + 60*h + s))
rest.append(rest[0]*3)
for r in rest:
t = 0
h = 0
if r >= 3600:
t = r//3600
r -= 3600*t
if r >= 60:
h = ... | [["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 12, 612], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 120 | 5 |
p=lambda x:print(f'{x//3600:02}:{x//60%60:02}:{x%60:02}')
for e in iter(input,'-1'):
h,m,s=map(int,e.split())
d=7200-h*3600-m*60-s
p(d);p(d*3)
| p=lambda x:print(f'{x//3600:02}:{x//60%60:02}:{x%60:02}')
for e in iter(input,'-1 -1 -1'):
h,m,s=map(int,e.split())
d=7200-h*3600-m*60-s
p(d);p(d*3)
| [["-", 0, 7, 12, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 7, 12, 652, 3, 4, 0, 557, 0, 6]] | 5 | 87 | 2 |
#!/usr/bin/python
# coding: utf-8
while True:
h, m, s = list(map(int, input().split()))
if h == m == s == -1:
break
full = 2 * 3600
rest = full - (h * 3600 + m * 60 + s)
h = int(rest / 3600)
m = int((rest - h * 3600) / 60)
s = rest - h * 3600 - m * 60
th = int(rest / 1200)
... | #!/usr/bin/python
# coding: utf-8
while True:
h, m, s = list(map(int, input().split()))
if h == m == s == -1:
break
full = 2 * 3600
rest = full - (h * 3600 + m * 60 + s)
h = int(rest / 3600)
m = int((rest - h * 3600) / 60)
s = rest - h * 3600 - m * 60
th = int(rest / 1200)
... | [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 48], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 153 | 4 |
def f(t):
c,t=t%N,t/N
print("%02d:%02d:%02d"%(t/N,t%N,c))
return
while True:
h,m,s=list(map(int,input().split()))
if [h,m,s]==[-1,-1,-1]: break
t=7200-(h*N+m)*N-s
f(t)
f(t*3) | N=60
def f(t):
c,t=t%N,t/N
print("%02d:%02d:%02d"%(t/N,t%N,c))
return
while True:
h,m,s=list(map(int,input().split()))
if [h,m,s]==[-1,-1,-1]: break
t=7200-(h*N+m)*N-s
f(t)
f(t*3) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 106 | 3 |
while (!feof(STDIN)) {
$stdin = trim(fgets(STDIN));
$values = explode(',', $stdin);
if (count($values) != 3) {
} else {
list($no, $weight, $height) = $values;
$bmi = $weight / pow($height, 2);
if ($bmi >= 25) {
echo $no . "\n";
}
}
} | <?php
while (!feof(STDIN)) {
$stdin = trim(fgets(STDIN));
$values = explode(',', $stdin);
if (count($values) != 3) {
} else {
list($no, $weight, $height) = $values;
$bmi = $weight / pow($height, 2);
if ($bmi >= 25) {
echo $no . "\n";
}
}
} | [["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605]] | 6 | 95 | 1 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNextInt()) {
String str = sc.next();
String[] a = str.split(",", 0);
double[] b = new double[3];
for (int i = 0; i < 3; i++)
b[i] = Double.parseDouble(a[... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String str = sc.next();
String[] a = str.split(",", 0);
double[] b = new double[3];
for (int i = 0; i < 3; i++)
b[i] = Double.parseDouble(a[i])... | [["-", 8, 196, 0, 52, 15, 15, 0, 492, 141, 22], ["+", 8, 196, 0, 52, 15, 15, 0, 492, 141, 22]] | 3 | 145 | 2 |
import java.text.DecimalFormat;
import java.util.Scanner;
public class Main {
private Scanner sc;
public static void main(String[] args) { new Main(); }
public Main() {
sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String[] nico = sc.nextLine().split(",");
double w = Double.parse... | import java.text.DecimalFormat;
import java.util.Scanner;
public class Main {
private Scanner sc;
public static void main(String[] args) { new Main(); }
public Main() {
sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String[] nico = sc.nextLine().split(",");
double w = Double.parse... | [["+", 0, 57, 15, 15, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["+", 0, 57, 15, 15, 0, 16, 31, 23, 0, 25]] | 3 | 132 | 4 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
* BMI
*/
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
* BMI
*/
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line... | [["+", 15, 15, 0, 16, 31, 16, 12, 23, 0, 24], ["+", 15, 15, 0, 16, 31, 16, 12, 23, 0, 25]] | 3 | 177 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
String[] s = in.nextLine().split(",");
String num = s[0];
double w = Double.parseDouble(s[1]);
double h = Double.parseDouble(s[1]);
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
String[] s = in.nextLine().split(",");
String num = s[0];
double w = Double.parseDouble(s[1]);
double h = Double.parseDouble(s[2]);
... | [["-", 49, 200, 51, 492, 3, 4, 0, 504, 71, 499], ["+", 49, 200, 51, 492, 3, 4, 0, 504, 71, 499]] | 3 | 120 | 2 |
#include <stdio.h>
int main(void) {
float BMI[100], weight[100], height[100];
int Num[100];
int i = 0, count = 0;
while (scanf("%d,%f,%f", &Num[i], &weight[i], &height[i]) != EOF) {
i++;
count++;
}
for (i = 0; i < count; i++) {
BMI[i] = weight[i] / (height[i] * height[i]);
}
for (i = 0; i... | #include <stdio.h>
int main(void) {
float BMI[100], weight[100], height[100];
int Num[100];
int i = 0, count = 0;
while (scanf("%d,%f,%f", &Num[i], &weight[i], &height[i]) != EOF) {
i++;
count++;
}
for (i = 0; i < count; i++) {
BMI[i] = weight[i] / (height[i] * height[i]);
}
for (i = 0; i... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 20], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 155 | 5 |
#include <stdio.h>
int main() {
int n;
double w;
double h;
while (scanf("%d,%lf,%lf", &n, &w, &h) != EOF) {
double bmi;
bmi = w / (h * h);
if (bmi >= 25) {
printf("%d", n);
}
}
return 0;
} | #include <stdio.h>
int main() {
int n;
double w;
double h;
while (scanf("%d,%lf,%lf", &n, &w, &h) != EOF) {
double bmi;
bmi = w / (h * h);
if (bmi >= 25) {
printf("%d\n", n);
}
}
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 72 | 1 |
#include <stdio.h>
int main() {
int n, num[100], i = 0, j;
double w, h, bmi;
for (j = 0; j < 100; j++)
num[j] = 0;
while (scanf("%d,%lf,%lf", &n, &w, &h) != EOF) {
bmi = h * h;
bmi = w / bmi;
if (bmi >= 25) {
num[i] = n;
i++;
}
// }
for (j = 0; j < i; j++)
printf... | #include <stdio.h>
int main() {
int n, num[100], i = 0, j;
double w, h, bmi;
for (j = 0; j < 100; j++)
num[j] = 0;
while (scanf("%d,%lf,%lf", &n, &w, &h) != EOF) {
bmi = h * h;
bmi = w / bmi;
if (bmi >= 25) {
num[i] = n;
i++;
}
}
for (j = 0; j < i; j++)
printf("%d\n", ... | [["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 0 | 131 | 2 |
#include <stdio.h>
int main(void) {
int number[100];
double weight[100], height[100];
double bmi[100];
int i;
i = 0;
while (scanf("%d", &number[i]) != EOF) {
scanf("%lf %lf", &weight[i], &height[i]);
bmi[i] = weight[i] / height[i] / height[i];
if (bmi[i] >= 25) {
printf("%d\n", number[i]);... | #include <stdio.h>
int main(void) {
int number[100];
double weight[100], height[100];
double bmi[100];
int i;
i = 0;
while (scanf("%d,", &number[i]) != EOF) {
scanf("%lf,%lf", &weight[i], &height[i]);
bmi[i] = weight[i] / height[i] / height[i];
if (bmi[i] >= 25) {
printf("%d\n", number[i])... | [["-", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 16, 31, 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, 6]] | 0 | 127 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.