結果
| 問題 |
No.2856 Junk Market Game
|
| コンテスト | |
| ユーザー |
prin_kemkem
|
| 提出日時 | 2024-08-25 15:22:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 114 ms / 2,000 ms |
| コード長 | 798 bytes |
| コンパイル時間 | 290 ms |
| コンパイル使用メモリ | 82,784 KB |
| 実行使用メモリ | 81,456 KB |
| 最終ジャッジ日時 | 2024-08-25 15:22:42 |
| 合計ジャッジ時間 | 6,746 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 52 |
ソースコード
from collections import defaultdict, deque, Counter
# from functools import cache
# import copy
from itertools import combinations, permutations, product, accumulate, groupby, chain
# from more_itertools import distinct_permutations
from heapq import heapify, heappop, heappush
import math
import bisect
from pprint import pprint
from random import randint, shuffle, randrange
import sys
# sys.setrecursionlimit(200000)
input = lambda: sys.stdin.readline().rstrip('\n')
inf = float('inf')
mod1 = 10**9+7
mod2 = 998244353
def ceil_div(x, y): return -(-x//y)
#################################################
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
S = [a+b for a, b in zip(A, B)]
S.sort()
s = 0
for i in range(N):
s += S[2*i]
print(s-sum(B))
prin_kemkem