結果
問題 |
No.232 めぐるはめぐる (2)
|
ユーザー |
|
提出日時 | 2016-09-15 07:44:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,174 bytes |
コンパイル時間 | 425 ms |
コンパイル使用メモリ | 57,724 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 06:00:52 |
合計ジャッジ時間 | 3,079 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 11 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; int main(){ int t,a,b; cin>>t>>a>>b; int m=min(a,b); int d=a+b-m; if(t-d<0){ cout<<"NO"<<endl;; } else if(t-d==1){ if(m==0){ cout<<"NO"<<endl;; } else { cout<<"YES"<<endl; for(int i=0; i<m-1; ++i){ cout<<"^>"<<endl; } cout<<"^"<<endl; cout<<">"<<endl; } } else { cout<<"YES"<<endl; for(int i=0; i<m; ++i){ cout<<"^>"<<endl; } if(t-d==2){ cout<<">"<<endl; cout<<"<"<<endl; }else if(t-d==3){ cout<<"^>"<<endl; cout<<"v"<<endl; cout<<"<"<<endl; } else if(t-d==4){ cout<<">"<<endl; cout<<"<"<<endl; cout<<">"<<endl; cout<<"<"<<endl; } else if(t-d>=5){ int e=t-d; if(e%2==1){ cout<<"^>"<<endl; cout<<"v"<<endl; cout<<"<"<<endl; e-=3; int f=e/2; for(int i=0; i<f; ++i){ cout<<">"<<endl; cout<<"<"<<endl; } } else { int f=e/2; for(int i=0; i<f; ++i){ cout<<">"<<endl; cout<<"<"<<endl; } } } } return 0; }