链接:https://www.nowcoder.com/acm/contest/144/J来源:牛客网 skywalkert, the new legend of Beihang University ACM-ICPC Team, retired this year leaving a group of newbies again. Rumor has it that he left a heritage when he left, and only the one who has at lea…
Given a BST, transform it into greater sum tree where each node contains sum of all nodes greater than that node. 自己想的复杂了,其实就是一个反向的inorder.新的值就是前面所有元素的求和.…
R.java 文件内报错:Underscores can only be used with source level 1.7 or greater 网上查找后得知是Android工程图片资源命名的问题,具体参考http://black-tulip.blogcn.com/2012/08/android%E5%B7%A5%E7%A8%8B%E5%9B%BE%E7%89%87%E8%B5%84%E6%BA%90%E5%91%BD%E5%90%8D%E7%A6%81%E5%BF%8C/ Android…
题目链接:http://poj.org/problem?id=2407 Relatives Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13599 Accepted: 6772 Description Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers…