結果
| 問題 |
No.374 コイン
|
| コンテスト | |
| ユーザー |
はまやんはまやん
|
| 提出日時 | 2016-06-04 22:47:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 606 bytes |
| コンパイル時間 | 1,569 ms |
| コンパイル使用メモリ | 166,352 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 22:38:29 |
| 合計ジャッジ時間 | 2,535 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define EPS 1e-10
#define PI acos(-1)
typedef long long ll;
ll A, B;
int solve()
{
if (A < B) return 0;
rep(i, 1, 10000)
{
double _max = (double)A / (1.0 + 1.0 / cos(PI / (double)i));
double _min = (double)A / (1.0 + 1.0 / cos(PI / (double)(i + 1)));
double BB = B;
if (_min < BB && BB <= _max) return i;
}
assert(false);
return 0;
}
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
while (cin >> A >> B)
{
if (solve() % 2 == 0)
cout << "K" << endl;
else
cout << "S" << endl;
}
}
はまやんはまやん