結果
| 問題 | No.232 めぐるはめぐる (2) | 
| コンテスト | |
| ユーザー |  fiord | 
| 提出日時 | 2015-08-20 00:29:41 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 132 ms / 1,000 ms | 
| コード長 | 787 bytes | 
| コンパイル時間 | 1,433 ms | 
| コンパイル使用メモリ | 160,456 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-14 12:38:51 | 
| 合計ジャッジ時間 | 2,903 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 22 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
	int t,a,b;	cin>>t>>a>>b;
	if(a+b==0){
		if(t==1)	cout<<"NO"<<endl;
		else{
			cout<<"YES"<<endl;
			if(t%2==1){
				cout<<"^\n>v\n<\n";
				t-=3;
			}
			while(t){
				cout<<">\n<\n";
				t-=2;
			}
		}
	}
	else 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 if(b)	cout<<">"<<endl;
			t--;
		}
		else{
			if(a*b)	cout<<">\n^"<<endl;
			else if(a)	cout<<">^\n<"<<endl;
			else if(b)	cout<<"^\nv>"<<endl;
			t-=2;
		}
		
		while(t){
			cout<<">\n<"<<endl;
			t-=2;
		}
	}
	return 0;
}
            
            
            
        