摘要: inline int read() { int n=0,f=1;char c=getchar(); while(c<'0'||c>'9'){if(c=='-') f=-1;c=getchar();} while(c>='0'&&c<='9') {n=n*10+c-'0';c=getchar();} 阅读全文
posted @ 2021-08-12 15:33 xiaoxiaowu 阅读(40) 评论(0) 推荐(0)
摘要: 邻接表的实现 #include <bits/stdc++.h> #define ll long long const int INF=0x3f3f3f3f; using namespace std; const int Max_n=1000005; vector<int> G[Max_n]; int 阅读全文
posted @ 2021-08-12 10:06 xiaoxiaowu 阅读(15) 评论(0) 推荐(0)
摘要: ll solve3(ll a,ll b) { ll sum=1; for(int i=0;i<a;i++) { sum=sum*(b--); } for(int i=1;i<=a;i++) sum=sum/i; return sum; } ll solve2(ll n) { ll sum=0; if 阅读全文
posted @ 2021-08-07 09:44 xiaoxiaowu 阅读(36) 评论(0) 推荐(0)
摘要: 求a*b%p 其中a,b,p是64位大数 #include <bits/stdc++.h> //#define pair<int,int> pii #define ll long long const int INF=0x3f3f3f3f; using namespace std; ll mul(l 阅读全文
posted @ 2021-08-02 10:13 xiaoxiaowu 阅读(86) 评论(0) 推荐(0)