結果
| 問題 |
No.232 めぐるはめぐる (2)
|
| コンテスト | |
| ユーザー |
ldsyb
|
| 提出日時 | 2016-03-18 12:08:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 753 bytes |
| コンパイル時間 | 498 ms |
| コンパイル使用メモリ | 60,392 KB |
| 実行使用メモリ | 13,636 KB |
| 最終ジャッジ日時 | 2024-10-01 09:04:05 |
| 合計ジャッジ時間 | 3,641 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 5 TLE * 1 -- * 16 |
ソースコード
#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{
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;
}
}
}
}
ldsyb