結果
| 問題 |
No.8016 unordered_mapなるたけ落とすマン
|
| ユーザー |
Kmcode1
|
| 提出日時 | 2016-05-22 00:48:47 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 946 bytes |
| コンパイル時間 | 897 ms |
| コンパイル使用メモリ | 106,680 KB |
| 実行使用メモリ | 7,960 KB |
| 最終ジャッジ日時 | 2024-10-07 05:43:56 |
| 合計ジャッジ時間 | 5,773 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 47 TLE * 1 |
コンパイルメッセージ
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);
| ~~~~~^~~~~~~~~~~~
ソースコード
#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;
}
Kmcode1