結果
問題 |
No.232 めぐるはめぐる (2)
|
ユーザー |
![]() |
提出日時 | 2016-03-18 12:02:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 723 bytes |
コンパイル時間 | 680 ms |
コンパイル使用メモリ | 60,360 KB |
実行使用メモリ | 13,888 KB |
最終ジャッジ日時 | 2024-10-01 09:04:01 |
合計ジャッジ時間 | 5,365 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 4 WA * 6 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{ 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{ if(t == 1) cout << "NO" << endl; else{ while(t){ cout << "^>" << endl << '<' << endl << 'v' << endl; t -= 3; } } } } }