- 博客(7)
- 收藏
- 关注
原创 UVALive 7269 Snake Carpet
5 5 5 3 35 4 4 3 2 5 4 4 1 25 5 5 3 3 6 65 4 4 3 2 6 6 5 4 4 1 2 6 65 5 5 3 3 6 65 4 4 3 2 6 65 4 4 1 2 7 67 7 7 7 7 7 6剩下自己领悟规律#include using namespace std;const int N = 520;int a[N
2017-03-24 13:58:54
284
原创 STL简易list, queue和stack
#include using namespace std;class Range{ int B, E, D;public: class Iterator{ public: int index; Range& out; Iterator(Range& o, int i): out(o), index(i){}
2017-03-24 13:52:55
235
原创 Eilxir解决哲学家就餐问题
require Tuplerequire List defmodule Rand do def rand do elem Time.utc_now().microsecond,0 endenddefmodule Example do def special(t, s) do if s == 5 do -1 else if elem
2017-02-23 23:16:41
284
原创 16叉树
#include #include using namespace std;const int M = 16;struct node{ node(int _v = 0, int _n = 0): value(_v), num(_n){ for(int i = 0; i < M; i++) next[i] = NULL; } int value, num; node* next
2017-01-29 19:35:23
735
1
原创 scala 快速排序与合并排序
def sort(L: List[Int]): List[Int] = L match { case Nil => Nil case base::tail => val (left, right) = tail.partition(_ < base) sort(left):::base::sort(right)} sort(List(3, 6, 1, 0, -1)).fore
2017-01-20 15:59:10
391
原创 scala 解决8皇后问题
val n = 14val Col = new Array[Boolean](n)val Bevel1 = new Array[Boolean](n*2)val Bevel2 = new Array[Boolean](n*2)def col(y: Int) = !Col(y)def bevel1(x: Int, y: Int) = !Bevel1(x-y+n-1)def b
2017-01-19 21:12:39
278
原创 新的开始
上一个博客写了一点ACM的题解,今天申请了新的博客,以后写一些新的东西。 其实早在10月份大连站结束以后ACM生涯就基本结束了,但因为同学还有其它地方的比赛就想等同学也打完之后再写点感慨。结果同学的成绩并不理想,真没想到我们队竟然是成绩最好的,成绩太差就不提了。可以说打了正好一年的比赛,15年10月接触OJ,16年10月结束ACM生涯,关键时刻抱队友大腿,在此膜拜一下绝望时刻有时(仅仅是有时
2017-01-19 20:53:50
186
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人