- 博客(39)
- 收藏
- 关注
原创 UVALive 7544 Banking II (DP)
原题:A month ago at the South Pacifi Divisional Contest, each of you (or one of your teammates) solved aproblem about authenticating users. To refresh your memory:The Actuarial Commerce Merchant b
2017-11-11 20:18:18 238
原创 SGU 168 Matrix (DP)
原题: 168. Matrixtime limit per test: 0.5 sec. memory limit per test: 16000 KBinput: standard output: standardYou are given N*M matrix A. You are to find such matrix B, th
2017-11-07 19:52:45 282
原创 Gym - 100641A
原题:https://vjudge.net/problem/Gym-100641A#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include
2017-09-28 19:32:22 288
原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 G. Finding the Radius for an Inserted Circle
原题:Three circles C_{a}Ca, C_{b}Cb, and C_{c}Cc, all with radius RRand tangent to each other, are located in two-dimensional space as shown in Figure 11. A smaller circle C_{1}C
2017-09-24 17:48:30 361
原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 F. Overlapping Rectangles
原题:There are nn rectangles on the plane. The problem is to find the area of the union of these rectangles. Note that these rectangles might overlap with each other, and the overlapped areas of
2017-09-24 17:46:50 301
原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 L. The Heaviest Non-decreasing Subsequence Problem (LIS)
原题:Let SS be a sequence of integers s_{1}s1, s_{2}s2, ......, s_{n}snEach integer is is associated with a weight by the following rules:(1) If is is negative, then its weight is 0
2017-09-24 17:43:29 285
原创 Problem 1002 cable cable cable-2017 ACM/ICPC Asia Regional Shenyang Online
原题:Problem Description: Connecting the display screen and signal sources which produce different color signals by cables, then the display screen can show the color of the signal source.Notice that ev
2017-09-10 19:23:35 253
原创 2017 ACM/ICPC Asia Regional Shenyang Online 1005 number number number(矩阵快速幂)
原题:number number numberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Problem DescriptionWe
2017-09-10 17:40:29 244
原创 2017 ACM-ICPC 亚洲区乌鲁木齐赛网络赛 E. Half-consecutive Numbers
枚举所有的完全平方数,如果t(i)是完全平方数,则i和i+1中的偶数除以2为完全平方数,奇数同样为完全平方数,打表即可,注释部分为打表代码#include #include #include #include #include #include #include #include #include #include #include #include #include #
2017-09-09 19:19:09 568
原创 Gym - 101158B Quality of Check Digits
原题: http://codeforces.com/gym/101158/attachments注意:表中并不是每行每列数字不重复出现#include #include #include #include #include #include #include #include #include #include #include #include
2017-08-31 19:39:22 313
原创 Gym 101158C Distribution Center(思路题)
原题: ACM International Col legiate Programming ContestAsia Regional Contest, Tsukuba, 2016–10–16Problem CDistribution CenterInput: Standard InputTime Limit: 3 secondsThe factory of the Im
2017-08-31 19:28:17 420
原创 Gym - 101190F Foreign Postcards (概率dp)
原题:ACM ICPC 2016–2017, Northeastern European Regional Contest.St. Petersburg – Barnaul – Tbilisi – Almaty, December 4, 2016Problem F. Foreign PostcardsInput file: foreign.inOutput file: fo
2017-08-30 17:48:43 640
原创 Analysis Gym - 101173A UVALive - 7747 Appearance Analysis (模拟)
原题:You have taken a photo of the Faculty of Electrical Engineering and Computing “C” building herein Zagreb with its equal sized windows neatly arranged in rows and columns. Some of the windowsa
2017-08-30 17:34:29 314
原创 Gym - 101190A Abbreviation(模拟)
原题:ACM ICPC 2016–2017, Northeastern European Regional Contest.St. Petersburg – Barnaul – Tbilisi – Almaty, December 4, 2016Problem A. AbbreviationInput file: abbreviation.inOutput file:
2017-08-29 19:05:20 984
原创 HDU - 6005 Pandaland (dijkstra)
原题:Mr. Panda lives in Pandaland. There are many cities in Pandaland. Each city can be treated as a point on a 2D plane. Different cities are located in different locations. There are also M bi
2017-08-29 09:10:05 550
转载 UVA - 11404 Palindromic Subsequence (LPS,dp)
原题链接:https://vjudge.net/problem/UVA-11404区间dp求LPS#include #include #include #include #include #include #include #include #include #include #include #include #include #incl
2017-08-27 10:22:08 223
原创 UVA - 10534 Wavio Sequence (LIS变形,dp)
原题: Wavio is a sequence of integers. It has some interesting prop erties.• Wavio is of o dd length i.e.L = 2∗ n+ 1.• The first (n + 1) integers of Wavio sequence makes a strictly in
2017-08-24 19:58:05 205
原创 UVALive - 4256 Salesmen (dp)
原题:Traveling salesmen of . (the prestigious Korean internet company) report their current locationto the company on a regular basis. They also have to report their new location to the company if
2017-08-24 10:26:04 293
原创 UVA 10382 Watering Grass (贪心)
原题: nsprinklers are installed in a horizontal strip of grassl meters long andw meters wide. Each sprinkleris installed at the horizontal center line of the strip. For each sprinkler we
2017-08-23 12:04:20 243
原创 LightOJ - 1370 Bi-shoe and Phi-shoe (欧拉函数,素数打表)
原题:Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his students, so he asked his assistant Bi-S
2017-08-21 21:26:21 220
原创 UVA - 12083 Guardian of Decency(二分图匹配)
原题:Frank N. Stein is a very conservative high-scho ol teacher. He wants to take some of his students on anexcursion, but he is afraid that some of them might b ecome couples. While you can never e
2017-08-21 15:58:50 206
原创 UVA - 1513 Movie collection ( 树状数组 )
原题:Mr. K. I. has a very big movie collection. He has organized his collection in a big stack. Whenever hewants to watch one of the movies, he lo cates the movie in this stack and removes it ca
2017-08-18 17:48:33 277
原创 Asia Hong Kong Regional Contest 2016 Playing with Numbers
原题:https://open.kattis.com/problems/playingwithnumbersYou have a list of NN numbers, each of the form 2a3b2a3b for some non-negative integers aaand bb. You want to perform N−1N−1 ope
2017-08-17 19:30:24 659
原创 UVA - 11806 Cheerleaders ( 容斥 )
原题:https://vjudge.net/problem/UVA-11806#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /
2017-08-16 21:26:42 183
原创 HDU 5835 Danganronpa
原题:Chisa Yukizome works as a teacher in the school. She prepares many gifts, which consist of nn kinds with a[i]a[i] quantities of each kind, for her students and wants to hold a class meeti
2017-08-15 16:54:04 185
原创 UVA - 1218 Perfect Service( 树形dp)
原题:A network is comp osed ofNcomputers connected byN−1 communication links such that any twocomputers can be communicated via a unique route. Two computers are said to beadjacentif t
2017-08-14 16:45:02 273
原创 Codeforces Round #428 (Div. 2) A. Arya and Bran
A. Arya and Brantime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBran and his older sister Arya are from the
2017-08-12 23:01:39 228
原创 UVA - 580 Critical Mass(dp 数学)
原题:During the early stages of the Manhattan Project, the dangers of the new radioctive materials werenot widely known. Vast new factory cities were built to manufacture uranium and plu- tonium in
2017-08-12 16:54:03 328
原创 UVA - 1262 Password
Shoulder-surfig is the behavior of intentionally and stealthily watching the screen of another person’selectronic device, such as laptop computer or mobile phone. Since mobile devices prevail, it is
2017-08-10 21:02:22 261
原创 FZU - 2148 Moon Game(几何)
原题:Fat brother and Maze are playing a kind of special (hentai) game in the clearly blue sky which we can just consider as a kind of two-dimensional plane. Then Fat brother starts to draw N s
2017-08-10 17:12:14 243
原创 UVA - 10820 Send a Table(欧拉函数)
原题:When participating in programming contests, you sometimes face the following problem: You knowhow to calcutale the output for the given input values, but your algorithm is way to o slow to
2017-08-10 11:02:03 256
原创 UVA - 1626 Brackets sequence ( dp )
原题:Let us defie a regular brackets sequence in the following way:1. Empty sequence is a regular sequence.2. If S is a regular sequence, then (S) and[S] are both regular sequences.3. If A a
2017-08-09 17:09:41 311
原创 UVA - 10003 Cutting Sticks (区间dp)
原题:You have to cut a wo o d stick into pieces. The most affordable company, The Analog Cutting Machinery,Inc. (ACM), charges money according to the length of the stick b eing cut. Their pro cedure
2017-08-09 11:20:29 196
原创 UVA - 12186 Another Crisis (树形dp)
原题:A couple of years ago, a new world wide crisis started, leaving many p eople with economical problems.Some workers of a particular company are trying to ask for an increase in their salaries.
2017-08-08 17:35:53 250
原创 UVA - 10891 Game of Sum(区间dp)
题意: 长度为n的整数序列中,A和B轮流从左或右端取任意数量的数字,直至全部数字被取完,每人每次采取最优策略使自己取得数字总和最大,A先取,结束时A取数字总和与B取数字总和的差。思路: 任意时刻游戏状态均为原序列的一段子序列,A,B取得数字总和为序列总和。则取dp[i][j]为子序列为i~j时,A取得最大数字和。dp[i][j]=sum(i,j)-mi
2017-08-08 11:17:36 211
原创 LightOJ - 1282 Leading and Trailing (数学、快速幂)
题意:求n^k的前三位和后三位数字。思路:n=10^a,a为浮点数,则n^k=10^(a*k)=10^(x+y),x为整数,y为小数,则n^k前三位数字则为10^y*100的整数部分,a可取log得出,y可由fomd()函数得。n^k的后三位则可有快速幂算出,模数为1000,注意补足前导0。#include #include #include #include #i
2017-08-07 20:17:02 304
原创 UVA - 140 Bandwidth(全排列枚举)
思路:存储所有路径,全排列所有点。#include #include #include #include #include #include #include #include #include #include #include #include //#pragma comment(linker, "/STACK:1024000000,1024000000")
2017-08-07 20:10:58 214
原创 CodeForces-832B Petya and Exam
根据题意模拟匹配就好#include #include #include #include #include #include #include #include #include #include #include #include //#pragma comment(linker, "/STACK:1024000000,1024000000")#define IN
2017-08-07 20:03:36 236
原创 UVA - 11584 Partitioning by Palindromes (dp)
题意:将一串字符串划分成尽量少的回文串。思路: 首先枚举回文串起始字符,标记所有回文串。dp[i]为0~i的最小划分回文串。dp[i]=dp[i-1]+1,dp[i]=min(dp[j-1]+1) j~i为回文串。 #include #include #include #include #include #include #include #include #inc
2017-08-07 19:46:25 194
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人