結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
kongarishisyamo
|
| 提出日時 | 2016-03-03 22:25:00 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 380µs | |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 309 ms |
| コンパイル使用メモリ | 77,284 KB |
| 実行使用メモリ | 7,856 KB |
| 最終ジャッジ日時 | 2026-09-27 16:46:40 |
| 合計ジャッジ時間 | 1,705 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int X,Y,L;
int ans=0;
cin>>X>>Y>>L;
ans+=(abs(X)/L)+(abs(X)%L!=0)+(abs(Y)/L)+(abs(Y)%L!=0);
if(X==0&&Y>0) ans+=0;
if(X==0&&Y==0) ans+=0;
if(X==0&&Y<0) ans+=2;
if(X>0&&Y>0) ans+=1;
if(X>0&&Y==0) ans+=1;
if(X>0&&Y<0) ans+=2;
if(X<0&&Y>0) ans+=1;
if(X<0&&Y==0) ans+=1;
if(X<0&&Y<0) ans+=2;
cout<<ans<<endl;
}
kongarishisyamo