0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

スミレ畑、やってみた。 その22

Posted at

概要

日本語プログラミング言語、スミレ畑、見つけたので、やってみた。
AtCoder、やってみた。
練習問題やってみた。

練習問題

ABC 086 C - Traveling
時刻0のとき、平面上の(0, 0)にいます。平面上のN箇所の点を、ある時刻に移動できるかという問題です。

投入するソース

2
3 1 2
6 1 1

期待値

Yes

写真

image.png

サンプルコード


Nは,入力したもの
前xは、0
前yは、0
結果は、○
N回繰り返す
   txyは,入力したものを、「 」で区切ったもの
   tは、txy(1)
   xは、txy(2)
   yは、txy(3)
   結果は、(結果 かつ (x - 前x)の絶対値 + (y - 前y)の絶対値 ≦ t かつ (x+y) % 2 = t % 2)
繰り返し終わり
もし、結果ならば
  「YES」を、出力して改行する
そうでなければ
  「NO」を、出力して改行する
もし終わり

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?