01 2019 档案

leecode 937 Reorder Log Files (模拟)
摘要:传送门:点我 You have an array of logs. Each log is a space delimited string of words. For each log, the first word in each log is an alphanumeric identifie 阅读全文

posted @ 2019-01-26 22:55 Esquecer 阅读(222) 评论(0) 推荐(0)

leecode 978. Longest Turbulent Subarray(最长连续波动序列,DP or 滚动数组)
摘要:传送门:点我 978. Longest Turbulent Subarray 978. Longest Turbulent Subarray A subarray A[i], A[i+1], ..., A[j] of A is said to be turbulent if and only if: 阅读全文

posted @ 2019-01-23 22:37 Esquecer 阅读(288) 评论(0) 推荐(0)

TOJ4439微积分――曲线积分(数学,模拟)
摘要:传送门:点我 格林公式P,Q为关于x,y的函数。 现在为了方便起见,现给出x的积分上限1,积分下限0, y的积分上限x,积分下限0。 P只是关于Y的函数,Q只是关于X的函数。 输入 开始输入为测试组数n。每一组的开始输入Q的项数q和Q关于X的系数以及指数。接下来是P的多项式的项数p和P的关于Y的系数 阅读全文

posted @ 2019-01-23 10:14 Esquecer 阅读(378) 评论(0) 推荐(0)

组合\快乘\卢卡斯
摘要:LL quick_pow(LL a, LL n){ LL ans = 1LL; a %= p; while(n){ if(n & 1) ans = ans * a % p; a = a * a % p; n >>= 1; } return ans; } LL C(LL n, LL m){ if(n 阅读全文

posted @ 2019-01-19 12:59 Esquecer 阅读(180) 评论(0) 推荐(0)

导航