2023 ICPC 网络赛 II】的更多相关文章

Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book has its knowledge a[i]a[i]. Unfortunately, the longer he learns, the fewer he gets. That means, if he reads books from ll to rr, he will get a…
这次网络赛没有打.生病了去医院了..尴尬.晚上回来才看了题补简单题. K  Supreme Number 题目链接:https://nanti.jisuanke.com/t/31452 题意:输入一个整数n(其实可以当成字符串,因为很长啊.),求满足不超过n的supreme number.这个supreme number的定义是,这个字符串的子串都是质数.比如.137就是,但是19就不是. 题解:找规律.我先开始题没看懂,没懂子串也要为素数.后面才看到.然后在纸上枚举了一下可能出现的情况.发现大…
题目连接 Problem There is a tree with n nodes. For each node, there is an integer value ai, (1≤ai​≤1,000,000,000 for 1≤i≤n). There is q queries which are described as follow: Assume the value on the path from node a to node b is t0​,t1​,⋯tm​. You are sup…
Trace There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xxx , yyy ) means the wave is a rectangle whose vertexes are ( 000 , 000 ), ( xxx , 000 ), ( 000 , yyy ), ( xxx , yyy ). Every time the wave will wash o…
A prime number (or a prime) is a natural number greater than 11 that cannot be formed by multiplying two smaller natural numbers. Now lets define a number NN as the supreme number if and only if each number made up of an non-empty subsequence of all…
There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xx , yy) means the wave is a rectangle whose vertexes are ( 00 , 00 ), ( xx , 00 ), ( 00 , yy ), ( xx , yy ). Every time the wave will wash out the trace of f…
Morgana is learning computer vision, and he likes cats, too. One day he wants to find the cat movement from a cat video. To do this, he extracts cat features in each frame. A cat feature is a two-dimension vector <xx, yy>. If x_ixi​ = x_jxj​and y_iy…
Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 2487    Accepted Submission(s): 386 Problem Description In graph theory, the complement of a graph G is a graph H on the same vertices such tha…
题面:https://nanti.jisuanke.com/t/41408 题意:A,2,3,4,5,6,7,8,9,10,J,Q,K,13张牌,无花色之分,val为1~13. 给n个人名+n个牌,输出人名的ranklist 比较规则: 皇家顺最大 顺子第二,都是顺看最大牌的val 四条第三,先看四张相同牌的val,再看剩下那张牌的val 葫芦第四,先看三张相同牌的val,再看两张相同牌的val 三条第五,先看三张相同牌的val,再看剩下两张牌的val之和 两对第六,先看大的两张相同牌的val,…
The Nth Iteam 题意:F(0)=1,F(1)=1,F(n)=3*F(n-1)+2*F(n-2) (n>=2) ,F(n) mod 998244353.给出Q跟N1,Ni=Ni-1^(F(Ni-1)*F(Ni-1)),求F(N1)^F(N2)^...^F(NQ) 这个比赛的E跟H数据都水得很,但题还是不错的. 比赛时是求了个循环节,又进行了矩阵的降幂,然后本地+测试在时限内跑出了几组1e7的数据,才敢交的,但没想到数据那么水,矩阵快速幂+map记忆化一下就能过. #include<c…