結果
問題 |
No.734 Careful Engineer
|
ユーザー |
![]() |
提出日時 | 2018-11-29 00:18:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,047 bytes |
コンパイル時間 | 933 ms |
コンパイル使用メモリ | 96,648 KB |
実行使用メモリ | 13,760 KB |
最終ジャッジ日時 | 2024-06-26 22:59:40 |
合計ジャッジ時間 | 4,375 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | AC * 1 TLE * 1 -- * 8 |
ソースコード
//g++ -std=c++11 -Wall -O2 -o main.exe main.cpp //g++ -std=c++14 -Wall -O2 -o main.exe main.cpp #include <cstdio> #include <cstdlib> #include <cmath> #include <iostream> #include <iomanip> #include <string> #include <vector> #include <map> #include <queue> #include <stack> #include <tuple> #include <functional> #include <algorithm> #include <complex> #include <numeric> using namespace std; #define spc " " #define MOD 1000000007 typedef long long ll; typedef long double ld; typedef pair<int, int> p_ii; typedef tuple<int, int, int, int> tup; bool tupComp(tup &t1, tup &t2){ return get<2>(t1) > get<2>(t2); } //------------------------------------------------------------------------------ int main(){ ll a, b, c; cin >> a >> b >> c; a *= 60; c *= 3600; int ans = 0; for(int i = 1;; i++){ if((i * b) >= (i * a)){ ans = -1; break; } else if((c + (i * b)) <= (i * a)){ ans = i; break; } } cout << ans << endl; return 0; }