随笔分类 -  基础

摘要:题目描述: Every superhero has been given a power value by the Felicity Committee. The avengers crew wants to maximize the average power of the superheroes 阅读全文
posted @ 2019-02-06 00:49 lu_nacy 阅读(293) 评论(0) 推荐(0)
摘要:题目描述 题目描述 We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A sup 阅读全文
posted @ 2019-02-04 23:38 lu_nacy 阅读(283) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/331/J来源:牛客网小希最近想知道一个东西,就是A+B=A|B(其中|为按位或)的二元组有多少个。 当然,直接做这个式子对小希来说太难了,所以小希改变了一些条件,她仅想知道其中A,B<NA,B<N的情况,其中N为2的幂次 阅读全文
posted @ 2019-02-01 23:30 lu_nacy 阅读(158) 评论(0) 推荐(0)
摘要:Consider a positive integer N written in standard notation with k+1 digits a​i​​ as a​k​​⋯a​1​​a​0​​ with 0≤a​i​​<10 for all i and a​k​​>0. Then N is 阅读全文
posted @ 2018-12-08 19:23 lu_nacy 阅读(151) 评论(0) 推荐(0)
摘要:The "travelling salesman problem" asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shor 阅读全文
posted @ 2018-12-06 09:29 lu_nacy 阅读(381) 评论(0) 推荐(0)
摘要:A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each inp 阅读全文
posted @ 2018-11-30 21:52 lu_nacy 阅读(141) 评论(0) 推荐(0)
摘要:基本操作 (1)头文件#include<vector>. (2)创建vector对象,vector<int> vec; (3)尾部插入数字:vec.push_back(a); (4)使用下标访问元素,cout<<vec[0]<<endl;记住下标是从0开始的。 (5)使用迭代器访问元素. vecto 阅读全文
posted @ 2018-05-22 21:59 lu_nacy 阅读(408) 评论(0) 推荐(0)