結果

問題 No.232 めぐるはめぐる (2)
ユーザー hotpepsihotpepsi
提出日時 2016-02-08 00:20:54
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 566 bytes
コンパイル時間 644 ms
コンパイル使用メモリ 61,448 KB
実行使用メモリ 6,388 KB
最終ジャッジ日時 2023-10-21 20:09:31
合計ジャッジ時間 3,157 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
6,388 KB
testcase_01 AC 127 ms
6,388 KB
testcase_02 AC 126 ms
6,388 KB
testcase_03 AC 127 ms
6,388 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 90 ms
5,332 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 WA -
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 3 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 2 ms
4,348 KB
testcase_22 AC 2 ms
4,348 KB
testcase_23 AC 1 ms
4,348 KB
testcase_24 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>

using namespace std;

int main(int argc, char *argv[])
{
	int T, A, B;
	cin >> T >> A >> B;
	if (A > T || B > T) {
		cout << "NO" << endl;
	} else {
		cout << "YES" << endl;
		vector<string> v(T);
		int i;
		for (i = 0; i < A; ++i) {
			v[i] += "^";
		}
		while (i < T / 2) {
			v[i++] += "^";
			v[i++] += "v";
		}
		for (i = 0; i < B; ++i) {
			v[T - 1 - i] += ">";
		}
		while (i < T / 2) {
			v[T - 1 - i++] += ">";
			v[T - 1 - i++] += "<";
		}
		for (int i = 0; i < T; ++i) {
			cout << v[i] << endl;
		}
	}
	return 0;
}
0