結果
| 問題 |
No.232 めぐるはめぐる (2)
|
| コンテスト | |
| ユーザー |
kongarishisyamo
|
| 提出日時 | 2016-02-28 23:56:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 530 bytes |
| コンパイル時間 | 654 ms |
| コンパイル使用メモリ | 58,728 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-24 12:25:12 |
| 合計ジャッジ時間 | 4,673 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 11 RE * 8 |
ソースコード
#include<iostream>
#include<string>
using namespace std;
#define TMAX 10000
int main(){
int T,A,B;
string AB[TMAX];
cin>>T>>A>>B;
for(int i=0;i<T;i++){
AB[i]="";
if(A==0&&B==0){
if(T-i==3){
AB[i++]="<^";
AB[i++]=">";
AB[i++]="v";
}
else AB[i]+='<',B--;
}
else{
if(A>0) AB[i]+='^',A--;
else AB[i]+='v',A++;
if(B>0) AB[i]+='>',B--;
else AB[i]+='<',B++;
}
}
if(A==0&&B==0){
cout<<"YES"<<endl;
for(int i=0;i<T;i++){
cout<<AB[i]<<endl;
}
}
else cout<<"NO"<<endl;
}
kongarishisyamo