結果
| 問題 |
No.232 めぐるはめぐる (2)
|
| コンテスト | |
| ユーザー |
qzpm
|
| 提出日時 | 2015-06-27 00:08:24 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,402 bytes |
| コンパイル時間 | 1,051 ms |
| コンパイル使用メモリ | 54,104 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-07 19:29:41 |
| 合計ジャッジ時間 | 2,448 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 4 |
ソースコード
#include <iostream>
using namespace std;
int main(void){
int T,A,B;
cin >> T >> A >> B;
int x,y;
if(T < A || T < B){
cout << "NO" << endl;
}else{
cout << "YES" << endl;
x = y = 0;
int i = 0;
while(T - i){
if((A - x) + (B - y) == T - i){
if(A - x > 0){
x++;
cout << "^" << endl;
}else{
y++;
cout << ">" << endl;
}
}else if((A - x) + (B - y) > T - i){
cout << "^>" << endl;
x++;
y++;
}else if((A - x) == (B - y) == T - i){
cout << "^>" << endl;
x++;
y++;
}else if(A == x && B == y){
if(T == i + 2){
cout << "<" << endl;
y--;
}else{
cout << "<v" << endl;
x--;
y--;
}
}else{
if((A - x) + (B - y) == (T - i) - 1){
cout << "^<" << endl;
x++;
y--;
}else{
cout << "<" << endl;
y--;
}
}
i++;
}
//cout << x << " " << y << endl;
}
}
qzpm