結果

問題 No.1624 三角形の反射
ユーザー yakkiyakki
提出日時 2021-07-23 22:12:57
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,239 bytes
コンパイル時間 1,181 ms
コンパイル使用メモリ 118,100 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-25 22:16:24
合計ジャッジ時間 2,100 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 2 ms
4,380 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 2 ms
4,380 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 2 ms
4,380 KB
testcase_18 WA -
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<list>
#include<iomanip>
#include<cmath>
#include<cstring>
#include<functional>
#include<cstdio>
#include<cstdlib>
#include<numeric>
#include<ctime>
//#include<atcoder/all>
using namespace std;
//using namespace atcoder;

#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
//#define MOD 1000000007
#define MOD 998244353
#define LINF (long long)4e18
#define jck 3.141592
#define PI acos(-1.0)

const double EPS = 1e-10;

using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;
//using mint = modint1000000007;

int dh[] = {-1,0,1,0};
int dw[] = {0,1,0,-1};


int main(){
    double a; cin >>a;
    ll p = round(a*1000);
    repr(i,1,1001){
        int p2 = p*i;
        if(p2%1000 == 0){
            p2 /= 1000;
            if(i == p2) cout << 'A' << " ";
            else if(i > p2) cout << 'C' << " ";
            else cout << 'B' << " ";
            int ans = i-1 + p2-1 + i/2 + p2/2 + (max(i,p2)-min(i,p2))/2;
            cout << ans << endl;
            return 0;
        }
    }

}

0