結果
| 問題 | 
                            No.232 めぐるはめぐる (2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             purple_jwl
                         | 
                    
| 提出日時 | 2015-07-05 21:36:05 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,017 bytes | 
| コンパイル時間 | 1,344 ms | 
| コンパイル使用メモリ | 161,076 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-07 23:06:39 | 
| 合計ジャッジ時間 | 3,877 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 17 WA * 5 | 
ソースコード
#include <bits/stdc++.h>
#define REP(i, x, n) for(int i = x; i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define F first
#define S second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
int main() {
	int t, a, b;
	cin >> t >> a >> b;
	if(min(a, b) + abs(a - b) > t) {
		cout << "NO" << endl;
	}
	else {
		int v = t - min(a, b) - abs(a - b);
		if(v % 2 && min(a, b) == 0) {
			cout << "NO" << endl;
		}
		else {
			cout << "YES" << endl;
			rep(i, min(a, b) - 1) {
				cout << "^>" << endl;
			}
			if(min(a, b) != 0) {
				if(v % 2) {
					cout << "^" << endl;
					cout << ">" << endl;
					v--;
				}
				else {
					cout << "^>" << endl;
				}
			}
			rep(i, abs(a - b)) {
				if(a > b) cout << "^" << endl;
				else cout << ">" << endl;
			}
			rep(i, v) {
				if(i % 2) cout << "<" << endl;
				else cout << ">" << endl;
			}
		}
	}
	
  return 0;
}
            
            
            
        
            
purple_jwl