1 2 3 4 5 ··· 9 下一页

2016年9月13日

【又想多了】 听 怎样成为高手-罗辑思维 记录

摘要: ## 总结 结论一:学习需要脱离顺畅区,进入不顺区,而且不能脱离太远,进入无从下手区。(同时练习方法要对) 结论二:有时,需要通过刻意,才能进入不顺区。 结论三:每个人都能享受学习。 ##文字版地址 http://blog.sina.com.cn/s/blog_4a8a82500102wne8.ht 阅读全文

posted @ 2016-09-13 15:09 ShineCheng 阅读(550) 评论(0) 推荐(0) 编辑

2014年12月23日

小刘(第二版)

摘要: 第三章3.1 uva1585 uvalive3354题意:错题0分,对题得分为目前位置连续正确数。求总分。思路:模拟代码:#include #include char str[10000];int main() { int t; scanf("%d", &t); while (t-... 阅读全文

posted @ 2014-12-23 12:18 ShineCheng 阅读(148) 评论(0) 推荐(0) 编辑

2014年10月17日

UVA 1594:Ducci Sequence (模拟 Grade E)

摘要: 题意:对于一个n元组(a0,a1,...),一次变换后变成(|a0-a1|,|a1-a2|,...)问1000次变换以内是否存在循环。思路:模拟,map判重代码:#include #include #include #include #include using namespace std;stru... 阅读全文

posted @ 2014-10-17 20:19 ShineCheng 阅读(844) 评论(1) 推荐(1) 编辑

UVA 1593: Alignment of Code(模拟 Grade D)

摘要: 题意:格式化代码。每个单词对齐,至少隔开一个空格。思路:模拟。求出每个单词最大长度,然后按行输出。代码:#include #include #include char words[1200][190][90];int maxLen[190];char tmp[200];typedef char * ... 阅读全文

posted @ 2014-10-17 19:59 ShineCheng 阅读(813) 评论(0) 推荐(0) 编辑

2014年10月16日

UVA 1589:Xiangqi (模拟 Grade D)

摘要: 题目:象棋,黑棋只有将,红棋有帅车马炮。问是否死将。思路:对方将四个方向走一步,看看会不会被吃。代码:很难看……WA了很多发,还越界等等。#include #include #include char graph[13][13];int go[4][2] = {{1,0},{0,1},{-1,0},... 阅读全文

posted @ 2014-10-16 21:45 ShineCheng 阅读(1590) 评论(1) 推荐(0) 编辑

2014年10月15日

UVA 1604:Cubic Eight-Puzzle(模拟,BFS Grade C)

摘要: 题意:3*3方格,有一个是空的。其他的每个格子里有一个立方体。立方体最初上下白色,前后红色,左右蓝色。移动的方式为滚。给出初态空的位置,终态上面颜色情况,问最少多少步能到达。如果超过30步不能到达,-1。思路:模拟。另外再加了一个A*优化。就是估计一下。应该还能优化的。感觉像二进制上可以优化。实在不... 阅读全文

posted @ 2014-10-15 19:33 ShineCheng 阅读(418) 评论(0) 推荐(0) 编辑

ZOJ 3820:Building Fire Stations(树的直径 Grade C)

摘要: 题意:n个点的树,边长全为1,求找出两个点,使得树上离这两个点距离最远的那个点,到这两个点(中某个点就行)的距离最小。思路:求树直径,找中点,删除中间那条边(如果直径上点数为奇数,则删任何一侧都可),分成两个子树,再求中心,即为答案。代码://14:12#include #include #incl... 阅读全文

posted @ 2014-10-15 15:18 ShineCheng 阅读(213) 评论(0) 推荐(0) 编辑

2014年10月2日

UVALive 6451:Tables(模拟 Grade D)

摘要: VJ题目链接题意:模拟输出表格思路:模拟……很暴力代码:#include #include #include #include using namespace std;int graph[100][100];int main() { int n; while (scanf("%d", &... 阅读全文

posted @ 2014-10-02 16:05 ShineCheng 阅读(183) 评论(0) 推荐(0) 编辑

2014年10月1日

UVA 11925:Generating Permutations(冒泡排序 Grade D)

摘要: VJ题目链接题意:n个数(n#include #include using namespace std;#define n 1023int a[n+10];int n;int hd;bool check() { for (int i = 1; i a[(hd+1)%n] && (!(a[hd... 阅读全文

posted @ 2014-10-01 14:05 ShineCheng 阅读(294) 评论(0) 推荐(0) 编辑

2014年9月29日

UVALive 3507:Keep the Customer Satisfied(贪心 Grade C)

摘要: VJ题目链接题意:知道n(n d[j]。假设我们现在有一个工作方案,使得i工作在j工作之前完成。如 ..., i , ... , j , ...记做 preI, i, midIJ, j, afterJ此时将这个工作方案的i移动到j后面一个完成,其他不动。则变成 preI , midIJ , j ,... 阅读全文

posted @ 2014-09-29 16:12 ShineCheng 阅读(198) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 9 下一页

导航