結果
問題 |
No.232 めぐるはめぐる (2)
|
ユーザー |
|
提出日時 | 2016-09-15 07:42:35 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,156 bytes |
コンパイル時間 | 573 ms |
コンパイル使用メモリ | 57,832 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-17 06:00:49 |
合計ジャッジ時間 | 3,990 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 12 |
ソースコード
#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 { for(int i=0; i<e; ++i){ cout<<">"<<endl; cout<<"<"<<endl; } } } } return 0; }