結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-16 22:19:12 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 386 bytes |
| コンパイル時間 | 2,986 ms |
| コンパイル使用メモリ | 275,568 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-07-16 22:19:17 |
| 合計ジャッジ時間 | 3,983 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
int main() {
int x, y, l;
cin >> x >> y >> l;
int cnt = abs(y) / l + abs(x) / l;
if (y < 0) cnt += 2;
if (abs(x) > 0) cnt++;
if (abs(x) % l > 0) cnt++;
if (abs(y) % l > 0) cnt++;
cout << cnt << endl;
return 0;
}