結果

問題 No.232 めぐるはめぐる (2)
ユーザー furafura
提出日時 2020-05-14 23:16:40
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 493 bytes
コンパイル時間 2,666 ms
コンパイル使用メモリ 197,308 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-14 08:51:55
合計ジャッジ時間 5,196 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	int t,a,b; scanf("%d%d%d",&t,&a,&b);

	if(max(a,b)>t) return puts("NO"),0;

	puts("YES");

	int y=0,x=0;
	if(max(a,b)%2!=t%2){
		if(a<=b) puts("^"), y++;
		else     puts(">"), x++;
		t--;
	}

	while(y<a || x<b){
		if(y<a && x<b) puts(">^"), y++, x++;
		else if(y<a)   puts("^"), y++;
		else if(x<b)   puts(">"), x++;
		t--;
	}
	while(t>0){
		puts("<");
		puts(">");
		t-=2;
	}

	return 0;
}
0