結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー kotamanegi
提出日時 2016-05-22 00:36:36
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 826 bytes
コンパイル時間 871 ms
コンパイル使用メモリ 95,452 KB
実行使用メモリ 14,760 KB
最終ジャッジ日時 2024-10-07 05:36:18
合計ジャッジ時間 5,439 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 TLE * 1 -- * 35
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:31:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   31 |         scanf("%d%d", &n, &m);
      |         ~~~~~^~~~~~~~~~~~~~~~
main.cpp:34:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   34 |                 scanf("%lld", &hogw);
      |                 ~~~~~^~~~~~~~~~~~~~~
main.cpp:39:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   39 |                 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>
#include <unordered_map>
using namespace std;
#define MAX_MOD 1000000007
#define REP(i,n) for(int i = 0;i < n;++i)
unordered_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