結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2015-01-14 23:03:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 608 bytes |
コンパイル時間 | 797 ms |
コンパイル使用メモリ | 89,200 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 18:15:19 |
合計ジャッジ時間 | 1,600 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <numeric> #include <limits> #include <climits> #include <cfloat> #include <functional> using namespace std; int main() { int x, y, l; cin >> x >> y >> l; int ret = (abs(x) + l - 1) / l + (abs(y) + l - 1) / l; if(y < 0) ret += 2; else if(x != 0) ++ ret; cout << ret << endl; return 0; }