結果
| 問題 |
No.232 めぐるはめぐる (2)
|
| コンテスト | |
| ユーザー |
qzpm
|
| 提出日時 | 2015-06-27 00:00:07 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,093 bytes |
| コンパイル時間 | 393 ms |
| コンパイル使用メモリ | 54,812 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-07 19:24:38 |
| 合計ジャッジ時間 | 2,746 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 5 |
ソースコード
#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) == (T - i) - 1){
cout << "^<" << endl;
x++;
y--;
}else{
cout << "<" << endl;
y--;
}
}
i++;
}
}
}
qzpm