結果

問題 No.734 Careful Engineer
ユーザー SugarDragon5SugarDragon5
提出日時 2018-09-28 21:31:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,097 bytes
コンパイル時間 1,502 ms
コンパイル使用メモリ 162,512 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-20 10:54:07
合計ジャッジ時間 1,896 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 WA -
testcase_09 AC 2 ms
6,940 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2 ms
6,944 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i,n,m) for(int i=(n);i<(m);i++)
#define REP(i,n) FOR(i,0,n)
#define REPR(i,n) for(int i=(n);i>=0;i--)
#define all(vec) vec.begin(),vec.end()
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using P=pair<int,int>;
using PP=pair<int,P>;
using Pl=pair<ll,ll>;
using PPl=pair<ll,Pl>;
using vs=vector<string>;
#define fi first
#define se second
#define pb push_back
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
const ll MOD=1000000007LL;
const int INF=1<<30;
const ll LINF=1LL<<60;
int main(){
    int a,b,c;
    cin>>a>>b>>c;
    a*=60;
    c*=60*60;
    if(b>=a){
        cout<<-1<<endl;
    }
    int ng=-1,ok=1e6;
    while(abs(ok-ng)>1){
        int mid=(ok+ng)/2;
        if(a*mid>c+b*mid){
            ok=mid;
        }else{
            ng=mid;
        }
    }
    if(!ok){
        cout<<-1<<endl;
    }else{
        cout<<ok<<endl;
    }
    return 0;
}
0