buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k | change_count int64 0 100 |
|---|---|---|---|---|---|
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
double xa, ya, ra, xb, yb, rb, d;
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> xa >> ya >> ra >> xb >> yb >> rb;
d = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
double xa, ya, ra, xb, yb, rb, d;
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> xa >> ya >> ra >> xb >> yb >> rb;
d = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb... | [["-", 12, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 12, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 12, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["+", 12, 16, 12, 2, 3, 4, 0, 16, 12, 22]] | 1 | 204 | 6 |
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#inclu... | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#inclu... | [["-", 0, 100, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 0, 100, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 944 | 2 |
#include <algorithm>
#include <complex>
#include <iostream>
#include <map>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define rep(i, n) for (int i = 0; i < (n); i++)
typ... | #include <algorithm>
#include <complex>
#include <iostream>
#include <map>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define rep(i, n) for (int i = 0; i < (n); i++)
typ... | [["-", 12, 23, 0, 41, 15, 23, 0, 16, 31, 22], ["+", 12, 23, 0, 41, 15, 23, 0, 16, 31, 22], ["-", 12, 23, 0, 41, 15, 23, 0, 16, 12, 22], ["+", 12, 23, 0, 41, 15, 23, 0, 16, 12, 22]] | 1 | 468 | 4 |
#include <cmath>
#include <iostream>
double dist(double xa, double ya, double xb, double yb) {
return sqrt((xb - xa) * (xb - xa) + (yb - ya) * (yb - ya));
}
int main() {
int n;
std::cin >> n;
for (int i = 0; i < n; ++i) {
double xa, ya, ra, xb, yb, rb;
std::cin >> xa >> ya >> ra >> xb >> yb >> rb;
... | #include <cmath>
#include <iostream>
double dist(double xa, double ya, double xb, double yb) {
return sqrt((xb - xa) * (xb - xa) + (yb - ya) * (yb - ya));
}
int main() {
int n;
std::cin >> n;
for (int i = 0; i < n; ++i) {
double xa, ya, ra, xb, yb, rb;
std::cin >> xa >> ya >> ra >> xb >> yb >> rb;
... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]] | 1 | 184 | 4 |
#include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double xa, ya, ra, xb, yb, rb;
cin >> xa >> ya >> ra >> xb >> yb >> rb;
double dsq = pow(xb - xa, 2.0) + pow(yb - ya, 2.0);
if (dsq > ra + rb) {
cout <<... | #include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double xa, ya, ra, xb, yb, rb;
cin >> xa >> ya >> ra >> xb >> yb >> rb;
double dsq = pow(xb - xa, 2.0) + pow(yb - ya, 2.0);
if (sqrt(dsq) > ra + rb) {
c... | [["+", 0, 57, 15, 339, 51, 16, 31, 2, 63, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 24], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 158 | 7 |
#include <cmath>
#include <iostream>
#include <vector>
int check_intersection(const double ra, const double rb,
const double distance) {
if (distance >= (ra + rb)) {
return 0;
} else if (ra > rb) {
return ((distance + rb) < ra) ? 2 : 1;
} else {
return ((distance + ra) < rb) ? ... | #include <cmath>
#include <iostream>
#include <vector>
int check_intersection(const double ra, const double rb,
const double distance) {
if (distance > (ra + rb)) {
return 0;
} else if (ra > rb) {
return ((distance + rb) < ra) ? 2 : 1;
} else {
return ((distance + ra) < rb) ? -... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22], ["+", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22]] | 1 | 273 | 4 |
#include <iostream>
#include <vector>
inline int func(const int x) { return x * x; }
int state_circles(const std::vector<double> &a, const std::vector<double> &b) {
double d;
d = func(a[0] - b[0]) + func(a[1] - b[1]);
if (func(a[2] + b[2]) < d)
return 0;
if (func(a[2] - b[2]) > d) {
if (a[2] > b[2])
... | #include <iostream>
#include <vector>
inline double func(const double x) { return x * x; }
int state_circles(const std::vector<double> &a, const std::vector<double> &b) {
double d;
d = func(a[0] - b[0]) + func(a[1] - b[1]);
if (func(a[2] + b[2]) < d)
return 0;
if (func(a[2] - b[2]) > d) {
if (a[2] > b... | [["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40]] | 1 | 236 | 4 |
#include <algorithm>
#include <iostream>
int main() {
int n;
while (std::cin >> n, n) {
int max = 0, before;
std::cin >> before;
for (int i = 1, a; i < n; i++) {
std::cin >> a;
before = std::max(before + a, a);
max = std::max(max, before);
}
std::cout << max << std::endl;
... | #include <algorithm>
#include <iostream>
int main() {
int n;
while (std::cin >> n, n) {
int max, before;
std::cin >> before;
max = before;
for (int i = 1, a; i < n; i++) {
std::cin >> a;
before = std::max(before + a, a);
max = std::max(max, before);
}
std::cout << max... | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 99 | 6 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, a[5001];
while (cin >> n) {
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int maxseq = -100001;
for (int i = 0; i < n; i++) {
int sum = 0;
for (int j = 0; i + j < n; j++) {
sum += a[i + j];
... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, a[5001];
while (cin >> n, n) {
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int maxseq = -100001;
for (int i = 0; i < n; i++) {
int sum = 0;
for (int j = 0; i + j < n; j++) {
sum += a[i + j];... | [["+", 8, 9, 0, 52, 15, 339, 51, 34, 0, 21], ["+", 8, 9, 0, 52, 15, 339, 51, 34, 12, 22]] | 1 | 124 | 2 |
while true
n = gets.to_i
break if n==0
a = Array.new(n){gets.to_i}
max = a.max
if n>1
for k in 2..n
ksum = a[0..k-1].inject(:+)
max = ksum if ksum>max
for l in 0..n-k
ksum += a[k+l]-a[l]
max = ksum if ksum>max
end
end
end
puts max
end | while true
n = gets.to_i
break if n==0
a = Array.new(n){gets.to_i}
max = a.max
if n>1
for k in 2..n
ksum = a[0..k-1].inject(:+)
max = ksum if ksum>max
for l in 0..n-k-1
ksum += a[k+l]-a[l]
max = ksum if ksum>max
end
end
end
puts max
end | [["+", 0, 88, 51, 267, 0, 475, 444, 738, 17, 33], ["+", 0, 88, 51, 267, 0, 475, 444, 738, 12, 612]] | 4 | 96 | 2 |
loop do
n = gets.to_i
break if n == 0
max = -1_000_000
sum = 0
n.times do
m = gets.to_i
sum += m
max = sum if max < sum
sum = 0 if sum < 0
end
puts sum.to_s
end | loop do
n = gets.to_i
break if n == 0
max = -1_000_000
sum = 0
n.times do
m = gets.to_i
sum += m
max = sum if max < sum
sum = 0 if sum < 0
end
puts max
end | [["-", 8, 736, 0, 652, 3, 4, 0, 652, 486, 22], ["-", 8, 736, 0, 652, 3, 4, 0, 652, 17, 131], ["-", 8, 736, 0, 652, 3, 4, 0, 652, 735, 22], ["+", 196, 737, 8, 736, 0, 652, 3, 4, 0, 22]] | 4 | 51 | 4 |
loop do
n = gets.to_i
break if n.zero?
a = []
n.times do |i|
a << gets.to_i
end
max = Float::INFINITY
n.times do |i|
sum = 0
a[i..-1].each do |_a|
sum += _a
max = sum if sum > max
end
end
puts max
end | loop do
n = gets.to_i
break if n.zero?
a = []
n.times do |i|
a << gets.to_i
end
max = -Float::INFINITY
n.times do |i|
sum = 0
a[i..-1].each do |_a|
sum += _a
max = sum if sum > max
end
end
puts max
end | [["+", 196, 737, 8, 736, 0, 662, 12, 748, 17, 33]] | 4 | 72 | 5 |
loop do
n = gets.to_i
break if n.zero?
a = []
n.times do |i|
a << gets.to_i
end
max = Float::INFINITY
n.times do |i|
sum = 0
a[i..-1].each do |_a|
sum += _a
max = sum if sum > max
end
end
puts max
end | loop do
n = gets.to_i
break if n.zero?
a = []
n.times do |i|
a << gets.to_i
end
max = -100_000
n.times do |i|
sum = 0
a[i..-1].each do |_a|
sum += _a
max = sum if sum > max
end
end
puts max
end | [["-", 196, 737, 8, 736, 0, 662, 12, 760, 345, 743], ["-", 196, 737, 8, 736, 0, 662, 12, 760, 0, 349], ["-", 196, 737, 8, 736, 0, 662, 12, 760, 141, 743], ["+", 196, 737, 8, 736, 0, 662, 12, 748, 17, 33], ["+", 196, 737, 8, 736, 0, 662, 12, 748, 439, 612]] | 4 | 72 | 5 |
#!/usr/local/bin/ruby
while (n=gets.to_i)!=0
rec=Array.new
for i in 1..n
rec << gets.to_i
end
ans = -1000000
for x in 1..n
sum = 0
for y in x..n
sum = sum + rec[y].to_i
if sum > ans
ans = sum
end
end
end
puts "#{ans}"
end | #!/usr/local/bin/ruby
while (n=gets.to_i)!=0
rec=Array.new
for i in 1..n
rec << gets.to_i
end
ans = -1000000
for x in 1..n
sum = 0
for y in (x-1)..n
sum = sum + rec[y].to_i
if sum > ans
ans = sum
end
end
end
puts "#{ans}"
end | [["+", 0, 88, 51, 267, 0, 475, 756, 739, 0, 24], ["+", 51, 267, 0, 475, 756, 739, 0, 738, 17, 33], ["+", 51, 267, 0, 475, 756, 739, 0, 738, 12, 612], ["+", 0, 88, 51, 267, 0, 475, 756, 739, 0, 25]] | 4 | 74 | 4 |
while True:
n = eval(input())
if n == 0:
exit()
A = [int(input()) for _ in range(n)]
if all(a<=0 for a in A):
print(max(a))
exit()
r = 0
tmp = 0
ans = 0
while r < n:
tmp += A[r]
if tmp < 0:
l = r
tmp = 0
else:
... | while True:
n = eval(input())
if n == 0:
exit()
A = [int(input()) for _ in range(n)]
if all(a <= 0 for a in A):
print(max(A))
continue
r = 0
tmp = 0
ans = 0
while r < n:
tmp += A[r]
if tmp < 0:
l = r
tmp = 0
els... | [["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117]] | 5 | 106 | 6 |
while True:
num = int(input())
if num == 0:
break
list = []
for i in range(num):
list.append(int(input()))
for i in range(1, num):
list[i] = max(list[i - 1] + list[i], list[i])
print((list)) |
while True:
num = int(input())
if num == 0:
break
list = []
for i in range(num):
list.append(int(input()))
for i in range(1, num):
list[i] = max(list[i - 1] + list[i], list[i])
print(max(list)) | [["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22]] | 5 | 80 | 1 |
while 1:
n=int(input())
if n==0:break
a=[int(input())for _ in[0]*n]
for i in range(n-1):a[i]=max(a[i],a[i]+a[i-1])
print(max(a))
| while 1:
n=int(input())
if n==0:break
a=[int(input())for _ in[0]*n]
for i in range(1,n):a[i]=max(a[i],a[i]+a[i-1])
print(max(a))
| [["-", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22]] | 5 | 76 | 4 |
while True:
n = int(input())
if n == 0:
break
a=[]
for i in range(n):
a.append(int(input()))
max = -1e10
for i in range(len(a)):
sum = 0
for j in range(i+1,len(a)):
sum += a[j]
if sum > max:
max = sum
print(max) | while True:
n = int(input())
if n == 0:
break
a=[]
for i in range(n):
a.append(int(input()))
max = -1e10
for i in range(len(a)):
sum = 0
for j in range(i,len(a)):
sum += a[j]
if sum > max:
max = sum
print(max) | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 91 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
for (int i = 0; i < n; i++) {
double[] x = new double[2];
double[] y = new double[2];
double[] r = new double[2];
for (int ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
for (int i = 0; i < n; i++) {
double[] x = new double[2];
double[] y = new double[2];
double[] r = new double[2];
for (int ... | [["+", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 0, 131], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 3, 4, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 503, 49, 200, 51, 492, 3, 4, 0, 25], ["-", 75, 57, 75, 57, 15, 15, 0, 16, 17, 18], ["+", 75, 57, 75, 57, 15, 15, 0, 16... | 3 | 270 | 7 |
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);
int nico = Integer.parseInt(sc.nextLine());
for (int i = 0; i < nico; i++) {
String[] params = sc.nextLine().split(" ");
... | 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);
int nico = Integer.parseInt(sc.nextLine());
for (int i = 0; i < nico; i++) {
String[] params = sc.nextLine().split(" ");
... | [["-", 64, 196, 0, 57, 15, 15, 0, 16, 17, 47], ["+", 64, 196, 0, 57, 15, 15, 0, 16, 17, 20], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 196, 0, 57, 15, 15, 0, 16, 17, 47], ["+", 75, 196, 0, 57, 15, 15, 0, 16, 17, 20]] | 3 | 316 | 8 |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while (n-- > 0) {
Circle a = new Circle(sc.nextDouble(), sc.nextDouble(), sc.nextDouble());
Circle b = new Circle(sc.nextDouble(), sc.nextDouble(), sc.nex... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while (n-- > 0) {
Circle a = new Circle(sc.nextDouble(), sc.nextDouble(), sc.nextDouble());
Circle b = new Circle(sc.nextDouble(), sc.nextDouble(), sc.nex... | [["-", 0, 16, 12, 16, 31, 16, 12, 509, 500, 22], ["+", 0, 16, 12, 16, 31, 16, 12, 509, 500, 22], ["-", 0, 57, 15, 15, 0, 16, 12, 16, 17, 47], ["-", 15, 15, 0, 16, 12, 16, 12, 509, 500, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 18], ["+", 15, 15, 0, 16, 12, 16, 12, 509, 500, 22], ["-", 75, 57, 15, 15, 0, 16, 12, 16, ... | 3 | 292 | 12 |
import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
class Cir {
Double x;
Double y;
Double r;
Cir(Double x, Double y, Double r) {
this.x = x;
this.y = y;
this.r = r;
}
Cir() {}
Double dist2(Cir c) {
... | import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
class Cir {
Double x;
Double y;
Double r;
Cir(Double x, Double y, Double r) {
this.x = x;
this.y = y;
this.r = r;
}
Cir() {}
Double dist2(Cir c) {
... | [["+", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 0, 131], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 0, 503, 49, 200, 51, 492, 3, 4, 0, 24], ["+", 0, 503, 49, 200, 51, 492, 3, 4, 0, 25], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20], ["+", 8, 196, 0, 57, 15, 15, 0, 1... | 3 | 349 | 7 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans;
double xa, ya, ra, xb, yb, rb;
for (int i = 0; i < n; i++) {
while (true) {
xa = sc.nextDouble();
ya = sc.nextDouble();
... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans;
double xa, ya, ra, xb, yb, rb;
for (int i = 0; i < n; i++) {
while (true) {
xa = sc.nextDouble();
ya = sc.nextDouble();
... | [["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 72], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 22]] | 3 | 247 | 4 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int num = input.nextInt();
for (int i = 0; i < num; i++) {
double x1 = input.nextDouble();
double y1 = input.nextDouble();
double r1 = input.nextDouble();
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int num = input.nextInt();
for (int i = 0; i < num; i++) {
double x1 = input.nextDouble();
double y1 = input.nextDouble();
double r1 = input.nextDouble();
... | [["+", 75, 57, 15, 15, 0, 16, 12, 16, 17, 33], ["+", 75, 57, 15, 15, 0, 16, 12, 16, 12, 22]] | 3 | 243 | 4 |
#include <stdio.h>
int main() {
int n, i;
double a[3], b[3], d;
scanf("%d", &n);
while (n--) {
for (i = 0; i < 3; i++)
scanf("%lf", &a[i]);
for (i = 0; i < 3; i++)
scanf("%lf", &b[i]);
d = (a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]);
if (d > (a[2] + b[2]) * (a[... | #include <stdio.h>
int main() {
int n, i;
double a[3], b[3], d;
scanf("%d", &n);
while (n--) {
for (i = 0; i < 3; i++)
scanf("%lf", &a[i]);
for (i = 0; i < 3; i++)
scanf("%lf", &b[i]);
d = (a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]);
if (d > (a[2] + b[2]) * (a[... | [["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 47]] | 0 | 284 | 4 |
#include <math.h>
#include <stdio.h>
double abso(double n) {
if (n < 0)
n *= (-1);
return n;
}
double dis(double xa, double ya, double xb, double yb) {
if (xa == xb) {
return abso(ya - yb);
} else {
return sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
}
}
int main(void) {
int n, i;
d... | #include <math.h>
#include <stdio.h>
double abso(double n) {
if (n < 0)
n *= (-1);
return n;
}
double dis(double xa, double ya, double xb, double yb) {
if (xa == xb) {
return abso(ya - yb);
} else {
return sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
}
}
int main(void) {
int n, i;
d... | [["-", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 64, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 64, 9, 0, 57, 15, 23, 0, 16, 17, 47]] | 0 | 298 | 7 |
#include <math.h>
#include <stdio.h>
int main(void) {
int i, n, ans;
double xa, ya, ra, xb, yb, rb, AB, R;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb);
AB = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
R = (ra > rb) ? ra : rb;
... | #include <math.h>
#include <stdio.h>
int main(void) {
int i, n, ans;
double xa, ya, ra, xb, yb, rb, AB, R;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb);
AB = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
R = (ra > rb) ? ra - rb : r... | [["+", 0, 1, 0, 11, 12, 41, 64, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 41, 64, 16, 12, 22], ["+", 0, 1, 0, 11, 12, 41, 75, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 41, 75, 16, 12, 22]] | 0 | 195 | 4 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int i, j, n;
double m[6], d;
scanf("%d", &n);
int res[n];
for (i = 0; i < n; i++) {
for (j = 0; j < 6; j++) {
scanf("%lf", m + j);
}
d = sqrt((m[0] - m[3]) * (m[0] - m[3]) + (m[1] - m[4]) * (m[1] - m[4]));
if (d > ... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int i, j, n;
double m[6], d;
scanf("%d", &n);
int res[n];
for (i = 0; i < n; i++) {
for (j = 0; j < 6; j++) {
scanf("%lf", m + j);
}
d = sqrt((m[0] - m[3]) * (m[0] - m[3]) + (m[1] - m[4]) * (m[1] - m[4]));
if (d > ... | [["-", 15, 23, 0, 16, 12, 16, 12, 2, 63, 22], ["+", 15, 23, 0, 16, 12, 16, 12, 2, 63, 22], ["-", 0, 57, 15, 23, 0, 16, 12, 2, 63, 22], ["+", 0, 57, 15, 23, 0, 16, 12, 2, 63, 22]] | 0 | 272 | 4 |
#include <math.h>
#include <stdio.h>
double d, r, s, z[6];
int n, i, j, a[50];
int main() {
for (scanf("%d", &n); n--;) {
for (i = 0; i < 6; i++)
scanf("%lf", a + i);
r = z[2];
s = z[5];
d = hypot(*z - z[3], z[1] - z[4]);
printf("%d\n", a[j++] = d > r + s ? 0 : r > d + s ? 2 : s > d + r ? -2... | #include <math.h>
#include <stdio.h>
double d, r, s, z[6];
int n, i, j, a[50];
int main() {
for (scanf("%d", &n); n--;) {
for (i = 0; i < 6; i++)
scanf("%lf", z + i);
r = z[2];
s = z[5];
d = hypot(*z - z[3], z[1] - z[4]);
printf("%d\n", a[j++] = d > r + s ? 0 : r > d + s ? 2 : s > d + r ? -2... | [["-", 8, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 8, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 17, 60], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 12, 13]] | 0 | 156 | 25 |
#include <math.h>
#include <stdio.h>
int main(void) {
int n;
double xa, ya, ra, xb, yb, rb;
double dist;
scanf("%d", &n);
for (; n > 0; n--)
scanf("%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb);
dist = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
if (dist > ra + rb) {
printf("%... | #include <math.h>
#include <stdio.h>
int main(void) {
int n;
double xa, ya, ra, xb, yb, rb;
double dist;
scanf("%d", &n);
for (; n > 0; n--) {
scanf("%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb);
dist = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
if (dist > ra + rb) {
p... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["+", 75, 76, 0, 57, 75, 76, 0, 9, 0, 46]] | 0 | 182 | 2 |
#include <stdio.h>
int main() {
int i, j, a[4], b[4], hit, blow;
while (scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
&b[1], &b[2], &b[3]) != EOF) {
hit = 0;
blow = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (a[i] == b[i])
hi... | #include <stdio.h>
int main() {
int i, j, a[4], b[4], hit, blow;
while (scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
&b[1], &b[2], &b[3]) != EOF) {
hit = 0;
blow = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (i == j && a[i] == b[j])
... | [["+", 0, 57, 15, 23, 0, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 98], ["-", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["+", 15, 23, 0, 16, 12, 16, 12, 69, 71, 22]] | 0 | 176 | 6 |
#include <stdio.h>
main() {
int a[5], b[5], i, j, hit, blow;
while (scanf("%d", a[0]) != EOF) {
for (i = 1; i < 4; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < 4; i++) {
scanf("%d", &b[i]);
}
hit = blow = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (a[... | #include <stdio.h>
main() {
int a[5], b[5], i, j, hit, blow;
while (scanf("%d", &a[0]) != EOF) {
for (i = 1; i < 4; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < 4; i++) {
scanf("%d", &b[i]);
}
hit = blow = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (a... | [["+", 0, 16, 31, 2, 3, 4, 0, 66, 17, 67]] | 0 | 183 | 1 |
#include <stdio.h>
int main() {
int A[4], B[4], h = 0, b = 0, i, j;
while (scanf("%d%d%d%d", &A[0], &A[1], &A[2], &A[3]) != EOF) {
h = b = 0;
scanf("%d%d%d%d", &B[0], &B[1], &B[2], &B[3]);
for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++) {
if (i == j && A[i] == B[i])
h++;
... | #include <stdio.h>
int main() {
int A[4], B[4], h = 0, b = 0, i, j;
while (scanf("%d%d%d%d", &A[0], &A[1], &A[2], &A[3]) != EOF) {
h = b = 0;
scanf("%d%d%d%d", &B[0], &B[1], &B[2], &B[3]);
for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++) {
if (i == j && A[i] == B[j])
h++;
... | [["-", 15, 23, 0, 16, 12, 16, 12, 69, 71, 22], ["+", 15, 23, 0, 16, 12, 16, 12, 69, 71, 22], ["-", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22]] | 0 | 183 | 4 |
// 0025 Hit and Blow
#include <iostream>
using namespace std;
int main() {
int a[4];
int b[4];
while (cin >> a[0] >> a[1] >> a[2] >> a[3]) {
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; i++)
cin >> b[i];
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
if (a[i] ... | // 0025 Hit and Blow
#include <iostream>
using namespace std;
int main() {
int a[4];
int b[4];
while (cin >> a[0] >> a[1] >> a[2] >> a[3]) {
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; i++)
cin >> b[i];
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
if (a[i] ... | [["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]] | 1 | 146 | 4 |
#include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define FOR(I, F, N) for (int I = F; I < (int... | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define FOR(I, F, N) for (int I = F; I < (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]] | 1 | 300 | 4 |
#include <array>
#include <iostream>
int main() {
std::array<int, 4> A;
while (std::cin >> A[0] >> A[1] >> A[2] >> A[3]) {
std::array<int, 4> B;
std::cin >> B[0] >> B[1] >> B[2] >> B[3];
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; ++i) {
if (A[i] == B[i])
++hit;
for ... | #include <array>
#include <iostream>
int main() {
std::array<int, 4> A;
while (std::cin >> A[0] >> A[1] >> A[2] >> A[3]) {
std::array<int, 4> B;
std::cin >> B[0] >> B[1] >> B[2] >> B[3];
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; ++i) {
if (A[i] == B[i])
++hit;
else... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 75, 76, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 173 | 5 |
#include <algorithm>
#include <array>
#include <iostream>
int main() {
int a1, a2, a3, a4, b1, b2, b3, b4;
while (std::cin >> a1 >> a2 >> a3 >> a4) {
std::cin >> b1 >> b2 >> b3 >> b4;
std::array<int, 4> A = {a1, a2, a3, a4};
std::array<int, 4> B = {b1, b2, b3, b4};
int hit = 0;
int blow = ... | #include <algorithm>
#include <array>
#include <iostream>
int main() {
int a1, a2, a3, a4, b1, b2, b3, b4;
while (std::cin >> a1 >> a2 >> a3 >> a4) {
std::cin >> b1 >> b2 >> b3 >> b4;
std::array<int, 4> A = {a1, a2, a3, a4};
std::array<int, 4> B = {b1, b2, b3, b4};
int hit = 0;
int blow = ... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 181 | 1 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#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 push_back
#define mp ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#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 push_back
#define mp ... | [["-", 0, 52, 8, 9, 0, 42, 0, 2, 63, 22], ["+", 0, 52, 8, 9, 0, 42, 0, 2, 63, 22], ["-", 8, 9, 0, 42, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 42, 0, 2, 3, 4, 0, 22]] | 1 | 206 | 4 |
#include <iostream>
using namespace std;
int main() {
int hit, blow;
int a[4], b[4];
while (cin >> a[0] >> a[1] >> a[2] >> a[3]) {
cin >> b[0] >> b[1] >> b[2] >> b[3];
hit = 0;
blow = 0;
for (int i = 0; i < 4; i++) {
for (int j = i; j < 4; j++) {
if (a[i] == b[j]) {
if (... | #include <iostream>
using namespace std;
int main() {
int hit, blow;
int a[4], b[4];
while (cin >> a[0]) {
cin >> a[1] >> a[2] >> a[3];
cin >> b[0] >> b[1] >> b[2] >> b[3];
hit = 0;
blow = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (a[i] == b[j]) {
... | [["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 8, 9, 0, 7, 10, 43, 4... | 1 | 159 | 8 |
#include <iostream>
int main() {
const int size = 4;
int a[size], b[size];
while (std::cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >>
b[3]) {
int hit = 0, blow = 0;
for (int i = 0; i < size; i++)
if (a[i] == b[i]) {
hit++;
} else {
for (int j = 1; j <... | #include <iostream>
int main() {
const int size = 4;
int a[size], b[size];
while (std::cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >>
b[3]) {
int hit = 0, blow = 0;
for (int i = 0; i < size; i++)
if (a[i] == b[i]) {
hit++;
} else {
for (int j = 0; j <... | [["-", 0, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 8, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["+", 8, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 17, 98]] | 1 | 161 | 6 |
#include <iostream>
int main() {
int a[4], b[4], c, d, i, j;
while (std::cin >> a[0]) {
for (i = 1; i < 4; i++) {
std::cin >> a[i];
}
for (i = 0; i < 4; i++) {
std::cin >> b[i];
}
c = 0;
d = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (i == j && a... | #include <iostream>
int main() {
int a[4], b[4], c, d, i, j;
while (std::cin >> a[0]) {
for (i = 1; i < 4; i++) {
std::cin >> a[i];
}
for (i = 0; i < 4; i++) {
std::cin >> b[i];
}
c = 0;
d = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (i == j && a... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 187 | 2 |
#include <bits/stdc++.h>
#define rep(i, l, n) for (int i = l; i < n; i++)
using namespace std;
int main() {
int a[4], b[4];
while (cin >> a[0]) {
int hit = 0, blow = 0;
rep(i, 1, 4) cin >> a[i];
rep(i, 0, 4) cin >> b[i];
rep(i, 0, 4) {
rep(j, i, 4) {
if (a[i] == b[j]) {
if (... | #include <bits/stdc++.h>
#define rep(i, l, n) for (int i = l; i < n; i++)
using namespace std;
int main() {
int a[4], b[4];
while (cin >> a[0]) {
int hit = 0, blow = 0;
rep(i, 1, 4) cin >> a[i];
rep(i, 0, 4) cin >> b[i];
rep(i, 0, 4) {
rep(j, 0, 4) {
if (a[i] == b[j]) {
if (... | [["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 146 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <numeric>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, a, b) for (long long int i = (a); i < (b); i++)
#define REP(i, n) for (long long int i = 0; i < (n); i++)
#define... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <numeric>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, a, b) for (long long int i = (a); i < (b); i++)
#define REP(i, n) for (long long int i = 0; i < (n); i++)
#define... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["-", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 51, 16, 31, 16, 31, 16, 31, 16, 31, 22]] | 1 | 213 | 6 |
#include <stdio.h>
int main(void) {
int a[5], s[5], d, f, g, i, j;
while (scanf("%d %d %d %d %d %d %d %d", &a[1], &a[2], &a[3], &a[4], &s[1],
&s[2], &s[3], &s[4]) != EOF) {
d = 0;
f = 0;
for (i = 1; i <= 4; i++) {
if (a[i] == s[i]) {
d++;
}
if (a[i] != s[i]) {
... | #include <stdio.h>
int main(void) {
int a[5], s[5], d, f, g, i, j;
while (scanf("%d %d %d %d %d %d %d %d", &a[1], &a[2], &a[3], &a[4], &s[1],
&s[2], &s[3], &s[4]) != EOF) {
d = 0;
f = 0;
for (i = 1; i <= 4; i++) {
if (a[i] == s[i]) {
d++;
}
if (a[i] != s[i]) {
... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["-", 64, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 64, 9, 0, 52, 15, 339, 51, 16, 17, 18]] | 1 | 192 | 4 |
#include <iostream>
using namespace std;
int main() {
int a[4], b[4];
int hit, blow;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
hit = blow = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit++;
}
for (int j = 0; i < 4; j++) {
if ... | #include <iostream>
using namespace std;
int main() {
int a[4], b[4];
int hit, blow;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
hit = blow = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit++;
}
for (int j = 0; j < 4; j++) {
if ... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22]] | 1 | 165 | 2 |
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
int a[4];
int b[4];
while ((scanf("%d", a[0])) != EOF) {
int hitcount = 0;
int bcount = 0;
for (int i = 1; i < 4; i++) {
scanf("%d", a[i]);
}
for (int i = 0; i < 4; i++)
cin >> b[i];
// a??????????... | #include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
int a[4];
int b[4];
while ((scanf("%d", &a[0])) != EOF) {
int hitcount = 0;
int bcount = 0;
for (int i = 1; i < 4; i++) {
scanf("%d", &a[i]);
}
for (int i = 0; i < 4; i++)
cin >> b[i];
// a????????... | [["+", 31, 23, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 1 | 186 | 2 |
#include <iostream>
using namespace std;
int main() {
int a[4];
int b[4];
while (cin >> a[0]) {
int hit = 0, brow = 0;
for (int i = 1; i < 4; i++) {
cin >> a[i];
}
for (int j = 0; j < 4; j++) {
cin >> b[j];
}
for (int k = 0; k < 4; k++) {
for (int l = 0; l < 4; l++) {... | #include <iostream>
using namespace std;
int main() {
int a[4];
int b[4];
while (cin >> a[0]) {
int hit = 0, brow = 0;
for (int i = 1; i < 4; i++) {
cin >> a[i];
}
for (int j = 0; j < 4; j++) {
cin >> b[j];
}
for (int k = 0; k < 4; k++) {
for (int l = 0; l < 4; l++) {... | [["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22]] | 1 | 168 | 2 |
#include <iostream>
#define SIZE 4
using namespace std;
int main() {
int a[SIZE], b[SIZE], hit, blo;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
hit = 0;
blo = 0;
for (int i = 0; i < SIZE; i++) {
if (a[i] == b[i]) {
hit++;
a[i] = -1;
b[... | #include <iostream>
#define SIZE 4
using namespace std;
int main() {
int a[SIZE], b[SIZE], hit, blo;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
hit = 0;
blo = 0;
for (int i = 0; i < SIZE; i++) {
if (a[i] == b[i]) {
hit++;
a[i] = -1;
b[... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 231 | 4 |
#include <iostream>
using namespace std;
int main() {
int a[4], b[4];
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
int hit_cnt = 0;
int blow_cnt = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit_cnt++;
a[i] = b[i] = -1;
}
}
... | #include <iostream>
using namespace std;
int main() {
int a[4], b[4];
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
int hit_cnt = 0;
int blow_cnt = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit_cnt++;
a[i] = b[i] = -1;
}
}
... | [["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 1 | 211 | 2 |
#include <iostream>
using namespace std;
int main() {
int n = 0;
while (cin >> n) {
int a[4], b[4];
int hit = 0, blow = 0;
a[0] = n;
cin >> a[1] >> a[2] >> a[3];
cin >> b[0] >> b[1] >> b[2] >> b[3];
for (int i = 0; i < 4; ++i) {
for (int j = 0; j < 4; ++j) {
if (i == j && a[i] ... | #include <iostream>
using namespace std;
int main() {
int n = 0;
while (cin >> n) {
int a[4], b[4];
int hit = 0, blow = 0;
a[0] = n;
cin >> a[1] >> a[2] >> a[3];
cin >> b[0] >> b[1] >> b[2] >> b[3];
for (int i = 0; i < 4; ++i) {
for (int j = 0; j < 4; ++j) {
if (i == j && a[i] ... | [["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 173 | 4 |
#include <iostream>
using namespace std;
int main() {
int a[4] = {0}, b[4] = {0}, hi, br;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
hi = 0;
br = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hi++;
}
}
for (int i; i < 4; i++) {
... | #include <iostream>
using namespace std;
int main() {
int a[4] = {0}, b[4] = {0}, hi, br;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
hi = 0;
br = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hi++;
}
}
for (int i = 0; i < 4; i++) {
... | [["+", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 183 | 4 |
#include <stdio.h>
int main() {
int a[4], b[4], x, y;
while (scanf("%d%d%d%d%d%d%d%d", &a[0], &a[1], &a[2], &a[3], &b[0], &b[1],
&b[2], &b[3]) != EOF) {
x = y = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i])
x++;
else if (a[i] == b[(i + 1) % 4] || a[i] == b[(i + 2) % 4... | #include <stdio.h>
int main() {
int a[4], b[4], x, y;
while (scanf("%d%d%d%d%d%d%d%d", &a[0], &a[1], &a[2], &a[3], &b[0], &b[1],
&b[2], &b[3]) != EOF) {
x = y = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i])
x++;
else if (a[i] == b[(i + 1) % 4] || a[i] == b[(i + 2) % 4... | [["+", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 187 | 2 |
#include <array>
#include <iostream>
//ヒットの数を数え上げる
int checkNumOfHit(std ::array<int, 4> x, std ::array<int, 4> y) {
int num = 0;
for (int i = 0; i < 4; i++) {
if (x.at(i) == y.at(i))
num++;
}
return num;
}
//ブローの数を数え上げる
int checkNumOfBlow(std ::array<int, 4> x, std ::array<int, 4> y) {
int num = 0... | #include <array>
#include <iostream>
//ヒットの数を数え上げる
int checkNumOfHit(std ::array<int, 4> x, std ::array<int, 4> y) {
int num = 0;
for (int i = 0; i < 4; i++) {
if (x.at(i) == y.at(i))
num++;
}
return num;
}
//ブローの数を数え上げる
int checkNumOfBlow(std ::array<int, 4> x, std ::array<int, 4> y) {
int num = 0... | [["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 278 | 4 |
#include <array>
#include <iostream>
int main() {
std::array<u_int, 4> a, b;
int hit, blow;
while (std::cin >> a[0] >> a[1] >> a[2] >> a[3]) {
std::cin >> b[0] >> b[1] >> b[2] >> b[3];
hit = 0;
blow = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i])
hit++;
for (int j = 0; j... | #include <array>
#include <iostream>
int main() {
std::array<u_int, 4> a, b;
int hit, blow;
while (std::cin >> a[0] >> a[1] >> a[2] >> a[3]) {
std::cin >> b[0] >> b[1] >> b[2] >> b[3];
hit = 0;
blow = 0;
for (int i = 0; i < 4; i++) {
if (a[i] == b[i])
hit++;
for (int j = 0; j... | [["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 166 | 4 |
#include <iostream>
using namespace std;
int main() {
int a[4], b[4];
while (cin >> a[0] >> a[1] >> a[2] >> a[3]) {
cin >> b[0] >> b[1] >> b[2] >> b[3];
int hit = 0, blow = 0;
for (int i = 0; i < 4; i++) {
for (int j = i; j < 4; j++) {
if (i == j && a[i] == b[j])
hit++;
... | #include <iostream>
using namespace std;
int main() {
int a[4], b[4];
while (cin >> a[0] >> a[1] >> a[2] >> a[3]) {
cin >> b[0] >> b[1] >> b[2] >> b[3];
int hit = 0, blow = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (i == j && a[i] == b[j])
hit++;
... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 159 | 2 |
#include <iostream>
using namespace std;
int main() {
int a1, a2, a3, a4, b1, b2, b3, b4, h, b;
cin >> a1 >> a2 >> a3 >> a4;
while (cin >> b1 >> b2 >> b3 >> b4) {
h = 0;
b = 0;
if (a1 == b1)
h++;
if (a2 == b2)
h++;
if (a3 == b3)
h++;
if (a4 == b4)
h++;
if (... | #include <iostream>
using namespace std;
int main() {
int a1, a2, a3, a4, b1, b2, b3, b4, h, b;
while (cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4) {
h = 0;
b = 0;
if (a1 == b1)
h++;
if (a2 == b2)
h++;
if (a3 == b3)
h++;
if (a4 == b4)
h++;
if (a1 == b2... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["-", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 51, 16, 31, 16, 31, 16, 31, 16, 31, 22]] | 1 | 184 | 6 |
#include <stdio.h>
int main(void) {
int a[4], b[4];
while (scanf("%d %d %d %d\n%d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
&b[1], &b[2], &b[3]) != EOF) {
int i, j;
int hit = 0;
for (i = 0; i < 4; ++i) {
if (a[i] == b[i]) {
++hit;
}
}
int blow = 0;
f... | #include <stdio.h>
int main(void) {
int a[4], b[4];
while (scanf("%d %d %d %d\n%d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
&b[1], &b[2], &b[3]) != EOF) {
int i, j;
int hit = 0;
for (i = 0; i < 4; ++i) {
if (a[i] == b[i]) {
++hit;
}
}
int blow = 0;
f... | [["-", 0, 52, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 52, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 224 | 6 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> a(4), b(4);
int hit = 0, blow = 0;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
for (int i = 0; i < 4; i++) {
if (a[i] == b[i])
hit++;
}
for (int i = 0; i < 4; i++) {
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> a(4), b(4);
int hit = 0, blow = 0;
while (cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) {
for (int i = 0; i < 4; i++) {
if (a[i] == b[i])
hit++;
}
for (int i = 0; i < 4; i++) {
... | [["-", 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 | 183 | 4 |
while line = gets
v = line.to_f
t = v / 9.8
y = 4.9 * t**2
n = ( y + 5 ) / 5
n = n.ceil
puts n
break
end | while line = gets
v = line.to_f
t = v / 9.8
y = 4.9 * t**2
n = ( y + 5 ) / 5
n = n.ceil
puts n
end | [["-", 0, 493, 0, 89, 8, 170, 0, 94, 0, 94]] | 4 | 39 | 1 |
while line = gets
line = line.to_f
t = (line / 9.8)
n = (4.9 * t **2 + 5)/5
puts n.round
end | while line = gets
line = line.to_f
t = (line / 9.8)
n = ((4.9 * t **2 + 5)/5 +1)
puts n.floor
end | [["+", 12, 739, 0, 738, 31, 738, 31, 739, 0, 24], ["+", 8, 170, 0, 662, 12, 739, 0, 738, 17, 72], ["+", 8, 170, 0, 662, 12, 739, 0, 738, 12, 612], ["+", 0, 89, 8, 170, 0, 662, 12, 739, 0, 25], ["-", 8, 170, 0, 652, 3, 4, 0, 652, 735, 22], ["+", 8, 170, 0, 652, 3, 4, 0, 652, 735, 22]] | 4 | 34 | 6 |
class Problem
def exec
while l = gets do
i = l.to_i
res = calc i
puts res
end
end
def calc(i)
# ?£????????????????????????????????¨????
t = i / 9.8
#?????????????????§??????????????¢????¨????
y = 4.9 * (t ** 2)
#??????????????¢????????????????????§???????????°?£???... | class Problem
def exec
while l = gets do
i = l.to_f
res = calc(i)
puts res
end
end
def calc(i)
# ?£????????????????????????????????¨????
t = i / 9.8
#?????????????????§??????????????¢????¨????
y = 4.9 * (t ** 2)
#??????????????¢????????????????????§???????????°?£??... | [["-", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22], ["+", 8, 170, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 8, 170, 0, 662, 12, 652, 3, 4, 0, 25], ["+", 8, 736, 0, 735, 8, 736, 0, 38, 0, 38], ["+", 0, 735, 8, 736, 0, 38, 0, 4, 0, 22]] | 4 | 67 | 12 |
while gets do
v = '25.4'.to_f
t = v/9.8
y = 4.9*t*t
puts ((y+5.0)/5.0).ceil
end | while gets do
v = $_.to_f
t = v/9.8
y = 4.9*t*t
puts ((y+5.0)/5.0).ceil
end | [["-", 8, 170, 0, 662, 12, 652, 486, 557, 0, 62], ["-", 8, 170, 0, 662, 12, 652, 486, 557, 0, 6], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 486, 744]] | 4 | 35 | 4 |
#!/usr/local/bin/ruby
while line=gets
v=line.to_i
t=v/9.8
y=4.9*t**2
n=(y+5)/5
puts n.ceil
end | #!/usr/local/bin/ruby
while line=gets
v=line.to_f
t=v/9.8
y=4.9*t**2
n=(y+5)/5
puts n.ceil
end | [["-", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22]] | 4 | 36 | 2 |
import sys,math
for l in sys.stdin:print(int(math.ceil(float(l)**2*0.01)+1)) | import sys,math
for l in sys.stdin:print(int(math.ceil(float(l)**2*0.01020408163265306122448979591837)+1)) | [["-", 0, 657, 31, 652, 3, 4, 0, 657, 12, 531], ["+", 0, 657, 31, 652, 3, 4, 0, 657, 12, 531]] | 5 | 32 | 6 |
import sys,math
for l in sys.stdin:print(int(math.ceil(float(l)**2*0.01)+1)) | import sys,math
for l in sys.stdin:print(int(math.ceil(float(l)**2/98)+1)) | [["-", 0, 657, 31, 652, 3, 4, 0, 657, 17, 48], ["-", 0, 657, 31, 652, 3, 4, 0, 657, 12, 531], ["+", 0, 657, 31, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 657, 31, 652, 3, 4, 0, 657, 12, 612]] | 5 | 32 | 6 |
import sys,math
for l in sys.stdin:print(int(math.ceil(float(l)**2*0.01)+1)) | import sys,math
for l in sys.stdin:print(int(math.ceil(float(l)**2/98))+1) | [["-", 0, 657, 31, 652, 3, 4, 0, 657, 17, 48], ["-", 0, 657, 31, 652, 3, 4, 0, 657, 12, 531], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 85], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 31, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 32 | 6 |
def get_float():
while True:
try:
yield float(input())
except EOFError:
break
v_lis = list(get_float())
for v in v_lis:
t = v / 9.8
y = 4.9 * (t**2)
_N = (y + 5) / 5
N = int(round(_N))
print(N) | import math
def get_float():
while True:
try:
yield float(input())
except EOFError:
break
v_lis = list(get_float())
for v in v_lis:
t = v / 9.8
y = 4.9 * (t**2)
_N = (y + 5) / 5
N = int(math.ceil(_N))
print(N) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 500, 22], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 70 | 6 |
import sys
for i in sys.stdin:
x = list(map(float, i.split()))
t = x[0] / 9.8
y = 4.9*(t**2)
print(int(round((y + 5)/5))) |
import sys
for i in sys.stdin:
x = list(map(float, i.split()))
t = x[0] / 9.8
y = 4.9*(t**2)
print(int((y + 5)/5) + 1) | [["-", 3, 4, 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], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 57 | 5 |
import math
while(1):
try:
thv = float(input())
except:
break
for i in range(1, 20):
y = 5 * (i-1)
t = math.sqrt(y/4.9)
v = 9.8 * t
if v > thv:
print(i)
break
| import math
while(1):
try:
thv = float(input())
except:
break
for i in range(1, 1000):
y = 5 * (i-1)
t = math.sqrt(y/4.9)
v = 9.8 * t
if v >= thv:
print(i)
break
| [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 64 | 4 |
while True:
try:
v = float(input())
except:
break
t = v / 9.8
y = 4.9 * pow(t, 2)
N = (y + 5) / 5
print(round(N)) | import math
while True:
try:
v = float(input())
except:
break
t = v / 9.8
y = 4.9 * pow(t, 2)
N = (y + 5) / 5
print(math.ceil(N)) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 500, 22], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 47 | 6 |
import math,sys
for e in sys.stdin:print(int(float(input())**2/98+2))
| import math,sys
for e in sys.stdin:print(int(float(e)**2/98+2))
| [["-", 31, 657, 31, 652, 3, 4, 0, 652, 63, 22], ["-", 31, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 31, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 31, 657, 31, 657, 31, 652, 3, 4, 0, 22]] | 5 | 29 | 4 |
while True:
try:
s = float(input())
t = s/9.8
y = 4.9*t**2
n = 1
while 5*(n-1) >= y:
n += 1
print(n)
except:
break | while True:
try:
s = float(input())
t = s/9.8
y = 4.9*t**2
n = 1
while 5*(n-1) < y:
n += 1
print(n)
except:
break | [["-", 0, 246, 8, 196, 0, 52, 15, 666, 667, 20], ["+", 0, 246, 8, 196, 0, 52, 15, 666, 667, 18]] | 5 | 49 | 2 |
import sys,math
for v in sys.stdin:
print(int(math.ceil(v**2/2/9.8/5))+1) | import sys,math
for v in sys.stdin:
print(int(math.ceil(float(v)**2/2/9.8/5))+1) | [["+", 31, 657, 31, 657, 31, 657, 31, 652, 63, 22], ["+", 31, 657, 31, 657, 31, 652, 3, 4, 0, 24], ["+", 31, 657, 31, 657, 31, 652, 3, 4, 0, 25]] | 5 | 33 | 3 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int[] sel = new int[4];
int[] esel = new int[4];
while (scan.hasNext()) {
for (int i = 0; i < 4; i++) {
sel[i] = scan.nextInt();
}
Data d = new Data(s... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int[] sel = new int[4];
int[] esel = new int[4];
while (scan.hasNext()) {
for (int i = 0; i < 4; i++) {
sel[i] = scan.nextInt();
}
Data d = new Data(s... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 22], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 276 | 2 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
while (stdIn.hasNext()) {
int[] a = new int[4];
int[] b = new int[4];
for (int i = 0; i < 4; i++) {
a[i] = stdIn.nextInt();
}
for (int i = 0; i < 4; i++) {
... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
while (stdIn.hasNext()) {
int[] a = new int[4];
int[] b = new int[4];
for (int i = 0; i < 4; i++) {
a[i] = stdIn.nextInt();
}
for (int i = 0; i < 4; i++) {
... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 22], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 208 | 2 |
import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while ((str = br.readLine()) != null) {
String[] s = str.split(" ");
String[] t = br.readLine().split(" ");
in... | import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while ((str = br.readLine()) != null) {
String[] s = str.split(" ");
String[] t = br.readLine().split(" ");
in... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 22], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 321 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a[] = new int[4];
int b[] = new int[4];
while (sc.hasNext()) {
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; i++) {
a[i] = sc.nextInt();
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a[] = new int[4];
int b[] = new int[4];
while (sc.hasNext()) {
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; i++) {
a[i] = sc.nextInt();
... | [["-", 0, 492, 3, 4, 0, 16, 31, 16, 31, 22], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 31, 22], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22]] | 3 | 223 | 4 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) {
InputStreamReader inputStreamReader = new InputStreamReader(System.in);
BufferedReader bufferedReader = new BufferedReader(... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) {
InputStreamReader inputStreamReader = new InputStreamReader(System.in);
BufferedReader bufferedReader = new BufferedReader(... | [["+", 8, 196, 0, 57, 64, 196, 0, 57, 0, 95], ["+", 0, 57, 64, 196, 0, 57, 75, 196, 0, 45], ["+", 0, 57, 64, 196, 0, 57, 75, 196, 0, 46]] | 3 | 353 | 3 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
while (s.hasNext()) {
int[] a = new int[8];
int[] b = new int[8];
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; i++)
a[i] = s.nextInt();
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
while (s.hasNext()) {
int[] a = new int[8];
int[] b = new int[8];
int hit = 0;
int blow = 0;
for (int i = 0; i < 4; i++)
a[i] = s.nextInt();
... | [["-", 0, 57, 15, 15, 0, 16, 12, 504, 516, 22], ["+", 15, 15, 0, 16, 31, 16, 12, 504, 516, 22], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 98], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 79], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 22]] | 3 | 208 | 6 |
import java.util.*;
public class Main {
private void doit() {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int[] a = new int[4];
int[] b = new int[4];
for (int i = 0; i < 4; i++) {
a[i] = sc.nextInt();
}
for (int i = 0; i < 4; i++) {
b[i] = sc.nex... | import java.util.*;
public class Main {
private void doit() {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int[] a = new int[4];
int[] b = new int[4];
for (int i = 0; i < 4; i++) {
a[i] = sc.nextInt();
}
for (int i = 0; i < 4; i++) {
b[i] = sc.nex... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 22], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 228 | 2 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int[] a = new int[4];
int hit = 0;
int blow = 0;
for (int i = 0; i < a.length; i++) {
a[i] = scanner.nextInt();
}
... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int[] a = new int[4];
int hit = 0;
int blow = 0;
for (int i = 0; i < a.length; i++) {
a[i] = scanner.nextInt();
}
... | [["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35], ["-", 8, 196, 0, 57, 75, 57, 64, 196, 0, 46], ["+", 8, 196, 0, 57, 75, 57, 64, 196, 0, 46]] | 3 | 186 | 4 |
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = null;
try {
List<Integer> dataset = new ArrayList<Integer>();
scan = new Scanner(new InputStreamReader(System.... | import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = null;
try {
List<Integer> dataset = new ArrayList<Integer>();
scan = new Scanner(new InputStreamReader(System.... | [["+", 0, 52, 8, 196, 0, 1, 0, 492, 500, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 492, 0, 131], ["+", 0, 52, 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, 196, 0, 52, 8, 196, 0, 1, 0, 35]] | 3 | 236 | 6 |
#include <stdio.h>
int main(void) {
int a1, a2, a3, a4;
int b1, b2, b3, b4;
while (scanf("%d %d %d %d %d %d %d %d", &a1, &a2, &a3, &a4, &b1, &b2, &b3,
&b4) != EOF) {
int co = 0, co2 = 0;
if (a1 == b1)
co++;
else if (a1 == b2 || a1 == b3 || a1 == b4)
co2++;
if (a2 == b2)... | #include <stdio.h>
int main(void) {
int a1, a2, a3, a4;
int b1, b2, b3, b4;
while (scanf("%d %d %d %d %d %d %d %d", &a1, &a2, &a3, &a4, &b1, &b2, &b3,
&b4) != EOF) {
int co = 0, co2 = 0;
if (a1 == b1)
co++;
else if (a1 == b2 || a1 == b3 || a1 == b4)
co2++;
if (a2 == b2)... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 195 | 1 |
#include <stdio.h>
int main(void) {
int a[4], b[4];
int i, j;
int hit, blow;
while (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
hit = 0;
blow = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (a[i] == b[... | #include <stdio.h>
int main(void) {
int a[4], b[4];
int i, j;
int hit, blow;
while (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
hit = 0;
blow = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (a[i] == b[... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 0 | 196 | 2 |
#include <math.h>
#include <stdio.h>
int main() {
int i, j, a[4], b[4];
int hit, blow;
while (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
hit = blow = 0;
for (i = 0; i < 4; i++) {
for (j = i; j < 4; j++) {
if (a[i] == b[j]... | #include <math.h>
#include <stdio.h>
int main() {
int i, j, a[4], b[4];
int hit, blow;
while (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
hit = blow = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (a[i] == b[j]... | [["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]] | 0 | 199 | 2 |
#include <stdio.h>
int main(void) {
int sum1[4], sum2[4];
int i, j, hit, blow;
hit = blow = 0;
while (scanf("%d%d%d%d\n%d%d%d%d", &sum1[0], &sum1[1], &sum1[2], &sum1[3],
&sum2[0], &sum2[1], &sum2[2], &sum2[3]) != EOF) {
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++)
if (s... | #include <stdio.h>
int main(void) {
int sum1[4], sum2[4];
int i, j, hit, blow;
hit = blow = 0;
while (scanf("%d%d%d%d\n%d%d%d%d", &sum1[0], &sum1[1], &sum1[2], &sum1[3],
&sum2[0], &sum2[1], &sum2[2], &sum2[3]) != EOF) {
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++)
if (s... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]] | 0 | 190 | 2 |
#include <stdio.h>
int main(void) {
int a[5], b[5], i, j, h, bl;
while (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
h = 0;
for (i = 0; i < 4; i++) {
if (a[i] == b[i])
h++;
}
bl = 0;
for (i = 0; i < 4; i++) {
... | #include <stdio.h>
int main(void) {
int a[5], b[5], i, j, h, bl;
while (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
h = 0;
for (i = 0; i < 4; i++) {
if (a[i] == b[i])
h++;
}
bl = 0;
for (i = 0; i < 4; i++) {
... | [["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]] | 0 | 198 | 2 |
#include <stdio.h>
int main(int argc, const char *argv[]) {
int a[4], b[4], i, j, hit = 0, blow = 0;
while (scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
&b[1], &b[2], &b[3]) != EOF) {
for (i = 0; i < 4; i++) {
for (j = i; j < 4; j++) {
if (a[i] == b[j]) {
... | #include <stdio.h>
int main(int argc, const char *argv[]) {
int a[4], b[4], i, j, hit = 0, blow = 0;
while (scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
&b[1], &b[2], &b[3]) != EOF) {
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (a[i] == b[j]) {
... | [["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]] | 0 | 181 | 2 |
main() {
int q[4], a[4], i, j;
while (~scanf("%d%d%d%d", q, q + 1, q + 2, q + 3)) {
int h = 0, b = 0;
scanf("%d%d%d%d", a, a + 1, a + 2, a + 3);
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (q[i] == a[j]) {
if (i == j)
h++;
else
b++;
... | main() {
int q[4], a[4], i, j;
while (~scanf("%d%d%d%d", q, q + 1, q + 2, q + 3)) {
int h = 0, b = 0;
scanf("%d%d%d%d", a, a + 1, a + 2, a + 3);
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (q[i] == a[j]) {
if (i == j)
h++;
else
b++;
... | [["-", 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 | 152 | 4 |
#include <stdio.h>
int main(void) {
int a[4], b[4], i, j, Hit, Blow;
while (1) {
Hit = 0;
Blow = 0;
if (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) == EOF)
break;
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
for (i = 0; i < 4; i++) {
if (a[i] == b[i])
Hit++;
... | #include <stdio.h>
int main(void) {
int a[4], b[4], i, j, Hit, Blow;
while (1) {
Hit = 0;
Blow = 0;
if (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) == EOF)
break;
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
for (i = 0; i < 4; i++) {
if (a[i] == b[i])
Hit++;
... | [["-", 8, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["-", 8, 9, 0, 7, 10, 11, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 10, 11, 12, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]] | 0 | 204 | 6 |
#include <stdio.h>
int main(int argc, char *argv[]) {
int a[4], b[4], i, j, hit, blow;
if (scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0], &b[1],
&b[2], &b[3]) != EOF) {
hit = blow = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (b[i] == a[j]) {
... | #include <stdio.h>
int main(int argc, char *argv[]) {
int a[4], b[4], i, j, hit, blow;
while (scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
&b[1], &b[2], &b[3]) != EOF) {
hit = blow = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (b[i] == a[j]... | [["-", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89]] | 0 | 182 | 2 |
#include <stdio.h>
int main() {
int a[4], b[4], hit = 0, blow = 0, i, j;
while (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
// Hit
hit = 0;
for (i = 0; i < 4; i++) {
if (a[i] == b[i])
hit++;
}
// Blow
blow = ... | #include <stdio.h>
int main() {
int a[4], b[4], hit = 0, blow = 0, i, j;
while (scanf("%d %d %d %d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d %d %d %d", &b[0], &b[1], &b[2], &b[3]);
// Hit
hit = 0;
for (i = 0; i < 4; i++) {
if (a[i] == b[i])
hit++;
}
// Blow
blow = ... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 206 | 1 |
#include <stdio.h>
#define SIZE 4
/* prototype declaration */
int hit(int *a, int *b);
int blow(int *a, int *b);
int main(int argc, const char *argv[]) {
int a[SIZE], b[SIZE];
while (scanf("%d%d%d%d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d%d%d%d", &b[0], &b[1], &b[2], &b[3]);
printf("%d %d\n", h... | #include <stdio.h>
#define SIZE 4
/* prototype declaration */
int hit(int *a, int *b);
int blow(int *a, int *b);
int main(int argc, const char *argv[]) {
int a[SIZE], b[SIZE];
while (scanf("%d%d%d%d", &a[0], &a[1], &a[2], &a[3]) != EOF) {
scanf("%d%d%d%d", &b[0], &b[1], &b[2], &b[3]);
printf("%d %d\n", h... | [["-", 8, 9, 0, 7, 8, 7, 10, 11, 12, 22], ["+", 8, 9, 0, 7, 8, 7, 10, 11, 12, 13]] | 0 | 273 | 2 |
#include <stdio.h>
int main() {
int a[4], b[4], i, j, hit, blow;
while (scanf("%d%d%d%d", a, a + 1, a + 2, a + 3) != EOF) {
hit = blow = 0;
scanf("%d%d%d%d", b, b + 1, b + 2, b + 3);
for (i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit++;
continue;
}
for (j = 0; j < 4; j+... | #include <stdio.h>
int main() {
int a[4], b[4], i, j, hit, blow;
while (scanf("%d%d%d%d", a, a + 1, a + 2, a + 3) != EOF) {
hit = blow = 0;
scanf("%d%d%d%d", b, b + 1, b + 2, b + 3);
for (i = 0; i < 4; i++) {
if (a[i] == b[i]) {
hit++;
continue;
}
for (j = 0; j < 4; j+... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 159 | 1 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] days = {-1, 30, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
String[] week = {"Sunday", "Monday", "Thuesday", "Wednesday",
"Thursday", "Friday", "Satu... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] days = {-1, 30, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
String[] week = {"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Satur... | [["-", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491], ["+", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491]] | 3 | 198 | 2 |
#include <stdio.h>
int main() {
int nm, nd, i;
int M[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
while (1) {
scanf("%d %d", &nm, &nd);
if (nm == 0)
break;
int d = 2;
int m;
if (0 < nm && nm < 13) {
if (0 < nd && nd < M[nm] + 1) {
for (i = nm - 1; i > 0; i--) {
... | #include <stdio.h>
int main() {
int nm, nd, i;
int M[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
while (1) {
scanf("%d %d", &nm, &nd);
if (nm == 0)
break;
int d = 2;
int m;
if (0 < nm && nm < 13) {
if (0 < nd && nd < M[nm] + 1) {
for (i = nm - 1; i > 0; i--) {
... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 255 | 4 |
#include <stdio.h>
main() {
int mon[12], month, day, day2, i, j;
mon[0] = 31;
mon[1] = 29;
mon[2] = 31;
mon[3] = 30;
mon[4] = 31;
mon[5] = 30;
mon[6] = 31;
mon[7] = 31;
mon[8] = 30;
mon[9] = 31;
mon[10] = 31;
mon[11] = 31;
while (1) {
scanf("%d %d", &month, &day);
if (month == 0 && d... | #include <stdio.h>
main() {
int mon[12], month, day, day2, i, j;
mon[0] = 31;
mon[1] = 29;
mon[2] = 31;
mon[3] = 30;
mon[4] = 31;
mon[5] = 30;
mon[6] = 31;
mon[7] = 31;
mon[8] = 30;
mon[9] = 31;
mon[10] = 30;
mon[11] = 31;
while (1) {
scanf("%d %d", &month, &day);
if (month == 0 && d... | [["-", 0, 30, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 9, 0, 1, 0, 11, 12, 13], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 300 | 4 |
#include <stdio.h>
int main() {
int days[12] = {31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366};
int m, d, total;
char a[7][10] = {"Thursday", "Friday", "Satuday", "Sunday",
"Monday", "Tuesday", "Wednesday"};
while (1) {
scanf("%d %d", &m, &d);
total = 0;
if (m == 0 &... | #include <stdio.h>
int main() {
int days[12] = {31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366};
int m, d, total;
char a[7][10] = {"Thursday", "Friday", "Saturday", "Sunday",
"Monday", "Tuesday", "Wednesday"};
while (1) {
scanf("%d %d", &m, &d);
total = 0;
if (m == 0 &... | [["-", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6], ["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6]] | 0 | 174 | 2 |
#include <stdio.h>
int main() {
char *days[7] = {"Monday", "Tuesday", "Wednesday", "Tuesday",
"Friday", "Saturday", "Sunday"};
int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int i, n, a, b;
while (1) {
scanf("%d %d", &a, &b);
if (!(a || b))
break;
n = b;
... | #include <stdio.h>
int main() {
char *days[7] = {"Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday"};
int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int i, n, a, b;
while (1) {
scanf("%d %d", &a, &b);
if (!(a || b))
break;
n = b;... | [["-", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6], ["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6]] | 0 | 164 | 2 |
#include <stdio.h>
int main() {
int m, d;
int days[11] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30};
char day[7][9] = {"Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday"};
while (scanf("%d %d", &m, &d), m != 0) {
while (--m > 0)
d += days[m - 1];
... | #include <stdio.h>
int main() {
int m, d;
int days[11] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30};
char day[7][10] = {"Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday"};
while (scanf("%d %d", &m, &d), m != 0) {
while (--m > 0)
d += days[m - 1];
... | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13]] | 0 | 141 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.