結果
| 問題 |
No.232 めぐるはめぐる (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-15 07:37:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
J_TLE
(最初)
|
| 実行時間 | - |
| コード長 | 990 bytes |
| コンパイル時間 | 535 ms |
| コンパイル使用メモリ | 57,412 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-25 05:33:44 |
| 合計ジャッジ時間 | 4,142 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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){
cout<<"^>"<<endl;
cout<<"v"<<endl;
cout<<"<"<<endl;
int e=t-d-3;
int f=e/2;
for(int i=0; i<f; ++i){
cout<<">"<<endl;
cout<<"<"<<endl;
}
}
}
return 0;
}