会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
liyeixn
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
5
6
7
8
9
10
11
12
13
···
32
下一页
2020年9月21日
样式来源
摘要: 总体的所有样式:https://www.cnblogs.com/ECJTUACM-873284962/p/7628894.html 代码高亮:https://www.cnblogs.com/hongrunhui/p/5910374.html?utm_source=debugrun&utm_mediu
阅读全文
posted @ 2020-09-21 17:28 liyexin
阅读(125)
评论(0)
推荐(0)
2020年9月17日
数据库删除信息后,再次加入信息ID不再从1开始的解决办法
摘要: “truncate table 表名”重置空ID 来源:https://zhidao.baidu.com/question/105850257.html?qbl=relate_question_1&word=%CA%FD%BE%DD%BF%E2id%B2%BB%CA%C7%B4%D31%BF%AA%
阅读全文
posted @ 2020-09-17 08:27 liyexin
阅读(429)
评论(0)
推荐(0)
2020年9月16日
Codeforces Round #670 (Div. 2)(树的重心,dfs求子树大小)
摘要: 地址:http://codeforces.com/contest/1406/problem/C 题意: 给出n个点,n-1条边。 通过删除一条边,增加一条边,使得重心唯一 重心:树的某个节点,当去掉该节点后,树的各个连通分量中,节点数最多的连通分量其节点数达到最小值。 解析: 关于重心的一个性质:
阅读全文
posted @ 2020-09-16 21:24 liyexin
阅读(329)
评论(2)
推荐(0)
2020年9月14日
Codeforces Round #670 (Div. 2)B. Maximum Product(5个数乘积最大)
摘要: 地址:http://codeforces.com/contest/1406/problem/B 题意: 给出n个数,找出5个数,使得乘积最大化。 解析: 5个数,分情况: 负 正 0 5 1 4 2 3 3 2 4 1 5 0 可以发现,对于负数个数为1,3的时候,这个时候结果是负数 假设这个时候n
阅读全文
posted @ 2020-09-14 21:03 liyexin
阅读(214)
评论(0)
推荐(0)
2020年9月8日
Codeforces Round #668 (Div. 2)A->C
摘要: A:http://codeforces.com/contest/1405/problem/A 解析: 倒序输出即可。 #include<bits/stdc++.h> #include<map> #include<iostream> #include<cstring> #include<cmath>
阅读全文
posted @ 2020-09-08 18:50 liyexin
阅读(195)
评论(0)
推荐(0)
2020年9月5日
Codeforces Round #667 (Div. 3)(A->E)
摘要: A:http://codeforces.com/contest/1409/problem/A 题意: a,b, 每一步可a+k或a-k,1<=k<=10,a=b最少需要几步 解析: 优先+-10,不足的一定<10,一步即可 #include<bits/stdc++.h> #include<map>
阅读全文
posted @ 2020-09-05 23:34 liyexin
阅读(254)
评论(0)
推荐(0)
2020年8月27日
Educational Codeforces Round 94 (Rated for Div. 2)(A->E(分治))
摘要: A:http://codeforces.com/contest/1400/problem/A 解析: 发现每一个字符串,都包含s[n-1],所以直接打印n个s[n-1]即可 #include<bits/stdc++.h> #include<map> #include<iostream> #inclu
阅读全文
posted @ 2020-08-27 18:15 liyexin
阅读(182)
评论(0)
推荐(0)
2020年8月22日
Codeforces Round #665 (Div. 2)A->C
摘要: A:http://codeforces.com/contest/1401/problem/A 题意: 给出n,k A初始在n点,A可以向左或向右移动 B随意放 求出最小操作数,使得|OB-AB|=k 解析: 分开讨论 n==k,A不需要移动,0 n>k:将B放在OA之间,可实现要求。设OB=X,有方
阅读全文
posted @ 2020-08-22 16:30 liyexin
阅读(135)
评论(0)
推荐(0)
2020年8月18日
洛谷P1372 又是毕业季I(数论做法+二分做法)
摘要: 洛谷地址:https://www.luogu.com.cn/problem/P1372 题意: 简单来讲,就是在1~n中,找k个使得它们的gcd最大 解析: 一数学分析: 假设第一个为x 那么有2x,3x,4x,....kx kx<=n 则:x<=n/k n/k即为答案 #include<bits/
阅读全文
posted @ 2020-08-18 18:15 liyexin
阅读(190)
评论(0)
推荐(0)
洛谷P2066 机器分配(dfs做法)
摘要: 洛谷地址:https://www.luogu.com.cn/problem/P2066 题目描述 总公司拥有高效设备M台,准备分给下属的N个分公司。各分公司若获得这些设备,可以为国家提供一定的盈利。问:如何分配这M台设备才能使国家得到的盈利最大?求出最大盈利值。其中M≤15,N≤10。分配原则:每个
阅读全文
posted @ 2020-08-18 17:51 liyexin
阅读(258)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
10
11
12
13
···
32
下一页
公告