結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー hogeover30hogeover30
提出日時 2016-05-22 02:04:34
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 552 bytes
コンパイル時間 1,930 ms
コンパイル使用メモリ 166,136 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-16 12:04:31
合計ジャッジ時間 6,239 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
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 AC 51 ms
5,376 KB
testcase_17 AC 51 ms
5,504 KB
testcase_18 AC 51 ms
5,376 KB
testcase_19 AC 50 ms
5,376 KB
testcase_20 AC 50 ms
5,376 KB
testcase_21 AC 50 ms
5,376 KB
testcase_22 AC 50 ms
5,376 KB
testcase_23 AC 50 ms
5,376 KB
testcase_24 AC 50 ms
5,376 KB
testcase_25 AC 49 ms
5,376 KB
testcase_26 AC 49 ms
5,376 KB
testcase_27 AC 48 ms
5,376 KB
testcase_28 AC 49 ms
5,376 KB
testcase_29 AC 49 ms
5,376 KB
testcase_30 AC 49 ms
5,376 KB
testcase_31 AC 49 ms
5,376 KB
testcase_32 AC 48 ms
5,376 KB
testcase_33 AC 47 ms
5,376 KB
testcase_34 AC 48 ms
5,376 KB
testcase_35 AC 47 ms
5,376 KB
testcase_36 AC 47 ms
5,376 KB
testcase_37 AC 47 ms
5,376 KB
testcase_38 AC 47 ms
5,376 KB
testcase_39 AC 47 ms
5,376 KB
testcase_40 AC 47 ms
5,504 KB
testcase_41 AC 2 ms
5,376 KB
testcase_42 AC 2 ms
5,376 KB
testcase_43 AC 2 ms
5,376 KB
testcase_44 AC 6 ms
5,376 KB
testcase_45 AC 6 ms
5,376 KB
testcase_46 AC 6 ms
5,376 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
//using namespace std;int main(){long n,a;map<long,int>r;for(cin>>n>>a;cin>>a;--n<0?cout<<r[a]<<' ',0:++r[a]);}
using namespace std;

long a[100010], c[100010];

int main()
{
    int n, m; scanf("%d%d", &n, &m);
    for(int i=0; i<n; ++i) scanf("%d", a+i);
    sort(a, a+n);
    int k=0;
    ++c[k];
    for(int i=1; i<n; ++i) ++c[k+=a[i]!=a[i-1]];
    n=unique(a, a+n)-a;

    for(int i=0; i<m; ++i) {
        long b; scanf("%ld", &b);
        int p=lower_bound(a, a+n, b)-a;
        printf("%d ", a[p]==b ? c[p] : 0);
    }
}
0