
比赛栏
少侠,慢点走
与其在失败后后悔,不如在失败前成功
展开
-
牛客小白月赛14
官方题解地址 A题解 B题解 C题解 D题解 E题解 F 待补 G题解 H 待补 I题解 J待补原创 2019-05-13 23:36:09 · 135 阅读 · 0 评论 -
A 简单计数(矩阵快速幂 + 矩阵构造)
矩阵快速幂 + 矩阵构造 AC如下 #include <bits/stdc++.h> #include<iostream> #include<algorithm> #include<cstdlib> #include<cstring> #include<cstdio> #include<string> #inclu...原创 2019-05-13 23:38:07 · 202 阅读 · 0 评论 -
B 投硬币(逆元 + 组合数 + 概率)
逆元 + 组合数 + 概率 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 100005; const int M = 998244353; ll fac[N]={1,1},inv[N]={1,1},f[N]={1,1}; ll qpow(ll a,ll b,ll ...原创 2019-05-13 23:39:36 · 264 阅读 · 0 评论 -
E 等比数列三角形(数学)(较难)
详细看官方题解 C++代码一 #include<bits/stdc++.h> using namespace std; double e = (sqrt(5) + 1) / 2; const int mod = 1e9 + 7; int main(){ int n ; cin >> n; long long ans = 0; for(int i = 1; i * i ...原创 2019-05-13 23:41:47 · 607 阅读 · 0 评论 -
I 有毒的玻璃球(积性函数 + 快速幂)
积性函数 + 快速幂 #include<bits/stdc++.h> using namespace std; typedef long long ll ; double e = (sqrt(5) + 1) / 2; const int mod = 1e9 + 7; const int N = 1e7; bool isprime[N + 7]; int prime[N + 7],ans...原创 2019-05-13 23:43:30 · 142 阅读 · 0 评论 -
G many sum(朴素 )
朴素 可更加优化 #include<bits/stdc++.h> using namespace std; long long A[2000000 + 10],B[2000000 + 10]; int main(){ int n , a ,m; cin >> n >> a >> m; A[1] = a; for(int...原创 2019-05-13 23:45:03 · 158 阅读 · 0 评论 -
2019年湘潭大学程序设计竞赛
https://ac.nowcoder.com/acm/contest/893#question Problem A 题意: 题解:模拟 C++版本一 #include<bits/stdc++.h> using namespace std; int main(){ int flag = 0; int n1,n2 , p1,p2 , s1,s2; cin >>...原创 2019-05-10 00:36:29 · 366 阅读 · 0 评论