結果
問題 |
No.232 めぐるはめぐる (2)
|
ユーザー |
![]() |
提出日時 | 2015-06-26 22:57:40 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 819 bytes |
コンパイル時間 | 499 ms |
コンパイル使用メモリ | 54,744 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-07 18:17:24 |
合計ジャッジ時間 | 5,081 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 6 WA * 12 TLE * 1 -- * 3 |
ソースコード
#include <iostream> using namespace std; int main(){ int t,a,b; cin>>t>>a>>b; if(t>=a&&t>=b){ cout<<"YES"<<endl; if(a==b){ while(a>1&&b>1){ cout<<">^"<<endl; a--; b--; t--; } if(t%2==0){ cout<<">\n^\n"; t-=2; } else{ cout<<">^"<<endl; t--; } } else{ while(a>0&&b>0){ cout<<">^\n"; a--; b--; t--; } if(a>0){ while(a>1){ cout<<">"<<endl; a--; t--; } if(t%2==0){ cout<<">^\nv\n"; t-=2; } else{ cout<<">"<<endl; t--; } } else if(b>0){ while(b>1){ cout<<"^"<<endl; a--; t--; } if(t%2==0){ cout<<">^\n<\n"; t-=2; } else{ cout<<"^"<<endl; t--; } } } while(t>0){ cout<<">\n<\n"; t--; } } else cout<<"NO"<<endl; return 0; }