結果
問題 |
No.232 めぐるはめぐる (2)
|
ユーザー |
![]() |
提出日時 | 2016-03-18 12:09:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 804 bytes |
コンパイル時間 | 630 ms |
コンパイル使用メモリ | 59,836 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2024-10-01 09:04:18 |
合計ジャッジ時間 | 4,173 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 8 WA * 2 TLE * 1 -- * 11 |
ソースコード
#include <iostream> #include <cmath> using namespace std; int main(){ int t,a,b; cin >> t >> a >> b; if(max(a,b) > t) cout << "NO" << endl; else if(a == b && a == 0) cout << "NO" << endl; else{ cout << "YES" << endl; if(t - max(a,b) == 1){ cout << '^' << endl; a--; } while(a && b){ cout << "^>" << endl; a--; b--; t--; } while(a--){ cout << '^' << endl; t--; } while(b--){ cout << '>' << endl; t--; } if(!(t & 1)){ while(t){ cout << '>' << endl << '<' << endl; t -= 2; } }else{ while(t){ cout << "^>" << endl << '<' << endl << 'v' << endl; t -= 3; } } } }