結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-16 00:10:45 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 381 bytes |
| コンパイル時間 | 386 ms |
| コンパイル使用メモリ | 82,336 KB |
| 実行使用メモリ | 66,984 KB |
| 最終ジャッジ日時 | 2025-04-16 00:12:21 |
| 合計ジャッジ時間 | 2,756 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 23 |
ソースコード
import sys
from collections import defaultdict
def main():
n = int(sys.stdin.readline())
a = list(map(int, sys.stdin.readline().split()))
count_map = defaultdict(int)
for num in a:
count_map[num] += 1
ans = 0
for num in a:
target = num ^ 1
ans += count_map.get(target, 0)
print(ans // 2)
if __name__ == "__main__":
main()
lam6er