結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー kotamanegikotamanegi
提出日時 2016-05-22 00:34:21
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 92 ms / 1,000 ms
コード長 791 bytes
コンパイル時間 876 ms
コンパイル使用メモリ 89,916 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2024-04-16 11:31:21
合計ジャッジ時間 7,074 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 77 ms
9,856 KB
testcase_04 AC 85 ms
9,856 KB
testcase_05 AC 85 ms
9,856 KB
testcase_06 AC 85 ms
9,728 KB
testcase_07 AC 86 ms
9,728 KB
testcase_08 AC 84 ms
9,728 KB
testcase_09 AC 85 ms
9,856 KB
testcase_10 AC 83 ms
9,856 KB
testcase_11 AC 85 ms
9,728 KB
testcase_12 AC 84 ms
9,728 KB
testcase_13 AC 82 ms
9,856 KB
testcase_14 AC 79 ms
9,728 KB
testcase_15 AC 80 ms
9,728 KB
testcase_16 AC 86 ms
9,856 KB
testcase_17 AC 85 ms
9,856 KB
testcase_18 AC 81 ms
9,728 KB
testcase_19 AC 92 ms
9,856 KB
testcase_20 AC 85 ms
9,856 KB
testcase_21 AC 82 ms
9,728 KB
testcase_22 AC 81 ms
9,856 KB
testcase_23 AC 80 ms
9,856 KB
testcase_24 AC 81 ms
9,856 KB
testcase_25 AC 80 ms
9,984 KB
testcase_26 AC 78 ms
9,728 KB
testcase_27 AC 78 ms
9,856 KB
testcase_28 AC 75 ms
9,728 KB
testcase_29 AC 76 ms
9,984 KB
testcase_30 AC 75 ms
9,856 KB
testcase_31 AC 75 ms
9,856 KB
testcase_32 AC 75 ms
9,984 KB
testcase_33 AC 76 ms
9,856 KB
testcase_34 AC 76 ms
9,728 KB
testcase_35 AC 72 ms
9,856 KB
testcase_36 AC 70 ms
9,728 KB
testcase_37 AC 68 ms
9,856 KB
testcase_38 AC 69 ms
9,728 KB
testcase_39 AC 66 ms
9,728 KB
testcase_40 AC 68 ms
9,600 KB
testcase_41 AC 1 ms
5,376 KB
testcase_42 AC 2 ms
5,376 KB
testcase_43 AC 1 ms
5,376 KB
testcase_44 AC 7 ms
5,376 KB
testcase_45 AC 7 ms
5,376 KB
testcase_46 AC 7 ms
5,376 KB
testcase_47 AC 72 ms
7,424 KB
testcase_48 AC 80 ms
7,808 KB
testcase_49 AC 83 ms
7,808 KB
testcase_50 AC 41 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:30:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   30 |         scanf("%d%d", &n, &m);
      |         ~~~~~^~~~~~~~~~~~~~~~
main.cpp:33:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   33 |                 scanf("%lld", &hogw);
      |                 ~~~~~^~~~~~~~~~~~~~~
main.cpp:38:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   38 |                 scanf("%lld", &b);
      |                 ~~~~~^~~~~~~~~~~~

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream> 
#include<map>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <iomanip>
#include <cstdint>
using namespace std;
#define MAX_MOD 1000000007
#define REP(i,n) for(int i = 0;i < n;++i)
map<long long, int> hoge;
int main() {
	int n, m;
	scanf("%d%d", &n, &m);
	for (int i = 0;i < n;++i) {
		long long hogw = 0;
		scanf("%lld", &hogw);
		hoge[hogw]++;
	}
	for (int i = 0;i < m;++i) {
		long long b = 0;
		scanf("%lld", &b);
		printf("%d ", hoge[b]);
	}

}
0