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
import numpy as np A, B, H, M = list(map(int, input().split())) long_rad = (H % 12) / 12. + M / (12. * 60) short_rad = M / 60. sub_rad = (np.abs(long_rad - short_rad)) if sub_rad > 1 / 2.: sub_rad -= 1 / 2. x = (A * np.cos(2 * np.pi * sub_rad)) y = (A * np.sin(2 * np.pi * sub_rad)) print(np.sqrt(y ** 2 + (B - x...
import numpy as np A, B, H, M = list(map(int, input().split())) long_rad = (H % 12) / 12. + M / (12. * 60) short_rad = M / 60. sub_rad = (np.abs(long_rad - short_rad)) if sub_rad > 1 / 2.: sub_rad = 1 - sub_rad x = (A * np.cos(2 * np.pi * sub_rad)) y = (A * np.sin(2 * np.pi * sub_rad)) print(np.sqrt(y ** 2 + (B...
[["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["-", 64, 196, 0, 1, 0, 677, 12, 657, 17, 85], ["-", 64, 196, 0, 1, 0, 677, 12, 657, 12, 531], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]]
5
128
import sys import math A,B,H,M = list(map(int,input().split())) rad_B = M * 6 rad_A = H * 30 + M * 0.5 if rad_A < rad_B: rad_C = rad_A - rad_B elif rad_A > rad_B: rad_C = rad_B - rad_A elif rad_A == rad_B: rad_C = 0 rad_C = abs(rad_C) if rad_C > 180: rad_C = 360 - rad_C #print(rad_A,rad_B,rad_C) ...
import sys import math A,B,H,M = list(map(int,input().split())) rad_B = M * 6 rad_A = H * 30 + M * 0.5 if rad_A < rad_B: rad_C = rad_A - rad_B elif rad_A > rad_B: rad_C = rad_B - rad_A elif rad_A == rad_B: rad_C = 0 rad_C = abs(rad_C) if rad_C > 180: rad_C = 360 - rad_C #print(rad_A,rad_B,rad_C) ...
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33]]
5
129
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { double a, b, h, m; double deg; double sl = ((double)360) / ((double)60); double ss = ((double)360) / ((double)720); ll i, j; double ret; cin >> a >> b >> h >> m; deg = abs(ss * h * 60 - sl * m); if (deg > 180) { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { double a, b, h, m; double deg; double sl = ((double)360) / ((double)60); double ss = ((double)360) / ((double)720); ll i, j; double ret; cin >> a >> b >> h >> m; deg = abs(ss * h * 60 + ss * m - sl * m); if (deg > 18...
[["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 72], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 12, 22]]
1
161
#include <math.h> #include <stdio.h> int main(void) { int H, M, A, B; double Hx, Hy, Mx, My, Hr, Mr; double d; scanf("%d%d%d%d", &A, &B, &H, &M); Hr = (M_PI / 2) - (M_PI / 6) * H - (M_PI / 360) * M; Hx = A * cos(Hr); Hy = A * sin(Hr); Mr = (M_PI / 2) - (M_PI / 30) * M; Mx = B * cos(Mr); My = B * ...
#include <math.h> #include <stdio.h> int main(void) { int H, M, A, B; double Hx, Hy, Mx, My, Hr, Mr, d; scanf("%d%d%d%d", &A, &B, &H, &M); Hr = (M_PI / 2) - (M_PI / 6) * H - (M_PI / 360) * M; Hx = A * cos(Hr); Hy = A * sin(Hr); Mr = (M_PI / 2) - (M_PI / 30) * M; Mx = B * cos(Mr); My = B * sin(Mr); ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
173
import numpy as np a, b, h, m = map(int, input().split()) w1 = 360 * (h/12) w2 = 360 * (m/60) s = min(abs(w1-w2), 360-abs(w1-w2)) rad = np.deg2rad(s) d = np.cos(rad) ans = (a**2 + b**2 - 2*a*b*d)**0.5 print(ans)
import numpy as np a, b, h, m = map(int, input().split()) w1 = 360 * ((h+m/60)/12) w2 = 360 * (m/60) s = min(abs(w1-w2), 360-abs(w1-w2)) rad = np.deg2rad(s) d = np.cos(rad) ans = (a**2 + b**2 - 2*a*b*d)**0.5 print(ans)
[["+", 12, 657, 12, 23, 0, 657, 31, 23, 0, 24], ["+", 12, 23, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 31, 22], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 17, 85], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 12, 657, 12, 23, 0, 657, 31, 23, 0, 25]]
5
103
#include <bits/stdc++.h> using namespace std; int main() { float A, B, H, M, a, c, b; cin >> A >> B >> H >> M; c = H * 30 + M * 0.5 - M * 6; if (c < 0) { c = c * -1; } if (c > 180) { c = 360 - c; } c = c / 180 * 3.141592653589793; b = A * A + B * B - 2 * A * B * cos(c); b = sqrt(b); cout ...
#include <bits/stdc++.h> using namespace std; int main() { long double A, B, H, M, a, c, b; cin >> A >> B >> H >> M; c = H * 30 + M * 0.5 - M * 6; if (c < 0) { c = c * -1; } if (c > 180) { c = 360 - c; } c = c / 180 * 3.14159265358979323846264338327950288419716939937; b = A * A + B * B - 2 * ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
124
// agrawal117 // chahatagrawal117 #include <bits/stdc++.h> #define endl '\n' #define mod 1000000007 typedef long long int ll; using namespace std; #define MAX 100005 const long double pie = 3.14159265358979323846; int calcAngle(double h, double m) { // validate the input if (h < 0 || m < 0 || h > 12 || m > 60) ...
// agrawal117 // chahatagrawal117 #include <bits/stdc++.h> #define endl '\n' #define mod 1000000007 typedef long long int ll; using namespace std; #define MAX 100005 const long double pie = 3.14159265358979323846; int calcAngle(double h, double m) { // validate the input if (h < 0 || m < 0 || h > 12 || m > 60) ...
[["-", 0, 11, 12, 2, 3, 4, 0, 16, 31, 13], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 31, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]]
1
307
import math A,B,H,M = map(int, input().split()) # 12時からの角度を求める # [1分あたりに進む角度]=360÷(12×60) tansin = (H*60+M)*0.5 tyosin = M*6 kakudo = tansin - tyosin print(kakudo) ans = (A**2)+(B**2)-(2*A*B*math.cos(math.radians(kakudo))) print(math.sqrt(ans))
import math A,B,H,M = map(int, input().split()) # 12時からの角度を求める # [1分あたりに進む角度]=360÷(12×60) tansin = (H*60+M)*0.5 tyosin = M*6 kakudo = tansin - tyosin ans = (A**2)+(B**2)-(2*A*B*math.cos(math.radians(kakudo))) print(math.sqrt(ans))
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
91
#include <algorithm> // sort #include <bitset> #include <cmath> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #inc...
#include <algorithm> // sort #include <bitset> #include <cmath> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #inc...
[["+", 51, 2, 3, 4, 0, 16, 31, 16, 17, 72], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 12, 22]]
1
173
#include <algorithm> #include <bitset> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <deque> #include <initializer_list> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <queue> #include <set> #i...
#include <algorithm> #include <bitset> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <deque> #include <initializer_list> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <queue> #include <set> #i...
[["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13]]
1
413
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner kbd = new Scanner(System.in); int a = kbd.nextInt(); int b = kbd.nextInt(); int h = kbd.nextInt(); int m = kbd.nextInt(); double A = h * 30 + m * 0.5; double B = m * 6; double C = 0; if...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner kbd = new Scanner(System.in); int a = kbd.nextInt(); int b = kbd.nextInt(); int h = kbd.nextInt(); int m = kbd.nextInt(); double A = h * 30 + m * 0.5; double B = m * 6; double C = 0; if...
[["-", 64, 196, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 31, 499], ["-", 64, 196, 0, 1, 0, 11, 12, 16, 12, 499], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 12, 22]]
3
208
#include <cmath> #include <iomanip> #include <iostream> #include <math.h> int main() { int a = 0; int b = 0; int h = 0; int m = 0; double hdeg = 0.0; double mdeg = 0.0; double diff = 0.0; double length = 0.0; std::cin >> a >> b >> h >> m; hdeg = h * 30 + m * 0.5; mdeg = m * 6; diff = std::abs...
#include <cmath> #include <iomanip> #include <iostream> #include <math.h> int main() { int a = 0; int b = 0; int h = 0; int m = 0; double hdeg = 0.0; double mdeg = 0.0; double diff = 0.0; double length = 0.0; std::cin >> a >> b >> h >> m; hdeg = h * 30 + m * 0.5; mdeg = m * 6; diff = std::abs...
[["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
240
#include <algorithm> #include <cmath> #include <iostream> #include <math.h> using namespace std; int main() { int A, B, H, M; // A < B cin >> A >> B >> H >> M; double sheta = 0; double ans = 0; double PI = 3.141592653589793; double hour = 30 * H + (M / 2); double min = 6 * M; bool flag = hour > min; ...
#include <algorithm> #include <cmath> #include <iostream> #include <math.h> using namespace std; int main() { int A, B, H, M; // A < B cin >> A >> B >> H >> M; double sheta = 0; double ans = 0; double PI = 3.141592653589793; double hour = 30 * H + (M / 2.0); double min = 6 * M; bool flag = hour > min...
[["-", 49, 50, 51, 16, 12, 23, 0, 16, 12, 13], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 12, 13], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 31, 13]]
1
205
import numpy as np A,B,H,M = map(int,input().split()) th_a = 30*H th_b = 6*M theta = th_a -th_b if theta <= 0: theta = -theta if theta >= 180: theta = 360 - theta if theta == 0: if A >= B: print(A-B) else: print(B-A) elif theta == 180: print(A+B) else: print(np.sqrt(A**2 + B**2 - 2*A*B*np.co...
import numpy as np A,B,H,M = map(int,input().split()) th_a = 30*H + 0.5 * M th_b = 6*M theta = th_a -th_b if theta <= 0: theta = -theta if theta >= 180: theta = 360 - theta if theta == 0: if A >= B: print(A-B) else: print(B-A) elif theta == 180: print(A+B) else: print(np.sqrt(A**2 + B**2 - 2*...
[["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 531], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 22]]
5
129
#include <math.h> #include <stdio.h> int main(void) { int A, B, H, M; long double a, b, h, m, x, j, s; double answer; scanf("%d %d %d %d", &A, &B, &H, &M); a = A; b = B; h = H % 12; m = M; s = (60.0L * h - 11.0L * m) / 360.0L * 3.14159265358979L; j = a * a + b * b - 2.0L * a * b * cosl(s); x = s...
#include <math.h> #include <stdio.h> int main(void) { int A, B, H, M; long double a, b, h, m, x, j, s; double answer; scanf("%d %d %d %d", &A, &B, &H, &M); a = A; b = B; h = H % 12; m = M; s = (60.0L * h - 11.0L * m) / 360.0L * 3.14159265358979L; j = a * a + b * b - 2.0L * a * b * cosl(s); x = s...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
136
import math A, B, H, M = map(int, input().split()) pi = math.pi Hrad = (H+(M/60))*2*pi/12 Mrad = M*2*pi/60 d = abs(Hrad-Mrad) if d >= pi: d = pi-d print(math.sqrt(A**2+B**2-2*A*B*math.cos(d)))
import math A, B, H, M = map(int, input().split()) pi = math.pi Hrad = (H+(M/60))*2*pi/12 Mrad = M*2*pi/60 d = abs(Hrad-Mrad) # print(math.degrees(d)) if d >= pi: d = 2*pi - d # print(math.degrees(d)) print(math.sqrt(A**2+B**2-2*A*B*math.cos(d)))
[["+", 0, 1, 0, 662, 12, 657, 31, 657, 31, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 48]]
5
99
#include <bits/stdc++.h> #define NREP() for (ll i = 0; i < n; i++) #define MREP() for (ll j = 0; j < m; j++) #define REP(i, x, y) for (ll i = x; i < y; i++) #define ALL(x) (x).begin(), (x).end() #define MSG(x) cout << x << endl; #define MSGF(x, n) MSG(fixed << setprecision(n) << x) #define END(x) ...
#include <bits/stdc++.h> #define NREP() for (ll i = 0; i < n; i++) #define MREP() for (ll j = 0; j < m; j++) #define REP(i, x, y) for (ll i = x; i < y; i++) #define ALL(x) (x).begin(), (x).end() #define MSG(x) cout << x << endl; #define MSGF(x, n) MSG(fixed << setprecision(n) << x) #define END(x) ...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13]]
1
520
#include <math.h> #include <stdio.h> #define PI 3.14159265 int main() { int a, b, h, m; double lx, ly, sx, sy; double lk, sk; double d; double s, c; scanf("%d %d %d %d", &a, &b, &h, &m); lk = (h * 60.0 + m) * 0.5; lk = lk * (double)(PI / 180.0); lx = a * cos(lk); ly = a * sin(lk); sk = m * 6...
#include <math.h> #include <stdio.h> #define PI \ 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067 int main() { int a, b, h, m; double lx, ly, sx, sy; double lk, sk; double d; double s,...
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 36, 36, 0, 30, 0, 58], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["+", 36, 36, 0, 30, 0, 58, 141, 22, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59]]
0
191
import math A, B, H, M = map(int, input().split()) a = 6*M b = 30*H + 0.5*M if a==b: print(abs(A-B)) exit() elif a < b: dif = b - a else: dif = a - b if int(dif) == 180: print(A+B) else: deg = dif%180 print(math.sqrt(pow(A,2)+pow(B,2)+(-2*A*B*math.cos(math.radians(deg)))))
import math A, B, H, M = map(int, input().split()) a = 6*M b = 30*H + 0.5*M if a==b: print(abs(A-B)) exit() elif a < b: dif = b - a else: dif = a - b if int(dif) == 180: print(A+B) else: deg = dif print(math.sqrt(pow(A,2)+pow(B,2)+(-2*A*B*math.cos(math.radians(deg)))))
[["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 109], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
5
133
#include <bits/stdc++.h> #include <cmath> using namespace std; int main() { const double pi = 3.1415926535897932; double A, B; cin >> A >> B; double H, M; cin >> H >> M; double a, b; a = (H / 6.00 + M / 360.00) * pi; b = pi * M / 30.00; cout << sqrt(A * A + B * B - 2.00 * A * B * cos(b - a)) << end...
#include <bits/stdc++.h> #include <cmath> using namespace std; int main() { const double pi = 3.1415926535897932; double A, B; cin >> A >> B; double H, M; cin >> H >> M; double a, b; a = (H / 6.00 + M / 360.00) * pi; b = pi * M / 30.00; cout << setprecision(24) << sqrt(A * A + B * B - 2.00 * A * B ...
[["+", 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
97
def to_radian(degree) degree * Math::PI / 180 end a, b, h, m = gets.split.map(&:to_i) l = 360 * (h * 60 + m) / 720 s = 360 * m / 60 d = l - s puts Math.sqrt(a ** 2 + b ** 2 - 2 * a * b * Math.cos(to_radian(d)))
def to_radian(degree) degree * Math::PI / 180 end a, b, h, m = gets.split.map(&:to_i) l = 360.0 * (h * 60 + m) / 720 s = 360.0 * m / 60 d = l - s puts Math.sqrt(a ** 2 + b ** 2 - 2 * a * b * Math.cos(to_radian(d)))
[["-", 0, 493, 0, 662, 12, 738, 31, 738, 31, 612], ["+", 0, 493, 0, 662, 12, 738, 31, 738, 31, 531]]
4
84
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; int main() { int a, b, h, m; cin >> a >> b >> h >> m; double M = 6 * m; double H = 30 * h + m / 2; double ans; /* if (M == H) { if (a > b) { ans = a...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; int main() { double a, b, h, m; cin >> a >> b >> h >> m; double M = 6 * m; double H = 30 * h + m / 2; double ans; /* if (M == H) { if (a > b) { ans ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
123
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define modulo ll(1e9 + 7) typedef long long ll; typedef pair<int, int> pii; void init() { cin.tie(0); cin.sync_with_stdio(0); } const int N = 1e5 + 9, M = 1e6 + 9, OO = 0x3f3f3f3f; const ll llOO = 0x3f3f3f3f3f3f3f3f; int main() { ...
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define modulo ll(1e9 + 7) typedef long long ll; typedef pair<int, int> pii; void init() { cin.tie(0); cin.sync_with_stdio(0); } const int N = 1e5 + 9, M = 1e6 + 9, OO = 0x3f3f3f3f; const ll llOO = 0x3f3f3f3f3f3f3f3f; int main() { ...
[["+", 51, 16, 12, 23, 0, 16, 31, 16, 31, 13], ["+", 51, 16, 12, 23, 0, 16, 31, 16, 17, 48], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 17, 48], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 12, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["-", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 0...
1
187
#include <bits/stdc++.h> using namespace std; typedef long long int ll; const int INF = 1 << 30; const long long LINF = 1LL << 60; const long long MOD = (long long)1e9 + 7; long double rad = 3.14159265 / 180.0; pair<long double, long double> calc(long double l, long double t) { pair<long double, long double> res;...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; const int INF = 1 << 30; const long long LINF = 1LL << 60; const long long MOD = (long long)1e9 + 7; long double rad = 3.14159265358979 / 180.0; pair<long double, long double> calc(long double l, long double t) { pair<long double, long double...
[["-", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13]]
1
389
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 h = scan.nextDouble(); double m = scan.nextDouble(); double ah = 0; double am = 0; am = m ...
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 h = scan.nextDouble(); double m = scan.nextDouble(); double ah = 0; double am = 0; am = m ...
[["-", 0, 57, 64, 196, 0, 1, 0, 11, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 11, 12, 499], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 17, 32], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 31, 499], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 12, 22]]
3
175
#define _USE_MATH_DEFINES #include <math.h> #include <stdio.h> #include <string.h> #define min (double)60 #define hour (double)12 typedef struct { double x; double y; } rect; int main() { double a, b, h, m, a_sita, b_sita; rect a_rect, b_rect; scanf("%lf %lf %lf %lf", &a, &b, &h, &m); b_sita = (-2 * M_...
#define _USE_MATH_DEFINES #include <math.h> #include <stdio.h> #include <string.h> #define min (double)60 #define hour (double)12 typedef struct { double x; double y; } rect; int main() { double a, b, h, m, a_sita, b_sita; rect a_rect, b_rect; scanf("%lf %lf %lf %lf", &a, &b, &h, &m); b_sita = (-2 * M_...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
200
#define _USE_MATH_DEFINES #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <algorithm> #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cmath> #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque...
#define _USE_MATH_DEFINES #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <algorithm> #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cmath> #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque...
[["-", 0, 1, 0, 11, 12, 16, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 16, 12, 2, 63, 22]]
1
254
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++) #define all(v) v.begin(), v.end() #define sz(v) v.size() #define INF 100000000000000 // 10^14 100兆 // aよりもbが大きいならばaをbで更新する // (更新されたならばtrueを返す) ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++) #define all(v) v.begin(), v.end() #define sz(v) v.size() #define INF 100000000000000 // 10^14 100兆 // aよりもbが大きいならばaをbで更新する // (更新されたならばtrueを返す) ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 31, 13]]
1
216
import math a,b,h,m = [int(x) for x in input().split()] x = (h*60+m)/2 y = 6*m angle = abs(x - y) angle = min(360 - angle, angle) pi = 3.14159265358979323 k = math.pi/180 if angle==180: print(a+b) elif(angle==0): print(0.0000000000) else: angle = angle*k p = math.cos(angle) if(p<-...
import math a,b,h,m = [int(x) for x in input().split()] x = (h*60+m)/2 y = 6*m angle = abs(x - y) angle = min(360 - angle, angle) pi = 3.14159265358979323 k = math.pi/180 if angle==180: print(a+b) elif(angle==0): print(abs(a-b)) else: angle = angle*k p = math.cos(angle) if(p<-1): ...
[["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 531], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
155
#include <bits/stdc++.h> #include <cmath> #include <math.h> using namespace std; const double pi = acos(-1); int main() { int h, m; double a, b; scanf("%f", &a); scanf("%f", &b); scanf("%i", &h); scanf("%i", &m); int hdeg, mdeg; hdeg = h * 30; hdeg += (m / 2); mdeg = m * 6; double diff = abs(hd...
#include <bits/stdc++.h> #include <cmath> #include <math.h> using namespace std; const double pi = acos(-1); int main() { double h, m; double a, b; scanf("%lf", &a); scanf("%lf", &b); scanf("%lf", &h); scanf("%lf", &m); double hdeg, mdeg; hdeg = h * 30; hdeg += (m / 2); mdeg = m * 6; double dif...
[["-", 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, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
169
import math a, b, h, m = map(int, input().split()) # 時針(0時からa時)の角度 j = 360/(12*60) * (h*60+m) # 分針の角度 f = 360/60 * m # 余弦定理に使う角度 beta = int(abs(j-f)) # 角度が180度より大きい時は360度から引く if beta>180: beta = 360-beta print(math.sqrt((a**2)+(b**2)-2*a*b*math.cos(math.radians(beta))))
import math a, b, h, m = map(int, input().split()) # 時針(0時からa時)の角度 j = 360/(12*60) * (h*60+m) # 分針の角度 f = 360/60 * m # 余弦定理に使う角度 beta = abs(j-f) # 角度が180度より大きい時は360度から引く if beta>180: beta = 360-beta print(math.sqrt((a**2)+(b**2)-2*a*b*math.cos(math.radians(beta))))
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
108
import math A,B,H,M = map(int,input().split()) angh = H*30+M*0.5 angm = M*6 ang = abs(angh - angm)%180 C = (A**2+B**2-2*A*B*math.cos(math.radians(ang)))**0.5 print(C)
import math A,B,H,M = map(int,input().split()) angh = H*30+M*0.5 angm = M*6 ang = abs(angh - angm)%360 C = (A**2+B**2-2*A*B*math.cos(math.radians(ang)))**0.5 print(C)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]]
5
81
#include <bits/stdc++.h> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> using namespace std; map<int, int> ct; map<int, int> ct2; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<pair<int, int>> vpii; typedef pair<int, int> pii; typedef long long ll; type...
#include <bits/stdc++.h> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> using namespace std; map<int, int> ct; map<int, int> ct2; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<pair<int, int>> vpii; typedef pair<int, int> pii; typedef long long ll; type...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
295
import math a,b,h,m = map(int , input().split()) long_needle =(5 * m)/60 + h * 5 sort_needle = m ans = math.sqrt(a**2 + b **2 - 2*a*b*abs(math.cos(abs(math.pi*(long_needle-sort_needle))/30))) print(ans)
import math a,b,h,m = map(int , input().split()) long_needle =(5 * m)/60 + h * 5 sort_needle = m ans = math.sqrt(a**2 + b **2 - 2*a*b*math.cos(abs(math.pi*(long_needle-sort_needle))/30)) print(ans)
[["-", 3, 4, 0, 657, 12, 657, 12, 652, 63, 22], ["-", 0, 657, 12, 657, 12, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
85
import math import sys a,b,h,m = map(int,input().split()) if b>a: a,b = b,a longd = 30*h + m/2 shortd = 360*m/60 # print(longd,shortd) if abs(longd-shortd) > 180: dist = 360-abs(longd-shortd) elif longd-shortd==0: print(abs(longd-shortd)) sys.exit() elif abs(longd-shortd) == 180: print(abs(longd...
import math import sys a,b,h,m = map(int,input().split()) if b>a: a,b = b,a longd = 30*h + m/2 shortd = 360*m/60 # print(longd,shortd) if abs(longd-shortd) > 180: dist = 360-abs(longd-shortd) elif longd-shortd==0: print(abs(a-b)) sys.exit() elif abs(longd-shortd) == 180: print(abs(a+b)) sys.e...
[["-", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22]]
5
251
<?php fscanf(STDIN,"%d %d %d %d",$a,$b,$h,$m); $deg_m = 360 / 60 * $m; $deg_h = ($h * 60 + $m) * 360 / (12 * 60); $deg = $deg_h - $deg_m; $a = pow($a,2) + pow($b,2) + 2*$a*$b*cos(deg2rad($deg)); echo sqrt($a);
<?php fscanf(STDIN,"%d %d %d %d",$a,$b,$h,$m); $deg_m = 360 / 60 * $m; $deg_h = ($h * 60 + $m) * 360 / (12 * 60); $deg = $deg_h - $deg_m; $answer = pow($a,2) + pow($b,2) - 2*$a*$b*cos(deg2rad($deg)); echo sqrt($answer);
[["-", 0, 493, 0, 1, 0, 11, 31, 606, 0, 141], ["+", 0, 493, 0, 1, 0, 11, 31, 606, 0, 141], ["-", 0, 493, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 493, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 0, 613, 3, 3, 0, 28, 0, 606, 0, 141], ["+", 0, 613, 3, 3, 0, 28, 0, 606, 0, 141]]
6
105
import math A,B,H,M=map(int,input().split()) s=abs(0.5*(H*60+M)-6*M) a=math.radians(s) h=A**2+B**2 minus=2*A*B*math.cos(a) ans=(h-minus)**(1/2)
import math A,B,H,M=map(int,input().split()) s=abs(0.5*(H*60+M)-6*M) a=math.radians(s) h=A**2+B**2 minus=2*A*B*math.cos(a) ans=(h-minus)**(1/2) print(ans)
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
84
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); double shortA = sc.nextInt(); double longB = sc.nextInt(); double time = sc.nextInt(); double minute = sc.nextInt(); double all = 360; double ans = 0.0; double timeM...
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); double shortA = sc.nextInt(); double longB = sc.nextInt(); double time = sc.nextInt(); double minute = sc.nextInt(); double all = 360; double ans = 0.0; double timeM...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 19], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 18], ["-", 64, 196, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 31, 515], ["-", 64, 196, 0, 1, 0, 11, 12, 16, 12, 515], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 12, 22]]
3
220
import math a, b, h, m = map(int, input().split()) angle_h = 30 * h angle_m = 6 * m angle = abs(angle_h - angle_m) if angle > 180: angle = 360 - angle bx = math.cos(math.radians(angle)) * b by = math.sin(math.radians(angle)) * b print(math.sqrt(((bx - a)**2) + (by**2)))
import math a, b, h, m = map(int, input().split()) angle_h = 30 * (h + m / 60) angle_m = 6 * m angle = abs(angle_h - angle_m) if angle > 180: angle = 360 - angle bx = math.cos(math.radians(angle)) * b by = math.sin(math.radians(angle)) * b print(math.sqrt(((bx - a)**2) + (by**2)))
[["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 24], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 17, 72], ["+", 12, 657, 12, 23, 0, 657, 12, 657, 31, 22], ["+", 12, 657, 12, 23, 0, 657, 12, 657, 17, 85], ["+", 12, 657, 12, 23, 0, 657, 12, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 25]]
5
103
#include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define REP(i, n) for (i = 0; i < n; i++) #define MAX 1000000 #define MOD 1000000007 long long fac[MAX], finv[MAX], inv[MAX]; // prototype declaration int i_in(); long long ll_in(); double d_in(); char c_in(); void s_in...
#include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define REP(i, n) for (i = 0; i < n; i++) #define MAX 1000000 #define MOD 1000000007 long long fac[MAX], finv[MAX], inv[MAX]; // prototype declaration int i_in(); long long ll_in(); double d_in(); char c_in(); void s_in...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
1,388
#include <inttypes.h> #include <math.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef unsigned long long int uint64; typedef long long int int64; #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define ABS(a) ((a) > (0) ? (a) : -(a)) void g...
#include <inttypes.h> #include <math.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef unsigned long long int uint64; typedef long long int int64; #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define ABS(a) ((a) > (0) ? (a) : -(a)) void g...
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
1,097
#include <bits/stdc++.h> #define endl '\n' #define pi 3.14159265 using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int A, B, H, M; double hour, min; for (int i = 0; i < 4; i++) scanf("%d%d%d%d", &A, &B, &H, &M); hour = 30. * H + 0.5 * M; min = 6. * M; if (hour > min && (...
#include <bits/stdc++.h> #define endl '\n' #define pi 3.14159265358979323846 using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int A, B, H, M; double hour, min; for (int i = 0; i < 4; i++) scanf("%d%d%d%d", &A, &B, &H, &M); hour = 30. * H + 0.5 * M; min = 6. * M; if (hou...
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
244
#pragma region #include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, n) for (int i = n; i > 0; i--) #define repc(i, m, n) for (int i = m; i < n; i++) #define reprc(i, m, n) for (int i = m; i > n; i--) #define all(v) v.begin(), v.end() #define INF 1e9 #defin...
#pragma region #include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, n) for (int i = n; i > 0; i--) #define repc(i, m, n) for (int i = m; i < n; i++) #define reprc(i, m, n) for (int i = m; i > n; i--) #define all(v) v.begin(), v.end() #define INF 1e9 #defin...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
183
import math a,b,h,m=map(int,input().split()) #1分間に進む分針 360/60=6度 #1時間に進む時針 360/12=30度 #1分間に進む時針 30/60=0.5度 r=abs((h*30+m*0.5)-(m*6)) s1=math.sqrt(a**2+b**2-(2*a*b*(math.cos(math.radians(r))))) print(s)
import math a,b,h,m=map(int,input().split()) #1分間に進む分針 360/60=6度 #1時間に進む時針 360/12=30度 #1分間に進む時針 30/60=0.5度 r=abs((h*30+m*0.5)-(m*6)) s=math.sqrt(a**2+b**2-(2*a*b*(math.cos(math.radians(r))))) print(s)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]]
5
85
import math s = list(map(float,input().split())) print(s) if(s[2] <= 12): dig = (360 * (s[2] / 12) + 30 * (s[3] / 60)) - 360 * s[3] / 60 else: dig = (360 * ((s[2] - 12) / 12) + 30 * (s[3] / 60)) - 360 * s[3] / 60 l = s[0] * s[0] + s[1] * s[1] - 2 * s[0] * s[1] * math.cos(math.radians(dig)) le = math.sqrt(l) pr...
import math s = list(map(float,input().split())) if(s[2] <= 12): dig = (360 * (s[2] / 12) + 30 * (s[3] / 60)) - 360 * s[3] / 60 else: dig = (360 * ((s[2] - 12) / 12) + 30 * (s[3] / 60)) - 360 * s[3] / 60 l = s[0] * s[0] + s[1] * s[1] - 2 * s[0] * s[1] * math.cos(math.radians(dig)) le = math.sqrt(l) print(le)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
164
A,B,H,M=input().split() A=int(A) B=int(B) H=int(H) M=int(M) kakudo_H = H*30 +M*0.5 kakudo_M = M*6 if M==0: kakudo_M=360 kakudo_sa=abs(kakudo_H-kakudo_M) # cはまずは2条している値としてセット c=A**2 +B**2-2*A*B*(math.cos(math.radians(kakudo_sa))) C=c**0.5 print(C)
import math A,B,H,M=input().split() A=int(A) B=int(B) H=int(H) M=int(M) kakudo_H = H*30 +M*0.5 kakudo_M = M*6 if M==0: kakudo_M=360 kakudo_sa=abs(kakudo_H-kakudo_M) # cはまずは2条している値としてセット c=A**2 +B**2-2*A*B*(math.cos(math.radians(kakudo_sa))) C=c**0.5 print(C)
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
5
108
#include <bits/stdc++.h> using namespace std; int main() { double a, b, h, m; long long zi, hun, kaku, result; double pi = 3.141592653589793238; cin >> a >> b >> h >> m; hun = m * 6; zi = (h + m / 60) * 30; kaku = abs(hun - zi); cout << fixed << setprecision(20) << sqrt(pow(a, 2) + pow(b, 2) ...
#include <bits/stdc++.h> using namespace std; int main() { double a, b, h, m; double zi, hun, kaku, result; double pi = 3.141592653589793238; cin >> a >> b >> h >> m; hun = m * 6; zi = (h + m / 60) * 30; kaku = abs(hun - zi); cout << fixed << setprecision(100) << sqrt(pow(a, 2) + pow(b, 2) - ...
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
116
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<ll>; using vii = vector<vi>; using Pll = pair<ll, ll>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define all(v) v.begin(), v.end() #define sz(x) ((int)x.size()) #define pb push_back #define mp make_pair #define mt make_tuple ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<ll>; using vii = vector<vi>; using Pll = pair<ll, ll>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define all(v) v.begin(), v.end() #define sz(x) ((int)x.size()) #define pb push_back #define mp make_pair #define mt make_tuple ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 110], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, ...
1
339
from math import cos, sqrt, radians A, B, H, M = map(int, input().split()) angle_a = 30 * H + 0.5 * M angle_b = 6 * M diff = abs(angle_a - angle_b) if diff > 180: diff = diff - 180 theta = radians(diff) res = sqrt(A*A + B*B - 2 * A * B * cos(theta)) print(res)
from math import cos, sqrt, radians A, B, H, M = map(int, input().split()) angle_a = 30 * H + 0.5 * M angle_b = 6 * M diff = abs(angle_a - angle_b) if diff > 180: diff = 360 - diff theta = radians(diff) res = sqrt(A*A + B*B - 2 * A * B * cos(theta)) print(res)
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]]
5
93
import math a, b, h, m = list(map(int, input().split())) needle = [h * 30 + m * 0.5, m * 6] angle = max(needle) - min(needle) print(angle) if angle > 180.0: angle = 360 -angle c2 = math.pow(a, 2) + math.pow(b, 2) - 2 * a * b * math.cos(math.radians(angle)) print('{:.11f}'.format(math.sqrt(c2)))
import math a, b, h, m = list(map(int, input().split())) needle = [h * 30 + m * 0.5, m * 6] angle = max(needle) - min(needle) if angle > 180.0: angle = 360 - angle c2 = math.pow(a, 2) + math.pow(b, 2) - 2 * a * b * math.cos(math.radians(angle)) print('{:.11f}'.format(math.sqrt(c2)))
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
118
import math from decimal import Decimal as d a,b,h,m=map(int,input().split()) tyousin=d((h+m/60)/6*math.pi) tanshin=d(m/30*math.pi) rad=abs(tyousin-tanshin) print(rad) x=a**2+b**2-2*a*b*math.cos(rad) ans=d(math.sqrt(x)) print(abs(ans))
import math from decimal import Decimal as d a,b,h,m=map(int,input().split()) tyousin=d((h+m/60)/6*math.pi) tanshin=d(m/30*math.pi) rad=abs(tyousin-tanshin) x=a**2+b**2-2*a*b*math.cos(rad) ans=d(math.sqrt(x)) print(abs(ans))
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
110
import math def dosuu(h,m): rad=abs((2*math.pi)*((6*m-(30*h+m/2))/360)) return rad a,b,h,m=map(int,input().split()) kaku=dosuu(h,m) print(kaku) rad=math.cos(kaku) long=(a**2+b**2-2*a*b*rad)**(1/2) print(long)
import math def dosuu(h,m): rad=abs((2*math.pi)*((6*m-(30*h+m/2))/360)) return rad a,b,h,m=map(int,input().split()) kaku=dosuu(h,m) rad=math.cos(kaku) long=(a**2+b**2-2*a*b*rad)**(1/2) print(long)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
113
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <tuple> #include <vector> using namespace std; #define int long long int #define rep(i, n) for (int i = 0; i < (int)(...
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <tuple> #include <vector> using namespace std; #define int long long int #define rep(i, n) for (int i = 0; i < (int)(...
[["-", 0, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 16, 12, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 16, 12, 2, 3, 4, 0, 16, 12, 22]]
1
424
#include <bits/stdc++.h> #include <cmath> using namespace std; // Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: // You use the default template now. You can remove this line by using your // custom template) int main() { long double A, B, H, M; cin >> A >> B >> H >> M; long double t...
#include <bits/stdc++.h> #include <cmath> using namespace std; // Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: // You use the default template now. You can remove this line by using your // custom template) int main() { long double A, B, H, M; cin >> A >> B >> H >> M; long double t...
[["-", 0, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]]
1
178
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string> #include <vector> #define mod 1000000007 #define mp make_pair #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int ...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string> #include <vector> #define mod 1000000007 #define mp make_pair #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int ...
[["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 3, 4, 0, 16, 12, 16, 12, 2, 63, 22], ["+", 3, 4, 0, 16, 12, 16, 12, 74, 0, 24], ["+", 0, 16, 12, 16, 12, 74, 39, 77, 39, 40], ["+", 3, 4, 0, 16, 12, 16, 12, 74, 0, 25], ["+", 0, 16, 12, 16, 12, 74, 51, 2, 63, 22]]
1
232
#include <math.h> #include <stdio.h> #define pi 3.1415926535897932384626433 int main() { int a, b, h, m; float radh, radm, rad, c, r; scanf("%d %d %d %d", &a, &b, &h, &m); radm = 6.0 * m; radh = 30.0 * h + 0.5 * m; rad = radm - radh; if (rad < 0) { rad = -rad; } r = rad * pi / 180.0; c = sqrt(a...
#include <math.h> #include <stdio.h> #define pi 3.141592653589793238462643383279 int main() { int a, b, h, m; double radh, radm, rad, c, r; scanf("%d %d %d %d", &a, &b, &h, &m); radm = 6.0 * m; radh = 30.0 * h + 0.5 * m; rad = radm - radh; if (rad < 0) { rad = -rad; } r = rad * pi / 180.0; c = ...
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 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, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
129
#C - : (Colon) import math A,B,H,M = map(int, input().split()) h = (H*60+M)*360/(12*60) m = M*360/60 # h = H*30 # h = h + 0.5*M # m = M*6 w = 0 w = h - m if w > 180: w = w-180 elif w == 180: print(abs(A+B)) exit() elif w == 0: print(abs(A-B)) exit() else: pass #print(h,m,w) c = A**2+B**2-2*A*...
#C - : (Colon) import math A,B,H,M = map(int, input().split()) h = (H*60+M)*360/(12*60) m = M*360/60 # h = H*30 # h = h + 0.5*M # m = M*6 w = 0 w = h - m if w > 180: w = w # elif w < 0: # w = w+180 elif w == 180: print(abs(A+B)) exit() elif w == 0: print(abs(A-B)) exit() else: pass #print(...
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
5
143
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int A, B, H, M; double Hangle, Mangle, angle, SQ_C, C; scanf("%d %d %d %d", &A, &B, &H, &M); Hangle = (H * 30) + (M * 0.5); Mangle = 6 * M; if (Hangle > Mangle) { angle = Hangle - Mangle; } else { angle = Ma...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int A, B, H, M; double Hangle, Mangle, angle, SQ_C, C; scanf("%d %d %d %d", &A, &B, &H, &M); Hangle = (H * 30) + (M * 0.5); Mangle = 6 * M; if (Hangle > Mangle) { angle = Hangle - Mangle; } else { angle = Ma...
[["-", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
144
#include <math.h> #include <stdio.h> int main(void) { long int a, b, h, m; scanf("%ld %ld %ld %ld", &a, &b, &h, &m); long double deg, c; deg = fabsl(30 * h + 0.5 * m - 6 * m); if (deg > 180) { deg = 360 - deg; } c = sqrtl(a * a + b * b - 2 * a * b * cosl(deg * 3.14159265 / 180)); printf("%15.12llf\...
#include <math.h> #include <stdio.h> int main(void) { long int a, b, h, m; scanf("%ld %ld %ld %ld", &a, &b, &h, &m); long double deg, c; deg = fabsl(30 * h + 0.5 * m - 6 * m); if (deg > 180) { deg = 360 - deg; } c = sqrtl(a * a + b * b - 2 * a * b * cosl(deg * 3.14159265359 / 180)); printf("%16.11l...
[["-", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
118
#define _USE_MATH_DEFINES #include <array> #include <cmath> #include <iomanip> #include <iostream> #include <string> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); double A, B, H, M; cin >> A >> B >> H >> M; double sita = abs(H * M_PI / 6 + M * M_PI / 360 - M * M_PI / 3); i...
#define _USE_MATH_DEFINES #include <array> #include <cmath> #include <iomanip> #include <iostream> #include <string> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); double A, B, H, M; cin >> A >> B >> H >> M; double sita = abs(H * M_PI / 6 + M * M_PI / 360 - M * M_PI / 30); ...
[["-", 51, 2, 3, 4, 0, 16, 12, 16, 12, 13], ["+", 51, 2, 3, 4, 0, 16, 12, 16, 12, 13]]
1
135
#define _LIBCPP_DEBUG 0 #include <bits/stdc++.h> using namespace std; int main() { double a, b, h, m; cin >> a >> b >> h >> m; double rad = abs(h * 30.0 - m * 5.5); rad = rad > 180.0 ? (rad - 180.0) * M_PI / 180.0 : rad * M_PI / 180.0; cout << fixed << setprecision(20) << sqrt(pow(a, 2.0) + pow(b, 2....
#define _LIBCPP_DEBUG 0 #include <bits/stdc++.h> using namespace std; int main() { double a, b, h, m; cin >> a >> b >> h >> m; double rad = abs(h * 30.0 - m * 5.5); rad = rad > 180.0 ? (360 - rad) * M_PI / 180.0 : rad * M_PI / 180.0; cout << fixed << setprecision(20) << sqrt(pow(a, 2.0) + pow(b, 2.0)...
[["-", 64, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 64, 16, 31, 16, 31, 23, 0, 16, 31, 13], ["-", 64, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 64, 16, 31, 16, 31, 23, 0, 16, 12, 22]]
1
112
#include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; void func_A() { int n; cin >> n; switch (n % 10) { case 2: case 4: case 5: case 7: case 9: cout << "hon"; break; case 0: case 1: case 6: case 8: cout << "pon"; bre...
#include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; void func_A() { int n; cin >> n; switch (n % 10) { case 2: case 4: case 5: case 7: case 9: cout << "hon"; break; case 0: case 1: case 6: case 8: cout << "pon"; bre...
[["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 110], ["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 31, 13], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 22]]
1
324
#include <bits/stdc++.h> using namespace std; #pragma GCC target("avx2") #pragma GCC optimization("O3") #pragma GCC optimization("unroll-loops") //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; //#define ordered_set tree<int, null_type,less<int>, //rb_tr...
#include <bits/stdc++.h> using namespace std; #pragma GCC target("avx2") #pragma GCC optimization("O3") #pragma GCC optimization("unroll-loops") //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; //#define ordered_set tree<int, null_type,less<int>, //rb_tr...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
303
import math a,b,h,m = map(float, input().split()) s_theta = m * 6 l_theta = (h*60 + m)*0.5 if abs(s_theta - l_theta) > 180: theta = abs(s_theta - l_theta) - 180 else: theta = abs(s_theta - l_theta) rad = math.radians(theta) ans = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(rad)) print(ans)
import math a,b,h,m = map(float, input().split()) s_theta = m * 6 l_theta = (h*60 + m)*0.5 if abs(s_theta - l_theta) > 180: theta = 360 - abs(s_theta - l_theta) else: theta = abs(s_theta - l_theta) rad = math.radians(theta) ans = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(rad)) print(ans)
[["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
5
107
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6 + 50; #define ll long long #define ios std::ios::sync_with_stdio(false) const ll INF(0x3f3f3f3f3f3f3f3fll); const int inf(0x3f3f3f3f); /* ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} ll lcm(ll a,ll b){return a*b/gcd(a,b);} ll pow_mod(ll x,ll n,ll mod){l...
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6 + 50; #define ll long long #define ios std::ios::sync_with_stdio(false) const ll INF(0x3f3f3f3f3f3f3f3fll); const int inf(0x3f3f3f3f); /* ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} ll lcm(ll a,ll b){return a*b/gcd(a,b);} ll pow_mod(ll x,ll n,ll mod){l...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
409
A, B, H, M = map(int,input().split()) import math theta = min(abs(30*H-6*M),360-abs(30*H-6*M)) cos = math.cos(math.radians(theta)) d = math.sqrt(math.pow(A,2)+math.pow(B,2)-2*A*B*cos) print(d)
A, B, H, M = map(int,input().split()) import math theta = min(abs(30*H-5.5*M),360-abs(30*H-5.5*M)) cos = math.cos(math.radians(theta)) d = math.sqrt(math.pow(A,2)+math.pow(B,2)-2*A*B*cos) print(d)
[["-", 0, 652, 3, 4, 0, 657, 12, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 31, 531], ["-", 12, 652, 3, 4, 0, 657, 12, 657, 31, 612], ["+", 12, 652, 3, 4, 0, 657, 12, 657, 31, 531]]
5
99
#include <math.h> #include <stdio.h> int main() { int A, B, H, M; float PI = 3.14159265359; scanf("%d %d %d %d", &A, &B, &H, &M); double a, b; a = (double)M * 6; b = (double)H * 30 + M * 0.5; double radA, radB; radA = (double)(90 - a) * PI / 180.0; radB = (double)(90 - b) * PI / 180.0; // printf("...
#include <math.h> #include <stdio.h> int main() { int A, B, H, M; double PI = 3.14159265359; scanf("%d %d %d %d", &A, &B, &H, &M); double a, b; a = (double)M * 6; b = (double)H * 30 + M * 0.5; double radA, radB; radA = (double)(90 - a) * PI / 180.0; radB = (double)(90 - b) * PI / 180.0; // printf(...
[["-", 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, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
189
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; int main() { long double a, b, h, m; cin >> a >> b >> h >> m; long double pi = 2.0 * asin(1.0); long double k = abs(360.0 * h / 12.0 + 30.0 * m / 60...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; int main() { long double a, b, h, m; cin >> a >> b >> h >> m; long double pi = 2.0 * asin(1.0); long double k = abs(360.0 * h / 12.0 + 30.0 * m / 60...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
135
#include <bits/stdc++.h> using namespace std; #define bip(a) __builtin_popcount(a) #define ull unsigned long long #define ll long long #define u unsigned #define pb push_back #define pf push_front /// for list #define mp make_pair #define is insert #define ff first #define ss second #define vi vector<int> #define vl v...
#include <bits/stdc++.h> using namespace std; #define bip(a) __builtin_popcount(a) #define ull unsigned long long #define ll long long #define u unsigned #define pb push_back #define pf push_front /// for list #define mp make_pair #define is insert #define ff first #define ss second #define vi vector<int> #define vl v...
[["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
328
#include <bits/stdc++.h> #include <math.h> using namespace std; #define ll long long int main() { double a, b, h, m; cin >> a >> b >> h >> m; double angle = abs(((h * 30) + (30 * m / 60) - m * 6)); if (angle > 360 - angle) angle = 360 - angle; double ans = (a * a) + (b * b) - 2 * a * b * cos(angle * 3.141...
#include <bits/stdc++.h> #include <math.h> using namespace std; #define ll long long int main() { double a, b, h, m; cin >> a >> b >> h >> m; double angle = abs(((h * 30) + (30 * m / 60) - m * 6)); if (angle > 360 - angle) angle = 360 - angle; double ans = (a * a) + (b * b) - 2 * a * b * cos(angle * 3.14...
[["-", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
1
118
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) \ ; \ for (int i = 0; i < (n); i++) //第一引数の変数をカウンタ変数としてn回回す using veci = vector<int>; using ve...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) \ ; \ for (int i = 0; i < (n); i++) //第一引数の変数をカウンタ変数としてn回回す using veci = vector<int>; using ve...
[["-", 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, 2, 63, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22]]
1
179
import math A, B, H, M = list(map(int, input().split())) theta = abs(60 * M - (60 * H + M) / 2) if theta > 180: theta = 360 - theta theta = abs(math.radians(theta)) ans = A ** 2 + B ** 2 - 2 * A * B * math.cos(theta) ans = math.sqrt(ans) print(ans)
import math A, B, H, M = list(map(int, input().split())) theta = abs(6 * M - (60 * H + M) / 2) if theta > 180: theta = 360 - theta theta = abs(math.radians(theta)) ans = A ** 2 + B ** 2 - 2 * A * B * math.cos(theta) ans = math.sqrt(ans) print(ans)
[["-", 12, 652, 3, 4, 0, 657, 31, 657, 31, 612], ["+", 12, 652, 3, 4, 0, 657, 31, 657, 31, 612]]
5
98
#include <iomanip> // setprecisionを使用するのに必要 #include <iostream> #include <math.h> using namespace std; int main() { int a, b, h, m; cin >> a >> b >> h >> m; double hv = 2 * M_PI / (12.0 * 60); double mv = 2 * M_PI / (60.0); // 角度(rad) double hr = hv * (h * 60 + m); double mr = mv * m; // cout << h...
#include <iomanip> // setprecisionを使用するのに必要 #include <iostream> #include <math.h> using namespace std; int main() { int a, b, h, m; cin >> a >> b >> h >> m; double hv = 2 * M_PI / (12.0 * 60); double mv = 2 * M_PI / (60.0); // 角度(rad) double hr = hv * (h * 60 + m); double mr = mv * m; // cout << h...
[["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48]]
1
152
import math A, B, H, M = map(int, input().split()) cos = math.cos(math.radians((60*H + M)/2)) result = math.sqrt(A**2 + B**2 - 2*A*B*cos) print(result)
import math A, B, H, M = map(int, input().split()) cos = math.cos(math.radians((60*H - 11*M)/2)) result = math.sqrt(A**2 + B**2 - 2*A*B*cos) print(result)
[["-", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 31, 612], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 17, 48]]
5
69
a,b,h,m = map(int, input().split()) import math zishin = 30 * h + 0.5 * m tanshin = 6 * m kakudo = abs(zishin - tanshin) if kakudo > 180: kakudo = kakudo - 180 cos = math.cos(math.radians(kakudo)) dis = a ** 2 + b ** 2 - 2 * a * b * cos print(math.sqrt(dis))
a,b,h,m = map(int, input().split()) import math zishin = 30 * h + 0.5 * m tanshin = 6 * m kakudo = abs(zishin - tanshin) if kakudo >= 180: kakudo = 360 - kakudo cos = math.cos(math.radians(kakudo)) dis = a ** 2 + b ** 2 - 2 * a * b * cos print(math.sqrt(dis))
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]]
5
93
A,B,H,M = map(int,input().split()) import math d = 30*(H%12)+0.6*M -6*M if d<0: d = -d if d>180: d = 360 -d c = A**2 + B**2 - 2*A*B*math.cos(math.radians(d)) print(math.sqrt(c))
A,B,H,M = map(int,input().split()) import math d = 30*(H%12)+0.5*M -6*M if d<0: d = -d if d>180: d = 360 -d c = A**2 + B**2 - 2*A*B*math.cos(math.radians(d)) print(math.sqrt(c))
[["-", 0, 662, 12, 657, 31, 657, 12, 657, 31, 531], ["+", 0, 662, 12, 657, 31, 657, 12, 657, 31, 531]]
5
94
#include <bits/stdc++.h> //Andrei Alexandru a.k.a Sho10 #define ll long long #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #define all(a) (a).begin(), (a).end() #define sz size #define f first #define s second #define pb push_back #define er erase #define in insert #define mp make_pair #define pi pair #defin...
#include <bits/stdc++.h> //Andrei Alexandru a.k.a Sho10 #define ll long long #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #define all(a) (a).begin(), (a).end() #define sz size #define f first #define s second #define pb push_back #define er erase #define in insert #define mp make_pair #define pi pair #defin...
[["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40]]
1
229
import math A,B,H,M=map(int,input().split()) x=abs(round(30*H - 5.5*M)) cosx=math.cos(math.radians(x)) print(math.sqrt((A**2)+(B**2)-2*A*B*cosx))
import math A,B,H,M=map(int,input().split()) x=abs(30*H - 5.5*M) cosx=math.cos(math.radians(x)) print(math.sqrt((A**2)+(B**2)-2*A*B*cosx))
[["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
77
import math a, b, h, m = map(int, input().split()) minute = m * 360 / 60 hours = (h * 360 / 12) hours += m * 360 / 720 angle = abs(minute - hours) if angle > 180: angle = 360 - angle angle = math.radians(angle) ans = math.sqrt((a**2) + (b**2) - (2*a*b*math.cos(angle)))
import math a, b, h, m = map(int, input().split()) minute = m * 360 / 60 hours = (h * 360 / 12) hours += m * 360 / 720 angle = abs(minute - hours) if angle > 180: angle = 360 - angle angle = math.radians(angle) ans = math.sqrt((a**2) + (b**2) - (2*a*b*math.cos(angle))) print(ans)
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
104
#include <bits/stdc++.h> using namespace std; int main() { int A, B; double H, M, C; cin >> A >> B >> H >> M; C = sqrt(A * A + B * B - 2 * A * B * cos(M_PI * (11 * M / 360 - H / 6))); cout << C << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int A, B; double H, M, C; cin >> A >> B >> H >> M; C = sqrt(A * A + B * B - 2 * A * B * cos(M_PI * (11 * M / 360 - H / 6))); cout << setprecision(14) << C << 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
76
import math A,B,H,M = map(int,input().split()) H_deg = H*(math.pi)/6+ M*math.pi/360 M_deg = M*(math.pi)/(3*10) if H_deg >= M_deg: deg = H_deg - M_deg else: deg = M_deg - H_deg if deg >math.pi: deg = deg-(math.pi) c2=0 c2 = A*A+B*B-2*A*B*(math.cos(deg)) print(math.sqrt(c2))
import math A,B,H,M = map(int,input().split()) H_deg = H*(math.pi)/6+M*math.pi/360 M_deg = M*(math.pi)/(3*10) if H_deg >= M_deg: deg = H_deg - M_deg else: deg = M_deg - H_deg if deg >math.pi: deg = 2*(math.pi)-deg c2=0 c2 = A*A+B*B-2*A*B*(math.cos(deg)) print(math.sqrt(c2))
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 31, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 48], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]]
5
125
#include <math.h> #include <stdio.h> int main() { double A, B, h, m; scanf("%lf", &A); scanf("%lf", &B); scanf("%lf", &h); scanf("%lf", &m); double C, x = 0, f = 0, j = 0, y = 0; f = m * 6.0; j = (h * 30) + m * 0.5; if (f <= j) { y = j - f; if (y > 180) y = 360 - y; } else { y ...
#include <math.h> #include <stdio.h> int main() { double A, B, h, m; scanf("%lf", &A); scanf("%lf", &B); scanf("%lf", &h); scanf("%lf", &m); double C, x = 0, f = 0, j = 0, y = 0; f = m * 6.0; j = (h * 30) + m * 0.5; if (f <= j) { y = j - f; if (y > 180) y = 360 - y; } else { y ...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
189
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ff first #define ss second #define pb push_back #define endl "\n" #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NUL...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ff first #define ss second #define pb push_back #define endl "\n" #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NUL...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
175
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double a = sc.nextInt(); double b = sc.nextInt(); double h = sc.nextInt(); double m = sc.nextInt(); double angle_h = (30 * h) + 0.2 * m; double angle_m = 6 * m; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double a = sc.nextInt(); double b = sc.nextInt(); double h = sc.nextInt(); double m = sc.nextInt(); double angle_h = (30 * h) + 0.5 * m; double angle_m = 6 * m; ...
[["-", 0, 503, 49, 200, 51, 16, 12, 16, 31, 515], ["+", 0, 503, 49, 200, 51, 16, 12, 16, 31, 515]]
3
172
#include <bits/stdc++.h> using namespace std; static const double pi = 3.141592653589793; int main() { double A, B, H, M; cin >> A >> B >> H >> M; double x = 0, y = 0; x = 60 * M; y = 30 * H + 0.5 * M; double minimum = min(x, y); double maximum = max(x, y); double kaku = min(abs(x - y), 360 - maximum + ...
#include <bits/stdc++.h> using namespace std; static const double pi = 3.141592653589793; int main() { double A, B, H, M; cin >> A >> B >> H >> M; double x = 0, y = 0; x = 6 * M; y = 30 * H + 0.5 * M; double minimum = min(x, y); double maximum = max(x, y); double kaku = min(maximum - minimum, 360 - maxi...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["-", 51, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["-", 31, 16, 31, 2, 3, 4, 0, 2, 63, 22], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 31, 22], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22], ["-", 31, 2, 3, 4, 0, 2, 3,...
1
159
#include <bits/stdc++.h> using namespace std; int main() { double a, b, h, m; cin >> a >> b >> h >> m; double pi = 3.141592653589793238462643383279502884197; double ang = fabs((h * 60 + m) / 720 - m / 60); if (ang > 0.5) ang -= 0.5; ang *= 2 * pi; double ans = sqrt(pow(a, 2) + pow(b, 2) - 2 * a * b * ...
#include <bits/stdc++.h> using namespace std; int main() { double a, b, h, m; cin >> a >> b >> h >> m; double pi = 3.141592653589793238462643383279502884197; double ang = fabs((h * 60 + m) / 720 - m / 60); if (ang > 0.5) ang = 1 - ang; ang *= 2 * pi; double ans = sqrt(pow(a, 2) + pow(b, 2) - 2 * a * b...
[["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 110], ["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 31, 13], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 22]]
1
115
#include <bits/stdc++.h> #define fin \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define ii pair<int, int> #define F fi...
#include <bits/stdc++.h> #define fin \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define ii pair<int, int> #define F fi...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 51, 16, 31, 23, 0, 16, 31, 74, 0, 24], ["-", 31, 23, 0, 16, 31, 74, 39, 77, 39, 40], ["-", 51, 16, 31, 23, 0, 16, 31, 74, 0, 25]]
1
344
#include <bits/stdc++.h> using namespace std; int A, B, H, M; long double ans; int main() { cin >> A >> B >> H >> M; int t = abs(60 * H - 11 * M); if (t > 360) { t = 720 - t; } if (t == 360) { ans = A + B; } else if (t == 0) { ans = abs(A - B); } else { ans = sqrt(A * A + B * B - ...
#include <bits/stdc++.h> using namespace std; int A, B, H, M; long double ans; int main() { cin >> A >> B >> H >> M; int t = abs(60 * H - 11 * M); if (t > 360) { t = 720 - t; } if (t == 360) { ans = A + B; } else if (t == 0) { ans = abs(A - B); } else { ans = sqrt(A * A + B * B - ...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
150
#include <bits/stdc++.h> #define rep(i, s, n) for (int i = s; i < n; ++i) #define drep(i, s, n) for (int i = n; i >= s; --i) #define all(x) (x).begin(), (x).end() #define RALL(a) (a).rbegin(), (a).rend() #define print(x) cout << (x) << endl using namespace std; typedef long long ll; int gcd(int a, int b) { if (a % b...
#include <bits/stdc++.h> #define rep(i, s, n) for (int i = s; i < n; ++i) #define drep(i, s, n) for (int i = n; i >= s; --i) #define all(x) (x).begin(), (x).end() #define RALL(a) (a).rbegin(), (a).rend() #define print(x) cout << (x) << endl using namespace std; typedef long long ll; int gcd(int a, int b) { if (a % b...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
430
/*apna time ayega*/ #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int a, h, m, b; cin >> a >> b >> h >> m; double angle = (h * 30) + (double)m / 2 - m * 6; double angle1; angle1...
/*apna time ayega*/ #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int a, h, m, b; cin >> a >> b >> h >> m; double angle = (h * 30) + (double)m / 2 - m * 6; double angle1; angle1...
[["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13]]
1
121
import numpy as np import math ABHM=np.array(input().split(" "),dtype=np.int32) A=ABHM[0] B=ABHM[1] H=ABHM[2] M=ABHM[3] minutes=H*60+M long_angle=6*minutes%360 small_angle=0.5*minutes%360 angle=0 if(long_angle>small_angle): angle=long_angle-small_angle else: angle=small_angle-long_angle if(angle==180): ...
import numpy as np import math ABHM=np.array(input().split(" "),dtype=np.int32) A=ABHM[0] B=ABHM[1] H=ABHM[2] M=ABHM[3] minutes=H*60+M long_angle=6*minutes%360 small_angle=0.5*minutes%360 angle=0 if(long_angle>small_angle): angle=long_angle-small_angle else: angle=small_angle-long_angle if(angle==180): ...
[["-", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["-", 0, 657, 12, 657, 12, 652, 63, 319, 500, 22], ["+", 0, 657, 12, 657, 12, 652, 63, 319, 500, 22], ["-", 12, 652, 3, 4, 0, 652, 63, 319, 500, 22], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 500, 22], ["-", 3, 4, 0, 652, 3, 4,...
5
154
from math import cos,radians, sqrt a,b,h,m = map(int, input().split()) tan = h*(360//12)+(0.5*m) naga = m*(360//60) if abs(naga-tan) > 180: kakudo = abs(naga-tan)-180 else: kakudo = abs(naga-tan) ans = sqrt(a**2 + b**2 - 2*a*b*cos(radians(kakudo))) print(ans)
from math import cos,radians, sqrt a,b,h,m = map(int, input().split()) tan = h*(360//12)+(0.5*m) naga = m*(360//60) if abs(naga-tan) > 180: kakudo = 360 - abs(naga-tan) else: kakudo = abs(naga-tan) ans = sqrt(a**2 + b**2 - 2*a*b*cos(radians(kakudo))) print(ans)
[["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
5
112
#include <bits/stdc++.h> using namespace std; int A, B, H, M; signed main() { cin >> A >> B >> H >> M; double t = M_PI * (60 * H - 11 * M) / 30 / 12; if (t > M_PI) t -= M_PI; double cc = (double)(A * A + B * B) - 2.0 * A * B * cos(t); printf("%.10f\n", sqrt(cc)); }
#include <bits/stdc++.h> using namespace std; int A, B, H, M; signed main() { cin >> A >> B >> H >> M; double t = M_PI * (60 * H - 11 * M) / 30 / 12; if (t > M_PI) t = 2 * M_PI - t; double cc = (double)(A * A + B * B) - 2.0 * A * B * cos(t); printf("%.10f\n", sqrt(cc)); }
[["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 110], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 64, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["+", 64, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 22]]
1
100
#include <bits/stdc++.h> using namespace std; int main() { double A, B, H, M; cin >> A >> B >> H >> M; H = H * 30 + M * 0.5; M *= 6; int rad = min(abs(H - M), 360 - abs(H - M)); double co = cos(M_PI * rad / 180); double aa = A * A + B * B - 2 * A * B * co; cout << fixed << setprecision(10) << sqrt(aa) ...
#include <bits/stdc++.h> using namespace std; int main() { double A, B, H, M; cin >> A >> B >> H >> M; H = H * 30 + M * 0.5; M *= 6; double rad = min(abs(H - M), 360 - abs(H - M)); double co = cos(M_PI * rad / 180); double aa = A * A + B * B - 2.0 * A * B * co; cout << fixed << setprecision(10) << sqrt...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 51, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 16, 31, 13]]
1
114
#include <algorithm> #include <cmath> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; double pie = 3.14159265358979; long long mod = 99...
#include <algorithm> #include <cmath> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; double pie = 3.14159265358979; long long mod = 99...
[["+", 51, 2, 3, 4, 0, 16, 31, 16, 17, 72], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 17, 85], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 12, 13]]
1
135
#include <cmath> #include <iomanip> #include <iostream> #include <string> using namespace std; typedef long long ll; int main() { double pai = 3.141592653589793; double a, b, h, m; double ka; cin >> a >> b >> h >> m; h = (h * 60 + m) / 2; m = m * 6; ka = max(h, m) - min(h, m); if (ka >= 180) { ka -=...
#include <cmath> #include <iomanip> #include <iostream> #include <string> using namespace std; typedef long long ll; int main() { double pai = 3.141592653589793; double a, b, h, m; double ka; cin >> a >> b >> h >> m; h = (h * 60 + m) / 2; m = m * 6; ka = max(h, m) - min(h, m); if (ka >= 180) { ka = ...
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 110], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
139
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; const long long int INF = 1e18; const long long int mod = 1e9 + 7; typedef pair<ll, ll> pairs; typedef vector<pairs> p; struct Edge { ll to, weight; Edge(ll t, ll w) : to(t), weight(w) {} }; using graph = vector<vector...
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; const long long int INF = 1e18; const long long int mod = 1e9 + 7; typedef pair<ll, ll> pairs; typedef vector<pairs> p; struct Edge { ll to, weight; Edge(ll t, ll w) : to(t), weight(w) {} }; using graph = vector<vector...
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 110], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
384
import math tempList = tuple(map(int, input().split())) a = tempList[0] b = tempList[1] hour = tempList[2] minute = tempList[3] time = hour * 60 + minute mypi = math.pi hourAngle = time/(12*60) minuteAngle = minute/60 diff = math.fabs(hourAngle - minute) if diff > 0.5: diff = 1 - diff angle = diff * mypi * 2 result...
import math tempList = tuple(map(int, input().split())) a = tempList[0] b = tempList[1] hour = tempList[2] minute = tempList[3] time = hour * 60 + minute mypi = math.pi hourAngle = time/(12*60) minuteAngle = minute/60 diff = abs(hourAngle - minuteAngle) if diff > 0.5: diff = 1 - diff angle = diff * mypi * 2 result ...
[["-", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 22]]
5
127
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); // freopen("input.txt","r",stdin); double a, b, h, m; cin >> a >> b >> h >> m; long long angle = abs((11 / 2.0) * m - 30.0 * h); if (angle > 180) { angle = abs(360 - angle); } double thi...
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); // freopen("input.txt","r",stdin); double a, b, h, m; cin >> a >> b >> h >> m; double angle = abs((11 / 2.0) * m - 30.0 * h); if (angle > 180) { angle = abs(360 - angle); } double third ...
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
147
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define ok() puts(ok ? "Yes" : "No"); using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<bool> vb; typedef vector<vb> vvb; typedef set<int> s...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define ok() puts(ok ? "Yes" : "No"); using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<bool> vb; typedef vector<vb> vvb; typedef set<int> s...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
265