"传送门" 题意: 给出一颗有根树,每个结点有一个权值$a_i,1\leq a_i\leq 10^9$;同时,每个结点有一个值$c_i$,表示其子树中有多少个结点,满足$a_j include include include include include include include inclu ...
分类:
其他好文 时间:
2020-01-30 00:00:30
阅读次数:
129
Given two sets of integers, the similarity of the sets is defined to be /, where N?c?? is the number of distinct common numbers shared by the two sets ...
分类:
其他好文 时间:
2020-01-29 21:54:49
阅读次数:
84
String.format()字符串常规类型格式化的两种重载方式 format(String format, Object… args) 新字符串使用本地语言环境,制定字符串格式和参数生成格式化的新字符串。 format(Locale locale, String format, Object… a ...
分类:
其他好文 时间:
2020-01-29 14:09:29
阅读次数:
102
Garland题意题解代码Numbers on Tree题意题解代码Garland题目链接 http://codeforces.com/contest/1286/problem/A题意给出一串灯泡,灯泡上编号为 1~n 的一个排列,其中一些灯泡掉落。定义整串的权值为相邻灯泡编号奇偶不同的对数,求放回... ...
分类:
其他好文 时间:
2020-01-28 23:36:10
阅读次数:
134
You are given an undirected graph consisting of nn vertices and mm edges. Your task is to find the number of connected components which are cycles. He ...
分类:
其他好文 时间:
2020-01-28 19:13:14
阅读次数:
152
函数的四种调用方式 函数有下列调用模式 函数调用模式 方法调用模式 构造器模式 上下文模式 1. 函数调用 模式 要调用,就肯定要先定义,函数的定义方式: 声明式: function fuc() {} 表达式式: var func = function() {}; Function: new Fun ...
分类:
其他好文 时间:
2020-01-28 00:06:43
阅读次数:
101
题目内容 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would ha ...
分类:
其他好文 时间:
2020-01-27 19:08:41
阅读次数:
65
一、显示行号 在PyCharm 里,显示行号有两种办法: 1、临时设置。右键单击行号处,选择 Show Line Numbers 但是这种方法,只对一个文件有效,并且,重启PyCharm 后消失 2,永久设置。File --> Settings -->Editor -->Appearance , 之 ...
分类:
其他好文 时间:
2020-01-27 17:31:52
阅读次数:
58
Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specification: Each input file contains ...
分类:
其他好文 时间:
2020-01-27 17:28:02
阅读次数:
71
1008 Elevator (20分) 题目: The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote ...
分类:
其他好文 时间:
2020-01-26 23:53:52
阅读次数:
68