Warning: session_start(): open(/tmp/sess_198f5623e896238eb422dd348e180d7d, O_RDWR) failed: No space left on device (28) in /data/wiki/inc/init.php on line 239
Warning: session_start(): Failed to read session data: files (path: ) in /data/wiki/inc/init.php on line 239
Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/auth.php on line 430
Writing /data/wiki/data/cache/d/d8bb799d01e07e83e070675a3db69567.captchaip failed
Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/Action/Export.php on line 103
Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/Action/Export.php on line 103
Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/Action/Export.php on line 103
^ 比赛时间 ^ 比赛名称 ^ 当场过题数 ^ 至今过题数 ^ 总题数 ^ 排名 ^
|2020-07-18| 牛客多校第九场 | 2 | 5 | 11 |734/975|
地址:[[https://ac.nowcoder.com/acm/contest/5674]]
====== A Groundhog and 2-Power Representation ======
===== 题意: =====
[[https://ac.nowcoder.com/acm/contest/5674/A]]
===== 题解: =====
python nb!,eval函数可以计算任何表达式所以只要把所有$($都转化成$**($即可
====== B Groundhog and Apple Tree ======
===== 题意: =====
===== 题解: =====
====== C Groundhog and Gaming Time ======
===== 题意: =====
===== 题解: =====
====== D Groundhog and Golden Apple ======
===== 题意: =====
===== 题解: =====
====== E Groundhog Chasing Death ======
===== 题意: =====
要计算$\prod_{i=a}^b\prod_{j=c}^d \gcd(x^i,y^j)$
===== 题解: =====
算$\gcd$即算各个素因子的最小值,所以与处理出所有公共素因子和指数,对单个素因子遍历即可,对于$a-b$的情况,可以用二分得方法算出另一块有多少大于等于它的然后对指数求和后直接用快速幂乘在一起即可。注意处理指数的时候,要对数模mod-1,应为素数$n$的欧拉函数一定是n-1
====== F Groundhog Looking Dowdy ======
===== 题意: =====
给出两个数$n$和$m$,下面$n$排每行给出不等的数,限定每行只能选一个,而且规定要选$m$个,要使选出的这$m$个数满足,最大与最小值之差最小,问最小的差多大?
===== 题解: =====
先把所有的数排序,然后利用一个滑动区间,每次保证这个区间中的数的种类能达到m个,每次到达m个,计算答案后将左端点向前推。这样就枚举完了所有情况。
====== G Groundhog Playing Scissors ======
===== 题意: =====
===== 题解: =====
====== H Groundhog Speaking Groundhogish ======
===== 题意: =====
===== 题解: =====
====== I Sorting the Array ======
===== 题意: =====
===== 题解: =====
====== J The Crime-solving Plan of Groundhog ======
===== 题意: =====
===== 题解: =====
====== K The Crime-solving Plan of Groundhog ======
===== 题意: =====
===== 题解: =====
====== L The Flee Plan of Groundhog ======
===== 题意: =====
===== 题解: =====
====== M The Shopping Plan of Groundhog======