A.Matrix 挺狗的一道题,从开始冲到最后都没冲出来,都没啥思路. 其实分开考虑每个数的贡献,这个想法也存在过,就是不知道该怎么计算,我们考虑我们单独考虑一个数字\(i(1\leq i\leq n)\)的贡献,其实就是在有一行答案是\(i\)的情况下总的方案数有多少个.同时我们注意到,每个不同的数之间是互不冲突的,因为在一个方案中,我们也是每行求每个数的答案然后累加起来.所以我们只考虑一个数在多少个不同的方案里贡献了答案.首先我们要选一行,其次保证这一行的答案是\(i\),考虑到这一行的其他…
A Simple Stone Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0 Problem Description After he has learned how to play Nim game, Bob begins to try another ston…
Permutation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0Special Judge Problem Description A permutation p1,p2,...,pn of 1,2,...,n is called a lucky permutatio…
A Simple Stone Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0 Problem Description After he has learned how to play Nim game, Bob begins to try another ston…
Permutation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0Special Judge Problem Description A permutation p1,p2,...,pn of 1,2,...,n is called a lucky permutatio…
Super-palindrome 题面地址:http://acm.hdu.edu.cn/downloads/CCPC2018-Hangzhou-ProblemSet.pdf 这道题是差分数组的题目,线段树也可以写,但是代码太长没必要. 代码: #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> #include<…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=6705 path Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1250    Accepted Submission(s): 257 Problem Description You have a directed weighted graph…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=6709 Fishing Master Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 631    Accepted Submission(s): 170 Problem Description Heard that eom is a fishin…
$$2019中国大学生程序设计竞赛(CCPC)\ -\ 网络选拔赛$$ \(A.\hat{} \& \hat{}\) 签到,只把AB都有的位给异或掉 //#pragma comment(linker, "/STACK:1024000000,1024000000") #include<bits/stdc++.h> using namespace std; function<void(void)> ____ = [](){ios_base::sync_wit…
Magic boy Bi Luo with his excited tree Problem Description Bi Luo is a magic boy, he also has a migic tree, the tree has N nodes , in each node , there is a treasure, it's value is V[i], and for each edge, there is a cost C[i], which means every time…