- 博客(10)
- 收藏
- 关注
原创 2019 ICPC Asia-East Continent Final C Dirichlet k-th root
题意:先给结论,fmod+1=ϵ(f(1))∗f,fmod=ϵ(f(1))f^{mod+1}=ϵ(f(1))*f,f^{mod}=ϵ(f(1))fmod+1=ϵ(f(1))∗f,fmod=ϵ(f(1)),因为题目保证f(1)=1,以下直接以1替代。即自卷mod+1次就回到了起点。这个结论意味着fk∗inv(k)=ff^{k*inv(k)}=ffk∗inv(k)=f,因为根据结论可知,fp∗mo...
2020-02-18 21:39:41
1740
2
原创 2019 Multi-University Training Contest 6 F - Faraway
题面Problem Descriptionn soldiers are dispatched to somewhere in Byteland. These soldiers are going to set off now, but the target location is not so clear.Assume the target location is at (xe,ye), i...
2019-10-26 16:07:47
185
原创 North American Invitational Programming Contest (NAIPC) 2019 Piece of Cake
Piece of Cake题目题意题解题目Alice received a cake for her birthday! Her cake can be described by a convex polygon with n vertices. No three vertices are collinear.Alice will now choose exactly k random ve...
2019-08-14 11:38:04
759
原创 CCPC-Wannafly Winter Camp Day7 D-二次函数
题目描述给定三个二次函数f(x)=x2+a1x+b1,g(x)=x2+a2x+b2,h(x)=x2+a3x+b3\begin{array}{c}f(x)=x^2 +a_1x+b_1 ,g(x)=x^2 +a_2x+b_2 ,h(x)=x^2+a_3x+b_3 \end{array}f(x)=x2+a1x+b1,g(x)=x2+a2x+b2,h(x)=x2+a3x+b3...
2019-04-08 13:40:22
169
原创 centos7环境配置全过程,uwsgi+nginx+django+https详解
因为当时学习服务器的时候用了ubuntu,后来做了很多小项目都是用ubuntu做的,但是项目逐渐涉及复杂内容后,发现网上大部分教程都是基于centos,也发现很多环境基于centos会友好一些,趁着现在还能回头,项目还不太大,长痛不如短痛,今天就搞了它。下面记录一下我重装的过程。首先是创建用户并授权# adduserdemo# passwddemo设置密码...
2019-03-31 22:20:14
1043
转载 求组合数模板
typedef long long ll;const ll mod = 1e9+7;const int mmax = 1e5 + 10;ll fac[mmax + 5];ll inv[mmax + 5];ll qpow(ll a, ll b) { ll r = 1, t = a; while (b) { if (b & 1)r = (r*...
2018-08-16 11:38:29
251
原创 2018 Multi-University Training Contest 8 1001 Character Encoding
Character EncodingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1274 Accepted Submission(s): 328 Problem DescriptionIn computer s...
2018-08-16 11:34:10
158
原创 多校赛2018 Multi-University Training Contest 8 1010 Taotao Picks Apples
Taotao Picks ApplesTime Limit: 2000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2307 Accepted Submission(s): 344 Problem DescriptionThere is an ...
2018-08-16 11:10:21
214
原创 矩阵快速幂模板
#include<bits/stdc++.h>using namespace std;typedef long long ll;const int Matr = 4;const ll mod = 1e9 + 7;class mat{public: ll a[Matr][Matr], size; mat(int len){ size = len; memse...
2018-08-14 11:07:04
177
原创 2018 Multi-University Training Contest 7 1010 Sequence
Problem DescriptionLet us define a sequence as below Your job is simple, for each task, you should output Fn module 109+7. InputThe first line has only one integer T, indicates the num...
2018-08-14 10:06:36
171
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人