会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
TWhh
博客园
首页
新随笔
联系
订阅
管理
2019年9月13日
博客迁移
摘要: 将博客搬至CSDN
阅读全文
posted @ 2019-09-13 20:54 TWhh
阅读(58)
评论(0)
推荐(0)
2016年9月18日
Codeforces Round #372 (Div. 2) -- C. Plus and Square Root
摘要: 直接找规律就可以打表 开始是2,+2后,变成4,开方变成2,等级为2, 2/2 = 1 然后2 + 17 2 = 36,开方后变成6 等级为3, 6/3 = 2 然后6 + 46 3 = 144,开方后变成12 等级为4 12/4 = 3 然后12 + 97 4 = 400 开方后变成20 等级为5
阅读全文
posted @ 2016-09-18 15:45 TWhh
阅读(112)
评论(0)
推荐(0)
Codeforces Round #372 (Div. 2), problem: (B) Complete the Word
摘要: 水题,每次截取长度为26的字符串,然后直接进行修改就可以 然而本弱渣昨天wa看很久 include using namespace std; int n,c; int ans[30]; int main() { string s; cin s; int tt=0; int n=s.size(); i
阅读全文
posted @ 2016-09-18 15:42 TWhh
阅读(152)
评论(0)
推荐(0)
Codeforces Round #372 (Div. 2), problem: (A) Crazy Computer 水题
摘要: #include using namespace std; int n,c; int a[1000000]; int main() { cin>>n>>c; if(n==1) { cout>a[i]; } for(int i=0;i
阅读全文
posted @ 2016-09-18 15:39 TWhh
阅读(151)
评论(0)
推荐(0)
2016年7月22日
codeforce 14D 无向图 求树的长度 bfs是一种方法 先用dfs做
摘要: 枚举每一条边 将树分为两部分 分别dfs求出树的直径 从一点开始最长路加次长路为树的直径 #include<iostream> #include<vector>#include<algorithm>using namespace std;vector<int> G[100000];int n,s;i
阅读全文
posted @ 2016-07-22 13:43 TWhh
阅读(149)
评论(0)
推荐(0)
图论 邻接表实现 动态数组实现
摘要: #include<iostream>#include<vector>#include<algorithm>using namespace std;struct edge{ int to,cost;};vector<edge> G[10000];int main(){ int v,e; while(c
阅读全文
posted @ 2016-07-22 09:29 TWhh
阅读(198)
评论(0)
推荐(0)
2016年7月21日
Codeforces Round #177 (Div. 2)---E. Polo the Penguin and XOR operation
摘要: 题意:让你构造一个序列,使得序列异或和最大,序列为n 的全排列 ,序列和计算方式为 SUM = a[1] ^ 0 + a[2] ^ 1 + a[3] ^ 2 + .......a[n] ^ n 感想 :之前没做过有关位运算的题,对这一块很陌生,两个数异或以后,如果二进制每一位都为1,那么一定最大,找
阅读全文
posted @ 2016-07-21 21:12 TWhh
阅读(153)
评论(0)
推荐(0)
cf 121 E 线段树解法
摘要: 题意:给n个数 m次操作 操作方式为 count 统计区间里的幸运数字都多少个 add给区间里每个数都加上一个值 网上的大牛都是用树状数组写的 线段树也可以解决 只是有点悬 刚学线段树 借此加强知识储备和代码能力 线段树单点更新 谢谢各位指教 #include<iostream> #include<
阅读全文
posted @ 2016-07-21 19:11 TWhh
阅读(236)
评论(0)
推荐(0)
公告