
icpc
Elige?
学校 浙江财经大学
专业 计算机科学与技术(19级)
ACM铜牌
展开
-
Traveling Merchant 线段树
Traveling Merchanthttps://ac.nowcoder.com/acm/contest/13168/L用14棵或7棵线段树来维护每种情况,维护max,min,最大差值还有最小差值,复杂度O(n)*14/O(n)*7然后查询,复杂度O(logn)难点在于找树#include<bits/stdc++.h>using namespace std;typedef long long ll;typedef long long ull;typedef long doub原创 2021-03-26 13:13:55 · 274 阅读 · 0 评论 -
2020 ICPC 南京 日记加题解
三题头罚时少最后做F题的时间有两个半小时最终打铁个人题解K K Co-prime Permutation链接签到题一开始以为A是,以为A是,因为A没有输入…题意是给你长度为n的1到n有型的序列,让你改变使他满足k个数gcd(i,pi)=1赛场上我们很快想到从2开始两两交换就行,每次交换会多2,如果要偶数就和1换,因为1和任何数都是1。L Let’s Play Curling链接题意自己看思路是看懂题意后自然知道求b序列每个区间内a的个数的最大值。排序下a和b,用map搞前缀和就原创 2020-12-21 12:08:54 · 632 阅读 · 0 评论 -
2020 ICPC上海 题解
G Fibonacci经典 奇奇偶奇奇偶奇奇偶答案自然为Cal(n,2) - Cal(n-n/3,2)6s ac真的很快啊!M Gitignore建树标记,然后跑个dfs就行一开始没考虑同名的文件夹wa了一发B Mine Sweeper II把原来的取反操作后总数不变知道这个就很容易做出来的,然后看不同的个数来选择你要输出的情况输出-1是个假条件,让我犹豫了一下。D Walker分类讨论加二分来满足精度要求C sum of log数位dp...原创 2020-12-15 20:56:19 · 913 阅读 · 0 评论 -
A.ABB(Manacher)
链接:https://ac.nowcoder.com/acm/problem/209398题目描述Fernando was hired by the University of Waterloo to finish a development project the university started some time ago. Outside the campus, the university wanted to build its representative bungalow street原创 2020-12-10 16:26:47 · 209 阅读 · 0 评论 -
2018-2019 ACM-ICPC, Asia Jiaozuo Regional Contest E. Resistors in Parallel(大数,思维,打表)
链接 https://codeforces.com/gym/102028/problem/EIn this physics problem, what we are concerned about are only resistors. If you are poor at physics, do not worry, since solving this problem does not require you to have advanced abilities in physics.Resisto原创 2020-12-01 18:33:53 · 197 阅读 · 0 评论 -
2020ICPC·小米 网络选拔赛第一场 J.Matrix Subtraction (二维差分)
链接:https://ac.nowcoder.com/acm/contest/7501/J?&headNav=acmGiven a matrix M of size n×m and two integers a, b , determine weither it is possible to make all entrys of M zero by repeatedly choosing a\times ba×b submatrices and reduce the values in the c原创 2020-11-26 20:58:49 · 122 阅读 · 0 评论 -
hdu6222 Heron and His Triangle
链接 http://acm.hdu.edu.cn/showproblem.php?pid=6222Problem DescriptionA triangle is a Heron’s triangle if it satisfies that the side lengths of it are consecutive integers t−1, t, t+ 1 and thatits area is an integer. Now, for given n you need to find a Her原创 2020-11-20 09:05:30 · 143 阅读 · 0 评论 -
2020ICPC 江西省大学生程序设计竞赛
G Mathematical Practice链接:https://ac.nowcoder.com/acm/contest/8827/G题目描述Kamishirasawa Keine always says, “If you don’t know what to do, why not give mathematical practice a try.”However, Cirno is way too much talented to work on simple problems. Theref原创 2020-11-17 20:26:32 · 1884 阅读 · 0 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲网上区域赛模拟赛
A Easy Equation链接:https://ac.nowcoder.com/acm/contest/8688/A题目描述You are given four positive integers ????, ????, ????, ????, please help little M calculate the number of equations ???? + ???? + ???? = ???? when 0 ≤ ???? ≤ ????, 0 ≤ ???? ≤ ????, 0 ≤ ????原创 2020-11-01 19:44:41 · 1825 阅读 · 3 评论 -
2018icpc南京 Problem I. Magic Potion
题意匹配问题但是多了魔法药水,可以让一个hero多消灭一个怪,而且一个hero最多只能喝一瓶,求最大消灭怪物数。standard input3 5 24 1 2 3 52 2 52 1 2standard output4standard input5 10 22 3 105 1 3 4 6 105 3 4 6 8 93 1 9 105 1 3 6 7 10standard output7思路没有药水,我想到这可以直接二分图匹配的匈牙利算法,但是有药水,训练时怎么想都不知原创 2020-10-23 20:51:00 · 175 阅读 · 0 评论 -
2018icpc南京 Problem J. Prime Game
题意计算出来每个数的质因子在各个区间的贡献InputThe first line contains one integer n (1 ≤ n ≤ 106) — the length of the sequence.The second line contains n integers ai (1 ≤ i ≤ n, 1 ≤ ai ≤ 106) — the sequence.OutputPrint the answer to the equation.Examplesstandard inpu.原创 2020-10-22 19:40:16 · 144 阅读 · 0 评论 -
2018icpc南京 Problem K. Kangaroo Puzzle
Your friend has made a computer video game called “Kangaroo Puzzle” and wants you to give it a tryfor him. As the name of this game indicates, there are some (at least 2) kangaroos stranded in a puzzleand the player’s goal is to control them to gather. A原创 2020-10-22 19:00:51 · 639 阅读 · 0 评论 -
2018icpc南京 Problem G. Pyramid
题目The use of the triangle in the New Age practices seems to be very important as it represents the unholytrinity (Satan, the Antichrist and the False Prophet bringing mankind to the New World Order withfalse/distorted beliefs). The triangle is of primar原创 2020-10-22 18:37:51 · 335 阅读 · 0 评论