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 |
|---|---|---|---|---|
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
#define PI 3.14159265359
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define mp make_pair
#define all(v) v.begin... |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
#define PI 3.14159265359
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define mp make_pair
#define all(v) v.begin... | [["-", 3, 4, 0, 16, 12, 16, 12, 2, 63, 22]] | 1 | 931 |
// AtCoder165 C
#define _CRT_SECURE_NO_WARNINGS
#include <assert.h>
#include <ctype.h>
#include <malloc.h>
#include <math.h>
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// qsortで用いる比較用関数.*a<*bならaが先になる.
int compare(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int ... | // AtCoder165 C
#define _CRT_SECURE_NO_WARNINGS
#include <assert.h>
#include <ctype.h>
#include <malloc.h>
#include <math.h>
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// qsortで用いる比較用関数.*a<*bならaが先になる.
int compare(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int ... | [["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 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 | 298 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int A = 0;
int B = 0;
double H = 0;
double M = 0;
double angle = 0;
double answer = 0.0;
scanf("%d %d %lf %lf", &A, &B, &H, &M);
angle = H * 30.0 + 30.0 * (M / 60.0) - M * 6.0;
angle = fabs(angle);
if (angle > 180) {
an... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int A = 0;
int B = 0;
double H = 0;
double M = 0;
double angle = 0;
double answer = 0.0;
scanf("%d %d %lf %lf", &A, &B, &H, &M);
angle = H * 30.0 + 30.0 * (M / 60.0) - M * 6.0;
angle = fabs(angle);
if (angle > 180) {
an... | [["-", 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 | 172 |
#include <inttypes.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int a, b, h, m;
double ans = 0;
int b_an;
double a_an;
double angle;
scanf("%d %d %d %d", &a, &b, &h, &m);
b_an = 6 * m;
a_an = 30 * h + 0.5 * m;
if (b_an > a_an) {
angle = b_an - ... | #include <inttypes.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int a, b, h, m;
double ans = 0;
int b_an;
double a_an;
double angle;
scanf("%d %d %d %d", &a, &b, &h, &m);
b_an = 6 * m;
a_an = 30 * h + 0.5 * m;
if (b_an > a_an) {
angle = b_an - ... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 0 | 207 |
import math
A,B,H,M=map(int,input().split())
if 30*H-6*M>=0:
y=abs(30*H-6*M)+M//2
else:
y=abs(30*H-6*M)-M//2
if y==90 or y==270:
ans=(A**2+B**2)**(0.5)
else:
ans=(A**2+B**2-2*A*B*math.cos(math.radians(y)))**(0.5)
print(ans)
| import math
A,B,H,M=map(int,input().split())
if 30*H-6*M>=0:
y=abs(30*H-6*M)+M/2
else:
y=abs(30*H-6*M)-M/2
if y==90 or y==270:
ans=(A**2+B**2)**(0.5)
else:
ans=(A**2+B**2-2*A*B*math.cos(math.radians(y)))**(0.5)
print(ans)
| [["-", 0, 1, 0, 662, 12, 657, 12, 657, 17, 676], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 85]] | 5 | 130 |
import math
N = input().split(" ")
A = int(N[0])
B = int(N[1])
H = int(N[2])
M = int(N[3])
naga = (30 * H) + (M / 2)
mizi = 6 * M
if naga < mizi:
deg = mizi - naga
elif naga > mizi:
deg = naga - mizi
if deg > 180:
deg = 360 - deg
s = (A ** 2) + (B ** 2) - (2 * A * B * math.cos(math.radians(deg)))
s = s**(1/2... | import math
N = input().split(" ")
A = int(N[0])
B = int(N[1])
H = int(N[2])
M = int(N[3])
naga = (30 * H) + (M / 2)
mizi = 6 * M
if naga < mizi:
deg = mizi - naga
elif naga >= mizi:
deg = naga - mizi
if deg >= 180:
deg = 360 - deg
s = (A ** 2) + (B ** 2) - (2 * A * B * math.cos(math.radians(deg)))
s = s**(1... | [["-", 0, 656, 0, 57, 75, 665, 15, 666, 667, 47], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 20], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 151 |
import math
a, b, h, m = map(int, input().split())
theta1 = (60*h + m) / 2.0;
theta2 = 6.0 * m;
theta = abs(theta1 - theta2);
if theta > 180:
theta -= 180;
c = math.cos(theta / 180 * math.acos(-1));
ans = a*a + b*b - 2*a*b*c;
ans = math.sqrt(ans);
print(ans); | import math
a, b, h, m = map(int, input().split())
theta1 = (60*h + m) / 2.0;
theta2 = 6.0 * m;
theta = abs(theta1 - theta2);
if theta > 180:
theta = 360 - theta;
c = math.cos(theta / 180 * math.acos(-1));
ans = a*a + b*b - 2*a*b*c;
ans = math.sqrt(ans);
print(ans); | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 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, 12, 22]] | 5 | 109 |
import math
A,B,H,M=map(int,input().split())
for i in range(10):
if 0<=abs(360*i-abs(30*H+int(M/2)-6*M))<360:
a=abs(360*i-abs(30*H+int(M/2)-6*M))
c=abs(180-abs(360*i-abs(30*H+int(M/2)-6*M)))
break
b=min(a,c)
print("{:.12f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2)))) | import math
A,B,H,M=map(int,input().split())
for i in range(10):
if 0<=abs(360*i-abs(30*H+(M/2)-6*M))<360:
a=abs(360*i-abs(30*H+(M/2)-6*M))
c=abs(360-abs(360*i-abs(30*H+(M/2)-6*M)))
break
b=min(a,c)
print("{:.9f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2)))) | [["-", 3, 4, 0, 657, 31, 657, 12, 652, 63, 22], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 31, 612], ["-", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6]] | 5 | 176 |
a,b,h,m = map(int,input().split())
import math
alp = 0.5*(h*60+m)/180*math.pi
be = 6*m/180*math.pi
if abs(alp-be) <= math.pi:
s = abs(alp-be)
else:
s = math.pi - abs(alp-be)
l = (a**2+b**2 - 2*a*b*math.cos(s))**(1/2)
print(l) | a,b,h,m = map(int,input().split())
import math
alp = 0.5*(h*60+m)/180*math.pi
be = 6*m/180*math.pi
if abs(alp-be) <= math.pi:
s = abs(alp-be)
else:
s = 2*math.pi - abs(alp-be)
l = (a**2+b**2 - 2*a*b*math.cos(s))**(1/2)
print(l) | [["+", 0, 1, 0, 662, 12, 657, 31, 657, 31, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 48]] | 5 | 118 |
import math
num = input()
num_list = num.split()
min_time = int(num_list[2]) * 60 + int(num_list[3])
hour_arg = min_time * 0.5
min_arg = int(num_list[3]) * 6
arg = abs(hour_arg - min_arg)
if arg == 0:
answer = 0
if arg > 180:
arg = 360 - arg
answer = pow(int(num_list[0]), 2) + pow(int(num_list[1]), 2) + (int(num... | import math
num = input()
num_list = num.split()
min_time = int(num_list[2]) * 60 + int(num_list[3])
hour_arg = min_time * 0.5
min_arg = int(num_list[3]) * 6
arg = abs(hour_arg - min_arg)
if arg == 0:
answer = 0
if arg > 180:
arg = 360 - arg
answer = pow(int(num_list[0]), 2) + pow(int(num_list[1]), 2) - (int(num_... | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 12, 657, 12, 23, 0, 657, 31, 657, 17, 48], ["+", 12, 657, 12, 23, 0, 657, 31, 657, 12, 612]] | 5 | 148 |
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
#define rep(i, j, n) for (int i = j; i < (int)(n); i++)
const ll MOD = 1000000007;
const ll INFL = (1LL << 60);
const int INFI = (1 << 30);
int main() {
double A, B, H, M;
cin >> A >> B >> H >> M;
double rad, pi = 3.1... | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
#define rep(i, j, n) for (int i = j; i < (int)(n); i++)
const ll MOD = 1000000007;
const ll INFL = (1LL << 60);
const int INFI = (1 << 30);
int main() {
double A, B, H, M;
cin >> A >> B >> H >> M;
double rad, pi = 3.1... | [["-", 0, 11, 12, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 11, 12, 16, 12, 16, 31, 16, 31, 13], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 31, 13]] | 1 | 137 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
long double a, b, h, m;
cin >> a >> b >> h >> m;
long double hour_angle = 0.5 * (h * 60 + m);
long double minute_angle = 6 * m;
long double angle = abs(hour_angle - minute_angle);
angle = min(360 - angle, angle);
angle = (an... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
long double a, b, h, m;
cin >> a >> b >> h >> m;
long double hour_angle = 0.5 * (h * 60 + m);
long double minute_angle = 6 * m;
double angle = abs(hour_angle - minute_angle);
angle = min(360 - angle, angle);
angle = (angle *... | [["-", 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]] | 1 | 133 |
#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 5;
const int N = 1e4;
const int MOD = 998244353;
const double EPS = 1e-9;
const double PI = acos(-1);
double to_rad(double x) { return x * PI / 180; }
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int a, b, h, m;
cin ... | #include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 5;
const int N = 1e4;
const int MOD = 998244353;
const double EPS = 1e-9;
const double PI = acos(-1);
double to_rad(double x) { return x * PI / 180; }
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int a, b, h, m;
cin ... | [["-", 51, 23, 0, 16, 31, 16, 31, 16, 31, 13], ["+", 51, 23, 0, 16, 31, 16, 31, 16, 31, 13], ["-", 49, 50, 51, 23, 0, 16, 12, 16, 12, 13], ["+", 49, 50, 51, 23, 0, 16, 12, 16, 12, 13], ["-", 49, 50, 51, 23, 0, 16, 31, 16, 31, 13], ["+", 49, 50, 51, 23, 0, 16, 31, 16, 31, 13]] | 1 | 191 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
int deg_a = ((60 * h + 1 * m) % 720);
int deg_b = (12 * m) % 360;
ld delta_deg = abs(deg_a - deg_b);
delta... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
int deg_a = ((60 * h + 1 * m) % 720);
int deg_b = (12 * m) % 720;
ld delta_deg = abs(deg_a - deg_b);
delta... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 31, 13], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 31, 13]] | 1 | 148 |
#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
using ll = long long;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double long_an = h * 30 + m * 0.5;
double short_an = m * 6;
double ang = abs(long_an - short_an);
// if(ang>180)
// ang =360-ang;
ang = 80;
ang ... | #include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
using ll = long long;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double long_an = h * 30 + m * 0.5;
double short_an = m * 6;
double ang = abs(long_an - short_an);
// if(ang>180)
// ang =360-ang;
ang = ang * M_PI... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 128 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.141592653589793238
typedef long long ll;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double x = 6 * m; //分針
double y = 30 * h + m / 2;
x = x * PI / 180.00000;
y = y * PI / 180.00000;
d... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.141592653589793238
typedef long long ll;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double x = 6 * m; //分針
double y = 30 * h + m / 2;
x = x * PI / 180.00000;
y = y * PI / 180.00000;
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 122 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, n) for (int i = 1; i <= (n); i++)
typedef long long ll;
typedef pair<int, int> pii;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
int t = h * 60 + m; // t分後
double hrad = (2 * M_PI) / (12 * 60) ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, n) for (int i = 1; i <= (n); i++)
typedef long long ll;
typedef pair<int, int> pii;
int main() {
double a, b;
int h, m;
cin >> a >> b >> h >> m;
int t = h * 60 + m; // t分後
double hrad = (2 * M_PI) / (... | [["-", 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, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 49, 50, 51, 16, 31, 23, 0, 16, 17, 48], ["-", 49, 50, 51, 16, 31, 23, 0, 16, 12, 22]] | 1 | 156 |
// I am so vegetable
#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define FIO ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define PB push_back
#define IN insert
#define ER erase
#define CT count
#define EP empty
#define _for(i, a, b) for (int i = (a); i < (b); ++i)
#define _rfor(i, a, b) for (int i = (a); ... | // I am so vegetable
#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define FIO ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define PB push_back
#define IN insert
#define ER erase
#define CT count
#define EP empty
#define _for(i, a, b) for (int i = (a); i < (b); ++i)
#define _rfor(i, a, b) for (int i = (a); ... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 13], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25]] | 1 | 459 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define pai 3.14159265358979323846
typedef long long ll;
int A[3][3], N;
bool punched[3][3];
bool ok[3][3];
int a[3][3], n;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
do... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define pai 3.14159265358979323846
typedef long long ll;
int A[3][3], N;
bool punched[3][3];
bool ok[3][3];
int a[3][3], n;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
do... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 49, 50, 51, 16, 31, 23, 0, 16, 12, 22], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 22], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 199 |
#include <bits/stdc++.h>
#define ll long long
#define PI 3.14159265
using namespace std;
const int N = 3e5 + 5, mod = 1e9 + 7;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long double a, b, h, m;
cin >> a >> b >> h >> m;
h = h * 5 + (m * 5 / 60);
long double kam;
if (h > m)
k... | #include <bits/stdc++.h>
#define ll long long
#define PI 3.14159265
using namespace std;
const int N = 3e5 + 5, mod = 1e9 + 7;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long double a, b, h, m;
cin >> a >> b >> h >> m;
h = h * 5 + (m * 5 / 60);
long double kam;
if (h > m)
k... | [["-", 12, 2, 3, 4, 0, 16, 31, 16, 12, 22], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 12, 13], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 48], ["+", 3, 4, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 176 |
import math
A,B,H,M=(int(x) for x in input().split())
rShort = (H*30)+M*0.5
rLong = M*60
ang=abs(rLong-rShort)
ang=min(ang,360-ang)
ans=A*A+B*B-2*A*B*math.cos(math.radians(ang))
print(math.sqrt(ans)) | import math
A,B,H,M=(int(x) for x in input().split())
rShort = H*30+M*0.5
rLong = M*6
ang=abs(rLong-rShort)
ang=min(ang,abs(360-ang))
ans=A*A+B*B-2*A*B*math.cos(math.radians(ang))
print(math.sqrt(ans)) | [["-", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["-", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 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 | 96 |
import math
a,b,h,m=map(int,input().split())
a_deg=h*30
b_deg=m*6
deg=math.radians(abs(b_deg-a_deg))
print(math.sqrt(a**2+b**2-2*a*b*math.cos(deg))) | import math
a,b,h,m=map(int,input().split())
a_deg=h*30+m*0.5
b_deg=m*6
deg=math.radians(abs(b_deg-a_deg))
print(math.sqrt(a**2+b**2-2*a*b*math.cos(deg)))
| [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 531]] | 5 | 73 |
import math
A,B,H,M = map(int,input().split())
omega_h = 360 / (12*60)
omega_m = 360 / 60
min_sum_h = (H*60 + M) * omega_h
min_sum_h = min_sum_h % 360
min_sum_m = M * omega_m
if min_sum_h - min_sum_m > 180:
omega = 360 - (min_sum_h - min_sum_m)
else:
omega = min_sum_h - min_sum_m
cos_omega = math.cos(math.ra... | import math
A,B,H,M = map(int,input().split())
omega_h = 360 / (12*60)
omega_m = 360 / 60
min_sum_h = (H*60 + M) * omega_h
min_sum_h = min_sum_h % 360
min_sum_m = M * omega_m
if min_sum_h - min_sum_m > 180:
omega = 360 - (min_sum_h - min_sum_m)
else:
omega = min_sum_h - min_sum_m
cos_omega = math.cos(math.ra... | [["-", 31, 23, 0, 657, 31, 657, 31, 657, 31, 612], ["+", 31, 23, 0, 657, 31, 657, 31, 657, 31, 22], ["-", 31, 23, 0, 657, 31, 657, 12, 657, 31, 612], ["+", 31, 23, 0, 657, 31, 657, 12, 657, 31, 22], ["-", 0, 657, 12, 657, 31, 657, 31, 657, 12, 612], ["+", 0, 657, 12, 657, 31, 657, 31, 657, 12, 22], ["-", 31, 23, 0, 657... | 5 | 125 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
#define PI 3.14159265358979323846
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
int time;
time = H * 60 + M;
int min, hour;
min = M * 6;
hour... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
#define PI 3.14159265358979323846
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
int time;
time = H * 60 + M;
double min, hour;
min = M * 6;
h... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 292 |
import math
a,b,h,m = input().split()
a = int(a)
b = int(b)
h = int(h)
m = int(m)
deg = abs(30*h - 6*m)
ans2 = a**2+b**2-2*a*b*math.cos(math.radians(deg))
print(math.sqrt(ans2)) | import math
a,b,h,m = input().split()
a = int(a)
b = int(b)
h = int(h)
m = int(m)
deg = abs(30*h + 0.5*m - 6*m)
ans2 = a**2+b**2-2*a*b*math.cos(math.radians(deg))
print(math.sqrt(ans2)) | [["+", 12, 652, 3, 4, 0, 657, 31, 657, 17, 72], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 31, 531], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 17, 48], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 12, 22]] | 5 | 89 |
#include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double h_kakudo = h * 60.0;
double m_kakudo = m;
double kakudo = ((h_kakudo + m_kakudo) * 5.5);
kakudo = fmod(kakudo, 360);
if (kakudo == 180.0) {
cout << a + b;
return 0;
}
double pi = 2.0 *... | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double h_kakudo = h * 60.0;
double m_kakudo = m;
double kakudo = ((h_kakudo + m_kakudo) * 5.5);
kakudo = fmod(kakudo, 360);
if (kakudo == 180.0) {
cout << a + b;
return 0;
}
double pi = 2.0 *... | [["-", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13]] | 1 | 151 |
import math
a, b, h, m = map(int, input().split())
h_kaku = 30 * h
m_kaku = 6 * m
sa_kaku = h_kaku - m_kaku if h_kaku >= m_kaku else m_kaku - h_kaku
if sa_kaku > 180:
sa_kaku = 360 - sa_kaku
if sa_kaku == 180:
ans = a+ b
elif sa_kaku == 0:
if a >= b:
ans = a-b
else:
ans = b-a
else:
... | import math
a, b, h, m = map(int, input().split())
h_kaku = 30 * h + (m / 2)
m_kaku = 6 * m
sa_kaku = h_kaku - m_kaku if h_kaku >= m_kaku else m_kaku - h_kaku
if sa_kaku > 180:
sa_kaku = 360 - sa_kaku
if sa_kaku == 180:
ans = a + b
elif sa_kaku == 0:
if a >= b:
ans = a - b
else:
ans ... | [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 24], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 31, 22], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 17, 85], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 25]] | 5 | 128 |
import math
A, B, H, M = map(int, input().split())
h_d = 30 * H + M / 2
m_d = 6 * M
if h_d >= m_d:
D = h_d - m_d
else:
D = m_d - h_d
if D > 180:
D -= 180
if D == 0:
ans = abs(B - A)
elif D == 180:
ans = B + A
else:
ans_sq = A*A + B*B - 2*A*B*math.cos(math.radians(D))
ans = math.sqrt(ans_... | import math
A, B, H, M = map(int, input().split())
h_d = 30 * H + M / 2
m_d = 6 * M
if h_d >= m_d:
D = h_d - m_d
else:
D = m_d - h_d
if D > 180:
D = 360 - D
if D == 0:
ans = abs(B - A)
elif D == 180:
ans = B + A
else:
ans_sq = A*A + B*B - 2*A*B*math.cos(math.radians(D))
ans = math.sqrt(a... | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 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, 12, 22]] | 5 | 125 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPLL(i, n) for (ll i = 0; i < (ll)(n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, const T &b... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPLL(i, n) for (ll i = 0; i < (ll)(n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, const T &b... | [["+", 0, 43, 49, 50, 51, 41, 64, 16, 31, 13], ["+", 0, 43, 49, 50, 51, 41, 64, 16, 17, 33], ["-", 0, 43, 49, 50, 51, 41, 64, 16, 17, 33], ["-", 0, 43, 49, 50, 51, 41, 64, 16, 12, 13]] | 1 | 321 |
#define _USE_MATH_DEFINES
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
if (60 * (h * 60 + m) == m * 720) {
cout << 0 << endl;
return 0;
}
if ((60 * (h * 60 + m) - m * 720 == 21600)) {
cout << a... | #define _USE_MATH_DEFINES
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
if (60 * (h * 60 + m) == m * 720) {
cout << abs(a - b) << endl;
return 0;
}
if ((60 * (h * 60 + m) - m * 720 == 21600)) {
... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 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 | 206 |
import numpy as np
import math
A, B, H, M = map(int, input().split())
#K = int(input())
#S = input()
def yogen_teiri(A, B, ang):
lenAB = np.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(ang)))
return lenAB
angA = H*30
angB = M*6
if angA > angB:
angAB = min(angA-angB, 360-(angA-angB))
lenAB = yogen_... | import numpy as np
import math
A, B, H, M = map(int, input().split())
#K = int(input())
#S = input()
def yogen_teiri(A, B, ang):
lenAB = np.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(ang)))
return lenAB
angA = H*30+M*0.5
angB = M*6
if angA > angB:
angAB = min(angA-angB, 360-(angA-angB))
lenAB = ... | [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 531]] | 5 | 160 |
#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
static const double pi = 3.141592653589793;
double a, b, h, m, c, ans;
double l, s, kakudo;
cin >> a >> b >> h >> m;
l = (30 * h) + (m / 2);
s = 6 * m;
if (l - s > 0) {
kakudo = l - s;
} else {
kakudo = s ... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
static const double pi = 3.141592653589793;
double a, b, h, m, c, ans;
double l, s, kakudo;
cin >> a >> b >> h >> m;
l = (30 * h) + (m / 2);
s = 6 * m;
if (l - s > 0) {
kakudo = l - s;
} else {
kakudo = s ... | [["-", 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 | 160 |
import math
a, b, h, m = map(int, input().split())
ang_a = h/12
ang_b = m/60
ang = ang_a - ang_b if ang_a - ang_b <= 0.5 else ang_b - ang_a
theta = ang * 2 * math.pi
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(theta))) | import math
a, b, h, m = map(int, input().split())
ang_a = (h+m/60)/12
ang_b = m/60
ang = ang_a - ang_b if ang_a - ang_b <= 0.5 else ang_b - ang_a
theta = ang * 2 * math.pi
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(theta))) | [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 72], ["+", 12, 657, 31, 23, 0, 657, 12, 657, 31, 22], ["+", 12, 657, 31, 23, 0, 657, 12, 657, 17, 85], ["+", 12, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]] | 5 | 84 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef long long ll;
const int mod = 1e9 + 7;
const int INF = 2000000;
int main() {
int a, b, H, M;
double pi = acos(-1);
cin >> a >> b >> H >> M;
int bdig = 6 * M;
double adig = 30 * H + 30 * (M / 60.0);
int di... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef long long ll;
const int mod = 1e9 + 7;
const int INF = 2000000;
int main() {
int a, b, H, M;
double pi = acos(-1);
cin >> a >> b >> H >> M;
double bdig = 6 * M;
double adig = 30 * H + 30 * (M / 60.0);
dou... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 16, 12, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 154 |
A,B,H,M=map(int,input().split())
import math
if abs(H*30+M*0.5-M*6)<=180:
C=A**2+B**2-2*A*B*math.cos(math.radians(abs(H*30+M*0.5-M*6)))
print(math.sqrt(C))
else:
C=A**2+B**2-2*A*B*math.cos(math.radians((180-abs(H*30+M*0.5-M*6))))
print(math.sqrt(C)) | A,B,H,M=map(int,input().split())
import math
if abs(H*30+M*0.5-M*6)<=180:
C=A**2+B**2-2*A*B*math.cos(math.radians(abs(H*30+M*0.5-M*6)))
print(math.sqrt(C))
else:
C=A**2+B**2-2*A*B*math.cos(math.radians((360-abs(H*30+M*0.5-M*6))))
print(math.sqrt(C)) | [["-", 0, 652, 3, 4, 0, 23, 0, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 23, 0, 657, 31, 612]] | 5 | 144 |
include Math
A, B, H, M = gets.chop.split.map(&:to_i)
hour = H + M/60.0
radi = hour*(11.0/6.0)
l = A**2 + B**2 -2*A*B(Math.cos(radi*PI))
puts sqrt(l) | include Math
A, B, H, M = gets.chop.split.map(&:to_i)
hour = H + M/60.0
radi = hour*(11.0/6.0)
l = A**2 + B**2 - 2*A*B*(Math.cos(radi*PI))
puts sqrt(l) | [["+", 0, 493, 0, 662, 12, 738, 12, 738, 17, 48]] | 4 | 67 |
import math
def readInt():
return list(map(int, input().split()))
a,b,h,m = readInt()
# print(a)
arg_h = 30*h + 30*(m/60)
arg_m = 6*m
if abs(arg_h-arg_m) < 180:
arg = math.radians(abs(arg_h-arg_m))
ans = (a**2+b**2-2*a*b*math.cos(arg))**(1/2)
elif abs(arg_h-arg_m) == 180:
ans = a+b
else:
arg = math.... | import math
def readInt():
return list(map(int, input().split()))
a,b,h,m = readInt()
# print(a)
arg_h = 30*h + 30*(m/60)
arg_m = 6*m
if abs(arg_h-arg_m) < 180:
arg = math.radians(abs(arg_h-arg_m))
ans = (a**2+b**2-2*a*b*math.cos(arg))**(1/2)
elif abs(arg_h-arg_m) == 180:
ans = a+b
else:
arg = math.... | [["+", 0, 662, 12, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 181 |
#include <algorithm>
#include <bits/stdc++.h> //復習必須
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
using ll = long long;
using namespace std;
#define P pair<int, int>
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
do... | #include <algorithm>
#include <bits/stdc++.h> //復習必須
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
using ll = long long;
using namespace std;
#define P pair<int, int>
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
do... | [["-", 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 | 194 |
import math
A,B,H,M = map(int,input().split())
H = H*5 + (5/60)*M
comp = abs(H-M)
if(comp>=30):
comp = 60-comp
print(comp)
pre = ((comp*6)/360)*2*math.pi
ans = A*A + B*B -2*A*B*math.cos(pre)
print(math.sqrt(ans)) | import math
A,B,H,M = map(int,input().split())
H = H*5 + (5/60)*M
comp = abs(H-M)
if(comp>=30):
comp = 60-comp
pre = ((comp*6)/360)*2*math.pi
ans = A*A + B*B -2*A*B*math.cos(pre)
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 | 107 |
#include <bits/stdc++.h>
#include <numeric>
using namespace std;
#define ll long long
#define mod 100000007
#define rep(i, n) for (int i = 0; i < n; ++i)
using Graph = vector<vector<int>>;
#define grepq priority_queue<double, std::vector<double>, std::greater<double>>
#define all(v) v.begin(), v.end()
ll INF = 10010001... | #include <bits/stdc++.h>
#include <numeric>
using namespace std;
#define ll long long
#define mod 100000007
#define rep(i, n) for (int i = 0; i < n; ++i)
using Graph = vector<vector<int>>;
#define grepq priority_queue<double, std::vector<double>, std::greater<double>>
#define all(v) v.begin(), v.end()
ll INF = 10010001... | [["-", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13]] | 1 | 353 |
import math
A,B,H,M = map(int,input().split())
w_long = 0.5
w_short = 6
minute = H * 60 + M
R_long = minute * w_long
R_short = M * w_short
R = abs(R_long-R_short)
if R == 0 or R == 360:
print(abs(A-B))
elif R == 180:
print(A+B)
cosR = math.cos(math.radians(R))
ans2 = A**2 + B**2 - 2*A*B*cosR
print(m... | import math
A,B,H,M = map(int,input().split())
w_long = 0.5
w_short = 6
minute = H * 60 + M
R_long = minute * w_long
R_short = M * w_short
R = abs(R_long-R_short)
if R == 0 or R == 360:
print(abs(A-B))
elif R == 180:
print(A+B)
else:
cosR = math.cos(math.radians(R))
ans2 = A**2 + B**2 - 2*A*B*co... | [["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102]] | 5 | 121 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
const double pi =
3.141592653589793238462643383279502884197169399375105820974944592307816406286l;
int a, b, h, m;
scanf("%d %d %d %d", &a, &b, &h, &m);
int deg = abs(30 * h - 5.5 * m);
double power = a * a + b *... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
const double pi =
3.141592653589793238462643383279502884197169399375105820974944592307816406286l;
int a, b, h, m;
scanf("%d %d %d %d", &a, &b, &h, &m);
double deg = fabs(30.0l * h - 5.5l * m);
double power = a *... | [["-", 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, 2, 63, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["-", 51, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["+", 51, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["-", 51, 2, 3, 4, 0, 16, 12, 16, 31, 13], ["+", 51, 2, 3, 4, 0... | 0 | 103 |
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
int A, B, H, M;
scanf("%d %d %d %d", &A, &B, &H, &M);
double theta, alpha, beta, y;
double pi = M_PI;
alpha = double(M) * 2.0 * pi / 60.0;
beta = (double(H... | #include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
int A, B, H, M;
scanf("%d %d %d %d", &A, &B, &H, &M);
double theta, alpha, beta, y;
double pi = M_PI;
alpha = double(M) * 2.0 * pi / 60.0;
beta = (double(H... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 183 |
#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int main() {
double a, b, h, m;
scanf("%lf%lf%lf%lf", &a, &b, &h, &m);
h = h * 60 + m;
double angh = 360 * h / 720;
double angm = 360 * m / 60;
if (angh < angm) {
swap(angh, angm);
}
double diff;
if (angh - angm > 180) {... | #include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int main() {
double a, b, h, m;
scanf("%lf%lf%lf%lf", &a, &b, &h, &m);
h = h * 60 + m;
double angh = 360 * h / 720;
double angm = 360 * m / 60;
if (angh < angm) {
swap(angh, angm);
}
double diff;
if (angh - angm > 180) {... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 156 |
import math
a, b, h, m = map(int, input().split())
angle_m = 6 * m
angle_h = 30 * h + 0.5 * m
angle = abs(angle_m - angle_h)
if angle > 180:
angle -= 180
ans = math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(angle)))
print('{:.20f}'.format(ans)) | import math
a, b, h, m = map(int, input().split())
angle_m = 6 * m
angle_h = 30 * h + 0.5 * m
angle = abs(angle_m - angle_h)
if angle > 180:
angle = 360 - angle
ans = math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(angle)))
print('{:.20f}'.format(ans)) | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 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, 12, 22]] | 5 | 95 |
#include <bits/stdc++.h>
#define PI 3.1415926535897
using namespace std;
typedef long long ll;
const int INF = 1000000000;
const ll LINF = 1000000000000000000; // 1e18
const double EPS = 1e-10;
int main(void) {
std::cout << std::fixed << std::setprecision(11);
double A, B, H, M;
cin >> A >> B >> H >> M;
double... | #include <bits/stdc++.h>
#define PI 3.1415926535897
using namespace std;
typedef long long ll;
const int INF = 1000000000;
const ll LINF = 1000000000000000000; // 1e18
const double EPS = 1e-10;
int main(void) {
std::cout << std::fixed << std::setprecision(11);
double A, B, H, M;
cin >> A >> B >> H >> M;
double... | [["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 192 |
#include <math.h>
#include <stdio.h>
int main(void) {
int a, b, h, m;
int deg;
scanf("%d %d %d %d", &a, &b, &h, &m);
deg = 6 * m - (30 * h + 0.5 * m);
if (deg < 0) {
deg = -deg;
}
if (deg >= 360) {
deg = deg % 360;
}
printf("%.10f\n",
sqrt(a * a + b * b - 2 * a * b * cos(deg * 2 * ... | #include <math.h>
#include <stdio.h>
int main(void) {
int a, b, h, m;
float deg;
scanf("%d %d %d %d", &a, &b, &h, &m);
deg = 6 * m - (30 * h + 0.5 * m);
if (deg < 0) {
deg = -deg;
}
while (deg >= 360) {
deg = deg - 360;
}
printf("%.10f\n",
sqrt(a * a + b * b - 2 * a * b * cos(deg *... | [["-", 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, 57, 0, 121], ["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 0 | 124 |
#include <bits/stdc++.h>
using namespace std;
double solve(double a, double b, double h, double m) {
double res;
double mrad = 2 * M_PI * (m / 60);
double hrad = 2 * M_PI * (h / 12) + mrad / 12;
double diff = abs(hrad - mrad);
double drad = diff > M_PI ? 2 * M_PI - diff : diff;
double s = 2 * a * b * cos(... | #include <bits/stdc++.h>
using namespace std;
double solve(double a, double b, double h, double m) {
double res;
double mrad = 2 * M_PI * (m / 60);
double hrad = 2 * M_PI * (h / 12) + mrad / 12;
double diff = abs(hrad - mrad);
double drad = diff > M_PI ? 2 * M_PI - diff : diff;
double s = 2 * a * b * cos(... | [["+", 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 | 154 |
import math
a,b,h,m = map(int,input().split())
a_rad=h*30+0.5*m
b_rad=m*6
ABSS=abs(a_rad-b_rad)
D=math.radians(ABSS)
print(D)
ans=math.sqrt(a**2+b**2-2*a*b*math.cos(D))
print(ans) | import math
a,b,h,m = map(int,input().split())
a_rad=h*30+0.5*m
b_rad=m*6
ABSS=abs(a_rad-b_rad)
D=math.radians(ABSS)
#print(D)
ans=math.sqrt(a**2+b**2-2*a*b*math.cos(D))
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 | 87 |
a,b,h,m=map(int,input().split())
import math
pi=math.pi
s1=30*h+m/2
s2=6*m
s1s2=abs(abs(s2-s1)-180)
cos=math.cos(math.radians(s1s2))
print((a**2+b**2-2*a*b*cos)**0.5) | a,b,h,m=map(int,input().split())
import math
pi=math.pi
s1=30*h+m/2
s2=6*m
s1s2=abs(s2-s1)
cos=math.cos(math.radians(s1s2))
print((a**2+b**2-2*a*b*cos)**0.5) | [["-", 12, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["-", 3, 4, 0, 657, 31, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 657, 31, 652, 3, 4, 0, 25], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 89 |
import math
all = input()
A = int(all.split(' ')[0])
B = int(all.split(' ')[1])
H = int(all.split(' ')[2])
M = int(all.split(' ')[3])
delta_ = H/12+(1/12)*(M/60)-M/60
print(delta_)
c = (A**2+B**2-2*A*B*math.cos(2*delta_*math.pi))**0.5
print(c) | import math
all = input()
A = int(all.split(' ')[0])
B = int(all.split(' ')[1])
H = int(all.split(' ')[2])
M = int(all.split(' ')[3])
delta_ = H/12+(1/12)*(M/60)-M/60
c = (A**2+B**2-2*A*B*math.cos(2*delta_*math.pi))**0.5
print(c) | [["-", 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 | 132 |
#include <bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
#define rad(n) (((n) / 360.) * 2 * M_PI)
using ll = long long;
template <class T, class U> using P = pair<T, U>;
template <class T> using Heap = priority_queue<T>;
template <class T>... | #include <bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
#define rad(n) (((n) / 360.) * 2 * M_PI)
using ll = long long;
template <class T, class U> using P = pair<T, U>;
template <class T> using Heap = priority_queue<T>;
template <class T>... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13]] | 1 | 371 |
package main
import (
"fmt"
"math"
)
func main() {
var a, b, h, m float64
fmt.Scan(&a, &b, &h, &m)
Adeg := h * 30 + m/60 * 30
Bdeg := m/5 * 30
Deg := math.Abs(Adeg-Bdeg)
if Deg > 180 {
Deg = Deg - 180
}
X := math.Pow(a,2) + math.Pow(b,2) - 2*a*b*math.Cos(Deg / 180 * math.Pi)
fmt.Println(math.Sqrt(X)... | package main
import (
"fmt"
"math"
)
func main() {
var a, b, h, m float64
fmt.Scan(&a, &b, &h, &m)
Adeg := h * 30 + m/60 * 30
Bdeg := m/5 * 30
Deg := math.Abs(Adeg-Bdeg)
if Deg > 180 {
Deg = 360 - Deg
}
X := math.Pow(a,2) + math.Pow(b,2) - 2*a*b*math.Cos(Deg / 180 * math.Pi)
fmt.Println(math.Sqrt(X)... | [["-", 64, 196, 0, 436, 12, 432, 0, 16, 31, 22], ["+", 64, 196, 0, 436, 12, 432, 0, 16, 31, 433], ["-", 64, 196, 0, 436, 12, 432, 0, 16, 12, 433], ["+", 64, 196, 0, 436, 12, 432, 0, 16, 12, 22]] | 7 | 144 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <vector>
using namespace std;
typedef long long ll;
int main(int argc, char const *argv[]) {
double A, B, H, M;
cin >> A >> B >> H >> M;
double st ... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <vector>
using namespace std;
typedef long long ll;
int main(int argc, char const *argv[]) {
double A, B, H, M;
cin >> A >> B >> H >> M;
double st ... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 110], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 154 |
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | #!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 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, 12, 22]] | 5 | 392 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (i = 0; i < n; i++)
// 2D::rep(i,j)rep(j,j)cin>>bin[i][j];
// vector<int> a(n)
#define A1 cout << "No" << endl
#define A2 cout << "Yes" << endl
#define A3 cout << ans << endl
#define AA(i) cout << i << endl
#define PI 3.1415926535... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (i = 0; i < n; i++)
// 2D::rep(i,j)rep(j,j)cin>>bin[i][j];
// vector<int> a(n)
#define A1 cout << "No" << endl
#define A2 cout << "Yes" << endl
#define A3 cout << ans << endl
#define AA(i) cout << i << endl
#define PI 3.1415926535... | [["-", 0, 43, 49, 50, 51, 16, 12, 16, 17, 85], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 17, 48], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 12, 13]] | 1 | 138 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double rad =
3.14159265359 / 30 * m - 3.14159265359 / 6 * h - 3.14159265359 / 360 * m;
if (rad > 3.14159265359) {
rad = 6.28318530718 - rad;
}
double ans = a * a + b * b - 2 * a * b * cos(rad);
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double rad = 3.141592653589793 / 30 * m - 3.141592653589793 / 6 * h -
3.141592653589793 / 360 * m;
if (rad > 3.141592653589793) {
rad = 6.283185307179586 - rad;
}
double ans = a * a + b *... | [["-", 51, 16, 31, 16, 31, 16, 31, 16, 31, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 31, 13], ["-", 51, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 51, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["-", 49, 50, 51, 16, 12, 16, 31, 16, 31, 13], ["+", 49, 50, 51, 16, 12, 16, 31, 16, 31, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 1... | 1 | 107 |
import math
a, b, h, m = map(int, input().split())
def choshin_angle(m):
return 6 * m
def tanshin_angle(h, m):
return 0.5 * (60 * h + m)
theta = abs(tanshin_angle(h, m) - choshin_angle(m))
while (theta > 180.):
theta -= 180.
theta = math.radians(theta)
x2 = a**2 + b**2 - 2 * a * b * math.cos(theta)
... | import math
a, b, h, m = map(int, input().split())
def choshin_angle(m):
return 6 * m
def tanshin_angle(h, m):
return 0.5 * (60 * h + m)
theta = abs(tanshin_angle(h, m) - choshin_angle(m))
if (theta >= 180.):
theta = 360 - theta
theta = math.radians(theta)
x2 = a**2 + b**2 - 2 * a * b * math.cos(the... | [["-", 36, 36, 36, 36, 0, 656, 0, 52, 0, 89], ["+", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["-", 0, 656, 0, 52, 15, 23, 0, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 667, 20], ["-", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 52, 8, 196, 0, 1, 0, 677, 12, 531], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ... | 5 | 118 |
import math
A, B , H , M = map(int, input().split())
d = 5.5 * (60*H+M)
distan = d - 360 * (d // 360)
if distan>180:
distan=distan-180
cosC = math.cos(math.radians(distan))
Cpow2 = pow(A,2)+pow(B,2)- 2* A * B * cosC
print(Cpow2**(0.5)) | import math
A, B , H , M = map(int, input().split())
d = 5.5 * (60*H+M)
distan = d - 360 * (d // 360)
if distan>180:
distan=360-distan
cosC = math.cos(math.radians(distan))
Cpow2 = pow(A,2)+pow(B,2)- 2* A * B * cosC
print(Cpow2**(0.5)) | [["-", 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 | 98 |
import math
A, B, H, M = map(int, input().split())
theta = abs(H/6 - M/30) * math.pi
x = math.sqrt((A * math.sin(theta))**2 + (B - A * math.cos(theta))**2)
print(x)
| import math
A, B, H, M = map(int, input().split())
H += M/60
theta = abs(H/6 - M/30) * math.pi
x = math.sqrt((A * math.sin(theta))**2 + (B - A * math.cos(theta))**2)
print(x)
| [["+", 36, 36, 0, 656, 0, 1, 0, 677, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 17, 107], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 17, 85], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 12, 612]] | 5 | 76 |
import math
def resolve():
a,b,h,m = map(int, input().split())
a_deg = h*30 + m*0.5
b_deg = m*6
angle = abs(a_deg - b_deg)
if angle == 0 or angle == 360:
print(abs(b-a))
elif angle == 180:
print(a+b)
elif angle > 180:
angle = 360 - angle
rad = math.radians(angle)... | import math
def resolve():
a,b,h,m = map(int, input().split())
a_deg = h*30 + m*0.5
b_deg = m*6
angle = abs(a_deg - b_deg)
if angle == 0 or angle == 360:
print(abs(b-a))
return
elif angle == 180:
print(a+b)
return
elif angle > 180:
angle = 360 - angl... | [["+", 8, 196, 0, 57, 64, 196, 0, 37, 0, 38], ["+", 0, 57, 75, 665, 64, 196, 0, 37, 0, 38]] | 5 | 130 |
import math
a,b,h,m = map(int, input().split())
h_angle=30*h
m_angle=6*m
sa_angle=abs(h_angle - m_angle)
if(sa_angle > 180 ):
sa_angle=360- sa_angle
theta=(sa_angle / 180) * math.pi
c_2=a*a +b*b -2*a*b*math.cos(theta)
c=math.sqrt(c_2)
print(c) | import math
a,b,h,m = map(int, input().split())
h_angle=30*h+0.5*m
m_angle=6*m
sa_angle=abs(h_angle - m_angle)
if(sa_angle > 180 ):
sa_angle=360- sa_angle
theta=(sa_angle / 180) * math.pi
c_2=a*a +b*b -2*a*b*math.cos(theta)
c=math.sqrt(c_2)
print(c) | [["+", 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 | 97 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <vector>
//#include <math.h>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <numeric>
#include <queue>
#include <string>
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep1(i, n)... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <vector>
//#include <math.h>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <numeric>
#include <queue>
#include <string>
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep1(i, n)... | [["-", 0, 43, 49, 50, 51, 16, 31, 2, 63, 22], ["-", 49, 50, 51, 16, 31, 2, 3, 4, 0, 24], ["-", 3, 4, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 257 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define in(n) cin >> (n)
#define out(ans) cout << (ans) << endl;
#define keta(n) cout << fixed << setprecision((n));
using ll = int64_t;
using v = vector<int>;
int main() {
double A, B, H, M, jikaku, hunkaku, kakusa, pi, h... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define in(n) cin >> (n)
#define out(ans) cout << (ans) << endl;
#define keta(n) cout << fixed << setprecision((n));
using ll = int64_t;
using v = vector<int>;
int main() {
double A, B, H, M, jikaku, hunkaku, kakusa, pi, h... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 191 |
# -*- coding: utf-8 -*-
"""
Created on Sun May 17 21:16:04 2020
@author: Kei
"""
import math
A,B,H,M = map(int,input().split())
theta_s = H*30
theta_l = M*6
theta = abs(theta_s-theta_l)
if theta > 180:
theta = 360 - theta
#print(theta)
C = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(theta)))
print... | # -*- coding: utf-8 -*-
"""
Created on Sun May 17 21:16:04 2020
@author: Kei
"""
import math
A,B,H,M = map(int,input().split())
theta_s = H*30 + M*0.5
theta_l = M*6
theta = abs(theta_s-theta_l)
if theta > 180:
theta = 360 - theta
#print(theta)
C = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(theta))... | [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 531]] | 5 | 91 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
#define REP(i, n) for (ll i = 0; i < (n); i++)
#define REP2(i, x, n) for (ll i = x; i < (n); i++)
#define REP3(i, x, n) for (ll i = x; i > (n); i--)
#define zero_pad(num) setfill('0') << std::right << setw(num)
#define space_pad(num) setfill(' ') <... | #include <bits/stdc++.h>
using namespace std;
using ll = long long int;
#define REP(i, n) for (ll i = 0; i < (n); i++)
#define REP2(i, x, n) for (ll i = x; i < (n); i++)
#define REP3(i, x, n) for (ll i = x; i > (n); i--)
#define zero_pad(num) setfill('0') << std::right << setw(num)
#define space_pad(num) setfill(' ') <... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 12, 13]] | 1 | 249 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, N) for (int i = 0; i < (int)N; i++)
#define LOOP(i, N) for (int i = 1; i <= (int)N; i++)
#define RREP(i, N) for (int i = (int)N - 1; i >= 0; i--)
#define RLOOP(i, N) for (int i = (int)N; i > 0; i--)
#define FOR(i, a, b) for (int i = a; i < (int)b; i++)
#def... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, N) for (int i = 0; i < (int)N; i++)
#define LOOP(i, N) for (int i = 1; i <= (int)N; i++)
#define RREP(i, N) for (int i = (int)N - 1; i >= 0; i--)
#define RLOOP(i, N) for (int i = (int)N; i > 0; i--)
#define FOR(i, a, b) for (int i = a; i < (int)b; i++)
#def... | [["-", 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]] | 1 | 246 |
#include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
long double dis;
long double h_kaku, m_kaku;
h_kaku = 30 * h + 0.5 * m;
m_kaku = 6 * m;
if (m_kaku = h_kaku) {
cout << setprecision(20) << abs(a - ... | #include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
long double dis;
long double h_kaku, m_kaku;
h_kaku = 30 * h + 0.5 * m;
m_kaku = 6 * m;
if (m_kaku == h_kaku) {
cout << setprecision(20) << abs(a -... | [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 206 |
import math as m
A,B,H,M=map(int,input().split())
a=(30*H)+(M/2)
b=M*1
if b-a==180 or a-b==180:
print(A+B)
else:
if b-a>=0:
if b-a<180:
c=b-a
d=m.radians(c)
f=m.cos(d)
e=A*A+B*B-2*A*B*f
g=m.sqrt(e)
print(g)
else:
... | import math as m
A,B,H,M=map(int,input().split())
a=(30*H)+(M/2)
b=M*6
if b-a==180 or a-b==180:
print(A+B)
else:
if b-a>=0:
if b-a<180:
c=b-a
d=m.radians(c)
f=m.cos(d)
e=A*A+B*B-2*A*B*f
g=m.sqrt(e)
print(g)
else:
... | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 298 |
import math
a,b,h,m=map(int,input().split())
if(h==0 and m==0):
print(0)
else:
ah=(h*30)+(m*0.5)
am=m*6
an=abs(ah-am)
f=abs(360-an)
ang=min(an,f)
d=math.cos(math.radians(ang))
z=math.sqrt((a**2)+(b**2)-(2*b*a*d))
print(z) | import math
a,b,h,m=map(int,input().split())
if(h==0 and m==0):
print(abs(a-b))
else:
ah=(h*30)+(m*0.5)
am=m*6
an=abs(ah-am)
f=abs(360-an)
ang=min(an,f)
d=math.cos(math.radians(ang))
z=math.sqrt((a**2)+(b**2)-(2*b*a*d))
print(z) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 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 | 126 |
import math
a,b,h,m=map(int,input().split())
h=h*30+(m/60)*30
m=m*6
diff=abs(h-m)*((math.pi)/180)
if(diff>180):
diff=diff-180
ans=a*a+b*b-2*a*b*abs(math.cos(diff))
print(math.sqrt(ans))
| import math
a,b,h,m=map(int,input().split())
h=h*30+(m/60)*30
m=m*6
diff=abs(h-m)*((math.pi)/180)
if(diff>180):
diff=diff-180
ans=a*a+b*b-2*a*b*(math.cos(diff))
print(math.sqrt(ans))
| [["-", 0, 662, 12, 657, 12, 657, 12, 652, 63, 22]] | 5 | 104 |
import math
a,b,h,m = map(int,input().split())
h_x = a*math.cos(math.radians(90-(h*60+m)/2))
h_y = a*math.sin(math.radians(90-(h*60+m)/2))
t_x = b*math.cos(math.radians(90-(m*60)))
t_y = b*math.sin(math.radians(90-(m*60)))
#print(90-(m*60),t_x,t_y)
print((abs(h_x-t_x)**2+abs(h_y-t_y)**2)**0.5) | import math
a,b,h,m = map(int,input().split())
h_x = a*math.cos(math.radians(90-(h*60+m)/2))
h_y = a*math.sin(math.radians(90-(h*60+m)/2))
t_x = b*math.cos(math.radians(90-(m*6)))
t_y = b*math.sin(math.radians(90-(m*6)))
#print(90-(m*60),t_x,t_y)
print((abs(h_x-t_x)**2+abs(h_y-t_y)**2)**0.5) | [["-", 3, 4, 0, 657, 12, 23, 0, 657, 12, 612], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 12, 612]] | 5 | 139 |
import math
A, B, H, M = map(int, input().split())
cosAB = abs((H * 30) - (M * 6))
C = math.sqrt(pow(A, 2) + pow(B, 2) - 2*A*B*math.cos(math.radians(cosAB)))
print (C) | import math
A, B, H, M = map(int, input().split())
cosAB = abs((H * 30 + M * 0.5) - (M * 6))
C = math.sqrt(pow(A, 2) + pow(B, 2) - 2*A*B*math.cos(math.radians(cosAB)))
print (C) | [["+", 3, 4, 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, 48], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 531]] | 5 | 80 |
#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable : 4244) // 最悪をします
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include... | #define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable : 4244) // 最悪をします
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 10,665 |
from math import *;
a, b, h, m = list(map(int, input().split()))
angle = 2 * pi * abs((h + m / 60) / 12 - m / 60)
if angle >= pi:
angle = 2 * pi - angle
ans = a * a + b * b - 2 * a * b * abs(cos(angle))
print(sqrt(abs(ans))) | from math import *;
a, b, h, m = list(map(int, input().split()))
angle = 2 * pi * abs((h + m / 60) / 12 - m / 60)
if angle >= pi:
angle = 2 * pi - angle
ans = a * a + b * b - 2 * a * b * cos(angle)
print(sqrt(abs(ans))) | [["-", 0, 662, 12, 657, 12, 657, 12, 652, 63, 22], ["-", 12, 657, 12, 657, 12, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 95 |
#include <math.h>
#include <stdio.h>
#define PI 3.1415927
int main() {
double A, B, H, M;
scanf("%lf %lf %lf %lf", &A, &B, &H, &M);
double D1, D2, dD;
D1 = (H + M / 60) * 30, D2 = M * 6;
dD = fabs(D1 - D2);
double S;
S = cos(PI * dD / 180);
double ans;
ans = sqrt(A * A + B * B - 2 * A * B * S);
pri... | #include <math.h>
#include <stdio.h>
#define PI 3.14159265358979323
int main() {
double A, B, H, M;
scanf("%lf %lf %lf %lf", &A, &B, &H, &M);
double D1, D2, dD;
D1 = (H + M / 60) * 30, D2 = M * 6;
dD = fabs(D1 - D2);
double S;
S = cos(PI * dD / 180);
double ans;
ans = sqrt(A * A + B * B - 2 * A * B *... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59]] | 0 | 125 |
import math
a, b, h, m = map(int, input().split())
a_h = h*30 + m*0.5
a_m = m* 6
angle = abs(a_h-a_m)%180
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(angle)))) | import math
a, b, h, m = map(int, input().split())
a_h = h*30 + m*0.5
a_m = m* 6
angle = abs(a_h-a_m)
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(angle))))
| [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 79 |
#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
#define inputInt(a) \
int a; \
cin >> a;
#define inputInt2(a, b) \... | #include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
#define inputInt(a) \
int a; \
cin >> a;
#define inputInt2(a, b) \... | [["+", 51, 16, 12, 16, 31, 16, 31, 74, 0, 24], ["+", 12, 16, 31, 16, 31, 74, 39, 77, 39, 40], ["+", 51, 16, 12, 16, 31, 16, 31, 74, 0, 25]] | 1 | 1,382 |
a,b,h,m = map(int, input().split(' '))
import math
if h == 0:
hang = 360
else:
hang = 1/12*h*360 + 1/60*m*30
if m == 0:
mang = 360
else:
mang = 1/60*m*360
ang = min(abs(hang-mang), abs(mang-hang))
c2 = a**2 + b**2 -2*a*b*math.cos(ang*math.pi/180)
print(math.sqrt(c2)) | a,b,h,m = map(int, input().split(' '))
import math
if h == 0 and m == 0:
hang = 360
else:
hang = 1/12*h*360 + 1/60*m*30
if m == 0:
mang = 360
else:
mang = 1/60*m*360
ang = min(abs(hang-mang), abs(mang-hang))
c2 = a**2 + b**2 -2*a*b*math.cos(ang*math.pi/180)
print(math.sqrt(c2)) | [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 126 |
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double x = (h * 30 + m * 0.5) - (m * 6);
x /= 180;
x *= 3.14159;
printf("%.20lf\n", sqrt(a * a + b * b - 2 * a * b * cos(x)));
return 0;
} | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double x = (h * 30 + m * 0.5) - (m * 6);
x /= 180;
x *= 3.141592653589793238462643383279;
printf("%.20lf\n", sqrt(a * a + b * b - 2 * a * b * cos(x)));
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]] | 1 | 95 |
import math
a,b,h,m=map(int,input().split())
hh=h/12*360 + m/60*30
mh=m/60*360
#print(hh,mh)
x=abs(hh-mh)
if x==180:
print(a+b)
else:
#print(round((a*2+b2-abs(2*a*b*math.cos(x*math.pi/180)))*0.5,9))
print ('%.9f'%(a**2+b**2-abs(2*a*b*math.cos(x*math.pi/180)))**0.5) | import math
a,b,h,m=map(int,input().split())
hh=h/12*360 + m/60*30
mh=m/60*360
#print(hh,mh)
x=abs(hh-mh)
if x==180:
print(a+b)
else:
#print(round((a*2+b2-abs(2*a*b*math.cos(x*math.pi/180)))*0.5,9))
print ('%.9f'%(a**2+b**2-2*a*b*math.cos(x*math.pi/180))**0.5) | [["-", 12, 657, 31, 23, 0, 657, 12, 652, 63, 22], ["-", 31, 23, 0, 657, 12, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 25]] | 5 | 105 |
/*****************************************************************************/
#define JaiShreeRam
/****************************************************************************/
/*
/************* आत्मनिर्भर ***************/
/*
TO NIGHT
--------------------------
BY - Percy Bysshe Shelley
--------------------------... | /*****************************************************************************/
#define JaiShreeRam
/****************************************************************************/
/*
/************* आत्मनिर्भर ***************/
/*
TO NIGHT
--------------------------
BY - Percy Bysshe Shelley
--------------------------... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 49, 50, 51, 16, 31, 2, 63, 23, 0, 22], ["+", 49, 50, 51, 16, 31, 2, 63, 23, 0, 25], ["+", 31, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 16, 12, 74, 0, 24], ["+", 12, 16, 31, 16, 12, 74, 39, 77, 39, 78], ["+",... | 1 | 1,802 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long double a, b, h, m;
cin >> a >> b >> h >> m;
cout << sqrt(a * a + b * b -
2 * a * b *
cos(abs(6 * m - (30 * h + 0.5 * m)) / 180 *
3.141592653589793238))
<< endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long double a, b, h, m;
cin >> a >> b >> h >> m;
cout << setprecision(20)
<< sqrt(a * a + b * b -
2 * a * b *
cos(abs(6 * m - (30 * h + 0.5 * m)) / 180 *
3.141592653589793238))
<< end... | [["+", 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 | 77 |
#include <bits/stdc++.h>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
#define ll long long int
#define ull unsigned long long int
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a, b, h, m;
cin >> a >> b >> h >> m;
double x, y;
x = h * 30 + m / 2;
... | #include <bits/stdc++.h>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
#define ll long long int
#define ull unsigned long long int
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
double a, b, h, m;
cin >> a >> b >> h >> m;
double x, y;
x = h * 30 + m / 2... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 149 |
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// ArrayList<Integer> list;
int a = sc.nextInt();
int b = sc.nextInt();
... | import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// ArrayList<Integer> list;
int a = sc.nextInt();
int b = sc.nextInt();
... | [["+", 51, 16, 12, 16, 31, 16, 31, 74, 0, 24], ["+", 12, 16, 31, 16, 31, 74, 39, 511, 0, 512], ["+", 51, 16, 12, 16, 31, 16, 31, 74, 0, 25]] | 3 | 207 |
import math
A, B, H, M = map(int, input().split())
a_angle = 30 * (H + M / 60)
b_angle = 6 * M
if a_angle == 0:
a_angle = 360
if b_angle == 0:
b_angle = 360
if abs(a_angle - b_angle) < abs(b_angle - a_angle):
angle = abs(a_angle - b_angle)
else:
angle = abs(b_angle - a_angle)
#print(math.cos(math.... | import math
A, B, H, M = map(int, input().split())
a_angle = 30 * (H + M / 60)
b_angle = 6 * M
if a_angle == 0:
a_angle = 360
if b_angle == 0:
b_angle = 360
if abs(a_angle - b_angle) < abs(b_angle - a_angle):
angle = abs(a_angle - b_angle)
else:
angle = abs(b_angle - a_angle)
# print(math.cos(math... | [["+", 12, 23, 0, 657, 31, 657, 31, 657, 12, 22], ["+", 0, 657, 12, 23, 0, 657, 31, 657, 17, 48], ["+", 0, 657, 12, 23, 0, 657, 31, 657, 12, 22], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 17, 48]] | 5 | 122 |
#include <bits/stdc++.h>
using namespace std;
#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++)
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double hh = (60.0 * h + m) / 720 * 360;
double mm = 6 * m;
cerr << fixed;
/*
cerr << "... | #include <bits/stdc++.h>
using namespace std;
#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++)
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double hh = (60.0 * h + m) / 720 * 360;
double mm = 6 * m;
cerr << fixed;
/*
cerr << "... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 12, 2, 63, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 168 |
# coding:utf-8
import math
def h_degree(h, m):
return (h*60 + m) * 0.5
def m_degree(m):
return m * 6
A, B, H, M = map(int, input().split(' '))
d = abs(h_degree(H, M) - m_degree(M))
if d == float(0):
print(B - A)
elif d == float(180):
print(A + B)
else:
if d > 180:
d = 360 - d
C2... | # coding:utf-8
import math
def h_degree(h, m):
return (h*60 + m) * 0.5
def m_degree(m):
return m * 6
A, B, H, M = map(int, input().split(' '))
d = abs(h_degree(H, M) - m_degree(M))
if d == float(0):
print(abs(A - B))
elif d == float(180):
print(A + B)
else:
if d > 180:
d = 360 - d
... | [["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 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, 17, 33], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 152 |
// include,namespace
#include <bits/stdc++.h>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
// REPmacro
#define all(x) (x).begin(), (x).end() //ソート
#define FOR(i, x, n) for (int i = (x); i < (n); i++)
#define FOR_R(i, x, n) for (int i = (n - 1); i >= (x); i--)
#define REP... | // include,namespace
#include <bits/stdc++.h>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
// REPmacro
#define all(x) (x).begin(), (x).end() //ソート
#define FOR(i, x, n) for (int i = (x); i < (n); i++)
#define FOR_R(i, x, n) for (int i = (n - 1); i >= (x); i--)
#define REP... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 198 |
#include <math.h>
#include <stdio.h>
#define pi 3.141592653589793238462
int main() {
int a, b, h, m;
double hour_angle, minite_angle, angle, degree, result;
scanf("%d %d %d %d", &a, &b, &h, &m);
hour_angle = h * 30 + m * 0.5;
minite_angle = m * 6.0;
if (hour_angle >= minite_angle) {
angle = hour_angle -... | #include <math.h>
#include <stdio.h>
#define pi 3.141592653589793238462
int main() {
int a, b, h, m;
double hour_angle, minite_angle, angle, degree, result;
scanf("%d %d %d %d", &a, &b, &h, &m);
hour_angle = h * 30 + m * 0.5;
minite_angle = m * 6.0;
if (hour_angle >= minite_angle) {
angle = hour_angle -... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 137 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
double h = sc.nextDouble();
double m = sc.nextDouble();
double mTHeta = 6 * m;
double hTheta = 30 * h + 0.5... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
double h = sc.nextDouble();
double m = sc.nextDouble();
double mTHeta = 6 * m;
double hTheta = 30 * h + 0.5... | [["+", 0, 57, 64, 1, 0, 11, 12, 492, 500, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 492, 0, 131], ["+", 0, 57, 64, 1, 0, 11, 12, 492, 141, 22], ["+", 64, 1, 0, 11, 12, 492, 3, 4, 0, 24], ["+", 64, 1, 0, 11, 12, 492, 3, 4, 0, 25]] | 3 | 285 |
#include <bits/stdc++.h>
using namespace std;
double x, y, a, b, h, pai = 3.1415926535897932384;
int main() {
// freopen(".in","r",stdin);
// freopen(".out","w",stdout);
cin >> x >> y >> a >> b;
int h = abs(a * 30 + b * 0.5 - b * 6);
cout << fixed << setprecision(20)
<< sqrt(x * x + y * y - 2 * x * y *... | #include <bits/stdc++.h>
using namespace std;
double x, y, a, b, h, pai = 3.1415926535897932384;
int main() {
// freopen(".in","r",stdin);
// freopen(".out","w",stdout);
cin >> x >> y >> a >> b;
double h = abs(a * 30 + b * 0.5 - b * 6);
cout << fixed << setprecision(20)
<< sqrt(x * x + y * y - 2 * x * ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 95 |
#include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define PI 3.1415926
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double angle = abs((30 * h) - (5.5 * m));
double cos_ = cos(angle * PI / 180.0);
dou... | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define PI 3.14159265359
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double angle = abs((30 * h) - (5.5 * m));
double cos_ = cos(angle * PI / 180.0);
... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59]] | 1 | 114 |
A,B,H,M=map(int,input().split())
N=abs(H*30+M*0.5-M*6)
if N >= 180 :
N=360-N
import math
ans2=A**2+B**2-2*A*B*math.cos((math.radians(N)))
#print(A**2,B**2,2*A*B,math.cos(math.radians(N)))
ans=math.sqrt(ans2) | A,B,H,M=map(int,input().split())
N=abs(H*30+M*0.5-M*6)
if N >= 180 :
N=360-N
import math
ans2=A**2+B**2-2*A*B*math.cos((math.radians(N)))
#print(A**2,B**2,2*A*B,math.cos(math.radians(N)))
ans=math.sqrt(ans2)
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 | 86 |
#include <bits/stdc++.h>
using namespace std;
// long long
using ll = long long;
// pair<int, int>
using PII = pair<int, int>;
//最大値、mod
const int MOD = 1000000007;
const int mod = 1000000007;
const int INF = 1000000000;
const long long LINF = 1e18;
const int MAX = 510000;
//出力系
#define print(x) cout << x << endl
#... | #include <bits/stdc++.h>
using namespace std;
// long long
using ll = long long;
// pair<int, int>
using PII = pair<int, int>;
//最大値、mod
const int MOD = 1000000007;
const int mod = 1000000007;
const int INF = 1000000000;
const long long LINF = 1e18;
const int MAX = 510000;
//出力系
#define print(x) cout << x << endl
#... | [["-", 3, 4, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22]] | 1 | 1,719 |
#include <math.h>
#include <stdio.h>
int main() {
double A = 0, B = 0, H = 0, M = 0;
scanf("%lf %lf %lf %lf", &A, &B, &H, &M);
double lad_h = 0, lad_m = 0;
lad_m = 2 * M_PI * (M / 60);
lad_h = 2 * M_PI * (H / 12) + 2 * M_PI * (M / 60) / 12;
double lad;
if (lad_m >= lad_h) {
lad = lad_m - lad_h;
... | #include <math.h>
#include <stdio.h>
int main() {
double A = 0, B = 0, H = 0, M = 0;
scanf("%lf %lf %lf %lf", &A, &B, &H, &M);
double lad_h = 0, lad_m = 0;
lad_m = 2 * M_PI * (M / 60);
lad_h = 2 * M_PI * (H / 12) + 2 * M_PI * (M / 60) / 12;
double lad;
if (lad_m >= lad_h) {
lad = lad_m - lad_h;
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 163 |
import math
A, B, H, M = map(int, input().split())
alpha = abs(H + M / 60 - M / 5)
if 6 < alpha:
alpha -= 6
print(math.sqrt(A ** 2 + B ** 2 - (math.cos(alpha * math.pi / 6) * 2 * A * B))) | import math
A, B, H, M = map(int, input().split())
alpha = abs(H + M / 60 - M / 5)
if 6 < alpha:
alpha = 12 - alpha
print(math.sqrt(A ** 2 + B ** 2 - (math.cos(alpha * math.pi / 6) * 2 * A * B))) | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 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, 12, 22]] | 5 | 80 |
A, B, H, M = gets.chop.split.map(&:to_i)
total_m = 60 * H + M
a = total_m * 0.5
b = M * 6
x = 0
ans = nil
if a == b && a == 0
ans = (a - b).abs
elsif a - b == 0
ans = (a - b).abs
elsif (a - b).abs == 180
ans = a + b
else
if a > b
if a - b < 180
x = a - b
else
x = b + 360 - a
end
els... | A, B, H, M = gets.chop.split.map(&:to_i)
total_m = 60 * H + M
a = total_m * 0.5
b = M * 6
x = 0
ans = nil
if a == b && a == 0
ans = (A - B).abs
elsif a - b == 0
ans = (A - B).abs
elsif (a - b).abs == 180
ans = A + B
else
if a > b
if a - b < 180
x = a - b
else
x = b + 360 - a
end
els... | [["-", 0, 662, 12, 652, 486, 739, 0, 738, 31, 22], ["+", 0, 662, 12, 652, 486, 739, 0, 738, 31, 743], ["-", 0, 662, 12, 652, 486, 739, 0, 738, 12, 22], ["+", 0, 662, 12, 652, 486, 739, 0, 738, 12, 743], ["-", 75, 759, 64, 749, 0, 662, 12, 738, 31, 22], ["+", 75, 759, 64, 749, 0, 662, 12, 738, 31, 743], ["-", 75, 759, 6... | 4 | 175 |
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
double a = sc.nextInt();
double b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
double angleH = h * 30 +... | import java.io.IOException;
import java.io.InputStream;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
double a = sc.nextInt();
double b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
double angleH = h * 30 + (... | [["-", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 31, 499], ["-", 0, 57, 64, 1, 0, 11, 12, 16, 12, 499], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 22]] | 3 | 612 |
import math
A, B, H, M = map(int, input().split())
H_an = H * 360 /12
M_an = M * 360 /60
an = abs(H_an - M_an)
if an >= 180:
an = 360 - an
an = an * math.pi/180
a = (A**2) + (B**2) - (2*A*B*math.cos(an))
print(math.sqrt(a)) | import math
A, B, H, M = map(int, input().split())
H_an = H * 360 /12 + M / 2
M_an = M * 360 /60
an = abs(H_an - M_an)
if an >= 180:
an = 360 - an
an = an * math.pi/180
a = (A**2) + (B**2) - (2*A*B*math.cos(an))
print(math.sqrt(a)) | [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 85], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 612]] | 5 | 100 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.