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 <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
template <class T> inline bool chmax(T &a, T b) {
if (... | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
template <class T> inline bool chmax(T &a, T b) {
if (... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 1 | 318 |
#include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
template <class T> inline bool chmax(T &a, T b) {
if (... | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
template <class T> inline bool chmax(T &a, T b) {
if (... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 3, 4, 0, 16, 12, 16, 12, 2, 63, 22], ["+", 3, 4, 0, 16, 12, 16, 12, 2, 63, 22]] | 1 | 320 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define SORT(x) sort((x).begin(), (x).end())
#define RSORT(x) sort((x).rbegin(), (x).rend())
#define ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define SORT(x) sort((x).begin(), (x).end())
#define RSORT(x) sort((x).rbegin(), (x).rend())
#define ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 931 |
a, b, h, m = gets.chomp.split(" ").map {|c| c.to_i}
h = h.to_f
m = m.to_f
theta = (30.0*h + (m/2.0) - 6.0*m)
if theta > 180.0
theta -= 180.0
end
puts Math.sqrt(a**2 + b**2 \
- 2.0*a*b*Math.cos(Math::PI * theta / 180.0)) | a, b, h, m = gets.chomp.split(" ").map {|c| c.to_i}
h = h.to_f
m = m.to_f
theta = (30.0*h + (m/2.0) - 6.0*m).abs
if theta > 180.0
theta = 360.0 - theta
end
puts Math.sqrt(a**2 + b**2 \
- 2.0*a*b*Math.cos(Math::PI * theta / 180.0)) | [["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["-", 0, 493, 0, 121, 64, 749, 0, 755, 17, 110], ["-", 0, 493, 0, 121, 64, 749, 0, 755, 12, 531], ["+", 0, 493, 0, 121, 64, 749, 0, 662, 0, 32], ["+", 0, 121, 64, 749, 0, 662, 12, 738, 31, 531], ["+", 0, 121, 64, 749, 0, ... | 4 | 96 |
import math
a,b,h,m=map(int,input().split())
h=h+m*(0.5/30)
angle=30*h-6*m
print(angle)
x=math.sqrt((a*a)+(b*b)-2*a*b*math.cos(math.radians(angle)))
print(x)
| import math
a,b,h,m=map(int,input().split())
h=h+m*(0.5/30)
angle=(30*h-6*m)
x=math.sqrt((a*a)+(b*b)-2*a*b*math.cos(math.radians(angle)))
print(x)
| [["+", 0, 656, 0, 1, 0, 662, 12, 23, 0, 24], ["-", 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]] | 5 | 86 |
#include <bits/stdc++.h>
using namespace std;
long double pi = 3.14159265359;
int main() {
long double A, B, H, M;
cin >> A >> B >> H >> M;
long double Hkakudo = (H * 60 + M) / 2;
long double Mkakudo = M * 6;
long double kakudo = max(Mkakudo, Hkakudo) - min(Mkakudo, Hkakudo);
if (kakudo > 180) {
ka... | #include <bits/stdc++.h>
using namespace std;
long double pi = 3.14159265359;
int main() {
long double A, B, H, M;
cin >> A >> B >> H >> M;
long double Hkakudo = (H * 60 + M) / 2;
long double Mkakudo = M * 6;
long double kakudo = max(Mkakudo, Hkakudo) - min(Mkakudo, Hkakudo);
if (kakudo > 180) {
ka... | [["+", 0, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 17, 48]] | 1 | 135 |
#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> P;
typedef priority_queue<P, vector<P>, greater<P>> P_queue;
const ll MOD = 998244353;
const ll mod = 1000000007;
const ll INF = 1e15;
const double PI = 3.141592... | #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> P;
typedef priority_queue<P, vector<P>, greater<P>> P_queue;
const ll MOD = 998244353;
const ll mod = 1000000007;
const ll INF = 1e15;
const double PI = 3.141592... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]] | 1 | 295 |
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
long long a, b, h, m;
double r, rad, c;
cin >> a >> b >> h >> m;
r = fabs(static_cast<double>(6.0 * m - 0.5 * (h * 60.0 + m)));
if (r == 0.0) {
c = b - a;
cout << c;
return 0;
} else ... | #include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
long long a, b, h, m;
double r, rad, c;
cin >> a >> b >> h >> m;
r = fabs(static_cast<double>(6.0 * m - 0.5 * (h * 60.0 + m)));
if (r == 0.0) {
c = fabs(b - a);
cout << c;
return 0;
}... | [["+", 64, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25]] | 1 | 191 |
import math
A, B, H, M = map(int, input().split())
H = H * 30 + M * 0.5
M = M * 6
diff = H - M
if diff < 0:
if diff < -180:
diff = abs(diff + 180)
else:
diff = abs(diff)
if diff > 180:
diff = 180 - (diff - 180)
print(math.sqrt(A**2 + B**2 - (2 * A * B * math.cos(math.radians(diff))))) | import math
A, B, H, M = map(int, input().split())
H = H * 30 + M * 0.5
M = M * 6
diff = H - M
if diff < 0:
if diff < -180:
diff = 180 - abs(diff + 180)
else:
diff = abs(diff)
if diff > 180:
diff = 180 - (diff - 180)
print(math.sqrt(A**2 + B**2 - (2 * A * B * math.cos(math.radians(diff)... | [["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33]] | 5 | 117 |
import math
a, b, h, m = map(int, input().split())
# 角度を求める
H = 30 * h + (m/2)
M = 6 * m
theta = abs(H-M)
if theta == 0 or theta == 360:
print(abs(a-b))
exit()
if theta > 180:
theta = theta - 180
#print(a, b, H, M, theta, math.sin(theta), math.cos(theta), math.tan(theta), math.sin(math.radians(theta)), math.cos(m... | import math
a, b, h, m = map(int, input().split())
# 角度を求める
H = 30 * h + (m/2)
M = 6 * m
theta = abs(H-M)
if theta == 0 or theta == 360:
print(abs(a-b))
exit()
if theta > 180:
theta = 360 - theta
#print(a, b, H, M, theta, math.sin(theta), math.cos(theta), math.tan(theta), math.sin(math.radians(theta)), math.cos(m... | [["-", 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], ["-", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 118 |
import math
a, b, h, m = map(int, input().split())
arg = abs(30*h - 5.5*m)
if arg == 180:
print(b+a)
exit()
if arg == 0:
print(b-a)
exit()
if arg > 180:
arg = 360 - arg
length = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(arg)))
print(length) | import math
a, b, h, m = map(int, input().split())
arg = abs(30*h - 5.5*m)
if arg == 180:
print(b+a)
exit()
if arg == 0:
print(abs(b-a))
exit()
if arg > 180:
arg = 360 - arg
length = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(arg)))
print(length) | [["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 108 |
# import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
# combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import item... | # import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
# combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import item... | [["-", 0, 1, 0, 662, 12, 657, 12, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 612]] | 5 | 152 |
# import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
# combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import item... | # import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
# combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import item... | [["-", 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 | 154 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int gcd(int p, int q) {
if (p % q == 0) {
return q;
}
return gcd(q, p % q);
}
int main() {
double a, b, h, m, rad, x;
cin >> a >> b >> h >> m;
x = 60 * h + m;
rad = M_PI * (0.5 * x - m) / 180;
doubl... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int gcd(int p, int q) {
if (p % q == 0) {
return q;
}
return gcd(q, p % q);
}
int main() {
double a, b, h, m, rad, x;
cin >> a >> b >> h >> m;
x = 60 * h + m;
rad = M_PI * (0.5 * x - 6 * m) / 180;
d... | [["+", 31, 16, 12, 23, 0, 16, 12, 16, 31, 13], ["+", 31, 16, 12, 23, 0, 16, 12, 16, 17, 48]] | 1 | 143 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int gcd(int p, int q) {
if (p % q == 0) {
return q;
}
return gcd(q, p % q);
}
int main() {
double a, b, h, m, rad, x;
cin >> a >> b >> h >> m;
x = 60 * h + m;
rad = M_PI * (0.5 * x - m) / 180;
doubl... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int gcd(int p, int q) {
if (p % q == 0) {
return q;
}
return gcd(q, p % q);
}
int main() {
double a, b, h, m, rad, x;
cin >> a >> b >> h >> m;
x = 60 * h + m;
rad = M_PI * 5.5 * x / 180;
double ans ... | [["-", 0, 11, 12, 16, 31, 16, 12, 23, 0, 24], ["-", 31, 16, 12, 23, 0, 16, 31, 16, 31, 13], ["+", 0, 11, 12, 16, 31, 16, 31, 16, 12, 13], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["-", 0, 11, 12, 16, 31, 16, 12, 23, 0, 25]] | 1 | 143 |
import math
a,b,h,m=map(int,input().split())
kakudoa=h*30+m/2
kakudob=m*60
kakudo=abs(kakudoa-kakudob)/180*math.pi
print(str(math.sqrt(a*a+b*b-2*a*b*math.cos(kakudo)))) | import math
a,b,h,m=map(int,input().split())
kakudoa=h*30+m/2
kakudob=m*6
kakudo=abs(kakudoa-kakudob)/180*math.pi
print(str(math.sqrt(a*a+b*b-2*a*b*math.cos(kakudo)))) | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 81 |
A,B,H,M = map(int,input().split())
import math
pi = math.pi
c = pi*abs(H+M/60-M/5)/6
CC = A**2+B**2-2*math.cos(c)
print(math.sqrt(CC)) | A,B,H,M = map(int,input().split())
import math
pi = math.pi
c = pi*abs(H+M/60-M/5)/6
CC = A**2+B**2-2*A*B*math.cos(c)
print(math.sqrt(CC)) | [["+", 12, 657, 12, 657, 31, 657, 31, 657, 12, 22], ["+", 0, 662, 12, 657, 12, 657, 31, 657, 17, 48], ["+", 0, 662, 12, 657, 12, 657, 31, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48]] | 5 | 72 |
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double h_deg, m_deg;
h_deg = (double)(h * 60.0 + m) / 2.0;
m_de... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double h_deg, m_deg;
h_deg = (double)(h * 60.0 + m) / 2.0;
m_de... | [["-", 0, 1, 0, 11, 12, 41, 64, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 41, 64, 16, 31, 13], ["-", 0, 1, 0, 11, 12, 41, 64, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 41, 64, 16, 12, 22], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 22], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13]] | 1 | 145 |
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double h_deg, m_deg;
h_deg = (double)(h * 60.0 + m) / 2.0;
m_de... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double h_deg, m_deg;
h_deg = (double)(h * 60.0 + m) / 2.0;
m_de... | [["-", 0, 1, 0, 11, 12, 41, 64, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 41, 64, 16, 31, 13], ["-", 0, 1, 0, 11, 12, 41, 64, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 41, 64, 16, 12, 22]] | 1 | 151 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double PI = acos(-1);
int main() {
cout << fixed << setprecision(20);
int A, B, H, M;
cin >> A >> B >> H >> M;
double RA = (double)((H * 60 + M) / 2);
double TA = RA * (PI / 180);
double AX = A * sin(TA);
double AY = A * cos(TA);
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double PI = acos(-1);
int main() {
cout << fixed << setprecision(20);
int A, B, H, M;
cin >> A >> B >> H >> M;
double RA = ((double)(H * 60 + M) / 2);
double TA = RA * (M_PI / 180);
double AX = A * sin(TA);
double AY = A * cos(TA);... | [["+", 49, 50, 51, 23, 0, 16, 31, 74, 0, 24], ["-", 51, 74, 51, 23, 0, 16, 31, 23, 0, 24], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 22], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 31, 22]] | 1 | 172 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long double PI = acos(-1);
int main() {
cout << fixed << setprecision(20);
int A, B, H, M;
cin >> A >> B >> H >> M;
long double RA = ((H * 60 + M) / 2);
long double TA = RA * (PI / 180);
long double AX = A * sin(TA);
long double AY... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long double PI = acos(-1);
int main() {
cout << fixed << setprecision(20);
long double A, B, H, M;
cin >> A >> B >> H >> M;
long double RA = ((H * 60 + M) / 2);
long double TA = RA * (PI / 180);
long double AX = A * sin(TA);
long d... | [["-", 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 | 178 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> v;
int main() {
double A, B;
static const double pi = 3.141592653589793;
ll H, M;
cin >> A >> B >> H >> M;
double arc, ans;
if (30 * H >= 5.5 * M) {
arc = min(30 * H - 5.5 * M, 360 - 30 * H + 5.5 * M) / 180;
}... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> v;
int main() {
double A, B;
static const double pi = 3.141592653589793;
ll H, M;
cin >> A >> B >> H >> M;
double arc, ans;
if (30 * H >= 5.5 * M) {
arc = min(30 * H - 5.5 * M, 360 - 30 * H + 5.5 * M) / 180;
}... | [["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]] | 1 | 159 |
#include <algorithm> //辞書順=next_permutation
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <locale>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <string> //char 小文字のほうが32大きい
#include <time.h>
#... | #include <algorithm> //辞書順=next_permutation
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <locale>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <string> //char 小文字のほうが32大きい
#include <time.h>
#... | [["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]] | 1 | 770 |
#include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define PI 3.14159265358979323846264338327950
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
int Akaku, Bkaku, kaku;
Akaku = (H * 60 + M) * 0.5;
Bkaku = ... | #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define PI 3.14159265358979323846264338327950
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
double Akaku, Bkaku, kaku;
Akaku = (H * 60 + M) * 0.5;
Bkaku... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 159 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll A, B, H, M;
cin >> A >> B >> H >> M;
double x = 6 * M - (60 * H + M) / 2; //ずれた度数
if (x < 0)
x *= -1;
while (x > 360)
x -= 360;
if (x > 180)
x = 360 - x;
cout << setprecision(20)
<< sqrt(A * A + B * B... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
double A, B, H, M;
cin >> A >> B >> H >> M;
double x = 6 * M - (60 * H + M) / 2; //ずれた度数
if (x < 0)
x *= -1;
while (x > 360)
x -= 360;
if (x > 180)
x = 360 - x; // 0<=x<=180
cout << setprecision(20)
<< s... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 121 |
#include <bits/stdc++.h>
using namespace std;
int main() {
double PI = 3.141592653589793;
int A, B, H, M;
cin >> A >> B >> H >> M;
double angleH = 360 * H / 12;
double angleM = 360 * M / 60;
angleH += 30 * M / 60;
double angle = angleH - angleM;
double radian = angle * PI / 180.0;
double answer... | #include <bits/stdc++.h>
using namespace std;
int main() {
double PI = 3.14159265358979323846264338327950L;
double A, B, H, M;
cin >> A >> B >> H >> M;
double angleH = 360 * H / 12;
double angleM = 360 * M / 60;
angleH += 30 * M / 60;
double angle = angleH - angleM;
double radian = angle * PI / 1... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 51, 16, 12, 23, 0, 16, 12, 2, 63, 22], ["+", 51, 16, 12, 23, 0, 16, 12, 2, 63, 22]] | 1 | 118 |
import sys
import math
def _ia(): return map(int, sys.stdin.readline().strip().split())
def main():
a, b, h, m = _ia()
ad = 30*h + .5*m
bd = 60 * m
dd = math.radians(ad-bd)
return (a**2+b**2-2*a*b*math.cos(dd))**.5
if __name__ == "__main__":
print(main())
| import sys
import math
def _ia(): return map(int, sys.stdin.readline().strip().split())
def main():
a, b, h, m = _ia()
ad = 30*h + .5*m
bd = 6 * m
dd = math.radians(ad-bd)
return (a**2+b**2-2*a*b*math.cos(dd))**.5
if __name__ == "__main__":
print(main())
| [["-", 8, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 612]] | 5 | 108 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define PI 3.14159265358979323846
double min(double x, double y) { return (x < y) ? x : y; }
double calcAngle(double h, double m) {
// validate the input
if (h < 0 || m < 0 || h > 12 || m > 60)
// printf("Wrong input");
if (h == 12)
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define PI 3.14159265358979323846
double min(double x, double y) { return (x < y) ? x : y; }
double calcAngle(double h, double m) {
// validate the input
if (h < 0 || m < 0 || h > 12 || m > 60)
// printf("Wrong input");
if (h == 12)
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 236 |
#include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
h = (360 / 12) * h + ((m / 60) * (360 / 12));
m = (360 / 60) * m;
double p = abs(h - m);
p = p * 3.14159 / 180;
double c = sqrt(pow(a, 2) + pow(b, 2) - 2 * a * b * (cos(p)));
cout << fixed << setpre... | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
h = (360 / 12) * h + ((m / 60) * (360 / 12));
m = (360 / 60) * m;
double p = abs(h - m);
// cout<<cos(1)<<endl;
// float pi=(22.0/7.0)*precision(17);
p = p * 3.14159265358979323846 / 180;
// cout<<... | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]] | 1 | 132 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
long double pi = 3.141592653589;
long double A, B, M;
int H;
cin >> A >> B >> H >> M;
long double sii = abs(M * pi / 30.0 - ((H % 12) * 60.0 + M) * pi / 3... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
long double pi = 3.141592653589;
long double A, B, M;
int H;
cin >> A >> B >> H >> M;
long double sii = abs(M * pi / 30.0 - ((H % 12) * 60.0 + M) * pi / 3... | [["+", 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], ["+", 75, 76, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 157 |
A,B,H,M=gets.split.map(&:to_i)
p r_hour=(H*(360/12))+(M*0.5)
p r_minute=(M*(360/60))
p angle=[(r_hour-r_minute).abs,360-r_hour+r_minute,360-r_minute+r_hour].min
p Math.sqrt((A**2)+(B**2)-(2*A*B*(Math.cos(angle/180*Math::PI)))) | A,B,H,M=gets.split.map(&:to_i)
r_hour=(H*(360/12))+(M*0.5)
r_minute=(M*(360/60))
angle=[(r_hour-r_minute).abs,360-r_hour+r_minute,360-r_minute+r_hour].min
p Math.sqrt((A**2)+(B**2)-(2*A*B*(Math.cos(angle/180*Math::PI)))) | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]] | 4 | 113 |
#include <bits/stdc++.h>
using namespace std;
int main() {
float pi = 3.14159265358979323846;
float A, B, C, H, M, h, m, angle;
cin >> A >> B >> H >> M;
// H時M分の時針の角度
h = 30 * H + 0.5 * M;
// cout << "h" << h << endl;
// H時M分の分針の角度
m = 6 * M;
// cout << "m" << m << endl;
// time時点のAとBの角度の絶対値
a... | #include <bits/stdc++.h>
using namespace std;
int main() {
long double pi = 3.14159265358979323846264338327950;
long double A, B, C, H, M, h, m, angle;
cin >> A >> B >> H >> M;
// H時M分の時針の角度
h = 30 * H + 0.5 * M;
// cout << "h" << h << endl;
// H時M分の分針の角度
m = 6 * M;
// cout << "m" << m << endl;
... | [["-", 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], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 138 |
#include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, h, m, c, d, e;
cin >> a >> b >> h >> m;
c = M_PI * 2 * m / 60;
m = 60 * h + m;
d = M_PI * 2 * m / 720;
e = abs(c - d);
cout << fixed << setprecision(20) << sqrt(a * a + b * b - cos(e));
} | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, h, m, c, d, e;
cin >> a >> b >> h >> m;
c = M_PI * 2 * m / 60;
m = 60 * h + m;
d = M_PI * 2 * m / 720;
e = abs(c - d);
cout << fixed << setprecision(20) << sqrt(a * a + b * b - 2 * a * b * cos(e));
}
| [["+", 0, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 12, 22], ["+", 3, 4, 0, 16, 12, 16, 31, 16, 17, 48], ["+", 3, 4, 0, 16, 12, 16, 31, 16, 12, 22], ["+", 12, 2, 3, 4, 0, 16, 12, 16, 17, 48]] | 1 | 99 |
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();
int H = sc.nextInt();
int M = sc.nextInt();
double ans;
double sho = (H * 60 + M) * 360 / (12 * 60);
double lon... | 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 ans;
double sho = (H * 60 + M) * 360 / (12 * 60);
doub... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512]] | 3 | 158 |
import math
A, B, H, M = map(int, input().split())
angle = abs(H / 12 - M / 60) * 2 * math.pi
ans = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(angle))
print(ans)
| import math
A, B, H, M = map(int, input().split())
angle = abs((H + M / 60) / 12 - M / 60) * 2 * math.pi
ans = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(angle))
print(ans)
| [["+", 3, 4, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 657, 31, 23, 0, 657, 12, 657, 31, 22], ["+", 31, 657, 31, 23, 0, 657, 12, 657, 17, 85], ["+", 31, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 3, 4, 0, 657, 31, 657, 31, 23, 0, 25]] | 5 | 71 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define GROW_DIFF_DEG 5.5
#define MIN_PER_HOUR 60
#define TERN_DEG 180
#define RAD 360
#define PI 3.141592653589793238
int main(void) {
float a, b;
int h, m;
scanf("%f %f %d %d", &a, &b, &h, &m);
int min = h * MIN_PER_HOUR + m;
lo... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define GROW_DIFF_DEG 5.5
#define MIN_PER_HOUR 60
#define TERN_DEG 180
#define RAD 360
#define PI 3.141592653589793238
int main(void) {
float a, b;
int h, m;
scanf("%f %f %d %d", &a, &b, &h, &m);
int min = h * MIN_PER_HOUR + m;
lo... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 280 |
#include <cmath>
#include <iomanip>
#include <iostream>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int a, b, h, m;
const double PI = M_PI;
int main() {
cin >> a >> b >> h >> m;
double rad = (119 * m - 60 * h) * PI / 360;
double ans = sqr... | #include <cmath>
#include <iomanip>
#include <iostream>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int a, b, h, m;
const double PI = M_PI;
int main() {
cin >> a >> b >> h >> m;
double rad = (11 * m - 60 * h) * PI / 360;
double ans = sqrt(... | [["-", 31, 16, 31, 23, 0, 16, 31, 16, 31, 13], ["+", 31, 16, 31, 23, 0, 16, 31, 16, 31, 13], ["-", 3, 4, 0, 16, 12, 16, 12, 2, 63, 22], ["-", 0, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 132 |
#include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
long long gcd(long long a, long long b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
int main() {
double a, b, h, m;
doubl... | #include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
long long gcd(long long a, long long b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
int main() {
double a, b, h, m;
doubl... | [["-", 0, 11, 12, 16, 12, 16, 12, 2, 63, 22], ["-", 12, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 156 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < n; ++i)
int main() {
int a, b, h, m, d10;
float c, d, r, ans;
cout << fixed << setprecision(10);
cin >> a >> b >> h >> m;
d10 = (55 * (h * 60 + m)) % 3600;
d = d10 / 10.0;
r = d * 3.14159265358979... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < n; ++i)
int main() {
int a, b, h, m, d10;
double c, d, r, ans;
cout << fixed << setprecision(10);
cin >> a >> b >> h >> m;
d10 = (55 * (h * 60 + m)) % 3600;
d = d10 / 10.0;
r = d * 3.1415926535897... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 132 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
double a, b, h, m, ans;
scanf("%lf%lf%lf%lf", &a, &b, &h, &m);
ans = sqrt((b * b) + (a * a) -
2 * b * a * cos((h * 60 - 11 * m) * 3.14159265358979 / 360));
printf("%lf", ans);
} | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
double a, b, h, m, ans;
scanf("%lf%lf%lf%lf", &a, &b, &h, &m);
ans = sqrt((b * b) + (a * a) -
2 * b * a * cos((h * 60 - 11 * m) * 3.14159265358979 / 360));
printf("%.10lf", ans);
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 94 |
from math import sqrt, cos, pi
a, b, h, m = map(int, input().split())
rot_a = h*30 + m*0.5
rot_b = m*6
rot = rot_a-rot_b if rot_a>rot_b else rot_b-rot_a
if rot > 180:
rot = min(rot_a, rot_b) + 360 - max(rot_a, rot_b)
ans = sqrt(a**2 + b**2 - 2*a*b*cos(rot*pi/180))
print(rot)
print(ans) | from math import sqrt, cos, pi
a, b, h, m = map(int, input().split())
rot_a = h*30 + m*0.5
rot_b = m*6
rot = rot_a-rot_b if rot_a>rot_b else rot_b-rot_a
if rot > 180:
rot = min(rot_a, rot_b) + 360 - max(rot_a, rot_b)
ans = sqrt(a**2 + b**2 - 2*a*b*cos(rot*pi/180))
print(ans) | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 112 |
// __ __ .__ .____________ __________
// __ ________ __
// / \ / \ ____ |_________ __| _\______ \__ __ ____ _____\______ \__
// ___/ |\_____ \ | | ______ ___.__. \ \/\/ _/ __ \| \_ __ \/ __ | |
// | _| | \/ ___\/ ___/| | _| | \ __/ | \|... | // __ __ .__ .____________ __________
// __ ________ __
// / \ / \ ____ |_________ __| _\______ \__ __ ____ _____\______ \__
// ___/ |\_____ \ | | ______ ___.__. \ \/\/ _/ __ \| \_ __ \/ __ | |
// | _| | \/ ___\/ ___/| | _| | \ __/ | \|... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 234 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define INF 1 << 31 - 1
#define LNF 9223372036854775807
#define PI 3.14159265358979
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) < (y) ? (y) : (x))
#define FOR(i, a, n) for (i = a; i < n; i++)
#define ... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define INF 1 << 31 - 1
#define LNF 9223372036854775807
#define PI 3.14159265358979
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) < (y) ? (y) : (x))
#define FOR(i, a, n) for (i = a; i < n; i++)
#define ... | [["-", 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]] | 0 | 668 |
import math
A, B, H, M = map(int, input().split())
KA = H / 12 * 360 + ((M / 60) * (360 / 12))
KB = M / 60 * 360
K = abs(KA - KB)
if K > 180:
K = 360 - K
# if K == 180:
# print(A + B)
# exit()
# if K == 0:
# print(abs(B - A))
# exit()
# cosB = round(math.cos(math.radians(K)), 13)
cosB = math.cos(... | import math
A, B, H, M = map(int, input().split())
KA = H / 12 * 360 + ((M / 60) * (360 / 12))
KB = M / 60 * 360
K = abs(KA - KB)
if K > 180:
K = 360 - K
# if K == 180:
# print(A + B)
# exit()
# if K == 0:
# print(abs(B - A))
# exit()
# cosB = round(math.cos(math.radians(K)), 13)
cosB = math.cos(... | [["-", 0, 656, 0, 1, 0, 662, 12, 432, 0, 21], ["-", 0, 656, 0, 1, 0, 662, 12, 432, 0, 612]] | 5 | 118 |
import math
a,b,h,m=map(int,input().split())
h=h+m/60
h=h/12*360
m=m/60*360
d=abs(h-m)
if d>180:
d=d-180
print((a**2+b**2-2*a*b*math.cos(math.radians(d)))**(1/2)) | import math
a,b,h,m=map(int,input().split())
h=h+m/60
h=h/12*360
m=m/60*360
d=abs(h-m)
if d>180:
d=360-d
print((a**2+b**2-2*a*b*math.cos(math.radians(d)))**(1/2)) | [["-", 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 | 97 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int A, B, H, M;
scanf("%d %d %d %d", &A, &B, &H, &M);
double h = (double)(H * 60 + M) * 0.5;
double m = (double)M * 6;
double hTheta = (90 - h) * (atan(1.0) * 4.0 / 180);
double mTheta = (90 - m) * (atan(1.0) * 4.0 / 180);
// pr... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int A, B, H, M;
scanf("%d %d %d %d", &A, &B, &H, &M);
double h = (double)(H * 60 + M) * 0.5;
double m = (double)M * 6;
double hTheta = (90 - h) * (atan(1.0) * 4.0 / 180);
double mTheta = (90 - m) * (atan(1.0) * 4.0 / 180);
// pr... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 183 |
import math
A, B, H, M = map(int, input().split())
pi = math.pi
ta = 30*H + 0.5*M
tb = 6*M
t = math.fabs( ta - tb )
if t > 180.0:
t = 360.0 - t
print(t)
t = (t*pi)/180.0
ans = A*A + B*B - 2*A*B*math.cos(t)
print("{:.9f}".format(math.sqrt(ans)))
| import math
A, B, H, M = map(int, input().split())
pi = math.pi
ta = 30*H + 0.5*M
tb = 6*M
t = math.fabs( ta - tb )
if t > 180.0:
t = 360.0 - t
#print(t)
t = (t*pi)/180.0
ans = A*A + B*B - 2*A*B*math.cos(t)
print("{:.9f}".format(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 | 112 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <time.h>
#include <vector>
int main(void) {
long A, B, H, M;
std::cin >> A >> B >> H >> M;
double pi = 3.1415926535;
double kakudo = (pi * M) / (double)30;
double kakudo... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <time.h>
#include <vector>
int main(void) {
long A, B, H, M;
std::cin >> A >> B >> H >> M;
double pi = 3.14159265358979;
double kakudo = (pi * M) / (double)30;
double ka... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 157 |
import os
import math
def main():
a,b,h,m = map(int, input().split())
rand2 = 6 * m
rand3 = (0.5 * m) + (30 * h)
rand_result = 0.0
if (abs(rand3 - rand2) < 180):
rand_result = abs(rand3 - rand2)
else:
rand_result = abs(rand3 - rand2) - 180
ans = math.sqrt(pow(a,2) + p... | import os
import math
def main():
a,b,h,m = map(int, input().split())
rand2 = 6 * m
rand3 = (0.5 * m) + (30 * h)
rand_result = 0.0
if (abs(rand3 - rand2) <= 180):
rand_result = abs(rand3 - rand2)
else:
rand_result = 360 - abs(rand3 - rand2)
ans = math.sqrt(pow(a,2) +... | [["-", 8, 196, 0, 57, 15, 23, 0, 666, 667, 18], ["+", 8, 196, 0, 57, 15, 23, 0, 666, 667, 19], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 143 |
#include <algorithm>
#include <cassert>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
typedef long l... | #include <algorithm>
#include <cassert>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
typedef long l... | [["-", 51, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["+", 51, 2, 3, 4, 0, 16, 31, 16, 12, 13]] | 1 | 203 |
a, b, h, m = map(int, input().split())
h_angle = h * 30 + m /2
m_angle = m * 2
angle = h_angle - m_angle
import math
angle_cos = math.cos(math.radians(m_angle))
c_2 = a ** 2 + b ** 2 - 2 * a * b * angle_cos
c = math.sqrt(c_2)
print(c) | a, b, h, m = map(int, input().split())
h_angle = h * 30 + m /2
m_angle = m * 6
angle = h_angle - m_angle
import math
angle_cos = math.cos(math.radians(angle))
c_2 = a ** 2 + b ** 2 - 2 * a * b * angle_cos
c = math.sqrt(c_2)
print(c) | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 83 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
cout << fixed << setprecision(21);
long double angle = 6 * M - (60 * H + M) / 2;
long double power_2 = A * A + B * B - 2 * A * B * cos(angle * M_PI / 180);
cout << sqrt(power_2) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long double A, B, H, M;
cin >> A >> B >> H >> M;
cout << fixed << setprecision(30);
long double angle = 6 * M - (60 * H + M) / 2;
long double power_2 = A * A + B * B - 2 * A * B * cos(angle * M_PI / 180);
cout << sqrt(power_2) << endl;
}
| [["-", 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], ["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13]] | 1 | 94 |
import math
a,b,h,m = map(int,input().split())
hangle = float((h/12)*360)
hangle += float((m/60)*30)
mangle = float((m/60)*360)
if hangle > 180 and mangle > 180:
angle = abs(hangle-mangle)
elif hangle > 180:
hangle = 360 - hangle
angle = abs(hangle-mangle)
elif mangle > 180:
mangle = 360 - mangle
... | import math
a,b,h,m = map(int,input().split())
hangle = float((h/12)*360)
hangle += float((m/60)*30)
mangle = float((m/60)*360)
if hangle > 180 and mangle > 180:
angle = abs(hangle-mangle)
elif hangle > 180:
hangle = 360 - hangle
angle = abs(hangle+mangle)
elif mangle > 180:
mangle = 360 - mangle
... | [["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 25], ["-", 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]] | 5 | 177 |
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
public static void main(String[]... |
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
public static void main(String[]... | [["-", 0, 492, 3, 4, 0, 16, 12, 16, 12, 499], ["+", 0, 492, 3, 4, 0, 16, 12, 16, 12, 515]] | 3 | 289 |
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
public static void main(String[]... |
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
public static void main(String[]... | [["-", 0, 492, 3, 4, 0, 16, 12, 16, 12, 499], ["+", 0, 492, 3, 4, 0, 16, 12, 16, 12, 515]] | 3 | 281 |
#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, h, m, c;
cin >> a >> b >> h >> m;
h = h * 30.0;
m = m * 6.0;
double angle;
angle = abs(h - m);
angle = angle * 3.14159265359 / 180.0;
if (angle == 0) {
c = abs(a - b);
} else {
c = a * a + b ... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, h, m, c;
cin >> a >> b >> h >> m;
h = h * 30.0 + m / 2.0;
m = m * 6.0;
double angle;
angle = abs(h - m);
angle = angle * 3.14159265359 / 180.0;
if (angle == 0) {
c = abs(a - b);
} else {
c = ... | [["+", 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, 85], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 12, 13]] | 1 | 131 |
import math
a,b,h,m=map(int,input().split())
H=((h%12)*30)
M=(m*6)
x=abs(H-M)
y=360-x
l=[x,y]
l.sort()
sita=l[0]
sita=math.radians(sita)
c=a**2+b**2-2*(a*b*math.cos(sita))
c=math.sqrt(c)
print(c)
| import math
a,b,h,m=map(int,input().split())
H=((h%12)*30)+0.5*m
M=(m*6)
x=abs(H-M)
y=360-x
l=[x,y]
l.sort()
sita=l[0]
sita=math.radians(sita)
c=a**2+b**2-2*(a*b*math.cos(sita))
c=math.sqrt(c)
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 | 115 |
#include <bits/stdc++.h>
using namespace std;
const long double eps = 1.0e-9; // 許容される誤差
const long double PI = 3.141592653589793238462643;
long double mysqrtl(long double x) {
long double a = sqrt((double)x); // 近似値
do {
a = (a + x / a) / 2.0L;
} while (fabsl(x - a * a) > eps);
return a;
}
int main(voi... | #include <bits/stdc++.h>
using namespace std;
const long double eps = 1.0e-12; // 許容される誤差
const long double PI = 3.1415926535897932384626433832795028841971693;
long double mysqrtl(long double x) {
long double a = sqrt((double)x); // 近似値
do {
a = (a + x / a) / 2.0L;
} while (fabsl(x - a * a) > eps);
retur... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 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 | 212 |
#include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(void) {
int a, b, h, m;
cin >> a >> b >> h >> m;
double ans, theta1, theta2, diff;
theta1 = (m)*6;
theta2 = (60 * h + m) / 2;
// diff = min(360 - abs(theta1 - theta2) , abs(theta1 - theta2));
double Theta = (M_PI * abs(t... | #include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(void) {
double a, b, h, m;
cin >> a >> b >> h >> m;
double ans, theta1, theta2, diff;
theta1 = (m)*6;
theta2 = (60 * h + m) / 2;
// diff = min(360 - abs(theta1 - theta2) , abs(theta1 - theta2));
double Theta = (M_PI * ab... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 119 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
double a, b, h, m;
cin >> a >> b >> h >> m;
double angle = (h * 30.0 + m * 0.5 - m * 6) * 3.1415926 / 180.0;
// cout<<angle<<endl;
double ans = a * a + b * b - 2 * a * b * cos(angl... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
double a, b, h, m;
cin >> a >> b >> h >> m;
double angle = (h * 30.0 + m * 0.5 - m * 6) * M_PI / 180.0;
// cout<<angle<<endl;
double ans = a * a + b * b - 2 * a * b * cos(angle);
... | [["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 22]] | 1 | 112 |
import math
a,b,h,m=map(int,input().split())
dh=30*h+m/2
dm=6*m
if dm==dh:
rad=0
else:
rad=abs(dm-dh)
if rad>180:
rad=rad-180
length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
elif 0<rad and rad<180:
length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
elif rad==180... | import math
a,b,h,m=map(int,input().split())
dh=30*h+m/2
dm=6*m
if dm==dh:
rad=0
else:
rad=abs(dm-dh)
if rad>180:
rad=360-rad
length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
elif 0<rad and rad<180:
length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
elif rad==180... | [["-", 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 | 161 |
import math
a,b,h,m = map(int,input().split())
num1 = m * 6
num2 = h * 30 + m * 0.5
if num1 >= num2:
sita = num1 - num2
else:
sita = num2 - num1
c2 = a**2 + b**2 - 2*a*b*math.radians(math.cos(sita))
c = math.sqrt(c2)
print(c) | import math
a,b,h,m = map(int,input().split())
num1 = m * 6
num2 = h * 30 + m * 0.5
if num1 >= num2:
sita = num1 - num2
else:
sita = num2 - num1
c2 = a**2 + b**2 - 2*a*b*math.cos(math.radians(sita))
c = math.sqrt(c2)
print(c)
| [["-", 12, 657, 12, 657, 12, 652, 63, 319, 319, 22], ["+", 12, 657, 12, 657, 12, 652, 63, 319, 319, 22], ["-", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 92 |
# coding: utf-8
# Your code here!
import math
a,b,h,m=map(int,input().split())
h=h+1/60*m
if(h>m):
d=h-m
else:
d=m-h
d*=30
c=a**2+b**2-2*a*b*math.cos(math.radians(d))
print('{:.23f}'.format(c**(1/2)))
| # coding: utf-8
# Your code here!
import math
a,b,h,m=map(int,input().split())
h=(h+1/60*m)*5
#print(h)
if(h>m):
d=h-m
else:
d=m-h
d*=6
c=a**2+b**2-2*a*b*math.cos(math.radians(d))
print('{:.23f}'.format(c**(1/2)))
| [["+", 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, 17, 48], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 36, 36, 0, 656, 0, 1, 0, 677, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 12, 612]] | 5 | 99 |
#include <bits/stdc++.h>
using namespace std;
#define PI 3.141592653589793238
int min(int x, int y) { return (x < y) ? x : y; }
double cal_cos(double n) {
double accuracy = 0.001, x1, denominator, cosx, cosval;
// Converting degrees to radian
n = n * (PI / 180.0);
x1 = 1;
// Maps the sum along the serie... | #include <bits/stdc++.h>
using namespace std;
#define PI 3.14159265358979323846264338327
int min(int x, int y) { return (x < y) ? x : y; }
double cal_cos(double n) {
double accuracy = 0.001, x1, denominator, cosx, cosval;
// Converting degrees to radian
n = n * (PI / 180.0);
x1 = 1;
// Maps the sum alon... | [["-", 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]] | 1 | 312 |
import math
A, B, H, M = map(int, input().split())
theta = math.radians(abs(H*30+M//2.0 - M*6))
print(math.sqrt(A**2 + B ** 2 - 2 * A * B * math.cos(theta)))
| import math
A, B, H, M = map(int, input().split())
theta = math.radians(H*30+M/2.0 - M*6)
print(math.sqrt(A**2 + B ** 2 - 2 * A * B * math.cos(theta)))
| [["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 657, 31, 657, 12, 657, 17, 676], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 17, 85], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 71 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define PI 3.141592653589793
#define MOD 1000000007
// qsort用、昇順
int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; }
// qsort(data, 10, sizeof(int), compare_int)
int main() {
double a, b, h, m;
scanf("%lf%lf%l... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define PI 3.141592653589793
#define MOD 1000000007
// qsort用、昇順
int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; }
// qsort(data, 10, sizeof(int), compare_int)
int main() {
double a, b, h, m;
scanf("%lf%lf%l... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 144 |
<?php
$line = trim(fgets(STDIN));
$line = explode(' ', $line);
$a = $line[0];
$b = $line[1];
$hr = $line[2];
$mn = $line[3];
// 長針・短針の設定
$short = $hr;
$long = $mn;
// 24時間表示 → 12時間表示
$hour = $short <= 12 ? $short : $short - 12;
$minute = $long;
// 短針の角度取得
$rShort = ($hour * (360 / 12)) + $minute * 1 / 2;
// 長針... | <?php
$line = trim(fgets(STDIN));
$line = explode(' ', $line);
$a = $line[0];
$b = $line[1];
$hr = $line[2];
$mn = $line[3];
// 長針・短針の設定
$short = $hr;
$long = $mn;
// 24時間表示 → 12時間表示
$hour = $short <= 12 ? $short : $short - 12;
$minute = $long;
// 短針の角度取得
$rShort = ($hour * (360 / 12)) + $minute * 1 / 2;
// 長針... | [["-", 0, 493, 0, 57, 15, 23, 0, 16, 12, 612], ["+", 0, 493, 0, 57, 15, 23, 0, 16, 12, 612], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 612], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 612]] | 6 | 215 |
import math
import sys
import numpy as np
a,b,h,m=map(int,input().split())
h=h*30+m*0.5
m=m*6
ma=max(h,m)
mi=min(h,m)
kakudo=abs(ma-mi)
if kakudo>180:
kakudo-=180
elif kakudo == 0:
print(abs(a-b))
exit()
elif kakudo==180:
print(a+b)
exit()
#print(kakudo)
c=math.cos(math.radians(kakudo))
#print(c)
an... | import math
import sys
import numpy as np
a,b,h,m=map(int,input().split())
h=h*30+m*0.5
m=m*6
ma=max(h,m)
mi=min(h,m)
kakudo=abs(ma-mi)
if kakudo>180:
kakudo=360-kakudo
elif kakudo == 0:
print(abs(a-b))
exit()
elif kakudo==180:
print(a+b)
exit()
#print(kakudo)
c=math.cos(math.radians(kakudo))
#print... | [["-", 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 | 159 |
import math
A,B,H,M = list(map(int,input().split()))
h = 360 / 12 * H
m = 360 /720 * M
Cs1 = math.fabs(h - m)
Cs2 = math.fabs(360 - Cs1)
Csl = [Cs1,Cs2]
Cs = min(Csl)
C = math.sqrt(A**2 + B**2 - 2 * A * B * math.cos(math.radians(Cs)))
print(C) | import math
A,B,H,M = list(map(int,input().split()))
h = 360 / 720 * M + 30 * H
m = 360 / 60 * M
Cs1 = math.fabs(h - m)
Cs2 = math.fabs(360 - Cs1)
Csl = [Cs1,Cs2]
Cs = min(Csl)
C = math.sqrt(A**2 + B**2 - 2 * A * B * math.cos(math.radians(Cs)))
print(C) | [["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 612], ["+", 0, 662, 12, 657, 31, 657, 31, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 612], ["+", 0, 1, 0, 662, 12, 657, 31,... | 5 | 108 |
import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(0)
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(abs(B - A))
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | [["-", 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 | 115 |
#include <bits/stdc++.h>
using namespace std;
struct Fast {
Fast() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
}
} fast;
long long mod = 998244353;
#define REP(i, n) for (long long i = 0; i < (n); i++)
long long modpow(long long m, long long n) {
if (n == 0)
ret... | #include <bits/stdc++.h>
using namespace std;
struct Fast {
Fast() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
}
} fast;
long long mod = 998244353;
#define REP(i, n) for (long long i = 0; i < (n); i++)
long long modpow(long long m, long long n) {
if (n == 0)
ret... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 51, 2, 3, 4, 0, 16, 12, 16, 31, 13], ["+", 51, 2, 3, 4, 0, 16, 12, 16, 31, 13]] | 1 | 448 |
import math
A, B, H, M = map(int,input().split())
rad_M = math.radians(60*M)
rad_H = math.radians(30*H+0.5*M)
rad = abs(rad_M-rad_H)
if rad >= math.pi:
rad = 2*math.pi - rad
S = (A**2) + (B**2) - 2*A*B*math.cos(rad)
S = S**0.5
print(S) | import math
A, B, H, M = map(float,input().split())
rad_M = math.radians(6*M)
rad_H = math.radians(30*H+0.5*M)
rad = abs(rad_M-rad_H)
if rad >= math.pi:
rad = 2*math.pi - rad
S = (A**2) + (B**2) - 2*A*B*math.cos(rad)
S = S**0.5
print(S) | [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 31, 612]] | 5 | 105 |
//#include<iostream>
//#include<algorithm>
//#include<string>
//#include <cmath>
//#include <vector>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(x, n) for (int x = 0; x < n; x++)
// vector//
#define vei vector<int>
#define velli vector<long long int>
#define pb(x) push_back(x) ... | //#include<iostream>
//#include<algorithm>
//#include<string>
//#include <cmath>
//#include <vector>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(x, n) for (int x = 0; x < n; x++)
// vector//
#define vei vector<int>
#define velli vector<long long int>
#define pb(x) push_back(x) ... | [["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 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 | 201 |
#include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using p = pair<int, int>;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double angleA =
(h / (double)12 * (double)360) + (m / (dou... | #include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using p = pair<int, int>;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double angleA =
(h / (double)12 * (double)360) + (m / (dou... | [["-", 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 | 196 |
#include <cmath>
#include <cstdio>
using namespace std;
int main() {
static const double pi = 3.141592653589793;
double a, b, h, m;
scanf("%lf %lf %lf %lf", &a, &b, &h, &m);
double sita = (h / 12 - m / 60 + m / 720);
if (sita < 0)
sita = (-1) * sita;
if (sita > 0.5)
sita = 1 - sita;
sita = sita *... | #include <cmath>
#include <cstdio>
using namespace std;
int main() {
static const double pi = 3.141592653589793;
double a, b, h, m;
scanf("%lf %lf %lf %lf", &a, &b, &h, &m);
double sita = (h / 12 - m / 60 + m / 720);
if (sita < 0)
sita = (-1) * sita;
if (sita > 0.5)
sita = 1 - sita;
sita = sita *... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 142 |
import math
A,B,H,M=map(int,input().split())
dA=(60*H+M)/2
dB=6*M
rad=dA-dB
print(rad)
C=math.radians(rad)
c=(A**2+B**2-2*A*B*math.cos(C))**0.5
print(format(c,'.10f')) | import math
A,B,H,M=map(int,input().split())
dA=(60*H+M)/2
dB=6*M
rad=dA-dB
C=math.radians(rad)
c=(A**2+B**2-2*A*B*math.cos(C))**0.5
print(format(c,'.10f'))
| [["-", 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 | 92 |
package main
import (
"fmt"
"math"
)
func main() {
var a, b, h, m float64
fmt.Scan(&a, &b, &h, &m)
rec := float64(30*h + m/2 - 10*m)
cosC := math.Cos(rec * math.Pi / 180)
//fmt.Println(rec, cosC)
result := a*a + b*b - float64(2*a*b*cosC)
fmt.Println(math.Sqrt(result))
}
| package main
import (
"fmt"
"math"
)
func main() {
var a, b, h, m float64
fmt.Scan(&a, &b, &h, &m)
rec := float64(30*h + m/2 - 6*m)
cosC := math.Cos(rec * math.Pi / 180)
//fmt.Println(rec, cosC)
result := a*a + b*b - float64(2*a*b*cosC)
fmt.Println(math.Sqrt(result))
}
| [["-", 0, 2, 3, 4, 0, 16, 12, 16, 31, 433], ["+", 0, 2, 3, 4, 0, 16, 12, 16, 31, 433]] | 7 | 115 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long double A, B, H, M, sa, ans;
cin >> A >> B >> H >> M;
H *= 30;
M *= 6;
H += M / 12;
if (H == 0)
H = 360;
if (M == 0)
M = 360;
sa = min(abs(H - M), abs(M - H));
sa /= 180;
sa *= 3.141592;
ans = A * A + B * B - (2 * A * B * cos... | #include <bits/stdc++.h>
using namespace std;
int main() {
long double A, B, H, M, sa, ans;
cin >> A >> B >> H >> M;
H *= 30;
M *= 6;
H += M / 12;
if (H == 0)
H = 360;
if (M == 0)
M = 360;
sa = min(abs(H - M), abs(M - H));
sa /= 180;
sa *= 3.14159265358979323846;
ans = A * A + B * B - (2... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]] | 1 | 141 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define rep(i, m, n) for (int(i) = (m); (i) < (n); ++(i))
#define rREP(i, m, n) for (int(i) = (n)-1; (i) >= (m); --(i))
#define all(x) (x).begin(), (x).end()
#define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) ||... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define rep(i, m, n) for (int(i) = (m); (i) < (n); ++(i))
#define rREP(i, m, n) for (int(i) = (n)-1; (i) >= (m); --(i))
#define all(x) (x).begin(), (x).end()
#define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) ||... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 303 |
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
#define pai 3.14159265358979323846
int main(void) {
int scan; // scanf result
long double answer; // to output
long do... | #include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
#define pai 3.14159265358979323846
int main(void) {
int scan; // scanf result
long double answer; // to output
long 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]] | 0 | 232 |
#include <math.h>
#include <stdio.h>
#define PI 3.141592653589793
int main(void) {
int a = 0;
int b = 0;
int h = 0; //時間
int m = 0; //分
double radH = 0.0;
double radM = 0.0;
double radHM = 0.0;
double ans = 0.0;
scanf("%d %d %d %d", &a, &b, &h, &m);
radH = ((h * 60.0 + m) * 0.50) * PI / 180.0;
... | #include <math.h>
#include <stdio.h>
#define PI 3.141592653589793
int main(void) {
int a = 0;
int b = 0;
int h = 0; //時間
int m = 0; //分
double radH = 0.0;
double radM = 0.0;
double radHM = 0.0;
double ans = 0.0;
scanf("%d %d %d %d", &a, &b, &h, &m);
radH = ((h * 60.0 + m) * 0.50) * PI / 180.0;
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 151 |
#include <cmath>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int nA, nB, nH, nM;
cin >> nA;
cin >> nB;
cin >> nH;
cin >> nM;
const float nPI = 3.141592653589793;
float nAngleM = 6 * nM;
float fAngleH = 30 * nH + 0.5 * nM;
float fAngle;
float fA;
if (nAngleM > fAngle... | #include <cmath>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int nA, nB, nH, nM;
cin >> nA;
cin >> nB;
cin >> nH;
cin >> nM;
const double nPI = 3.141592653589793;
int nAngleM = 6 * nM;
double fAngleH = 30 * nH + 0.5 * nM;
double fAngle;
double fA;
if (nAngleM > fAng... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 186 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
typedef long long ll;
using namespace std;
const double pi = 4 * atan(1.0);
const ll mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
int main() {
double a, b, h,... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
typedef long long ll;
using namespace std;
const double pi = 4 * atan(1.0);
const ll mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
int main() {
double a, b, h,... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 138 |
import math
a,b,c,d = map(float,input().split())
H = 30
M = 6
HM = 0.5
kakudo = abs((c*H+d*HM) - d*M)
if kakudo == 180:
print(a+b)
elif kakudo == 0:
print(0)
else:
print(math.sqrt(pow(a,2) + pow(b,2) - 2*a*b*math.cos(math.radians(kakudo)))) | import math
a,b,c,d = map(float,input().split())
H = 30
M = 6
HM = 0.5
kakudo = abs((c*H+d*HM) - d*M)
if kakudo == 180:
print(a+b)
elif kakudo == 0:
print(abs(a-b))
else:
print(math.sqrt(pow(a,2) + pow(b,2) - 2*a*b*math.cos(math.radians(kakudo)))) | [["-", 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 | 110 |
#include <bits/stdc++.h>
using namespace std;
int main() {
static const double pi = 3.141592653589793;
double a, b, h, m;
cin >> a >> b >> h >> m;
double kakudo = (h * (pi / 6) + m * (pi / 360)) - m * (pi / 30);
double x = sqrt((a * a) + (b * b) - (2 * a * b * abs(cos(kakudo))));
cout << fixed << setprecis... | #include <bits/stdc++.h>
using namespace std;
int main() {
static const double pi = 3.141592653589793238462643383279;
double a, b, h, m;
cin >> a >> b >> h >> m;
double kakudo = (h * (pi / 6) + m * (pi / 360)) - m * (pi / 30);
double x = sqrt((a * a) + (b * b) - (2 * a * b * cos(kakudo)));
cout << fixed <<... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 16, 12, 23, 0, 16, 12, 2, 63, 22], ["-", 12, 23, 0, 16, 12, 2, 3, 4, 0, 24], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]] | 1 | 117 |
import math
a,b,h,m=[int(x) for x in input().rstrip().split()]
now_h=h*60*0.5+m*0.5
now_m=m*6
# if h==0:
# now_h=360
# if m==0:
# now_m=360
kakudo=int(abs(now_h-now_m))
kakudo=math.cos(math.radians(kakudo))
print((a**2+b**2-2*a*b*kakudo)**0.5)
| import math
a,b,h,m=[int(x) for x in input().rstrip().split()]
now_h=h*60*0.5+m*0.5
now_m=m*6
# if h==0:
# now_h=360
# if m==0:
# now_m=360
kakudo=(abs(now_h-now_m))
kakudo=math.cos(math.radians(kakudo))
print((a**2+b**2-2*a*b*kakudo)**0.5)
| [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 96 |
#include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i, start, end) for (int i = start; i < (int)(end); ++i)
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double hdeg = (h * 60 + m) / 2;
double mdeg = m... | #include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i, start, end) for (int i = start; i < (int)(end); ++i)
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double hdeg = (h * 60 + m) / 2;
double mdeg = m... | [["-", 0, 1, 0, 11, 12, 41, 64, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 41, 64, 16, 31, 13], ["-", 0, 1, 0, 11, 12, 41, 64, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 41, 64, 16, 12, 22], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]] | 1 | 190 |
import math
A,B,H,M = map(int,input().split())
angle = 360*abs(H/12-M/60)
angle = math.radians(angle)
print((A**2 + B**2 - 2*A*B*math.cos(angle))**(1/2))
| import math
A,B,H,M = map(int,input().split())
angle = 360*abs((H+M/60)/12-M/60)
angle = math.radians(angle)
print((A**2 + B**2 - 2*A*B*math.cos(angle))**(1/2))
| [["+", 3, 4, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 657, 31, 23, 0, 657, 12, 657, 31, 22], ["+", 31, 657, 31, 23, 0, 657, 12, 657, 17, 85], ["+", 31, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 3, 4, 0, 657, 31, 657, 31, 23, 0, 25]] | 5 | 75 |
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
long double h = (H * 30 + M / 2);
long double m = M * 6;
long double kaku = abs(h - m);
if (kaku > 180) {
kaku... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
long double h = (H * 30.0 + M / 2.0);
long double m = M * 6.0;
long double kaku = abs(h - m);
if (kaku > 180) {
... | [["-", 49, 50, 51, 23, 0, 16, 31, 16, 12, 13], ["+", 49, 50, 51, 23, 0, 16, 31, 16, 12, 13], ["-", 49, 50, 51, 23, 0, 16, 12, 16, 12, 13], ["+", 49, 50, 51, 23, 0, 16, 12, 16, 12, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 152 |
package main
import (
"fmt"
"math"
)
func sq(i float64) float64 {
return i * i
}
func main() {
var a, b, h, m float64
fmt.Scan(&a, &b, &h, &m)
mo := m * 6
ho := h*30 + m*0.5
result := sq(a) + sq(b) - 2*a*b*math.Cos((mo-ho)*(math.Pi/180))
println(math.Sqrt(result))
}
| package main
import (
"fmt"
"math"
)
func sq(i float64) float64 {
return i * i
}
func main() {
var a, b, h, m float64
fmt.Scan(&a, &b, &h, &m)
mo := m * 6
ho := h*30 + m*0.5
result := sq(a) + sq(b) - 2*a*b*math.Cos((mo-ho)*(math.Pi/180))
fmt.Println(math.Sqrt(result))
}
| [["-", 0, 435, 8, 196, 0, 1, 0, 2, 63, 22], ["+", 8, 196, 0, 1, 0, 2, 63, 438, 439, 22], ["+", 8, 196, 0, 1, 0, 2, 63, 438, 0, 131], ["+", 8, 196, 0, 1, 0, 2, 63, 438, 119, 120]] | 7 | 127 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<double, double>;
const ll INF = 1LL << 60;
template <class T> in... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<double, double>;
const ll INF = 1LL << 60;
template <class T> in... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22]] | 1 | 304 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
long double a, b, h, m;
cin >> a >> b >> h >> m;
long double x, y, theta, ans;
x = h * 30.00000000000000000000000 + m * 0.50000000000000000000000000;
y = 6 * m;
theta = abs(x - y);
if (theta >... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
long double a, b, h, m;
cin >> a >> b >> h >> m;
long double x, y, theta, ans;
x = h * 30.00000000000000000000000 + m * 0.50000000000000000000000000;
y = 6 * m;
theta = abs(x - y);
if (theta >... | [["+", 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 | 123 |
#include <bits/stdc++.h>
using namespace std;
int A;
int B;
int H;
int M;
int L_old = 0;
int S_old = 0;
double L = 0;
double S = 0;
double cen_old = 0;
double cen = 0;
long double x = 0; //求めたい線分長
int main() {
/*
vector<int> data(5);
for (int i = 0; i < 5; i++) {
cin >> data.at(i);
}
*/
cin... | #include <bits/stdc++.h>
using namespace std;
int A;
int B;
int H;
int M;
int L_old = 0;
int S_old = 0;
double L = 0;
double S = 0;
double cen_old = 0;
double cen = 0;
long double x = 0; //求めたい線分長
int main() {
/*
vector<int> data(5);
for (int i = 0; i < 5; i++) {
cin >> data.at(i);
}
*/
cin... | [["+", 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 | 209 |
from math import cos,radians
a,b,h,m = map(int,input().split())
mne = (360/60)*m
hne = (360/12)*h + (30*(mne/360))
if hne == mne:
print(abs(a+b))
exit()
elif abs(hne - mne) == 180:
print(a+b)
exit()
elif hne > mne:
theta = hne - mne
else:
theta = mne -hne
theta = min(theta,360-theta)
t = co... | from math import cos,radians
a,b,h,m = map(int,input().split())
mne = (360/60)*m
hne = (360/12)*h + (30*(mne/360))
if hne == mne:
print(abs(a-b))
exit()
elif abs(hne - mne) == 180:
print(a+b)
exit()
elif hne > mne:
theta = hne - mne
else:
theta = mne -hne
theta = min(theta,360-theta)
t ... | [["-", 3, 4, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 33]] | 5 | 160 |
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;
using namespace std;
#define pi 3.14159265
int main() {
double a, b, h, m, hour_ang, sec_ang, ang;
cin >> a >> b >> h >>... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;
using namespace std;
#define pi 3.14159265358979
int main() {
double a, b, h, m, hour_ang, sec_ang, ang;
cin >> a >> b >... | [["-", 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 | 145 |
import math
A,B,H,M= map(int,input().split())
theta = abs(30*H+(M/720)-6*M)
#print(theta)
theta = min(theta, 360-theta)
#print(theta)
theta = math.radians(theta)
X2 = pow(A,2)+pow(B,2)-2*A*B*math.cos(theta)
print(math.sqrt(X2))
| import math
A,B,H,M= map(int,input().split())
theta = abs(30*H+(M/2)-6*M)
theta = min(theta, 360-theta)
theta = math.radians(theta)
X2 = pow(A,2)+pow(B,2)-2*A*B*math.cos(theta)
print(math.sqrt(X2))
| [["-", 0, 657, 31, 657, 12, 23, 0, 657, 12, 612], ["+", 0, 657, 31, 657, 12, 23, 0, 657, 12, 612]] | 5 | 97 |
from math import cos, sqrt, pi
A, B, H, M = map(int, input().split())
th = ((H * 60 + M) * 5.5 % 360) * pi / 180
print(sqrt(A*A + B*B - A*B*cos(th))) | from math import cos, sqrt, pi
A, B, H, M = map(int, input().split())
th = float(((H * 60 + M) * 5.5 % 360) * pi / 180)
print(sqrt(A*A + B*B - 2*A*B*cos(th))) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["+", 0, 657, 12, 657, 31, 657, 31, 657, 31, 612], ["+", 0, 657, 12, 657, 31, 657, 31, 657, 17, 48]] | 5 | 69 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int a, b, c, d;
cin >> a >> b >> c >> d;
long long int ds =
min(fabs((c * 30 + d * 0.5) - (d * 6)),
double(10000.0000009) /*360-fabs((c*30+d*0.5)-(d*6))*/);
if (ds == 180) {
cout << a + b;
return 0;
}
if (ds == 0) {... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int a, b, c, d;
cin >> a >> b >> c >> d;
double ds = min(fabs((c * 30 + d * 0.5) - (d * 6)),
double(10000.0000009) /*360-fabs((c*30+d*0.5)-(d*6))*/);
if (ds == 180) {
cout << a + b;
return 0;
}
if (ds == 0) {
... | [["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 159 |
#include <bits/stdc++.h>
#define forna(i, a, n) for (int i = a; i < n; i++)
typedef long long int lli;
using namespace std;
int min(int x, int y) { return (x < y) ? x : y; }
double my_sqrt(double num) {
double start = 0.00000000;
double end = num;
double sqrt = 0.0000000000;
double epsil = 0.00000100000;
whi... | #include <bits/stdc++.h>
#define forna(i, a, n) for (int i = a; i < n; i++)
typedef long long int lli;
using namespace std;
int min(int x, int y) { return (x < y) ? x : y; }
double my_sqrt(double num) {
double start = 0.00000000;
double end = num;
double sqrt = 0.0000000000;
double epsil = 0.00000100000;
whi... | [["-", 49, 50, 51, 16, 31, 16, 31, 2, 63, 22], ["+", 49, 50, 51, 16, 31, 16, 31, 2, 63, 22]] | 1 | 419 |
import math
a, b, h, m = map(int, input().split())
rad_h = (2 * math.pi / 12) * h
rad_m = (2 * math.pi / 60) * m
# print(rad_h)
# print(rad_m)
theta = abs(rad_h - rad_m)
# print(theta)
# print(math.cos(theta))
# print(theta * 360 / 2 / math.pi)
# x_2 = a ** 2 + b ** 2 - 2 * a * b * math.cos(theta)
# print(x_2)
x = ... | import math
a, b, h, m = map(int, input().split())
rad_h = (2 * math.pi / 12) * (h + m / 60)
rad_m = (2 * math.pi / 60) * m
# print(rad_h)
# print(rad_h * 360 / 2 / math.pi)
# print(rad_m)
# print(rad_m * 360 / 2 / math.pi)
theta = abs(rad_h - rad_m)
# print(theta)
# print(math.cos(theta))
# print(theta * 360 / 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 | 94 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.