• + 0 comments

    for those who are getting wrong answer for cpp code multiply 1ll when adding to ans variable long long ans = 0; for(auto v : mp){ ans += 1ll * v.second * (v.second-1); }