上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: 传送门 A - Kth Term #include <bits/stdc++.h> #define ll long long using namespace std; int a[32]={1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 阅读全文
posted @ 2020-03-15 13:22 zdragon 阅读(299) 评论(0) 推荐(1) 编辑
摘要: 传送门 A - Hitachi String #include <bits/stdc++.h> #define ll long long using namespace std; char s[15]; int main() { //freopen("in.txt","r",stdin); scan 阅读全文
posted @ 2020-03-09 21:27 zdragon 阅读(350) 评论(0) 推荐(1) 编辑
摘要: 传送门 A - Station and Bus #include <bits/stdc++.h> using namespace std; char s[5]; int main() { //freopen("in.txt","r",stdin); scanf("%s",s); int a=0,b= 阅读全文
posted @ 2020-03-08 12:16 zdragon 阅读(549) 评论(0) 推荐(1) 编辑
摘要: 传送门 A - Duplex Printing #include <bits/stdc++.h> #define ll long long using namespace std; int main() { //freopen("in.txt","r",stdin); int n; scanf("% 阅读全文
posted @ 2020-03-02 16:10 zdragon 阅读(534) 评论(2) 推荐(2) 编辑
摘要: 传送门 A - Beginner #include <bits/stdc++.h> #define ll long long using namespace std; int main() { //freopen("in.txt","r",stdin); int n,r; scanf("%d%d", 阅读全文
posted @ 2020-02-23 20:16 zdragon 阅读(527) 评论(3) 推荐(0) 编辑
摘要: 描述 Given an N x N square grid (2 <= N <= 15) and each grid has some beans in it. You want to write at most K (1 <= K <= 2N - 2) horizontal or vertical 阅读全文
posted @ 2019-11-25 14:10 zdragon 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 描述 FJ now is a postman of a small town in the hills. The town can be represented by a N×N matrix. Each field is represented with:-'K' character: a hou 阅读全文
posted @ 2019-11-17 18:24 zdragon 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 题意:求$(\sum_{i=1}^{n}\sum_{j=1}^{n}ijgcd(i,j))mod p$(p为质数,n<=1e10) 很显然,推式子。 $\sum_{i=1}^{n}\sum_{j=1}^{n}ijgcd(i,j)$ =$\sum_{d=1}^{n}\sum_{i=1}^{n}\sum 阅读全文
posted @ 2019-09-19 21:35 zdragon 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 题意:求$\sum_{i=1}^{n}\sum_{j=1}^{m}lcm(i,j)$。 开始开心(自闭)化简: $\sum_{i=1}^{n}\sum_{j=1}^{m}lcm(i,j)$ =$\sum_{d=1}^{n}\sum_{i=1}^{n}\sum_{j=1}^{m}\frac{ij}{d 阅读全文
posted @ 2019-09-19 21:11 zdragon 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题意:$\sum_{i=1}^{n}\sum_{j=1}^{n}[gcd(i,j)\epsilon prime]$。 对于这类题一般就是枚举gcd,可得: =$\sum_{d\epsilon prime}\sum_{i=1}^{n}\sum_{j=1}^{n}[gcd(i,j)==d]$ =$\su 阅读全文
posted @ 2019-09-18 21:50 zdragon 阅读(235) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页