結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー Kmcode1Kmcode1
提出日時 2016-05-22 00:44:51
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 995 bytes
コンパイル時間 1,129 ms
コンパイル使用メモリ 104,448 KB
実行使用メモリ 13,712 KB
最終ジャッジ日時 2024-04-16 11:44:35
合計ジャッジ時間 5,636 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 85 ms
8,320 KB
testcase_04 WA -
testcase_05 AC 88 ms
8,344 KB
testcase_06 WA -
testcase_07 AC 85 ms
8,468 KB
testcase_08 AC 103 ms
8,340 KB
testcase_09 AC 82 ms
8,340 KB
testcase_10 AC 86 ms
8,468 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 86 ms
8,468 KB
testcase_14 AC 101 ms
8,340 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:46:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   46 |                 scanf("%d", &a);
      |                 ~~~~~^~~~~~~~~~
main.cpp:55:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   55 |                 scanf("%d", &b);
      |                 ~~~~~^~~~~~~~~~

ソースコード

diff #

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cctype>
#include<cstdlib>
#include<algorithm>
#include<bitset>
#include<cstdio>
#include<cstring>
#include<string>
#include<cctype>
#include<cstdlib>
#include<algorithm>
#include<bitset>
#include<vector>
#include<list>
#include<deque>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cmath>
#include<sstream>
#include<fstream>
#include<iomanip>
#include<ctime>
#include<complex>
#include<functional>
#include<climits>
#include<cassert>
#include<iterator>
#include<unordered_map>
using namespace std;

unordered_map<int, int> mp;

int n;
int m;

vector<int> v;
int main(){
	cin >> n >> m;
	for (int i = 0; i < n; i++){
		int a;
		scanf("%d", &a);
		v.push_back(a);
	}
	random_shuffle(v.begin(), v.end());
	for (int i = 0; i < v.size(); i++){
		mp[v[i]]++;
	}
	for (int i = 0; i < n; i++){
		int b;
		scanf("%d", &b);
		if (i){
			printf(" ");
		}
		printf("%d", mp[b]);
	}
	puts("");
	return 0;
}
0