摘要: #Description>你有$n$个整数$A_{i}$和$n$个整数$B_{i}$。你需要把它们配对,即每个$A_{i}$恰好对应一 个$Bp_{i}$。要求所有配对的整数差的绝对值之和尽量小,但不允许两个相同的数配对。例如$A=\lbrace 5,6,8 \rbrace$,$B=\lbrace ... 阅读全文
posted @ 2015-04-05 22:28 lmxyy 阅读(173) 评论(0) 推荐(0) 编辑
摘要: #Description>Given $n$, calculate the sum $LCM(1,n) + LCM(2,n) + \cdots + LCM(n,n)$, where $LCM(i,n)$ denotes the Least Common Multiple of the integer... 阅读全文
posted @ 2015-04-05 20:43 lmxyy 阅读(137) 评论(0) 推荐(0) 编辑