結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-11-23 16:43:13 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 751 bytes |
| 記録 | |
| コンパイル時間 | 1,289 ms |
| コンパイル使用メモリ | 213,772 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-11-23 16:43:17 |
| 合計ジャッジ時間 | 3,238 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge6_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t=1;
while (t--) {
int x,y,l;
cin >> x >> y >> l;
int x1 = abs(x);
int y1 = abs(y);
int c1 = x1+y1;
int c2 = 0;
if(c1%l==0){
c2 = c1/l;
} else {
c2 = c1/l + 1;
}
int ec = 0;
if(x>0 && y>0){
ec = 1;
} else if (x>0 && y<0){
ec = 2;
} else if(x<0 && y>0){
ec = 1;
} else if(x<0 && y<0){
ec = 2;
}
int fc = ec + c2;
cout << fc << endl;
}
}
vjudge1