結果
問題 |
No.8016 unordered_mapなるたけ落とすマン
|
ユーザー |
![]() |
提出日時 | 2016-05-22 00:34:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 87 ms / 1,000 ms |
コード長 | 791 bytes |
コンパイル時間 | 881 ms |
コンパイル使用メモリ | 91,704 KB |
実行使用メモリ | 9,984 KB |
最終ジャッジ日時 | 2024-10-07 05:19:52 |
合計ジャッジ時間 | 6,984 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 48 |
コンパイルメッセージ
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); | ~~~~~^~~~~~~~~~~~
ソースコード
#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]); } }