地址:http://acm.uestc.edu.cn/#/problem/show/1565 题目: Kidd1ng Me? Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit Status There are 1010 tests. For the ithith test, you should output ii. Input No input. Output F…
地址:http://acm.uestc.edu.cn/#/problem/show/1567 题目: Jermutat1on Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit Status You are given two numbers nn and kk. You are required to construct a permutation p1,p2,..…
地址:http://acm.uestc.edu.cn/#/problem/show/1559 题目: B0n0 Path Time Limit: 1500/500MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) There is a country with NN cities, there are roads between some pairs of cities. For every pair of cities,…
地址:http://acm.uestc.edu.cn/#/problem/show/1554 题目: C0ins Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) There are infinite coins with values 1,2,5,101,2,5,10. What's the minimum numbers of coins should be picked t…
地址:http://acm.uestc.edu.cn/#/problem/show/1557 题目: Minimum C0st Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) There are NN numbers where the ithith is AiAi. In order to make the sum of them changed to SS, you can…
地址:http://acm.uestc.edu.cn/#/problem/show/1564 题目: G - GC?(X,Y) Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 131071/131071KB (Java/Others) One positive integer can be represented by the product of some prime numbers. Sort the prime numbers…
地址:http://acm.uestc.edu.cn/#/problem/show/1551 题目: Hesty Str1ng Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) A chrysanthemum was painted on the second page, and we tried to use the magic power learned just now.…
地址:http://acm.uestc.edu.cn/#/problem/show/1558 题目: D - Destr0y City Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Alice want to build nn cities on a plane. A city can be regarded as a point. In order to keep comm…
题意:You are given an array A of N non-negative integers and an integer M. Find the number of pair(i,j) such that 1≤i≤j≤N and min(Ai,Ai+1,...,Aj)⋅(Ai⊕Ai+1⊕...⊕Aj)≤M. 先用把数字从小到大依次插入,用个set预处理出每个最小值控制的子区间的范围,对于大小相同的数,靠左的数优先. 然后对于每个子区间,最小值将它划分成左右两段,枚举较短的那段,…
题意:给你一个零一矩阵,q次询问,每次给你两个长宽相同的子矩阵,问你它们是恰好有一位不同,还是完全相同,还是有多于一位不同. 对每行分别哈希,先一行一行地尝试匹配,如果恰好发现有一行无法对应,再对那一行内部进行暴力找出那一行内部有几位不同即可. #include<cstdio> using namespace std; typedef unsigned long long ull; int n,m,q; char a[1005][1005]; ull b[1005][1005],pw[1005…
题意:有n瓶药剂,其中只有一瓶药剂有毒.让你用最少的小白鼠试出哪瓶有毒.你只有一次给任意只小白鼠各喂食任意种类药剂的机会. m只老鼠就能对应2^m种“生死状态”的组合,给每种状态分配一个种类的药剂,然后给每只老鼠喂食“如果它在这种药剂对应的生死状态下死去”的所有药剂,就可以根据发生的死亡情况,分辨出哪瓶药剂有毒. 比如老鼠数有3只. 000 1 001 2 010 3 100 4 110 5 011 6 101 7 111 8 给一号鼠喂4578 给二号鼠3568 给三号鼠2678. 所以答案为…
ACM International Collegiate Programming Contest, Tishreen Collegiate Programming Contest (2017)- K. Poor Ramzi -dp+记忆化搜索 [Problem Description] 给你一串\(01\)字符串,将其划分,使得划分后,分别求出每组\(01\)之和后是回文的,求划分的方案数, [Solution] 定义\(dp[l][r]\)表示,区间\([l,r]\)中满足条件的方案数是多少.…
心情不好来写博客. 为了满足ykk想要气球的愿望,NicoDafaGood.Achen和我成功去神大耍了一圈. 因为队名一开始是LargeDumpling应援会,然后队名被和谐,变成了学校的名字,顿时紧张无比,感觉要丢人还要把学校带上了 或许,这5个小时还是蛮愉快的. 最先A掉的题是G题,Bravo 签到题,比较暴力,代码很少,我很快就写完了,结果被卡了常,然后加register就过了. 第二个A掉的题是D题,Echo 我们看到有很多队都过了这道题,但是我们三个都看不懂这道题,我不忍心弃这个题,…
B - Banana Watch Time Limit: 1000/1000MS (Java/Others)     Memory Limit: 262144/262144KB (Java/Others) Submit  Status As a famous technology company, Banana Inc. invents Banana Watch, redefining the watch. While a normal watch has 12 indexes and two…
我是铁牌选手 这次比赛非常得爆炸,可以说体验极差,是这辈子自己最脑残的事情之一. 天时,地利,人和一样没有,而且自己早早地就想好了甩锅的套路. 按理说不开K就不会这么惨了啊,而且自己也是毒,不知道段错误也可以是MLE,而且我的内存就是卡了那么一点点,在比赛紧张的状态下人也变傻了吧. 这次的题目难度是两边到中间一次递增的,但是我也不懂榜怎么会那样  A Peak Time Limit: 1 Second      Memory Limit: 65536 KB A sequence of  inte…
2018 China Collegiate Programming Contest Final (CCPC-Final 2018)-K - Mr. Panda and Kakin-中国剩余定理+同余定理 [Problem Description] \[ 求解x^{2^{30}+3}=c\pmod n \] 其中\(n=p\cdot q\),\(p\)为小于\(x\)的最大素数,\(q\)为大于\(x\)的最小素数,\(x\)为\([10^5,10^9]\)内随机选择的数.\(0< c<n\).…
Doki Doki Literature Club Time Limit: 1 Second      Memory Limit: 65536 KB Doki Doki Literature Club! is a visual novel developed by Team Salvato. The protagonist is invited by his childhood friend, Sayori, to join their high school's literature club…
Secrete Master Plan Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 429    Accepted Submission(s): 244 Problem Description Master Mind KongMing gave Fei Zhang a secrete master plan stashed in a…
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5503 The 12th Zhejiang Provincial Collegiate Programming Contest - K Capture the Flag Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge In computer security, Capture…
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5494 The 12th Zhejiang Provincial Collegiate Programming Contest - B Team Formation Time Limit: 3 Seconds      Memory Limit: 131072 KB For an upcoming programming contest, Edward, the…
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5499 The 12th Zhejiang Provincial Collegiate Programming Contest - G Lunch Time Time Limit: 2 Seconds      Memory Limit: 65536 KB The 999th Zhejiang Provincial Collegiate Programming C…
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5504  The 12th Zhejiang Provincial Collegiate Programming Contest - L Demacia of the Ancients Time Limit: 2 Seconds      Memory Limit: 65536 KB There is a popular multiplayer online ba…
2016 Sichuan Province Programming Contest 代码 2016 Sichuan Province Programming Contest A. Nearest Neighbor Search \(dx\)根据\(x_0\)与\([x_1, x_2]\)位置考虑. \(dx.dy.dz\)单独考虑. B. Odd Discount 做法一:对于两个不同优惠\((i,j)\),所有方案中与两个优惠商品交集为奇数,即同时取到两种优惠的个数为\(2^{n-2}\)种.…
2016 Hunan Province Programming Contest A. 2016 题意 \(1 \le a \le n, 1 \le b \le m\) ,其中\(1 \le n,m \le 10^9\) 求正整数\((a,b)\)对的数量,满足\(ab \% 2016 = 0\) 思路 \(2016=2^53^27\) 根据\(a\)对因子的贡献对\(a\)分类,每种方案数对应\(b\)的数量,即\[\lfloor \frac{m}{\frac{2016}{a}} \rfloor…
Problem A Almost Palindrome Given a line of text, find the longest almost-palindrome substring. A string S is almost-palindrome if S begins and ends with a letter, and a(S) and b(S) have at most 2k positions with different characters Here a(S) is the…
Problem F Funny Car Racing There is a funny car racing in a city with n junctions and m directed roads. The funny part is: each road is open and closed periodically. Each road is associate with two integers (a, b), that means the road will be open fo…
Problem H High bridge, low bridge Q: There are one high bridge and one low bridge across the river. The river has flooded twice, why the high bridge is flooded twice but the low bridge is flooded only once? A: Because the lower bridge is so low that…
Problem I Interesting Calculator There is an interesting calculator. It has 3 rows of button. Row 1: button 0, 1, 2, 3, ..., 9. Pressing each button appends that digit to the end of the display. Row 2: button +0, +1, +2, +3, ..., +9. Pressing each bu…
Problem J Joking with Fermat's Last Theorem Fermat's Last Theorem: no three positive integers a, b, and c can satisfy the equation an + bn = cn for any integer value of n greater than two. From the theorem, we know that a3 + b3 = c3 has no positive i…
Game Rooms Time Limit: 4000/4000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit Status Your company has just constructed a new skyscraper, but you just noticed a terrible problem: there is only space to put one game room on each…