結果

問題 No.232 めぐるはめぐる (2)
ユーザー zaichu
提出日時 2016-01-15 22:02:21
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 587 bytes
コンパイル時間 1,167 ms
コンパイル使用メモリ 159,036 KB
実行使用メモリ 13,752 KB
最終ジャッジ日時 2024-09-19 19:08:07
合計ジャッジ時間 5,357 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other AC * 7 WA * 4 TLE * 1 -- * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
	ll t,a,b;
	cin >> t >> a >> b;
	if((t < a or t < b) or (a == 0 and b == 0 and t == 1) ){
		cout << "NO" << endl;
		return 0;
	}
	cout << "YES" << endl;
	while(max(a,b) != 0){
		if(a != 0){
			cout << ">";
			a--;
		}
		if(b != 0){
			cout << "^";
			b--;
		}
		cout << endl;
		t--;
	}
	while(t != 0){
		if(t % 2 == 0){
			cout << ">" << endl;
			cout << "<" << endl;
			t -= 2;
		}else if(t % 2 == 1){
			cout << ">^" << endl;
			cout << "<" << endl;
			cout << "v" << endl;
		t -= 3;
		}
	}
	return 0;
}
0