結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー kuuso1kuuso1
提出日時 2016-05-22 03:21:49
言語 C#(csc)
(csc 3.9.0)
結果
MLE  
実行時間 -
コード長 1,706 bytes
コンパイル時間 1,125 ms
コンパイル使用メモリ 116,480 KB
実行使用メモリ 57,252 KB
最終ジャッジ日時 2024-04-16 12:13:03
合計ジャッジ時間 19,871 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
18,176 KB
testcase_01 AC 28 ms
18,432 KB
testcase_02 AC 26 ms
18,048 KB
testcase_03 MLE -
testcase_04 MLE -
testcase_05 MLE -
testcase_06 MLE -
testcase_07 MLE -
testcase_08 MLE -
testcase_09 MLE -
testcase_10 MLE -
testcase_11 MLE -
testcase_12 MLE -
testcase_13 MLE -
testcase_14 MLE -
testcase_15 MLE -
testcase_16 MLE -
testcase_17 MLE -
testcase_18 MLE -
testcase_19 WA -
testcase_20 MLE -
testcase_21 MLE -
testcase_22 MLE -
testcase_23 AC 387 ms
41,728 KB
testcase_24 MLE -
testcase_25 MLE -
testcase_26 MLE -
testcase_27 MLE -
testcase_28 MLE -
testcase_29 MLE -
testcase_30 MLE -
testcase_31 MLE -
testcase_32 MLE -
testcase_33 MLE -
testcase_34 MLE -
testcase_35 MLE -
testcase_36 MLE -
testcase_37 MLE -
testcase_38 MLE -
testcase_39 MLE -
testcase_40 MLE -
testcase_41 AC 27 ms
18,304 KB
testcase_42 AC 26 ms
18,048 KB
testcase_43 AC 26 ms
18,048 KB
testcase_44 AC 58 ms
20,736 KB
testcase_45 AC 55 ms
20,596 KB
testcase_46 AC 55 ms
20,696 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 MLE -
testcase_50 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;
using System.Runtime.InteropServices;
class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		
		Dictionary<int,int> D = new Dictionary<int,int>();
		for(int i=0;i<N;i++){
			if(!D.ContainsKey(A[i].GetHashCode()))D.Add(A[i].GetHashCode(),0);
			D[A[i].GetHashCode()]++;
		}
		
		for(int i=0;i<M;i++){
			Console.Write(i==0?"{0}":" {0}",D.ContainsKey(B[i].GetHashCode())?D[B[i].GetHashCode()]:0);
		}
		Console.WriteLine();
		
		
		
	}
	int N,M;
	myLong[] A,B;
	public Sol(){
		var d = ria();
		N = d[0];
		M = d[1];
		A = new myLong[N];
		B = new myLong[M];
		String[] ss = rsa();
		for(int i=0;i<N;i++){
			A[i] = new myLong(long.Parse(ss[i]));
		}
		ss = rsa();
		for(int i=0;i<M;i++){
			B[i] = new myLong(long.Parse(ss[i]));
		}
	}
	
	struct myLong{
		public long X;
		public myLong(long x){
			X=x;
		}
		public override int GetHashCode(){
			return (int)((this.X%1000000007)^(this.X/1000000007));
		}
	}
	
	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