
补题+题解 | 总结
YOONGI
这个作者很懒,什么都没留下…
展开
-
NYIST--2018大一新生第一次周赛题解
比赛链接:https://cn.vjudge.net/contest/261258 密码:nyist A - Thickest Burger 厚的肉排乘2加上薄的肉排#include<stdio.h>int main(){ int t; scanf("%d",&t); while(t--) //t组输入 { ...原创 2018-10-13 17:32:15 · 817 阅读 · 0 评论 -
CodeForces - 939E Maximize!(尺取)
Maximize!题目链接:http://codeforces.com/problemset/problem/939/EYou are given a multisetSconsisting of positive integers (initially empty). There are two kind of queries:Add a positive integer to...原创 2019-04-08 21:27:51 · 318 阅读 · 0 评论 -
FZU - 1924 死锁 (拓扑排序)
死锁在操作系统中存在着死锁问题。进程在执行过程中,因争夺资源而造成的一种互相等待的现象,若无外力作用,它们都将无法推进下去。此时称系统处于死锁状态或系统产生了死锁,这些永远在互相等待的进程称为死锁进程。由于资源占用是互斥的,当某个进程提出申请资源后,使得有关进程在无外力协助下,永远分配不到必需的资源而无法继续运行,这就产生了死锁。例如,如果线程A占用了资源1并等待资源2,而线程B占...原创 2019-04-03 09:30:10 · 469 阅读 · 0 评论 -
CodeForces - 405B Domino Effect (模拟)
Domino Effect题目链接:http://codeforces.com/problemset/problem/405/BLittle Chris knows there's no fun in playing dominoes, he thinks it's too random and doesn't require skill. Instead, he decided to p...原创 2019-04-03 10:29:00 · 256 阅读 · 0 评论 -
ZOJ - 3939 The Lucky Week (规律)
The Lucky Week题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3939Edward, the headmaster of the Marjar University, is very busy every day and always forgets the date.There was ...原创 2019-04-09 10:58:09 · 149 阅读 · 0 评论 -
HDU - 5542 The Battle of Chibi (DP + 离散化+树状数组)
The Battle of ChibiCao Cao made up a big army and was going to invade the whole South China. Yu Zhou was worried about it. He thought the only way to beat Cao Cao is to have a spy in Cao Cao's army....原创 2019-04-17 10:41:18 · 178 阅读 · 0 评论 -
HDU - 5543 Pick The Sticks(01背包)
Pick The SticksThe story happened long long ago. One day, Cao Cao made a special order called "Chicken Rib" to his army. No one got his point and all became very panic. However, Cao Cao himself fel...原创 2019-04-17 11:09:09 · 270 阅读 · 0 评论 -
ZOJ - 3732 Graph Reconstruction (Havel_Hakimi定理 )
Graph Reconstruction题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3732Let there be a simple graph withNvertices but we just know the degree of each vertex. Is it possible to...原创 2019-04-22 11:17:09 · 217 阅读 · 0 评论 -
CCPC-Wannafly Summer Camp 2019 Day1
CCPC-Wannafly Summer Camp 2019 Day1比赛链接:https://vjudge.net/contest/312902#overviewA:CodeForces 449B Jzzhu and Cities (最短路+思维)B:CodeForces 585B Phillip and Trains (搜索+思维)C:CodeForces ...原创 2019-08-03 09:12:54 · 178 阅读 · 0 评论 -
CodeForces - 721D Maxim and Array (贪心思维+模拟)
Maxim and ArrayRecently Maxim has found an array ofnintegers, needed by no one. He immediately come up with idea of changing it: he invented positive integerxand decided to add or subtract it...原创 2019-08-03 11:02:09 · 175 阅读 · 0 评论 -
HDU-6623 Minimal Power of Prime (思维 +素数筛)
Minimal Power of PrimeProblem DescriptionYou are given a positive integer n > 1. Consider all the different prime divisors of n. Each of them is included in the expansion n into prime factors i...原创 2019-08-01 10:08:06 · 671 阅读 · 0 评论 -
CCPC-Wannafly Summer Camp 2019 Day4
CCPC-Wannafly Summer Camp 2019 Day1比赛链接:https://vjudge.net/contest/314412#overviewA - One-dimensional Japanese Crossword CodeForces - 721A题目链接:http://codeforces.com/problemset/problem/721...原创 2019-08-06 11:29:26 · 238 阅读 · 0 评论 -
CodeForces - 989C A Mist of Florescence (思维构图)
A Mist of FlorescenceAs the boat drifts down the river, a wood full of blossoms shows up on the riverfront."I've been here once," Mino exclaims with delight, "it's breathtakingly amazing.""Wh...原创 2019-08-02 10:54:07 · 252 阅读 · 0 评论 -
2019网络赛总结
这么多场网络赛下来,发现了很多自己的不足:首先就是网络赛中遇到很多题目都是会的算法,但是没办法灵活的运用。就像ccpc网络赛有一道后缀数组+主席树的题,知道是后缀数组,但是不知道要到底要怎么做。还有之前学的有些算法,很久没有用过,现在已经不太熟悉了。在网络赛中发现现在还是有很多算法是还没有学的,甚至连模板都还没有,特别是数论这方面的知识还很欠缺。要找一段时间好好看看数论,刷刷数论专题,把模...原创 2019-09-18 16:28:55 · 183 阅读 · 0 评论 -
2019icpc上海网络赛
比赛链接:The Preliminary Contest for ICPC Asia Shanghai 2019L. Digit sum签到题题目大意:给出n,b,求1-n 的b进制的各个位数之和思路:因为n就到10^6可以直接预处理打表。 或者也可以数位DP代码:#include<stdio.h>#include<string.h>#in...原创 2019-09-19 11:13:30 · 478 阅读 · 2 评论 -
HDU - 3117 Fibonacci Numbers (矩阵快速幂 + 斐波那契通项公式)
Fibonacci Numbers题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3117The Fibonacci sequence is the sequence of numbers such that every element is equal to the sum of the two previous elements, exc...原创 2019-04-08 20:31:05 · 501 阅读 · 0 评论 -
CodeForces - 731C Socks (并查集)
SocksArseniy is already grown-up and independent. His mother decided to leave him alone formdays and left on a vacation. She have prepared a lot of food, left some money and washed all Arseniy'...原创 2019-03-29 16:23:07 · 307 阅读 · 0 评论 -
POJ - 2299 Ultra-QuickSort (归并排序)
Ultra-QuickSortIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the seq...原创 2019-03-29 19:02:13 · 275 阅读 · 0 评论 -
NBUT - 1220 SPY (STL map)
SPYThe National Intelligence Council of X Nation receives a piece of credible information that Nation Y will send spies to steal Nation X’sconfidential paper. So the commander ofThe National Int...原创 2019-03-29 20:26:28 · 259 阅读 · 0 评论 -
HDU - 1250 Hat's Fibonacci (大数+滚动数组)
Hat's FibonacciA Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1.F(1) = 1, F(2) = 1, F(3) = 1,F(4) = 1, F(n>4) = F(n - ...原创 2019-03-26 23:29:32 · 165 阅读 · 0 评论 -
CodeForces - 832B Petya and Exam (模拟)
Petya and ExamIt's hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy to Petya, but he thinks he lacks time to finish them all, so he asks you to help ...原创 2019-04-05 09:32:50 · 222 阅读 · 0 评论 -
HDU - 1110 Equipment Box (数学)
Equipment BoxThere is a large room in the Pyramid called Room-of-No-Return. Its floor is covered by rectangular tiles of equal size. The name of the room was chosen because of the very high number o...原创 2019-03-27 20:15:56 · 193 阅读 · 0 评论 -
SCU - 4490 Lisp em
Lisp emTime Limit: 1000 MS Memory Limit: 131072 K DescriptionThere are two lists and they may be intersected with each other. You must judge if they are intersected and find the first...原创 2019-03-28 22:24:28 · 285 阅读 · 0 评论 -
水陆距离 HihoCoder - 1478 (BFS)
水陆距离给定一个N x M的01矩阵,其中1表示陆地,0表示水域。对于每一个位置,求出它距离最近的水域的距离是多少。 矩阵中每个位置与它上下左右相邻的格子距离为1。Input第一行包含两个整数,N和M。以下N行每行M个0或者1,代表地图。数据保证至少有1块水域。对于30%的数据,1 <= N, M <= 100 对于100%的数据,1 <= ...原创 2019-03-28 22:34:32 · 658 阅读 · 0 评论 -
POJ - 3122 Pie(二分)
PieMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my party and eac...原创 2019-03-28 22:51:50 · 245 阅读 · 0 评论 -
CodeForces - 1051C Vasya and Multisets
Vasya and Multisets万圣节到了,杰哥准备给班级里的同学发糖吃,男生女生各一堆。于是他去腐败街的xx小卖部买糖,他认为糖只要是独一无二的那他就是好糖,他跟老板说他想要买n个不一样的糖,但是老板是个黑心商贩,当杰哥把糖带回去的时候才发现有挺多相同的糖而杰哥是一个公平正直的人,他希望男生女生两堆糖中好糖的数量相同,于是他想找你帮忙来解决他的烦恼。为了简化问题我们将不同的糖用不用...原创 2019-04-02 15:48:02 · 135 阅读 · 0 评论 -
CodeForces - 203B Game on Paper
Game on PaperOne not particularly beautiful evening Valera got very bored. To amuse himself a little bit, he found the following game.He took a checkered white square piece of paper, consisting of...原创 2019-04-02 15:59:21 · 206 阅读 · 0 评论 -
NBUT - 1223 Friends number (暴力打表)
Friends numberPaula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284, then, everything is changing… (The story in “...原创 2019-03-29 00:06:20 · 218 阅读 · 0 评论 -
CodeForces - 813C The Tag Game (BFS)
The Tag Game 题目链接:http://codeforces.com/problemset/problem/813/CAlice got tired of playing the tag game by the usual rules so she offered Bob a little modification to it. Now the game should be ...原创 2019-04-08 13:01:58 · 210 阅读 · 0 评论 -
POJ - 1149 PIGS (最大流 Dinic)
PIGS题目链接:http://poj.org/problem?id=1149Mirko works on a pig farm that consists of M locked pig-houses and Mirko can't unlock any pighouse because he doesn't have the keys. Customers come to the fa...原创 2019-04-08 17:28:46 · 164 阅读 · 0 评论 -
HihoCoder - 1634 Puzzle Game (最大子矩阵和)
Puzzle GameOnce upon a time, there was a little dog YK. One day, he went to an antique shop and was impressed by a beautiful picture. YK loved it very much. However, YK did not have money to buy ...原创 2019-09-28 09:12:51 · 273 阅读 · 0 评论