結果
| 問題 |
No.232 めぐるはめぐる (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-25 01:23:48 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 751 bytes |
| コンパイル時間 | 2,048 ms |
| コンパイル使用メモリ | 193,992 KB |
| 最終ジャッジ日時 | 2025-01-07 14:53:29 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 8 WA * 14 |
ソースコード
#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&&y%2!=t%2) {
cout<<'^'<<endl;
y--;
t--;
}
while (t) {
if (x%2==t%2) {
if (x==-1) {
cout<<'<';
x++;
} else {
cout<<'>';
x--;
}
}
if (y%2==t%2) {
if (y==-1) {
cout<<'v';
y++;
} else {
cout<<'^';
y--;
}
}
cout<<endl;
t--;
}
return 0;
}