摘要: 题目: Given 2 integers u and v, find the shortest array such that bitwise xor of its elements is u, and the sum of its elements is v. Input The only lin 阅读全文
posted @ 2020-03-15 14:30 AC_沫离 阅读(127) 评论(0) 推荐(0)
摘要: 题目: You are given a tree consisting of n nodes. You want to write some labels on the tree's edges such that the following conditions hold: Every label 阅读全文
posted @ 2020-03-15 14:06 AC_沫离 阅读(178) 评论(0) 推荐(0)
摘要: 题目: Ehab has an array a of length n. He has just enough free time to make a new array consisting of n copies of the old array, written back to back. W 阅读全文
posted @ 2020-03-15 13:07 AC_沫离 阅读(331) 评论(0) 推荐(0)
摘要: 题目: You are given a positive integer x. Find any such 2 positive integers a and b such that GCD(a,b)+LCM(a,b)=x. As a reminder, GCD(a,b) is the greate 阅读全文
posted @ 2020-03-15 12:50 AC_沫离 阅读(228) 评论(0) 推荐(0)