摘要: 题意:给一个二分图,存在重边,求使各点度数至少为k(0<=k<=min(d[i]))的最小边集合。 分析:首先建立一个源点s向二分图左边连边,建立一个汇点e,所有二分图右边的点向e点连边。要使每个点的度数大于等于k,可使流过每个点的流量小于等于d[i]-k。(d[i]为每个点的度数),就可以在建立源 阅读全文
posted @ 2018-05-02 21:03 zhang_upstar 阅读(445) 评论(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 阅读(221) 评论(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 阅读(183) 评论(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 阅读(753) 评论(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 阅读(692) 评论(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 阅读(473) 评论(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 阅读(566) 评论(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 阅读(462) 评论(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 阅读(336) 评论(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 阅读(235) 评论(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 阅读(240) 评论(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 阅读(245) 评论(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 阅读(593) 评论(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 阅读(206) 评论(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 阅读(320) 评论(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 阅读(359) 评论(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 阅读(4296) 评论(0) 推荐(0) 编辑