結果
問題 | No.232 めぐるはめぐる (2) |
ユーザー | nokonoko |
提出日時 | 2015-07-01 19:14:52 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 302 ms / 1,000 ms |
コード長 | 2,193 bytes |
コンパイル時間 | 2,373 ms |
コンパイル使用メモリ | 102,072 KB |
実行使用メモリ | 24,952 KB |
最終ジャッジ日時 | 2023-10-12 13:36:56 |
合計ジャッジ時間 | 6,854 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 295 ms
23,088 KB |
testcase_01 | AC | 296 ms
22,940 KB |
testcase_02 | AC | 298 ms
23,096 KB |
testcase_03 | AC | 302 ms
24,952 KB |
testcase_04 | AC | 57 ms
20,636 KB |
testcase_05 | AC | 58 ms
20,692 KB |
testcase_06 | AC | 59 ms
18,692 KB |
testcase_07 | AC | 59 ms
20,764 KB |
testcase_08 | AC | 226 ms
20,692 KB |
testcase_09 | AC | 57 ms
20,668 KB |
testcase_10 | AC | 60 ms
20,768 KB |
testcase_11 | AC | 58 ms
20,772 KB |
testcase_12 | AC | 58 ms
20,776 KB |
testcase_13 | AC | 58 ms
20,860 KB |
testcase_14 | AC | 58 ms
20,732 KB |
testcase_15 | AC | 57 ms
20,656 KB |
testcase_16 | AC | 59 ms
20,672 KB |
testcase_17 | AC | 59 ms
20,820 KB |
testcase_18 | AC | 64 ms
18,644 KB |
testcase_19 | AC | 59 ms
20,640 KB |
testcase_20 | AC | 59 ms
20,840 KB |
testcase_21 | AC | 59 ms
20,700 KB |
testcase_22 | AC | 59 ms
20,696 KB |
testcase_23 | AC | 57 ms
20,612 KB |
testcase_24 | AC | 59 ms
20,708 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; } for (int i = dummyStepTurnX; i < turn; i++) { stepListX[i] = 2; } for (int i = 0, dummyY = (dummyStepTurnY - (dummyStepTurnY % 2)); i < dummyY; i++) { stepListY[i] = -((i % 2) + 1); } for (int i = dummyStepTurnY; i < turn; i++) { stepListY[i] = -2; } Array.Sort(stepListX); Array.Sort(stepListY); for (int i = 0; i < turn; i++) { string output = ""; if (stepListX[i] == 2) { output += ">"; } else if (stepListX[i] == 1) { output += "<"; } if (stepListY[i] == -2) { output += "^"; } else if (stepListY[i] == -1) { output += "v"; } Console.WriteLine(output); } } else { Console.WriteLine("NO"); } } } }