結果
| 問題 | No.232 めぐるはめぐる (2) | 
| コンテスト | |
| ユーザー |  chakku | 
| 提出日時 | 2015-09-26 04:01:19 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 131 ms / 1,000 ms | 
| コード長 | 1,221 bytes | 
| コンパイル時間 | 558 ms | 
| コンパイル使用メモリ | 67,164 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-14 12:39:04 | 
| 合計ジャッジ時間 | 2,355 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 22 | 
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <queue>
#include <string>
#include <climits>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,x,n) for(int i=x;i<n;i++)
#define ALL(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<":"<<x<<endl
const int INF = INT_MAX / 3;
int main(){
	int T, A, B;
	cin >> T >> A >> B;
	if (T < max(A, B)){
		cout << "NO" << endl;
		return 0;
	}
	if (T == 1 && A == 0 && B == 0){
		cout << "NO" << endl;
		return 0;
	}
	cout << "YES" << endl;
	int res = T - max(A, B);
	if (res % 2 == 1){
		if (A == 0 && B == 0){
			cout << ">^" << endl << "<" << endl << "v" << endl;
			T -= 3;
		}else if (A == 0&&B != 0){
			cout << ">^" << endl << "v" << endl;
			B--;
			T--; T--;
		} else if (B == 0 && A != 0){
			cout << ">^" << endl << "<" << endl;
			A--;
			T--; T--;
		} else{
			cout << ">" << endl << "^" << endl;
			A--; B--;
			T--; T--;
		}
	}
	for (int i = 0; i < min(A, B); i++){
		cout << ">^" << endl;
	}
	for (int i = min(A, B); i < T; i++){
		if (i < max(A, B)){
			if (A>B) cout << "^" << endl;
			else cout << ">" << endl;
		} else{
			if (i % 2) cout << "^" << endl;
			else cout << "v" << endl;
		}
	}
	return 0;
}
            
            
            
        