拿map存一下每个数出现的次数,扫一遍map即可
你是一名数据科学家,正在分析一份长度为 n 的观测序列。序列中的每个元素都是一个正整数。
定义“特殊值”为:本身是奇数,且在整个序列中出现的总次数也为奇数。请你求出所有特殊值在序列中出现的总次数。
序列长度 n 不超过 2×105,每个元素的值不超过 109。
In following contests:
By signing up a CodeFun2000 universal account, you can submit code and join discussions in all online judging services provided by us.