結果

問題 No.232 めぐるはめぐる (2)
ユーザー fiord
提出日時 2015-08-20 00:23:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 588 bytes
コンパイル時間 1,347 ms
コンパイル使用メモリ 160,236 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 10:45:29
合計ジャッジ時間 3,435 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
	int t,a,b;	cin>>t>>a>>b;
	if(t<a||t<b)	cout<<"NO"<<endl;
	else{
		cout<<"YES"<<endl;
		while(a>1&&b>1){
			a--,b--,t--;	cout<<">^"<<endl;
		}
		while(a>1){
			a--,t--;	cout<<"^"<<endl;
		}
		while(b>1){
			b--,t--;	cout<<">"<<endl;
		}
		if(t%2==1){
			if(a*b)	cout<<">^"<<endl;
			else if(a)	cout<<"^"<<endl;
			else 	cout<<">"<<endl;
			t--;
		}
		else{
			if(a*b)	cout<<">\n^"<<endl;
			else if(a)	cout<<">^\n<"<<endl;
			else 	cout<<"^\nv>"<<endl;
			t-=2;
		}
		while(t){
			cout<<">\n<"<<endl;
			t-=2;
		}
	}
	return 0;
}
0