結果
問題 | No.232 めぐるはめぐる (2) |
ユーザー | nokonoko |
提出日時 | 2015-07-01 00:41:45 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 2,389 bytes |
コンパイル時間 | 2,177 ms |
コンパイル使用メモリ | 104,164 KB |
実行使用メモリ | 24,944 KB |
最終ジャッジ日時 | 2023-09-22 04:47:52 |
合計ジャッジ時間 | 6,318 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 258 ms
22,928 KB |
testcase_01 | AC | 252 ms
20,900 KB |
testcase_02 | AC | 258 ms
23,140 KB |
testcase_03 | AC | 256 ms
24,944 KB |
testcase_04 | AC | 57 ms
20,656 KB |
testcase_05 | AC | 58 ms
22,684 KB |
testcase_06 | AC | 58 ms
20,640 KB |
testcase_07 | AC | 61 ms
20,776 KB |
testcase_08 | AC | 198 ms
22,764 KB |
testcase_09 | AC | 60 ms
22,752 KB |
testcase_10 | AC | 58 ms
20,744 KB |
testcase_11 | AC | 57 ms
22,796 KB |
testcase_12 | AC | 59 ms
18,732 KB |
testcase_13 | AC | 59 ms
22,680 KB |
testcase_14 | AC | 58 ms
20,688 KB |
testcase_15 | AC | 59 ms
20,708 KB |
testcase_16 | AC | 58 ms
20,676 KB |
testcase_17 | WA | - |
testcase_18 | AC | 62 ms
20,704 KB |
testcase_19 | AC | 57 ms
20,700 KB |
testcase_20 | AC | 59 ms
20,688 KB |
testcase_21 | AC | 58 ms
20,704 KB |
testcase_22 | AC | 59 ms
20,668 KB |
testcase_23 | AC | 60 ms
20,660 KB |
testcase_24 | AC | 56 ms
20,700 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 posMax = Math.Max(posX, posY); if ((turn >= posMax) && (!((posMax == 0) && (turn == 1)))) { Console.WriteLine("YES"); int dummyStepTurnX = turn - posX; int dummyStepTurnY = turn - posY; int[] stepListX = new int[turn]; int[] stepListY = new int[turn]; for (int i = 0, dummyX = (dummyStepTurnX - (dummyStepTurnX % 2)); i < dummyX; i++) { stepListX[i] = ((i % 2) << 1) - 1; } for (int i = dummyStepTurnX; i < turn; i++) { stepListX[i] = 1; } for (int i = 0, dummyY = (dummyStepTurnY - (dummyStepTurnY % 2)); i < dummyY; i++) { stepListY[i] = ((i % 2) << 1) - 1; } for (int i = dummyStepTurnY; i < turn; i++) { stepListY[i] = 1; } if ((dummyStepTurnX % 2) != 0) { int stepBuffer = stepListX[0]; stepListX[0] = stepListX[dummyStepTurnX - 1]; stepListX[dummyStepTurnX - 1] = stepBuffer; } for (int i = 0; i < turn; i++) { string output = ""; if (stepListX[i] == 1) { output += ">"; } else if (stepListX[i] == -1) { output += "<"; } if (stepListY[i] == 1) { output += "^"; } else if (stepListY[i] == -1) { output += "v"; } Console.WriteLine(output); } } else { Console.WriteLine("NO"); } } } }