05 2018 档案

摘要:集合和容器都是Java中的容器。 区别 数组特点:大小固定,只能存储相同数据类型的数据 集合特点:大小可动态扩展,可以存储各种类型的数据 转换 数组转换为集合: Arrays.asList(数组) 示例: 集合转换为数组: 集合.toArray(); 示例: 阅读全文
posted @ 2018-05-03 10:05 zhang_upstar 阅读(273) 评论(0) 推荐(0)
摘要:题意:给一个二分图,存在重边,求使各点度数至少为k(0<=k<=min(d[i]))的最小边集合。 分析:首先建立一个源点s向二分图左边连边,建立一个汇点e,所有二分图右边的点向e点连边。要使每个点的度数大于等于k,可使流过每个点的流量小于等于d[i]-k。(d[i]为每个点的度数),就可以在建立源 阅读全文
posted @ 2018-05-02 21:03 zhang_upstar 阅读(479) 评论(0) 推荐(0)
摘要:题目链接: http://codeforces.com/contest/976/problem/E 题目: Recently Max has got himself into popular CCG “BrainStone”. As “BrainStone” is a pretty intellec 阅读全文
posted @ 2018-05-02 21:01 zhang_upstar 阅读(237) 评论(0) 推荐(0)
摘要:Degree Set time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Degree Set time limit per tes 阅读全文
posted @ 2018-05-02 20:57 zhang_upstar 阅读(197) 评论(0) 推荐(0)
摘要:Problem Statement Iroha is very particular about numbers. There are K digits that she dislikes: D1,D2,…,DK. She is shopping, and now paying at the cas 阅读全文
posted @ 2018-05-02 20:53 zhang_upstar 阅读(849) 评论(0) 推荐(0)
摘要:文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition) AtCoder - 1978 Problem Statement Iroha has a sequence of N strings S1,S2,…,SN. The length of each 阅读全文
posted @ 2018-05-02 20:52 zhang_upstar 阅读(704) 评论(0) 推荐(0)
摘要:和風いろはちゃんイージー / Iroha and Haiku (ABC Edition) AtCoder - 1977 Problem Statement Iroha loves Haiku. Haiku is a short form of Japanese poetry. A Haiku con 阅读全文
posted @ 2018-05-02 20:51 zhang_upstar 阅读(496) 评论(0) 推荐(0)
摘要:Problem Statement We have a large square grid with H rows and W columns. Iroha is now standing in the top-left cell. She will repeat going right or do 阅读全文
posted @ 2018-05-02 20:50 zhang_upstar 阅读(588) 评论(0) 推荐(0)
摘要:Problem Description Julyed is preparing for her CET-6. She has N words to remember, but there is only M days left. If she can’t remember all these wor 阅读全文
posted @ 2018-05-02 20:45 zhang_upstar 阅读(489) 评论(0) 推荐(0)
摘要:Little Q loves playing with different kinds of graphs very much. One day he thought about an interesting category of graphs called ``Cool Graph'', whi 阅读全文
posted @ 2018-05-02 20:38 zhang_upstar 阅读(349) 评论(0) 推荐(0)
摘要:Yi Sima was one of the best counselors of Cao Cao. He likes to play a funny game himself. It looks like the modern Sudoku, but smaller. Actually, Yi S 阅读全文
posted @ 2018-05-02 20:36 zhang_upstar 阅读(248) 评论(0) 推荐(0)
摘要:Alice and Bob is playing a game. Each of them has a number. Alice’s number is A, and Bob’s number is B. Each turn, one player can do one of the follow 阅读全文
posted @ 2018-05-02 20:34 zhang_upstar 阅读(264) 评论(0) 推荐(0)
摘要:Frog FZU - 2272 Therearex frogs and y chicken in a garden. Kim found there are n heads and m legs in the garden. Please tell Kim how many frogs and ch 阅读全文
posted @ 2018-05-02 20:29 zhang_upstar 阅读(257) 评论(0) 推荐(0)
摘要:阶乘除法 CSU - 1781 输入两个正整数 n, m,输出 n!/m!,其中阶乘定义为 n!= 1*2*3*...*n (n>=1)。 比如,若 n=6, m=3,则n!/m!=6!/3!=720/6=120。 是不是很简单?现在让我们把问题反过来:输入 k=n!/m!,找到这样的整数二元组(n 阅读全文
posted @ 2018-05-02 20:27 zhang_upstar 阅读(631) 评论(0) 推荐(0)
摘要:You are given a sequence a1, a2, ..., an of one-dimensional segments numbered 1through n. Your task is to find two distinct indices i and j such that 阅读全文
posted @ 2018-05-02 20:26 zhang_upstar 阅读(215) 评论(0) 推荐(0)
摘要:You might have heard about the next game in Lara Croft series coming out this year. You also might have watched its trailer. Though you definitely mis 阅读全文
posted @ 2018-05-02 20:24 zhang_upstar 阅读(344) 评论(0) 推荐(0)
摘要:String can be called correct if it consists of characters "0" and "1" and there are no redundant leading zeroes. Here are some examples: "0", "10", "1 阅读全文
posted @ 2018-05-02 20:23 zhang_upstar 阅读(375) 评论(0) 推荐(0)
摘要:1.改写comp从大到小排序。 运行结果: 233 113 23 13 3 什么会这样呢?比较时sort函数根据comp函数进行判断输的大小,系统默认 2.对结构体排序 比如ss结构体中a代表的是索引号,b代表的是索引对应的值,那么我想按索引排序,通过改写comp函数即可实现。 结果: 1 213  阅读全文
posted @ 2018-05-02 20:04 zhang_upstar 阅读(4355) 评论(0) 推荐(0)