思维
文章平均质量分 81
UMR小豪
这个作者很懒,什么都没留下…
展开
-
HDU 6166 Senior Pan
Senior Pan fails in his discrete math exam again. So he asks Master ZKC to give him graph theory problems everyday. The task is simple : ZKC will give Pan a directed graph every time, and selects some原创 2017-08-23 08:57:25 · 614 阅读 · 0 评论 -
C. Karen and Game
C. Karen and Gametime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputOn the way to school, Karen became fixate原创 2017-06-18 13:09:09 · 450 阅读 · 0 评论 -
Ignatius and the Princess IV
"OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to原创 2017-06-05 16:59:18 · 360 阅读 · 0 评论 -
C. Vladik and Memorable Trip
C. Vladik and Memorable Triptime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVladik often travels by trains原创 2017-05-28 15:27:56 · 1029 阅读 · 0 评论 -
C. Naming Company
C. Naming Companytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOleg the client and Igor the analyst are原创 2017-05-16 11:29:30 · 446 阅读 · 0 评论 -
C. International Olympiad
C. International Olympiadtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputInternational Abbreviation Olympia原创 2017-05-24 15:26:15 · 395 阅读 · 0 评论 -
C. Mike and gcd problem
C. Mike and gcd problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMike has a sequence A = [a1, a2, ..原创 2017-04-22 21:00:27 · 705 阅读 · 0 评论 -
B. Rebus
B. Rebustime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rebus of form ? + ? - ? + ? = n, co原创 2017-05-23 22:24:31 · 370 阅读 · 0 评论 -
E. Read Time
E. Read Timetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMad scientist Mike does not use slow hard disks原创 2017-05-23 18:09:11 · 347 阅读 · 0 评论 -
C. Rational Resistance
C. Rational Resistancetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMad scientist Mike is building a time原创 2017-05-23 10:23:33 · 317 阅读 · 0 评论 -
Gym - 100502 A - Amanda Lounges
题目链接:https://odzkskevi.qnssl.com/7bdafb89605bd39aff640413e2d2157a?v=1488601228。题意:大意就是有n个飞机场,每个飞机场可能有个休息室,然后给你m组关系,每组关系有3个数x,y,z,表示若z=0,表示x、y飞机场都没有休息室。若z=1,表示x、y其中有一个有休息室,若z=2,表示两个都有休息室。问总共最少有几个休息转载 2017-04-28 22:07:03 · 480 阅读 · 0 评论 -
Cf 406 A. The Monster
A. The Monstertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA monster is chasing after Rick and Morty on原创 2017-03-24 21:34:42 · 761 阅读 · 0 评论 -
C. Functions again
C. Functions againtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSomething happened in Uzhlyandia again...原创 2017-03-30 18:35:45 · 950 阅读 · 0 评论 -
B. Masha and geometric depression
Masha really loves algebra. On the last lesson, her strict teacher Dvastan gave she new exercise.You are given geometric progression b defined by two integers b1 and q. Remind that a geometric p原创 2017-03-30 15:47:46 · 630 阅读 · 0 评论 -
Problem I: 约素
Problem I: 约素Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 1847 Solved: 480Description判断一个正整数n的约数个数是否为p,其中p是素数。Input第一行给测试总数T(T 接下来有T行,每行有两个数字n(1 Output每组测试数据输出一行,如果n原创 2017-03-22 22:04:05 · 381 阅读 · 0 评论 -
Problem E: 同源数
Problem E: 同源数Time Limit: 3 Sec Memory Limit: 128 MBSubmit: 1331 Solved: 236Description如果x和y的质因子集合完全相同,那么我们就说他们是同源的。比如说18 = 2 * 32,12 = 3 * 22;Input本题有多组数据(组数 每组数据输入形如:原创 2017-03-22 21:56:34 · 377 阅读 · 0 评论 -
C. An impassioned circulation of affection
C. An impassioned circulation of affectiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNadeko's birthda原创 2017-06-08 16:50:21 · 494 阅读 · 0 评论 -
B. Number Busters
B. Number Busterstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArthur and Alexander are number busters. T原创 2017-06-21 13:31:37 · 441 阅读 · 0 评论 -
C. Arithmetic Progression
C. Arithmetic Progressiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputEverybody knows what an arithmetic原创 2017-06-21 13:40:27 · 670 阅读 · 0 评论 -
CF173 C Spiral Maximum
题意:给你一个n*m的格子,每个格子有一个数。现在你可以拿走题目上说明的螺旋图内的数字。必须是整个螺旋图的。问你可以得到的最大值是多少。 思路:我们好好观察图,发现当前的螺旋图的值 = 当前子矩阵 - 上一个螺旋图的值 - 左上角偏下一个的格子点。所以我们可以循环处理。一直到边界。#include <iostream>#include <cstdio>#include <cmath>#inc原创 2017-08-24 20:50:07 · 247 阅读 · 0 评论 -
HDU6119 小小粉丝度度熊
HDU6119原创 2017-08-13 19:29:46 · 299 阅读 · 0 评论 -
B - Game of the Rows
B. Game of the Rows time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Daenerys Targaryen has an army consisting of k groups of soldiers, the原创 2017-08-14 02:08:59 · 530 阅读 · 0 评论 -
CodeForces - 731C Socks
Arseniy is already grown-up and independent. His mother decided to leave him alone for m days and left on a vacation. She have prepared a lot of food, left some money and washed all Arseniy’s clothes.T原创 2017-08-11 20:50:44 · 361 阅读 · 0 评论 -
HDU 4662 MU Puzzle
Suppose there are the symbols M, I, and U which can be combined to produce strings of symbols called "words". We start with one word MI, and transform it to get a new word. In each step, we can use on原创 2017-08-03 23:48:43 · 567 阅读 · 0 评论 -
HDU 6103 Kirinriki
We define the distance of two strings A and B with same length n is disA,B=∑n−1i=0|Ai−Bn−1−i|dis_{A,B}=\sum_{i=0}^{n−1}|A_i−B_{n−1−i}| The difference between the two characters is defined as the diff原创 2017-08-11 00:37:08 · 302 阅读 · 0 评论 -
HDU Counting Divisors
官方题解:设n=p_1^{c_1}p_2^{c_2}...p_m^{c_m}n=p1c1p2c2...pmcm,则d(n^k)=(kc_1+1)(kc_2+1)...(kc_m+1)d(nk)=(kc1+1)(kc2+1)...(kcm+1)。枚举不超过\sqrt{r}√r的所有质数pp,再枚举区间[l,原创 2017-08-03 19:12:05 · 256 阅读 · 0 评论 -
HDU 6038 Function
FunctionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 607 Accepted Submission(s): 243Problem DescriptionYou are given a p原创 2017-07-26 10:37:57 · 514 阅读 · 0 评论 -
Maximum Value CodeForces - 485D
You are given a sequence a consisting of n integers. Find the maximum possible value of (integer remainder of ai divided by aj), where 1 ≤ i, j ≤ n and ai ≥ aj.InputThe first line contain原创 2017-08-02 14:26:47 · 386 阅读 · 0 评论 -
C. The Tag Game
C. The Tag Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice got tired of playing the tag game by t原创 2017-06-14 16:19:45 · 312 阅读 · 0 评论 -
B.The Golden Age
B. The Golden Agetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputUnlucky year in Berland is such a year tha原创 2017-06-14 16:07:18 · 369 阅读 · 0 评论 -
CF422 div2 C. Hacker, pack your bags!
C. Hacker, pack your bags!time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt's well known that the best wa原创 2017-07-03 13:37:03 · 514 阅读 · 0 评论 -
CF422 div2 B. Crossword solving
B. Crossword solvingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputErelong Leha was bored by calculating o原创 2017-07-03 13:32:17 · 406 阅读 · 0 评论 -
Satisfactory Pairs
Given a positive integer, , find and print the number of pairs of positive integers , where , that exist such that the equation (where and are positive integers) has at least one solution.原创 2017-06-23 15:26:33 · 303 阅读 · 0 评论 -
D. An overnight dance in discotheque
D. An overnight dance in discothequetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe crowdedness of the原创 2017-06-09 22:08:26 · 673 阅读 · 0 评论 -
ZSTUOJ 4273: 玩具
4273: 玩具Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 784 Solved: 159Description商店有n个玩具,第i个玩具有价格a[i]和快乐值b[i]。有一天,小王来到商店想买一些玩具,商店老板告诉他,如果他买的所有玩具的位置是连续的,那么老板答应小王购买的所有玩具中某一个可以免费。小王接受老板的提议原创 2017-03-22 21:50:17 · 571 阅读 · 0 评论 -
poj2431Expedition
ExpeditionTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15341 Accepted: 4302DescriptionA group of cows grabbed a truck and ventured on an expedition原创 2017-04-07 21:46:40 · 383 阅读 · 0 评论 -
C. Pavel and barbecue
C. Pavel and barbecuetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPavel cooks barbecue. There are n skewers, they原创 2017-01-25 21:05:55 · 629 阅读 · 0 评论 -
C. Jon Snow and his Favourite Number
C. Jon Snow and his Favourite Numbertime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputJon Snow now has to fi原创 2017-02-21 19:43:21 · 966 阅读 · 0 评论 -
POJ 3191 The Moronic Cowmpouter
Inexperienced in the digital arts, the cows tried to build a calculating engine (yes, it's a cowmpouter) using binary numbers (base 2) but instead built one based on base negative 2! They were quite p原创 2017-01-23 13:05:06 · 497 阅读 · 0 评论 -
Lotus and Horticulture
Lotus and HorticultureTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 289 Accepted Submission(s): 86Problem DescriptionThes原创 2017-01-22 12:11:09 · 454 阅读 · 0 评论