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
x1, y1, x2, y2 = gets.split.map(&:to_i) puts Math.sqrt((x1 - x2)**2 + (y1 -y2)**2)
x1, y1, x2, y2 = gets.split.map(&:to_f) puts Math.sqrt((x1 - x2)**2 + (y1 -y2)**2)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
38
x1, y1, x2, y2 = gets.split.map(&:to_i) a = (x2 - x1)**2 b = (y2 - y1)**2 puts Math.sqrt(a + b)
x1, y1, x2, y2 = gets.split.map(&:to_f) a = (x2 - x1)**2 b = (y2 - y1)**2 puts Math.sqrt(a + b)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
44
x1,y1,x2,y2=gets.split.map(&:to_i) d=((x2-x1)**2+(y2-y1)**2)**(1/2.0) puts "%05f" % d
x1,y1,x2,y2=gets.split.map(&:to_f) d=((x2-x1)**2+(y2-y1)**2)**(1/2.0) puts "%05f" % d
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
48
include Math x1,y1,x2,y2= gets.split.map(&:to_i) dx = x1 - x2 dy = y1 - y2 puts sqrt(dx * dx + dy * dy)
include Math x1,y1,x2,y2= gets.split.map(&:to_f) dx = x1 - x2 dy = y1 - y2 puts sqrt(dx * dx + dy * dy)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
40
x1, y1, x2, y2 = gets.chomp.split.map(&:to_i) x_long = x2 - x1 y_long = y2 - y1 long = Math.hypot(x_long, y_long) puts "#{sprintf("%.9f", long)}"
x1, y1, x2, y2 = gets.chomp.split.map(&:to_f) x_long = x2 - x1 y_long = y2 - y1 long = Math.hypot(x_long, y_long) puts "#{sprintf("%.9f", long)}"
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
52
x1, y1, x2, y2 = gets.split.map(&:to_i) puts sprintf("%.5f", Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))
x1, y1, x2, y2 = gets.split.map(&:to_f) puts sprintf("%.5f", Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
45
x1,y1,x2,y2 = gets.split.map(&:to_i) printf "%.8f\n", Math.hypot(x1 - x2, y1 - y2)
x1,y1,x2,y2 = gets.split.map(&:to_f) printf "%.8f\n", Math.hypot(x1 - x2, y1 - y2)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
35
x1, y1, x2, y2 = STDIN.gets.split(" ").map(&:to_i) puts "%.8f" % [((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5]
x1, y1, x2, y2 = STDIN.gets.split(" ").map(&:to_f) puts "%.8f" % [((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5]
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
50
a = gets.split(" ").map(&:to_i); x = a[2] - a[0]; y = a[3] - a[1]; puts ((x**2 + y**2)**0.5).to_s;
a = gets.split(" ").map(&:to_f); x = a[2] - a[0]; y = a[3] - a[1]; puts ((x**2 + y**2)**0.5).to_s;
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
58
x1,y1,x2,y2 = gets.chomp.split(" ").map &:to_i puts "#{((x2-x1)**2+(y2-y1)**2)**(0.5)}"
x1,y1,x2,y2 = gets.chomp.split(" ").map &:to_f puts "#{((x2-x1)**2+(y2-y1)**2)**(0.5)}"
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
48
x1,y1,x2,y2 = gets.chomp.split(" ").map{|item| item.to_i} distance = (((x1-x2).abs**2) + ((y1-y2).abs**2))**(1/2.0) puts distance
x1,y1,x2,y2 = gets.chomp.split(" ").map{|item| item.to_f} distance = (((x1-x2).abs**2) + ((y1-y2).abs**2))**(1/2.0) puts distance
[["-", 12, 652, 196, 196, 8, 734, 0, 652, 735, 22], ["+", 12, 652, 196, 196, 8, 734, 0, 652, 735, 22]]
4
63
x1, y1, x2, y2 = gets.chomp.split(/\s/).map(&:to_i) puts Math.sqrt((x1-x2)**2 + (y1-y2)**2)
x1, y1, x2, y2 = gets.chomp.split(/\s/).map(&:to_f) puts Math.sqrt((x1-x2)**2 + (y1-y2)**2)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
45
def calc_distance(x, y) #x, y???????´???°2??????1?¬?????????? require 'bigdecimal' distance = ((y[0] - x[0])**2 + (y[1] - x[1])**2) ** 0.5 distance_approximately = BigDecimal(distance.to_s).floor(8).to_f return distance_approximately #P1??¨P2????????¢ end input_values = gets.chomp.split.map(&:to_i) x = [input_...
def calc_distance(x, y) #x, y???????´???°2??????1?¬?????????? require 'bigdecimal' distance = ((y[0] - x[0])**2 + (y[1] - x[1])**2) ** 0.5 distance_approximately = BigDecimal(distance.to_s).floor(8).to_f return distance_approximately #P1??¨P2????????¢ end input_values = gets.chomp.split.map(&:to_f) x = [input_...
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
110
x1,y1,x2,y2 = gets.split(" ").map(&:to_i) distance = (x2-x1)**2 + (y2-y1)**2 puts Math.sqrt(distance)
x1,y1,x2,y2 = gets.split(" ").map(&:to_f) distance = (x2-x1)**2 + (y2-y1)**2 puts Math.sqrt(distance)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
46
x1, y1, x2, y2 = gets.split.map(&:to_f) puts Math.sqrt((x2 - x1) ** 2 + (y1 + y2) ** 2)
x1, y1, x2, y2 = gets.split.map(&:to_f) puts Math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
[["-", 0, 738, 31, 738, 31, 739, 0, 738, 31, 22], ["-", 0, 738, 31, 738, 31, 739, 0, 738, 17, 33], ["+", 0, 738, 31, 738, 31, 739, 0, 738, 17, 33], ["+", 0, 738, 31, 738, 31, 739, 0, 738, 12, 22], ["-", 0, 738, 12, 738, 31, 739, 0, 738, 17, 72], ["+", 0, 738, 12, 738, 31, 739, 0, 738, 17, 33]]
4
38
#lines = <<'EOS' #0 0 1 1 #EOS lines = $stdin.read array = lines.split("\n") str = array[0] x1 = str.split(" ")[0].to_i y1 = str.split(" ")[1].to_i x2 = str.split(" ")[2].to_i y2 = str.split(" ")[3].to_i diff = ((x1-x2)**2).abs + ((y1-y2)**2).abs d = Math.sqrt(diff) puts "#{d}"
#lines = <<'EOS' #0 0 1 1 #EOS lines = $stdin.read array = lines.split("\n") str = array[0] x1 = str.split(" ")[0].to_f y1 = str.split(" ")[1].to_f x2 = str.split(" ")[2].to_f y2 = str.split(" ")[3].to_f diff = ((x1-x2)**2).abs + ((y1-y2)**2).abs d = Math.sqrt(diff) puts "#{d}"
[["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]]
4
123
x1, y1, x2, y2 = gets.split(" ").map(&:to_i) a = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) puts "%f"%a
x1, y1, x2, y2 = gets.split(" ").map(&:to_f) a = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) puts "%f"%a
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
50
x1, y1, x2, y2 = gets.split(" ").map(&:to_i) printf "%f\n", Math.sqrt((x2-x1)**2 + (y2-y1)**2)
x1, y1, x2, y2 = gets.split(" ").map(&:to_f) printf "%f\n", Math.sqrt((x2-x1)**2 + (y2-y1)**2)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
48
a, b, c, d = gets.split.map(&:to_i) p Math.hypot(c - a, d - b)
a, b, c, d = gets.split.map(&:to_f) p Math.hypot(c - a, d - b)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
30
#!/usr/bin/env ruby x1, y1, x2, y2 = gets.chomp.split.map(&:to_i) puts Math.sqrt((x1 - x2)**2 + (y1 - y2)**2)
#!/usr/bin/env ruby x1, y1, x2, y2 = gets.chomp.split.map(&:to_f) puts Math.sqrt((x1 - x2)**2 + (y1 - y2)**2)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
41
# Your code here! x1, y1, x2, y2 = gets.split.map(&:to_i) p ((x2 - x1)**2 + (y2 - y1)**2) **(1/2.0)
# Your code here! x1, y1, x2, y2 = gets.split.map(&:to_f) puts ((x2 - x1)**2 + (y2 - y1)**2)**(1/2.0)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]]
4
42
x1,y1,x2,y2 = gets.chomp.split(" ").map{|x| x.to_i} printf("%f\n",((x2-x1)**2+(y2-y1)**2)**0.5)
x1,y1,x2,y2 = gets.chomp.split(" ").map{|x| x.to_f} printf("%f\n",((x2-x1)**2+(y2-y1)**2)**0.5)
[["-", 12, 652, 196, 196, 8, 734, 0, 652, 735, 22], ["+", 12, 652, 196, 196, 8, 734, 0, 652, 735, 22]]
4
55
x1,y1,x2,y2 = gets.split.map(&:to_f) x = x1 - x2 y = y1 - y2 printf Math::sqrt("&.6f", x ** 2 + y ** 2)
x1,y1,x2,y2 = gets.split.map(&:to_f) x = x1 - x2 y = y1 - y2 puts Math::sqrt(x ** 2 + y ** 2)
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 62], ["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21]]
4
44
x1, y1, x2, y2 = io.gets.split.map(&:to_f) printf "%.4f", Math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
x1, y1, x2, y2 = gets.split.map(&:to_f) printf "%.4f", Math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
[["-", 0, 662, 12, 652, 486, 652, 486, 652, 486, 22], ["-", 0, 662, 12, 652, 486, 652, 486, 652, 17, 131]]
4
44
a,b,c,d=gets.split.map(&:to_i) puts Math.sqrt((c-a)**2+(d-b)**2)
a,b,c,d=gets.split.map(&:to_f) puts Math.sqrt((c-a)**2+(d-b)**2)
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753]]
4
38
from math import sqrt def main(): x1, y1, x2, y2 = map(float, input()) print(sqrt((x2-x1)**2 + (y2-y1)**2)) if __name__ == '__main__': main()
from math import sqrt def main(): x1, y1, x2, y2 = map(float, input().split()) print(sqrt((x2-x1)**2 + (y2-y1)**2)) if __name__ == '__main__': main()
[["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
56
import math x_1,y_1,x_2,y_2 = int(input().split(" ")) print(math.sqrt((x_1-x_2)**2+(y_1-y_2)**2))
import math x_1,y_1,x_2,y_2 = map(float,input().split()) print(math.sqrt((x_1-x_2)**2+(y_1-y_2)**2))
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 654], ["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 655]]
5
46
// 2???????????¢????±???????????????°?????? // x1,x2,y1,y2????????????????????§???????????? // sample input 0 0 1 1 // sample output 1.41421356 #include <cmath> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt(pow(x2 - x1, 2) + po...
// 2???????????¢????±???????????????°?????? // x1,x2,y1,y2????????????????????§???????????? // sample input 0 0 1 1 // sample output 1.41421356 #include <cmath> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt(pow(x2 - x1, 2) + po...
[["-", 0, 16, 12, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 16, 12, 2, 3, 4, 0, 16, 12, 22]]
1
67
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double n = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); printf("%f/n", n); return 0; }
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double n = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); printf("%f\n", n); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
77
#include <iomanip> #include <iostream> #include <math.h> using namespace std; int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; int x = fabs(x2 - x1); int y = fabs(y2 - y1); cout << fixed << setprecision(4) << sqrt(x * x + y * y) << endl; return 0; }
#include <iomanip> #include <iostream> #include <math.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double x = fabs(x2 - x1); double y = fabs(y2 - y1); cout << fixed << setprecision(4) << sqrt(x * x + y * y) << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
80
#include <cmath> #include <cstdio> #include <iostream> using namespace std; struct point { int x; int y; }; int main() { point p1, p2; cin >> p1.x >> p1.y >> p2.x >> p2.y; double distance = sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y)); printf("%.6f\n", distance); return...
#include <cmath> #include <cstdio> #include <iostream> using namespace std; struct point { double x; double y; }; int main() { point p1, p2; cin >> p1.x >> p1.y >> p2.x >> p2.y; double distance = sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y)); printf("%.6f\n", distance); ...
[["-", 0, 30, 0, 122, 8, 123, 0, 124, 39, 40], ["+", 0, 30, 0, 122, 8, 123, 0, 124, 39, 40]]
1
109
#include <cmath> #include <iostream> #include <stdio.h> using namespace std; int main() { int x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; printf("%f\n", sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))); return 0; }
#include <cmath> #include <iostream> #include <stdio.h> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; printf("%f\n", sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
73
#include <iomanip> #include <iostream> #include <math.h> using namespace std; void Solution() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(5) << sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) << endl; } int main() { Solution(); return 0; }
#include <iomanip> #include <iostream> #include <math.h> using namespace std; void Solution() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << setprecision(5) << sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) << endl; } int main() { Solution(); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22]]
1
84
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { int x1, y1, x2, y2, d; cin >> x1 >> y1 >> x2 >> y2; d = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)); cout << fixed << setprecision(15) << d << endl; return 0; }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2, d; cin >> x1 >> y1 >> x2 >> y2; d = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)); cout << fixed << setprecision(15) << d << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
76
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { int x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double r = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); // cout << r << endl; printf("%.8f", r); cout << endl; return 0; }
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double r = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); // cout << r << endl; printf("%.8f", r); cout << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
76
#define _USE_MATH_DEFINES #include <cctype> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <string> #include <vector> #define rep(i, start, n) for (int i = start; i < n; i++) #define And && #define Or || #define Lb cout << endl using namespace std; int main(void) { int x1, x2, y1,...
#define _USE_MATH_DEFINES #include <cctype> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <string> #include <vector> #define rep(i, start, n) for (int i = start; i < n; i++) #define And && #define Or || #define Lb cout << endl using namespace std; int main(void) { double x1, x2, ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
102
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << setprecision(15) << sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)) << endl; return 0; }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << setprecision(15) << sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)) << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
74
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <string> using namespace std; int main(void) { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; printf("%llf\n", sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2))); return 0; }
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <string> using namespace std; int main(void) { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; printf("%f\n", sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2))); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
76
#include <cmath> #include <iostream> #include <stdio.h> int main(void) { int x1 = 0; int y1 = 0; int x2 = 0; int y2 = 0; std::cin >> x1 >> y1 >> x2 >> y2; double r = std::sqrt(std::pow(x2 - x1, 2.0) + std::pow(y2 - y1, 2.0)); printf("%.8f\n", r); return 0; }
#include <cmath> #include <iostream> #include <stdio.h> int main(void) { double x1 = 0; double y1 = 0; double x2 = 0; double y2 = 0; std::cin >> x1 >> y1 >> x2 >> y2; double r = std::sqrt(std::pow(x2 - x1, 2.0) + std::pow(y2 - y1, 2.0)); printf("%.8f\n", r); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
88
#include <iostream> #include <math.h> using namespace std; class Point { private: double x; double y; public: void setX(double x); void setY(double y); double getX(); double getY(); }; void Point::setX(double a) { x = a; } void Point::setY(double a) { y = a; } double Point::getX() { return x; } doubl...
#include <iostream> #include <math.h> using namespace std; class Point { private: double x; double y; public: void setX(double x); void setY(double y); double getX(); double getY(); }; void Point::setX(double a) { x = a; } void Point::setY(double a) { y = a; } double Point::getX() { return x; } doubl...
[["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
199
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> setprecision(6) >> x1; cin >> setprecision(6) >> y1; cin >> setprecision(6) >> x2; cin >> setprecision(6) >> y2; cout << setprecision(6) << sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - ...
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> setprecision(10) >> x1; cin >> setprecision(10) >> y1; cin >> setprecision(10) >> x2; cin >> setprecision(10) >> y2; cout << setprecision(10) << sqrt((x1 - x2) * (x1 - x2) + (y1 - ...
[["-", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
100
#include <cmath> #include <iostream> using namespace std; int main() { double a, b, c, d, x, y; cin >> a >> b >> c >> d; x = a - c; x *= x; y = b - d; y *= y; double z = sqrt(x + y); cout << z << endl; return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { double a, b, c, d, x, y; cin >> a >> b >> c >> d; x = a - c; x *= x; y = b - d; y *= y; double z = sqrt(x + y); cout << fixed << z << endl; return 0; }
[["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
76
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double d = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 = y2)); printf("%1f\n", d); return 0; }
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double d = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); printf("%1f\n", d); return 0; }
[["-", 0, 16, 12, 16, 12, 23, 0, 42, 0, 32], ["+", 0, 16, 12, 16, 12, 23, 0, 16, 17, 33]]
1
78
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int(i) = 0; (i) < (n); (i)++) #define For(i, a, b) for (int(i) = (a); (i) < (b); (i)++) int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double r = sqrt((x2 - x1...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <vector> using namespace std; #define REP(i, n) for (int(i) = 0; (i) < (n); (i)++) #define For(i, a, b) for (int(i) = (a); (i) < (b); (i)++) int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double r = sqrt((x2 -...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
100
#include <cmath> #include <iomanip> #include <iostream> #include <string> #define rep(i, start, n) for (int i = 0; i < n; i++) using namespace std; int main() { int x1 = 0, y1 = 0, x2 = 0, y2 = 0; //?????°?????? int ac = 0, bd = 0, abcd = 0; double dist = 0; cin >> x1 >> y1 >> x2 >> y2; //??\??? ac = (x...
#include <cmath> #include <iomanip> #include <iostream> #include <string> #define rep(i, start, n) for (int i = 0; i < n; i++) using namespace std; int main() { double x1 = 0, y1 = 0, x2 = 0, y2 = 0; //?????°?????? double ac = 0, bd = 0, abcd = 0; double dist = 0; cin >> x1 >> y1 >> x2 >> y2; //??\??? a...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
137
#include <cmath> #include <iostream> using namespace std; int main() { int x1, x2, y1, y2; double dis; cin >> x1 >> y1 >> x2 >> y2; dis = sqrt(pow(x2 - x1, 2.0) + pow(y2 - y1, 2.0)); cout << fixed << dis << endl; return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2, dis; cin >> x1 >> y1 >> x2 >> y2; dis = sqrt(pow(x2 - x1, 2.0) + pow(y2 - y1, 2.0)); cout << fixed << dis << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21]]
1
70
#include <iostream> #include <math.h> using namespace std; int main() { int x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; int a = x1 - x2; int b = y1 - y2; int c = a * a + b * b; double d = sqrt(c); cout << fixed << d << endl; return 0; }
#include <iostream> #include <math.h> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double a = x1 - x2; double b = y1 - y2; double c = a * a + b * b; double d = sqrt(c); cout << fixed << d << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
77
#include <cmath> #include <iomanip> #include <iostream> class Point { public: Point() { x = 0, y = 0; } Point(double x, double y) { this->x = x, this->y = y; } double getX() { return x; } double getY() { return y; } private: double x, y; }; int main(int argc, char const *argv[]) { double x1, x2, y1, y2; ...
#include <cmath> #include <iomanip> #include <iostream> class Point { public: Point() { x = 0, y = 0; } Point(double x, double y) { this->x = x, this->y = y; } double getX() { return x; } double getY() { return y; } private: double x, y; }; int main(int argc, char const *argv[]) { double x1, x2, y1, y2; ...
[["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 48], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 22], ["+", 12, 2, 3, 4, 0, 16, 12, 16, 31, 22], ["+", 12, 2, 3, 4, 0, 16, 12, 16, 17, 48]]
1
203
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double d = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); cout << fixed << setprecision(8) << d << "\n"; }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double d = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); cout << fixed << setprecision(8) << d << "\n"; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
94
#include <cmath> #include <iostream> using namespace std; int main(void) { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)) << endl; return 0; }
#include <cmath> #include <iostream> using namespace std; int main(void) { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)) << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
64
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)) << endl; }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)) << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
62
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; double distance(double x1, double y1, double x2, double y2) { return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); } int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; printf("%.8lf\n", distance(x1, y1, x2, y2)); ...
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; double distance(double x1, double y1, double x2, double y2) { return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); } int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; printf("%.8lf\n", distance(x1, y1, x2, y2))...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
102
#include <iomanip> #include <iostream> #include <math.h> using namespace std; int main() { long p1x, p1y, p2x, p2y, l; cin >> p1x >> p1y >> p2x >> p2y; l = pow((p2x - p1x), 2) + pow((p2y - p1y), 2); l = sqrt(l); cout << fixed << setprecision(4) << l << endl; return 0; }
#include <iomanip> #include <iostream> #include <math.h> using namespace std; int main() { double p1x, p1y, p2x, p2y, l; cin >> p1x >> p1y >> p2x >> p2y; l = pow((p2x - p1x), 2) + pow((p2y - p1y), 2); l = sqrt(l); cout << fixed << setprecision(4) << l << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
84
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main(void) { int x1, x2, y1, y2; cin >> x1 >> x2 >> y1 >> y2; printf("%.8f\n", sqrt((x1 - y1) * (x1 - y1) + (x2 - y2) * (x2 - y2))); }
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main(void) { double x1, x2, y1, y2; cin >> x1 >> x2 >> y1 >> y2; printf("%.8f", sqrt((x1 - y1) * (x1 - y1) + (x2 - y2) * (x2 - y2))); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
71
#include <iostream> using namespace std; #include <cmath> int main() { double x1, y1, x2, y2; double result, temp; cin >> x1 >> y1 >> x2 >> y2; temp = pow(x1 - x2, 2) + pow(y1 - y2, 2); result = sqrt(temp); cout << result << endl; return 0; }
#include <iostream> using namespace std; #include <cmath> int main() { double x1, y1, x2, y2; double result, temp; cin >> x1 >> y1 >> x2 >> y2; temp = pow(x1 - x2, 2) + pow(y1 - y2, 2); result = sqrt(temp); cout << fixed; cout << result << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
74
#include <iostream> #include <math.h> #include <string> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); cout << d << endl; return 0; }
#include <iostream> #include <math.h> #include <string> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); cout << fixed << d << endl; return 0; }
[["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
74
#include <algorithm> #include <cstdlib> #include <ctype.h> #include <functional> #include <iostream> #include <math.h> #include <numeric> #include <sstream> #include <string.h> #include <string> #include <vector> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double dist...
#include <algorithm> #include <cstdlib> #include <ctype.h> #include <functional> #include <iostream> #include <math.h> #include <numeric> #include <sstream> #include <string.h> #include <string> #include <vector> using namespace std; int main() { long double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; long d...
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22]]
1
85
#include <bits/stdc++.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(5) << sqrt(pow(x1 - x2, 2.0) + pow(y1 - y2, 2.0)) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << setprecision(8) << sqrt(pow(x1 - x2, 2.0) + pow(y1 - y2, 2.0)) << endl; return 0; }
[["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
64
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { int x1, x2, y1, y2; double dist; cin >> x1 >> x2 >> y1 >> y2; dist = sqrt((y1 - x1) * (y1 - x1) + (y2 - x2) * (y2 - x2)); printf("%.10lf", dist); return 0; }
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2; double dist; cin >> x1 >> x2 >> y1 >> y2; dist = sqrt((y1 - x1) * (y1 - x1) + (y2 - x2) * (y2 - x2)); printf("%.10lf", dist); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
79
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main(void) { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double dist = sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)); cout << dist << endl; return 0; }
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main(void) { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double dist = sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)); cout << fixed << dist << endl; return 0; }
[["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
73
#include <cstdio> long double sqrt(double); int main(void) { double d; double x1, y1, x2, y2, D; scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2); D = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2); sqrt(D); d = sqrt(D); printf("%Lf\n", d); return 0; } long double sqrt(double a) { int i; long double b = ...
#include <cstdio> long double sqrt(double); int main(void) { long double d; double x1, y1, x2, y2, D; scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2); D = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2); sqrt(D); d = sqrt(D); printf("% 8.8Lf\n", d); return 0; } long double sqrt(double a) { int i; long do...
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
154
#include <iomanip> #include <iostream> #include <math.h> using namespace std; int main() { double x1, x2, y1, y2, x, y, a, b, p; cin >> x1 >> y1 >> x2 >> y2; x = x2 - x1; y = y2 - y1; a = x * x; b = y * y; p = a + b; double answer = sqrt(p); cout << answer << setprecision(8) << endl; }
#include <iomanip> #include <iostream> #include <math.h> using namespace std; int main() { double x1, x2, y1, y2, x, y, a, b, p; cin >> x1 >> y1 >> x2 >> y2; x = x2 - x1; y = y2 - y1; a = x * x; b = y * y; p = a + b; double answer = sqrt(p); cout << fixed << setprecision(8) << answer << endl; }
[["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
94
#include <bits/stdc++.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double d = sqrt((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)); printf("%lf\n", d); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double d = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); printf("%lf\n", d); return 0; }
[["-", 49, 50, 51, 16, 31, 2, 3, 4, 0, 25], ["-", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24]]
1
76
#include <math.h> #include <stdio.h> int main(void) { double answer, px, py, p2x, p2y, tate, yoko; scanf("%lf %lf %lf $lf", &px, &py, &p2x, &p2y); if (py < p2y) { tate = p2y - py; } else if (p2y < py) { tate = py - p2y; } else { tate = 0; } if (px < p2x) { yoko = p2x - px; } else if (p...
#include <math.h> #include <stdio.h> int main(void) { double answer, px, py, p2x, p2y, tate, yoko; scanf("%lf %lf %lf %lf", &px, &py, &p2x, &p2y); if (py < p2y) { tate = p2y - py; } else if (p2y < py) { tate = py - p2y; } else { tate = 0; } if (px < p2x) { yoko = p2x - px; } else if (p2...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
148
/* * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_10_A */ #include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(5) << sqrt((x2 - x1) * (x2 - x1) + (y2 ...
/* * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_10_A */ #include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(10) << sqrt((x2 - x1) * (x2 - x1...
[["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
82
#include <cmath> #include <iomanip> #include <iostream> using namespace std; //--------------------------------------- //--------------------------------------- int main(void) { int x1, y1, x2, y2; cout << fixed << setprecision(4); cin >> x1; cin >> y1; cin >> x2; cin >> y2; cout << sqrt(pow((x1 - x2),...
#include <cmath> #include <iomanip> #include <iostream> using namespace std; //--------------------------------------- //--------------------------------------- int main(void) { double x1, y1, x2, y2; cout << fixed << setprecision(4); cin >> x1; cin >> y1; cin >> x2; cin >> y2; cout << sqrt(pow((x1 - x...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
85
#include <cmath> #include <iostream> using namespace std; int main() { int x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << (float)sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) << endl; return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 16, 31, 16, 12, 74, 0, 24], ["-", 0, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["-", 0, 1, 0, 16, 31, 16, 12, 74, 0, 25], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
70
#include <iostream> #include <math.h> using namespace std; int main() { // freopen("in.txt", "r", stdin); double x1, x2, y1, y2; double result; cin >> x1 >> y1 >> x2 >> y2; result = sqrt(pow(x1 + x2, 2) + pow(y1 + y2, 2)); printf("%.4lf", result); }
#include <iostream> #include <math.h> using namespace std; int main() { // freopen("in.txt", "r", stdin); double x1, x2, y1, y2; double result; cin >> x1 >> y1 >> x2 >> y2; result = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); printf("%.4lf", result); }
[["-", 0, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 16, 12, 2, 3, 4, 0, 16, 17, 33]]
1
69
#include <math.h> #include <stdio.h> int main() { double a, b, c, d; scanf("%lf %lf %lf %lf", &a, &b, &c, &d); printf("%???f\n", sqrt((a - c) * (a - c) + (b - d) * (b - d))); return 0; }
#include <math.h> #include <stdio.h> int main() { double a, b, c, d; scanf("%lf %lf %lf %lf", &a, &b, &c, &d); printf("%lf\n", sqrt((a - c) * (a - c) + (b - d) * (b - d))); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
76
#include <iostream> #include <math.h> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << sqrt(pow(y2 - y1, 2) + pow(x2 - x1, 2)) << endl; return 0; }
#include <iostream> #include <math.h> using namespace std; int main() { long double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt(pow(y2 - y1, 2) + pow(x2 - x1, 2)) << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22]]
1
61
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { double x1 = 0, y1 = 0, x2 = 0, y2 = 0; cin >> x1 >> y1 >> x2 >> y2; cout << setiosflags(ios::showpoint) << sqrt(pow((x1 - x2), 2) + pow((y1 - y2), 2)) << endl; return 0; }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { double x1 = 0, y1 = 0, x2 = 0, y2 = 0; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(10) << sqrt(pow((x1 - x2), 2) + pow((y1 - y2), 2)) << endl; return 0; }
[["-", 0, 16, 31, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 31, 16, 12, 2, 63, 22], ["-", 31, 16, 12, 2, 3, 4, 0, 343, 345, 348], ["-", 31, 16, 12, 2, 3, 4, 0, 343, 0, 349], ["-", 31, 16, 12, 2, 3, 4, 0, 343, 141, 22], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
82
#include <cmath> #include <iostream> int main(int argc, const char *argv[]) { double x1, y1, x2, y2; std::cin >> x1 >> y1 >> x2 >> y2; std::cout << std::sqrt(std::pow(x2 - x1, 2.0) + std::pow(y2 - y1, 2.0)) << std::endl; return 0; }
#include <cmath> #include <iostream> int main(int argc, const char *argv[]) { double x1, y1, x2, y2; std::cin >> x1 >> y1 >> x2 >> y2; std::cout << std::fixed << std::sqrt(std::pow(x2 - x1, 2.0) + std::pow(y2 - y1, 2.0)) << std::endl; return 0; }
[["+", 0, 16, 31, 16, 31, 16, 12, 343, 141, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 16, 31, 16, 12, 2, 63, 343, 345, 348], ["+", 0, 16, 31, 16, 12, 2, 63, 343, 0, 349]]
1
78
#include <cmath> #include <iostream> using namespace std; int main() { int x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double ans = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2); cout << fixed << sqrt(ans) << endl; }
#include <cmath> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double ans = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2); cout << fixed << sqrt(ans) << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
71
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main(void) { int x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double distance = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); cout << fixed << distance << endl; return 0; }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main(void) { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; double distance = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); cout << setprecision(10) << distance << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 12, 2, 63, 22], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 25]]
1
71
#include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(5) << sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)); }
#include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(15) << sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)) << endl; }
[["-", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
71
#include <cmath> #include <iostream> #include <stdio.h> using namespace std; double a, b, c, d; int main() { cin >> a >> b >> c >> d; double d = sqrt((a - c) * (a - c) + (b - d) * (b - d)); printf("%.6f\n", d); }
#include <cmath> #include <iostream> #include <stdio.h> using namespace std; double a, b, c, d; int main() { cin >> a >> b >> c >> d; double e = sqrt((a - c) * (a - c) + (b - d) * (b - d)); printf("%.6f\n", e); }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
75
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; cout << fixed << setprecision(8) << sqrt((a - c) * (a - c) + (b - d) * (b - d)) << endl; }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { double a, b, c, d; cin >> a >> b >> c >> d; cout << fixed << setprecision(8) << sqrt((a - c) * (a - c) + (b - d) * (b - d)) << endl; cin >> a; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
73
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double dist = 0.0 + sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); cout << setprecision(9) << dist << endl; return 0; }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main(int argc, char *argv[]) { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double dist = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); cout << setprecision(15) << dist << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
89
#include <bits/stdc++.h> using namespace std; int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(10) << fixed << sqrt((pow(x1 - x2, 2) + pow(y1 - y2, 2)) * 1.0) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(10) << fixed << sqrt((pow(x1 - x2, 2) + pow(y1 - y2, 2)) * 1.0) << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
67
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main() { double x; int a, b, c, d; cin >> a >> b >> c >> d; x = ((c - a) * (c - a)) + ((d - b) * (d - b)); printf("%.6f \n", sqrt(x)); }
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main() { double x; double a, b, c, d; cin >> a >> b >> c >> d; x = ((c - a) * (c - a)) + ((d - b) * (d - b)); printf("%.6f \n", sqrt(x)); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
81
#include <cmath> #include <cstdio> #include <cstdlib> int main() { double x1, y1, x2, y2; scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2); double dx = abs(x1 - x2); double dy = abs(y1 - y2); double dis = sqrt(dx * dx + dy * dy); printf("%f\n", dis); return 0; }
#include <cmath> #include <cstdio> using namespace std; int main() { double x1, y1, x2, y2; scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2); double dx = abs(x1 - x2); double dy = abs(y1 - y2); double dis = sqrt(dx * dx + dy * dy); printf("%f\n", dis); return 0; }
[["-", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 233], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 256], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 35]]
1
87
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { float x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(5) << sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(20) << sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
63
#include <bits/stdc++.h> using namespace std; int main() { int x1, y1, x2, y2; double ans; cin >> x1 >> y1 >> x2 >> y2; ans = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); printf("%.5lf\n", ans); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double x1, y1, x2, y2; double ans; cin >> x1 >> y1 >> x2 >> y2; ans = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); printf("%.5lf\n", ans); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
76
// clang-format off #include <bits/stdc++.h> using namespace std; #define int long long #define main signed main() #define loop(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) loop(i, 0, n) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define prec(n) fixed << setprecision(n)...
// clang-format off #include <bits/stdc++.h> using namespace std; #define int long long #define main signed main() #define loop(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) loop(i, 0, n) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define prec(n) fixed << setprecision(n)...
[["-", 0, 1, 0, 191, 51, 83, 0, 42, 0, 40], ["+", 0, 1, 0, 191, 51, 83, 0, 42, 0, 40]]
1
618
#include <bits/stdc++.h> using namespace std; int main(void) { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) << endl; }
#include <bits/stdc++.h> using namespace std; int main(void) { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << setprecision(10) << sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) << endl; }
[["+", 0, 16, 31, 16, 31, 16, 12, 2, 63, 22], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
63
#include <bits/stdc++.h> using namespace std; int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << setprecision(8) << sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << setprecision(8) << sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
70
#include "cmath" #include "iostream" #include "stdio.h" using namespace std; int main(int argc, char const *argv[]) { double x1, y1, x2, y2 = 0; cin >> x1 >> y2 >> x2 >> y2; printf("%f\n", sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2))); return 0; }
#include "cmath" #include "iostream" #include "stdio.h" using namespace std; int main(int argc, char const *argv[]) { double x1, y1, x2, y2 = 0; cin >> x1 >> y1 >> x2 >> y2; printf("%.10f\n", sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2))); return 0; }
[["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
84
#include <cmath> #include <cstdio> #include <iostream> #include <string> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; int e; e = (c - a) * (c - a) + (d - b) * (d - b); printf("%.7f\n", sqrt(e)); }
#include <cmath> #include <cstdio> #include <iostream> #include <string> using namespace std; int main() { double a, b, c, d; cin >> a >> b >> c >> d; double e; e = (c - a) * (c - a) + (d - b) * (d - b); printf("%.7f\n", sqrt(e)); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
79
#include <cmath> #include <iomanip> #include <iostream> using namespace std; double f(int x) { return x * x; } int main(void) { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << setprecision(8) << sqrt(f(x2 - x1) + f(y2 - y1)) << endl; return 0; }
#include <cmath> #include <iomanip> #include <iostream> using namespace std; double f(double x) { return x * x; } int main(void) { double x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << setprecision(8) << sqrt(f(x2 - x1) + f(y2 - y1)) << endl; return 0; }
[["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40]]
1
80
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double X = (x1 - x2) * (x1 - x2); double Y = (y1 - y2) * (y1 - y2); printf("%.1lf\n", sqrt(X + Y)); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double X = (x1 - x2) * (x1 - x2); double Y = (y1 - y2) * (y1 - y2); printf("%.6lf\n", sqrt(X + Y)); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
80
#include <cmath> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)) << endl; return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)) << endl; return 0; }
[["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
61
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2, D; cin >> x1 >> y1 >> x2 >> y2; D = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); printf("%f%8\n", D); return 0; }
#include <cmath> #include <cstdio> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2, D; cin >> x1 >> y1 >> x2 >> y2; D = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); printf("%f\n", D); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
73
#include <bits/stdc++.h> #include <cmath> using namespace std; int main(void) { double a, b, c, d, x, y; cin >> a >> b >> c >> d; x = c - a; y = b - d; if (x < 0) x = x * -1; if (y < 0) y = y * -1; printf("%lf\nn", sqrt(x * x + y * y)); return 0; }
#include <bits/stdc++.h> #include <cmath> using namespace std; int main(void) { double a, b, c, d, x, y; cin >> a >> b >> c >> d; x = c - a; y = b - d; if (x < 0) x = x * -1; if (y < 0) y = y * -1; printf("%lf\n", sqrt(x * x + y * y)); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
97
#include <iostream> #include <math.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)) << endl; }
#include <iostream> #include <math.h> using namespace std; int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << fixed << sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)) << endl; }
[["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
58
var readable = process.stdin; readable.resume(); readable.setEncoding('utf-8'); readable.on('data', function(chunk) { input += chunk; var data = chunk.split(" ").map(Number); var a = data[0]; var b = data[1]; var C = data[2] * (Math.PI / 180); var h = Math.sin(C) * b; var ta = Math.cos(C) * b; var c = ...
var readable = process.stdin; readable.resume(); readable.setEncoding('utf-8'); readable.on('data', function(chunk) { var data = chunk.split(" ").map(Number); var a = data[0]; var b = data[1]; var C = data[2] * (Math.PI / 180); var h = Math.sin(C) * b; var ta = Math.cos(C) * b; var c = Math.sqrt(Math.pow...
[["-", 0, 63, 8, 556, 0, 1, 0, 564, 31, 22], ["-", 0, 63, 8, 556, 0, 1, 0, 564, 17, 107], ["-", 0, 63, 8, 556, 0, 1, 0, 564, 12, 22], ["-", 3, 3, 0, 63, 8, 556, 0, 1, 0, 35]]
2
184
"use strict"; main(require("fs") .readFileSync("/dev/stdin", "utf8") .replace(/\r?\n$/, "") .split(/\r?\n/)); function main(lines) { var ary = lines[0].split(" ").map(Number); var a = ary[0], b = ary[1], C = ary[2] / 180 * Math.PI; console.log(a * b * Math.sin(C)); console.log(a + b ...
"use strict"; main(require("fs") .readFileSync("/dev/stdin", "utf8") .replace(/\r?\n$/, "") .split(/\r?\n/)); function main(lines) { var ary = lines[0].split(" ").map(Number); var a = ary[0], b = ary[1], C = ary[2] / 180 * Math.PI; console.log(a * b * Math.sin(C) / 2); console.log(a ...
[["+", 0, 1, 0, 2, 3, 3, 0, 16, 17, 85], ["+", 0, 1, 0, 2, 3, 3, 0, 16, 12, 555]]
2
162
// config = {stdin: 'tmp', newline: '\r\n'}; // win config = { stdin : '/dev/stdin', newline : '\n' }; // linux line = require('fs') .readFileSync(config.stdin, 'ascii') .split(config.newline)[0] .split(' ') .map(Number); (function(a, b, C) { console.log('%d %d %d', 0.5 ...
// config = {stdin: 'tmp', newline: '\r\n'}; // win config = { stdin : '/dev/stdin', newline : '\n' }; // linux line = require('fs') .readFileSync(config.stdin, 'ascii') .split(config.newline)[0] .split(' ') .map(Number); (function(a, b, C) { console.log('%d\n%d\n%d', 0....
[["-", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491], ["+", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491], ["+", 0, 1, 0, 2, 3, 3, 0, 557, 0, 44], ["-", 0, 16, 12, 2, 3, 3, 0, 16, 17, 72], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 31, 555], ["+", 0, 16, 12, 2, 3, 3, 0, 16, 17, 33], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 31, 555]]
2
158
<?php list($a, $b, $r) = explode(" ", trim(fgets(STDIN))); $s = 0.5 * ($a * $b) * (sin(c * (M_PI / 180))); $l = $a + $b + sqrt(pow($a, 2) + pow($b, 2) - (2 * $a * $b * cos($r * (M_PI / 180)))); $h = $b * sin($r * (M_PI / 180)); print($s . "\n" . $l . "\n" . $h); ?>
<?php list($a, $b, $r) = explode(" ", trim(fgets(STDIN))); $s = 0.5 * ($a * $b) * (sin($r * (M_PI / 180))); $l = $a + $b + sqrt(pow($a, 2) + pow($b, 2) - (2 * $a * $b * cos($r * (M_PI / 180)))); $h = $b * sin($r * (M_PI / 180)); print($s . "\n" . $l . "\n" . $h); ?>
[["-", 0, 613, 3, 3, 0, 28, 0, 16, 31, 141], ["+", 3, 3, 0, 28, 0, 16, 31, 606, 0, 607], ["+", 3, 3, 0, 28, 0, 16, 31, 606, 0, 141]]
6
143
<?php list($a,$b,$C)=explode(' ',trim(fgets(STDIN))); $C=deg2rad($C); $h=$b*sin($c); $c=sqrt(pow($a-$b*cos($c),2)+pow($h,2)); echo $a*$h/2,PHP_EOL,$a+$b+$c,PHP_EOL,$h;
<?php list($a,$b,$C)=explode(' ',trim(fgets(STDIN))); $C=deg2rad($C); $h=$b*sin($C); $c=sqrt(pow($a-$b*cos($C),2)+pow($h,2)); echo $a*$h/2,PHP_EOL,$a+$b+$c,PHP_EOL,$h;
[["-", 12, 613, 3, 3, 0, 28, 0, 606, 0, 141], ["+", 12, 613, 3, 3, 0, 28, 0, 606, 0, 141]]
6
105
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); double a = scan.nextDouble(); double b = scan.nextDouble(); double arg = scan.nextDouble(); double rad = Math.toRadians(arg); double S = b * a * Math.sin(rad) / 2; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); double a = scan.nextDouble(); double b = scan.nextDouble(); double arg = scan.nextDouble(); double rad = Math.toRadians(arg); double S = b * a * Math.sin(rad) / 2; ...
[["+", 51, 16, 12, 16, 31, 16, 31, 16, 31, 499], ["+", 51, 16, 12, 16, 31, 16, 31, 16, 17, 48]]
3
173