結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー Kmcode1Kmcode1
提出日時 2016-05-22 00:48:47
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 946 bytes
コンパイル時間 833 ms
コンパイル使用メモリ 107,452 KB
実行使用メモリ 14,396 KB
最終ジャッジ日時 2024-04-16 11:47:02
合計ジャッジ時間 4,966 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 TLE -
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:47:27: warning: format ‘%lld’ expects argument of type ‘long long int*’, but argument 2 has type ‘int*’ [-Wformat=]
   47 |                 scanf("%lld", &a);
      |                        ~~~^   ~~
      |                           |   |
      |                           |   int*
      |                           long long int*
      |                        %d
main.cpp:52:27: warning: format ‘%lld’ expects argument of type ‘long long int*’, but argument 2 has type ‘int*’ [-Wformat=]
   52 |                 scanf("%lld", &b);
      |                        ~~~^   ~~
      |                           |   |
      |                           |   int*
      |                           long long int*
      |                        %d
main.cpp:47:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   47 |                 scanf("%lld", &a);
      |                 ~~~~~^~~~~~~~~~~~
main.cpp:52:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   52 |                 scanf("%lld", &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<long long int, long long int> mp;

int n;
int m;

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