結果
| 問題 |
No.232 めぐるはめぐる (2)
|
| コンテスト | |
| ユーザー |
purple_jwl
|
| 提出日時 | 2015-07-05 21:44:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,108 bytes |
| コンパイル時間 | 1,536 ms |
| コンパイル使用メモリ | 161,220 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-07 23:06:45 |
| 合計ジャッジ時間 | 3,644 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 4 |
ソースコード
#include <bits/stdc++.h>
#define REP(i, x, n) for(int i = x; i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define F first
#define S second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
int main() {
int t, a, b;
cin >> t >> a >> b;
if(min(a, b) + abs(a - b) > t) {
cout << "NO" << endl;
}
else {
int v = t - min(a, b) - abs(a - b);
if(v == 1) {
cout << "NO" << endl;
}
else {
cout << "YES" << endl;
rep(i, min(a, b) - 1) {
cout << "^>" << endl;
}
if(min(a, b) != 0) {
if(v % 2) {
cout << "^" << endl;
cout << ">" << endl;
v--;
}
else {
cout << "^>" << endl;
}
}
rep(i, abs(a - b)) {
if(a > b) cout << "^" << endl;
else cout << ">" << endl;
}
if(v % 2) {
cout << "<v" << endl;
cout << ">" << endl;
cout << "^" << endl;
v -= 3;
}
rep(i, v) {
if(i % 2) cout << "<" << endl;
else cout << ">" << endl;
}
}
}
return 0;
}
purple_jwl