結果

問題 No.504 ゲーム大会(ランキング)
ユーザー HimatsubushinHimatsubushin
提出日時 2024-03-14 11:59:52
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 1,336 ms
コンパイル使用メモリ 27,904 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-03-14 11:59:56
合計ジャッジ時間 3,327 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,676 KB
testcase_01 AC 1 ms
6,676 KB
testcase_02 AC 1 ms
6,676 KB
testcase_03 AC 1 ms
6,676 KB
testcase_04 AC 1 ms
6,676 KB
testcase_05 AC 1 ms
6,676 KB
testcase_06 AC 1 ms
6,676 KB
testcase_07 AC 23 ms
6,676 KB
testcase_08 AC 24 ms
6,676 KB
testcase_09 AC 24 ms
6,676 KB
testcase_10 AC 23 ms
6,676 KB
testcase_11 AC 23 ms
6,676 KB
testcase_12 AC 20 ms
6,676 KB
testcase_13 AC 20 ms
6,676 KB
testcase_14 AC 23 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>

int main(void) {
	int i, n, p1, p2, r = 1, h[100001];

	scanf("%d", &n);
	scanf("%d", &p1);

	h[0] = 1;
	for (i = 1; i < n; i++) {
		scanf("%d", &p2);
		if (p1 < p2)
			r++;
		h[i] = r;
	}

	for (i = 0; i < n; i++)
		printf("%d\n", h[i]);

	return EXIT_SUCCESS;
}
0