2016年10月14日

ubuntu 16.04 搜狗输入法无法中英文切换

摘要: Ubuntu 16.04 安装了搜狗输入法后无法用shift 键切换英文,原来是在设置里把其他输入法都禁止了,其中就包括英文(美国),重新加回来就可以了。 阅读全文

posted @ 2016-10-14 09:03 Tob's_the_top 阅读(765) 评论(0) 推荐(0) 编辑

2016年10月13日

修改可选项文件实现自动连接数据库服务器

摘要: 一般连接mysql服务器都要输入mysql -h localhost -p -u root语句,修改了可选项文件可以供mysql自动读取,连接服务器。 MySql的可选项文件位于/etc/mysql 或者 /etc 文件夹下。 cd /etc/mysql sudo vim my.cnf 在文件中添加 阅读全文

posted @ 2016-10-13 22:36 Tob's_the_top 阅读(130) 评论(0) 推荐(0) 编辑

2016年10月2日

Codeforces Round #374 (Div. 2)解题报告

摘要: Problem B: Passwords 题意:给出n个字符串密码,在给出一个正确密码,输密码必须先输入简单的密码,连续输错k次密码会罚时5秒,输一次密码耗时1秒,求可能的最短和最长的耗时。(注意:给出的n个密码可能包含多个正确密码) 思路:略 code: #include <map> #inclu 阅读全文

posted @ 2016-10-02 17:20 Tob's_the_top 阅读(109) 评论(0) 推荐(0) 编辑

2016年8月26日

hihoCoder 1238 : Total Highway Distance(dfs + 二分)

摘要: 题目连接 题意:给出n个城市,n-1条道路,求出两两路径的和。 思路:题意等价于求每天道路的使用次数,如下图所示 红色路径的使用度为以节点2为根节点的子树的节点数x * (n-x),此处为2 * 2 = 4。先按u<v的规则保存好道路,然后dfs一遍处理处每天道路的使用度,dfs过程中需要知道当前的 阅读全文

posted @ 2016-08-26 23:01 Tob's_the_top 阅读(141) 评论(0) 推荐(0) 编辑

2016年8月25日

AIM Tech Round 3 (Div. 2) 题解

摘要: 总结:做了3道,补题1道 A. Juicer 题意:水题 #include <iostream> #include <cstdio> #include <algorithm> #define maxn 100005 using namespace std; int a[maxn]; int main 阅读全文

posted @ 2016-08-25 11:05 Tob's_the_top 阅读(177) 评论(0) 推荐(0) 编辑

2016年8月13日

Codeforces Round #367 (Div. 2) 题解

摘要: 本场总结:做了3道,第一题赛后被系统hack A. Beru-taxi Vasiliy lives at point (a, b) of the coordinate plane. He is hurrying up to work so he wants to get out of his hou 阅读全文

posted @ 2016-08-13 01:56 Tob's_the_top 阅读(315) 评论(0) 推荐(0) 编辑

2016年8月9日

zjgsu 第六场解题报告

该文被密码保护。 阅读全文

posted @ 2016-08-09 00:56 Tob's_the_top 阅读(5) 评论(0) 推荐(0) 编辑

2016年7月30日

图论模板集合

摘要: 1.拓扑排序 #include <iostream> #include <cstdio> #include <cstring> #include <string> #include <algorithm> #include <set> #include <vector> using namespac 阅读全文

posted @ 2016-07-30 17:43 Tob's_the_top 阅读(128) 评论(0) 推荐(0) 编辑

poj1144Network (求割点模板题)

摘要: 题目连接 题意:给出一个无向图,求出割点的个数 code: 阅读全文

posted @ 2016-07-30 17:38 Tob's_the_top 阅读(145) 评论(0) 推荐(0) 编辑

2016年7月27日

hud 5547 sodoku (DFS)

摘要: 题目连接 题目大意:4*4的网格做数独,*代表空的格子,要求将4*4分解为4个2*2的网格,每个2*2网格也满足数独(包含1234) code: 阅读全文

posted @ 2016-07-27 09:41 Tob's_the_top 阅读(126) 评论(0) 推荐(0) 编辑

导航