結果

問題 No.232 めぐるはめぐる (2)
ユーザー akakimidoriakakimidori
提出日時 2015-07-27 19:29:10
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 448 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 23,696 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-23 04:03:22
合計ジャッジ時間 2,789 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<stdio.h>

int main(void){
	int t,a,b;
	scanf("%d%d%d",&t,&a,&b);
	if(t>=a && t>=b){
		printf("YES\n");
		while(a>1 && b>1){
			printf("^>\n");
			a--;
			b--;
			t--;
		}
		while(a>1){
			printf("^\n");
			a--;
			t--;
		}
		while(b>1){
			printf(">\n");
			b--;
			t--;
		}
		while(t>1){
			printf("%c\n",b?'>':'<');
			b=(b==0);
			t--;
		}
		printf("^");
		if(b) printf(">");
		printf("\n");
	} else {
		printf("NO\n");
	}
	return 0;
}
0