Time Limit: 15000/8000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others) Input There are several test cases. Please process till EOF.For each test case, there is only one line containing 6 integers N,M,X0,X1,Y0,Y1.See the description for…
Wow! Such City! 题意:题面很难理解,幸亏给出了提示,敲了一发板子过了.给出x数组y数组和z数组的求法,并给出x.y的前几项,然后直接利用所给条件构造出z数组再构造出C数组即可,Cij表示i点到j点的路长,然后再跑个dij就可以求出0点到其他点的最短路,然后将这些最短路对M取余求所有取余值的最小值.需要注意的是Cij=Z(i*n+j),也就是X.Y.Z数组都要开到(n-1)*n+n.理解了其实也就是水题了,题意这样东扯西扯真是迷.. const int N=1e6+1000;…
Wow! Such Sequence! 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4893 Description Recently, Doge got a funny birthday present from his new friend, Protein Tiger from St. Beeze College. No, not cactuses. It's a mysterious blackbox. After some resea…
Wow! Such Conquering! Problem Description There are n Doge Planets in the Doge Space. The conqueror of Doge Space is Super Doge, who is going to inspect his Doge Army on all Doge Planets. The inspection starts from Doge Planet 1 where DOS (Doge Olymp…
Problem Description Chen, Adrian (November 7, 2013). "Doge Is An Ac- tually Good Internet Meme. Wow.". Gawker. Retrieved November 22, 2013. Doge is an Internet meme that became popular in 2013. The meme typically con- sists of a picture of a Shi…
http://acm.hdu.edu.cn/showproblem.php?pid=4893 三种操作: 1 k d - "add" 2 l r - "query sum" 3 l r - "change to nearest Fibonacci" 节点附件三个值: s1:由lazy控制的区间的正确的和. s2:区间内与全部数相近的fib数之和,随着单点更新而更新. col:lazy,标记区间是否所有取fib数,是取1,否则取0. 询问区间的和时…
Wow! Such Sequence! Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2234 Accepted Submission(s): 657 Problem Description Recently, Doge got a funny birthday present from his new friend, Prot…
Time Limit: 15000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description There are n Doge Planets in the Doge Space. The conqueror of Doge Space is Super Doge, who is going to inspect his Doge Army on all Doge Planets. Th…
Problem Description Doge, tired of being a popular image on internet, is considering moving to another city for a new way of life. In his country there are N (2 ≤N≤ 1000) cities labeled 0 . . . N - 1. He is currently in city 0. Meanwhile, for each pa…
MZL's City Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 710 Accepted Submission(s): 245 Problem Description MZL is an active girl who has her own country. Her big country has N cities numb…
MZL's City Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 743 Accepted Submission(s): 260 Problem Description MZL is an active girl who has her own country. Her big country has N cities numb…
Wow! Such Doge! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2351 Accepted Submission(s): 1445 Problem Description Chen, Adrian (November 7, 2013). “Doge Is An Ac- tually Good Internet Mem…
磨了一天的线段树,不能说完全搞清楚,只能说有一个大概的了解,靠着模板才把这道题A了,只能说太弱~~! 题意: 初始时有一字符串,全为0. 三种操作: 1 k d - add 把d加到第k个数上去2 l r - query sum 计算l到r所有数的和3 l r - change to nearest Fibonacci 把l到r的数修改为距离它最近的斐波那契数 节点附件三个值: s1:由lazy控制的区间的正确的和. s2:区间内与所有数相近的fib数之和,随着单点更新而更新. col:laz…
简单题,公式计算+最短路.注意点:注意1 取模,2 数组开到n*n+n. #include<iostream> #include<queue> using namespace std; long long x[1234567];long long y[1234567];long long z[1234567]; int c[1001][1001]; int d[1002];int inq[1002]; const int inf=0x3f3f3f3f; int n,m; void…
Wow! Such City! Time Limit: 15000/8000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others) Total Submission(s): 824 Accepted Submission(s): 310 Problem Description Doge, tired of being a popular image on internet, is considering moving…