結果

問題 No.232 めぐるはめぐる (2)
ユーザー aaaaaaiu
提出日時 2019-08-25 01:14:25
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 694 bytes
コンパイル時間 1,992 ms
コンパイル使用メモリ 192,344 KB
最終ジャッジ日時 2025-01-07 14:53:15
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int t,y,x;
    cin>>t>>y>>x;
    if (t<y||t<x||t==1&&y==0&&x==0) {
        puts("NO");
        return 0;
    }
    puts("YES");
    if (x%2!=t%2) {
        cout<<'^'<<endl;
        y--;
        t--;
    }
    if (y%2!=t%2) {
        cout<<'>'<<endl;
        x--;
        t--;
    }
    while (t) {
        if (x==-1) {
            cout<<'<';
            x++;
        } else {
            cout<<'>';
            x--;
        }
        if (y==-1) {
            cout<<'v';
            y++;
        } else {
            cout<<'^';
            y--;
        }
        cout<<endl;
        t--;
    }
    return 0;
}
0