結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー kuuso1kuuso1
提出日時 2016-05-22 17:05:59
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 169 ms / 1,000 ms
コード長 1,185 bytes
コンパイル時間 1,082 ms
コンパイル使用メモリ 108,928 KB
実行使用メモリ 44,572 KB
最終ジャッジ日時 2024-04-16 12:18:08
合計ジャッジ時間 10,385 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
19,328 KB
testcase_01 AC 31 ms
19,200 KB
testcase_02 AC 32 ms
19,328 KB
testcase_03 AC 158 ms
43,776 KB
testcase_04 AC 169 ms
44,372 KB
testcase_05 AC 164 ms
44,220 KB
testcase_06 AC 166 ms
44,572 KB
testcase_07 AC 163 ms
44,380 KB
testcase_08 AC 164 ms
44,160 KB
testcase_09 AC 165 ms
44,396 KB
testcase_10 AC 166 ms
44,160 KB
testcase_11 AC 167 ms
43,520 KB
testcase_12 AC 162 ms
43,392 KB
testcase_13 AC 163 ms
43,904 KB
testcase_14 AC 164 ms
43,648 KB
testcase_15 AC 164 ms
43,392 KB
testcase_16 AC 161 ms
43,392 KB
testcase_17 AC 160 ms
43,152 KB
testcase_18 AC 160 ms
42,440 KB
testcase_19 AC 160 ms
43,648 KB
testcase_20 AC 158 ms
42,880 KB
testcase_21 AC 157 ms
43,136 KB
testcase_22 AC 158 ms
42,752 KB
testcase_23 AC 157 ms
42,752 KB
testcase_24 AC 161 ms
42,624 KB
testcase_25 AC 158 ms
42,752 KB
testcase_26 AC 156 ms
42,880 KB
testcase_27 AC 154 ms
43,008 KB
testcase_28 AC 153 ms
43,008 KB
testcase_29 AC 155 ms
43,136 KB
testcase_30 AC 155 ms
43,008 KB
testcase_31 AC 153 ms
42,752 KB
testcase_32 AC 152 ms
42,752 KB
testcase_33 AC 151 ms
43,776 KB
testcase_34 AC 152 ms
43,520 KB
testcase_35 AC 155 ms
43,520 KB
testcase_36 AC 152 ms
43,392 KB
testcase_37 AC 150 ms
43,392 KB
testcase_38 AC 150 ms
43,520 KB
testcase_39 AC 149 ms
43,264 KB
testcase_40 AC 151 ms
43,392 KB
testcase_41 AC 33 ms
19,200 KB
testcase_42 AC 33 ms
19,456 KB
testcase_43 AC 34 ms
19,328 KB
testcase_44 AC 45 ms
21,740 KB
testcase_45 AC 44 ms
21,560 KB
testcase_46 AC 45 ms
21,444 KB
testcase_47 AC 128 ms
42,624 KB
testcase_48 AC 135 ms
42,240 KB
testcase_49 AC 134 ms
42,496 KB
testcase_50 AC 166 ms
40,604 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		
		var D = new Dictionary<long,int>();
		for(int i=0;i<N;i++){
			if(!D.ContainsKey(A[i]))D.Add(A[i],0);
			D[A[i]]++;
		}
		
		Console.WriteLine(String.Join(" ",B.Select(x=> D.ContainsKey(x)?D[x]:0).ToArray()));
		
		
		
	}
	int N,M;
	long[] A,B;
	public Sol(){
		var d = ria();
		N = d[0];
		M = d[1];
		A = rla();
		B = rla();
	}

	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);}
	static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));}
	static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));}
	static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));}
}
0