結果
| 問題 |
No.232 めぐるはめぐる (2)
|
| コンテスト | |
| ユーザー |
nola_suz
|
| 提出日時 | 2015-06-27 00:44:25 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 133 ms / 1,000 ms |
| コード長 | 3,092 bytes |
| コンパイル時間 | 1,012 ms |
| コンパイル使用メモリ | 98,180 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2024-09-14 12:33:06 |
| 合計ジャッジ時間 | 2,852 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
#include <fstream>
#include <iomanip>
//#include <utility>
//#include <memory>
//#include <functional>
//#include <deque>
//#include <cctype>
//#include <ctime>
//#include <numeric>
//#include <list>
//#include <iomanip>
//#if __cplusplus >= 201103L
//#include <array>
//#include <tuple>
//#include <initializer_list>
//#include <forward_list>
//
//#define cauto const auto&
//#else
//#endif
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;
#define VV(T) vector<vector< T > >
template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
v.assign(a, vector<T>(b, t));
}
template <class F, class T>
void convert(const F &f, T &t){
stringstream ss;
ss << f;
ss >> t;
}
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()
#define DEBUG
#ifdef DEBUG
#define dump(x) cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#else
#define dump(x)
#define debug(x)
#endif
#define LDcout(x,n) fixed<<setprecision(n)<<x
#define MOD 1000000007LL
#define EPS 1e-8
static const int INF=1<<24;
void mainmain(){
int T,a,b;
cin>>T>>a>>b;
if(T<a||T<b){
cout<<"NO"<<endl;
return;
}
if(T==1&&a==0&&b==0){
cout<<"NO"<<endl;
return;
}
vector<string> v(T,"");
int cnt=0;
while(a||b){
if(a) a--,v[cnt]+="^";
if(b) b--,v[cnt]+=">";
cnt++;
T--;
}
if(T%2==0){
reep(i,cnt,cnt+T){
if(i&1)v[i]+="^";
else v[i]+="v";
}
}
else if(T==1){
if(v[cnt-1].size()==2){
v[cnt-1]=">";
v[cnt]="^";
}
else{
if(v[cnt-1]==">"){
v[cnt-1]="^";
v[cnt]="v>";
}
else{
v[cnt-1]="<";
v[cnt]="^>";
}
}
}
else{
T-=3;
v[cnt++]=">";
v[cnt++]="^";
v[cnt++]="v<";
reep(i,cnt,cnt+T){
if(i%2) v[i]="<";
else v[i]=">";
}
}
cout<<"YES"<<endl;
rep(i,v.size()){
cout<<v[i]<<endl;
}
}
signed main() {
ios_base::sync_with_stdio(false);
cout<<fixed<<setprecision(0);
mainmain();
}
nola_suz