結果
問題 | No.232 めぐるはめぐる (2) |
ユーザー | nokonoko |
提出日時 | 2015-06-29 23:30:39 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 2,513 bytes |
コンパイル時間 | 2,843 ms |
コンパイル使用メモリ | 102,688 KB |
実行使用メモリ | 22,884 KB |
最終ジャッジ日時 | 2023-09-22 04:32:17 |
合計ジャッジ時間 | 6,834 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 244 ms
22,828 KB |
testcase_01 | AC | 248 ms
20,808 KB |
testcase_02 | AC | 248 ms
20,876 KB |
testcase_03 | AC | 241 ms
20,716 KB |
testcase_04 | AC | 58 ms
20,964 KB |
testcase_05 | AC | 58 ms
20,776 KB |
testcase_06 | AC | 59 ms
22,884 KB |
testcase_07 | AC | 57 ms
20,840 KB |
testcase_08 | AC | 197 ms
20,760 KB |
testcase_09 | AC | 58 ms
20,764 KB |
testcase_10 | AC | 61 ms
22,800 KB |
testcase_11 | WA | - |
testcase_12 | AC | 58 ms
22,768 KB |
testcase_13 | WA | - |
testcase_14 | AC | 60 ms
20,780 KB |
testcase_15 | AC | 60 ms
22,796 KB |
testcase_16 | AC | 58 ms
22,868 KB |
testcase_17 | AC | 58 ms
20,748 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | AC | 59 ms
20,800 KB |
testcase_22 | AC | 60 ms
20,788 KB |
testcase_23 | AC | 63 ms
22,828 KB |
testcase_24 | AC | 60 ms
22,820 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace YukiCoderNo232 { class Program { static void Main() { string[] buffer = (Console.ReadLine()).Split(' '); int turn = int.Parse(buffer[0]); int posY = int.Parse(buffer[1]); int posX = int.Parse(buffer[2]); int nowPosX = 0; int nowPosY = 0; int posMax = Math.Max(posX, posY); int stepCount = 0; if ((turn >= posMax) && (!((posX == 0) && (posY == 0) && ((turn % 2) != 0)))) { Console.WriteLine("YES"); int step = turn - posMax; int dummyStepCount = (step / 2); for (int i = 0; i < dummyStepCount; i++) { Console.WriteLine(">"); Console.WriteLine("<"); stepCount += 2; } int posMin = Math.Min(posX, posY); int posDiff = Math.Abs(posY - posX); if ((step % 2) == 0) { for (int i = 0; i < posMin; i++) { Console.WriteLine("^>"); nowPosX++; nowPosY++; stepCount++; } } else { Console.WriteLine("^"); Console.WriteLine(">"); nowPosX++; nowPosY++; stepCount += 2; for (int i = 1; i < posMin; i++) { Console.WriteLine("^>"); nowPosX++; nowPosY++; stepCount++; } } if (posX > posY) { for (int i = 0; i < posDiff; i++) { Console.WriteLine(">"); nowPosX++; stepCount++; } } else if (posX < posY) { for (int i = 0; i < posDiff; i++) { Console.WriteLine("^"); nowPosY++; stepCount++; } } } else { Console.WriteLine("NO"); } } } }