日期:2014-05-17 浏览次数:20729 次
Dictionary<string, string> dic1,Dictionary<string, string> dic2
private bool IsHaveSame(Dictionary<string, string> dic1,Dictionary<string, string> dic2)
{
foreach (string value in dic1.Values)
{
if (value.Length > 0 && dic2.ContainsValue(value))//3162ms
//if (dic2.ContainsValue(value))//248ms
{
return true;
}
}
return false;
}
for (int i = 0; i < 5000 - 1; i++)
{
for (int j = i + 1; j < 5000; j++)
{
if (IsHaveSame(dic1,dic2))
{
}
}
}