01 2019 档案
摘要:Extended Traffic 题目链接:https://vjudge.net/problem/LightOJ-1074 Description: Dhaka city is getting crowded and noisy day by day. Certain roads always re
阅读全文
摘要:The Shortest Path in Nya Graph Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13070 Accepted Sub
阅读全文
摘要:0 or 1 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4370 Description: Given a n*n matrix Cij (1<=i,j<=n),We want to find a n*n matrix Xij (1<=i,j<=n
阅读全文
摘要:Layout 题目链接:http://poj.org/problem?id=3169 Description: Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N
阅读全文
摘要:F1. Pictures with Kittens (easy version) 题目链接:https://codeforces.com/contest/1077/problem/F1 题意: 给出n个数,以及k,x,k即长度为k的区间至少选一个,x的意思是一共要选x个,少一个或者多一个都不行。 选
阅读全文
摘要:E. Thematic Contests 题目链接:https://codeforces.com/contest/1077/problem/E 题意: 给出n个数,然后你可以规定一个基数x,第一次选x个相同的数出来,第二次选2*x出来,第三次选4*x个出来....问最后最多选多少个数出来。 题解:
阅读全文
摘要:D. Cutting Out 题目链接:https://codeforces.com/contest/1077/problem/D 题意: 给你n个数,现在要你选k个数出来,并且能够从这n个数种选取尽量多的这k个数。 题解: 一开始想的贪心+模拟,然后写崩了... 其实这个题二分一下选几组就好了,因
阅读全文
摘要:E. Binary Numbers AND Sum 题目链接:https://codeforces.com/contest/1066/problem/E 题意: 给出两个用二进制表示的数,然后将第二个二进制不断地往右边移一位,每次答案加上这两个的交集,求最后的答案。 题解: 考虑第二个二进制每一位对
阅读全文
摘要:B. Vitamins 题目链接:https://codeforces.com/contest/1042/problem/B 题意: 给出几种药,没种可能包含一种或多种(最多三种)维生素,现在问要吃到这三种维生素买药最少花费是多少。 题解: 嗯...可以直接暴力: #include <bits/st
阅读全文
摘要:D. Petya and Array 题目链接:https://codeforces.com/contest/1042/problem/D 题意: 给出n个数,问一共有多少个区间,满足区间和小于t。 题解: 假设目前区间右端点为r,左端点为l,那么由前缀和可得知:sumr-suml-1<t,然后我们
阅读全文
摘要:Codeforces Round #506 (Div. 3) 题目总链接:https://codeforces.com/contest/1029 A. Many Equal Substrings 题意: 给出长度为n的字符串,然后要求你添加一些字符,使得有k个这样的字符串。 题解: 直接暴力吧...
阅读全文
摘要:Codeforces Round #532 (Div. 2) 题目总链接:https://codeforces.com/contest/1100 A. Roman and Browser 题意: 给出由-1和1组成的n个数,现在任意选定一个起点,从起点开始向左向右k个k个地拿走。最后问abs(cnt
阅读全文
摘要:Educational Codeforces Round 58 (Rated for Div. 2) 题目总链接:https://codeforces.com/contest/1101 A. Minimum Integer 题意: 多组数据,给你三个数l,r,d,要求在区间[l,r]之外找一个最小的
阅读全文
摘要:F. Elongated Matrix 题目链接:https://codeforces.com/contest/1102/problem/F 题意: 给出一个n*m的矩阵,现在可以随意交换任意的两行,最后从上到下,从左到右形成一个序列s1,s2.....snm,满足对于任意相邻的两个数,它们差的绝对
阅读全文
摘要:Codeforces Round #531 (Div. 3) 题目总链接:https://codeforces.com/contest/1102 A. Integer Sequence Dividing 题意: 给一个数n,然后要求你把1,2.....n分为两个集合,使得两个集合里面元素的和的差的绝
阅读全文
摘要:The Maximum Number of Strong Kings 题目链接:http://poj.org/problem?id=2699 Description: A tournament can be represented by a complete graph in which each
阅读全文
摘要:Budget 题目链接:http://poj.org/problem?id=2396 Description: We are supposed to make a budget proposal for this multi-site competition. The budget proposal
阅读全文
摘要:Ombrophobic Bovines Time Limit: 1000MSMemory Limit: 65536K Total Submissions: 21660Accepted: 4658 题目链接:http://poj.org/problem?id=2391 Description: FJ'
阅读全文
摘要:Sightseeing tour 题目链接:http://poj.org/problem?id=1637 Description: The city executive board in Lund wants to construct a sightseeing tour by bus in Lun
阅读全文
摘要:Cops and Thieves Description: The Galaxy Police (Galaxpol) found out that a notorious gang of thieves has plans for stealing an extremely valuable exh
阅读全文
摘要:44. Wildcard Matching 题目链接:https://leetcode.com/problems/wildcard-matching/ Description: Given an input string (s) and a pattern (p), implement wildca
阅读全文
摘要:Wpremig和Jhadgre的藏宝图 题目链接:https://ac.nowcoder.com/acm/contest/333/M Description: Jhadgre在生日那天收到了一张神秘的藏宝图,于是他决定和Wpremig分享这张藏宝图,并且去寻宝! 这张藏宝图上总共有N行,每行有M个格
阅读全文
摘要:E.Easy Problem Description: Zghh likes number, but he doesn't like writing problem description. So he will just give you a problem instead of telling
阅读全文
摘要:Dandan's lunch Description: As everyone knows, there are now n people participating in the competition. It was finally lunch time after 3 hours of the
阅读全文
摘要:45. Jump Game II 题目链接:https://leetcode.com/problems/jump-game-ii/ Description: Given an array of non-negative integers, you are initially positioned a
阅读全文
摘要:42. Trapping Rain Water 题目链接:https://leetcode.com/problems/trapping-rain-water/ Description: Given n non-negative integers representing an elevation m
阅读全文
摘要:41. First Missing Positive 题目链接:https://leetcode.com/problems/first-missing-positive/ Description: Given an unsorted integer array, find the smallest
阅读全文
摘要:4. Median of Two Sorted Arrays 题目链接:https://leetcode.com/problems/median-of-two-sorted-arrays/ Description: There are two sorted arrays nums1 and nums
阅读全文
摘要:Good Bye 2018! 题目链接:https://codeforces.com/contest/1091 A. New Year and the Christmas Ornament 题意: 给出三堆数量分别为y,b,r的东西,现在要你从三堆中各选一堆,满足y'+1=b'且b'+1=r' (y
阅读全文
摘要:题目总链接:https://codeforces.com/contest/1096 A. Find Divisible 题意: 给出l,r,在[l,r]里面找两个数x,y,使得y%x==0,保证有解。 题解: 直接输出l,2*l就好啦,但我还是写了个循环... 代码如下: #include <bit
阅读全文
摘要:题目总链接:https://codeforces.com/contest/1095 A. Repeating Cipher 题意: 给出一个字符串,然后将其“收缩”,不断地将连续的一个、两个只变为一个,问最终的字符串是什么。 题解: 模拟一下就好了。 代码如下: #include <bits/std
阅读全文