結果

問題 No.1032 数数え
ユーザー crossick_lovecrossick_love
提出日時 2021-02-24 16:02:29
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 275 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 31,760 KB
実行使用メモリ 8,200 KB
最終ジャッジ日時 2023-10-24 22:01:07
合計ジャッジ時間 4,791 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>
int main(void) {
	int a,b;
	int count=0;
	scanf("%d %d",&a,&b);
	int ar[a];
	for(int i=0;i<a;i++){
		scanf("%d",&ar[i]);
	}
	for(int k=1;k<=b;k++){
		count=0;
		for(int i=0;i<a;i++){
			if(ar[i]==k){
			count++;
			}
		}
		printf("%d %d\n",k,count);		
	}
}
0