結果

問題 No.232 めぐるはめぐる (2)
ユーザー vain0vain0
提出日時 2015-06-26 23:40:57
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,523 bytes
コンパイル時間 637 ms
コンパイル使用メモリ 75,792 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-22 01:45:17
合計ジャッジ時間 3,863 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
4,380 KB
testcase_01 AC 127 ms
4,376 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 WA -
testcase_09 AC 2 ms
4,380 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 2 ms
4,376 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cassert>
#include <functional>
#include <set>
#include <ctime>
#include <cmath>
#include <climits>
#include <cstring>
#include <string>
#include <queue>
#include <map>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#ifndef ONLINE_JUDGE //POJ
# include <complex>
# include <random>
# include <array>
# define mkt make_tuple
# define empb emplace_back
#endif
#ifdef _LOCAL
# include "for_local.h"
#endif
using namespace std;
typedef unsigned int uint; typedef long long ll; typedef unsigned long long ull;
#define repi(_I, _B, _E) for(int _I = (_B); (_I) < (_E); ++ (_I))
#define rep(_I, _N) for(int _I = 0; (_I) < (_N); ++ (_I))
#define mkp make_pair
#define all(_X) (_X).begin(), (_X).end()

int t, a, b;

signed main() {
	cin >> t >> a >> b;

	int mi = min(a, b);
	int ma = max(a, b);
	int u = t - ma;
	int c = u / 4;
	int d = u % 4;
	int e = 0;
	if ( d == 1 ) {
		c -= 1;
		e += 1;
	}

	if ( u >= 0 && c >= 0 ) {
		cout << "YES" << endl;
		rep(_, mi) {
			cout << "^>" << endl;
		}
		rep(_, a - mi) {
			cout << ">" << endl;
		}
		rep(_, b - mi) {
			cout << "^" << endl;
		}
		rep(_, c) {
			cout << "<" << endl << "v" << endl << ">" << endl << "^" << endl;
		}
		switch ( d ) {
			case 0: break;
			case 2: cout << "<" << endl << ">" << endl; break;
			case 3: cout << "<" << endl << ">v" << endl << "^" << endl; break;
		}
		rep(_, e) {
			cout << "<" << endl << "v" << endl << ">" << endl << "<^" << endl << ">" << endl;
		}

	} else {
		cout << "NO" << endl;
	}
	return 0;
}
0