Last Posts

  • Mac下Homebrew安装指南

    最近终于有点时间了,想跟一下学堂在线的课程“TsinghuaX: 30240243X 操作系统 (2016春)”,可以和THU在pizza平台交流也是一个不错的体验。课程也提供了相关的实验环境配置说明(主要为Windows下用虚拟机搭载的Ubuntu环境),不过在配置实验环境的过程中发现了一点小问题,于是就产生了这篇文章。

     

    (更多…)

    continue reading
  • 迟迟不见的更新,究竟去哪了

    也不知道是过了多久,再次打开这里的时候依旧觉得有些东西早已物是人非。

    上次更新还是2014年11月,距今已经过去了16个月了,当年还是一年级的我也已经三年级了,好像是时候考虑本科毕业之后应该做什么了。在过去的约三年时间,学了各种似懂非懂的课程,写了各种有用没用的代码,身边的朋友也换了一批又一批,该过去的事情也早已经过去了,该来的也已经在身边了,好像这是一个还不错的结局。

    (更多…)

    continue reading
  • UVa 839.Not so Mobile

    UVa 839.Not so Mobile

    • Question:输入一个树状天平,根据力矩相等判断是否平衡。力矩平衡也就是Wl * Dl = Wr * Dr(如果有子树,那么它的W为子树的Wl + Wr)。换句话说题目就是要求验证输入是否可以建立一颗满足力矩平衡的二叉树。

    (更多…)

    continue reading
  • ZOJ 1814 | POJ 1666.Candy Sharing Game

    ZOJ 1814POJ 1666.Candy Sharing Game

     

    • Question:A number of students sit in a circle facing their teacher in the center. Each student initially has an even number of pieces of candy. When the teacher blows a whistle, each student simultaneously gives half of his or her candy to the neighbor on the right. Any student, who ends up with an odd number of pieces of candy, is given another piece by the teacher. The game ends when all students have the same number of pieces of candy.
      Write a program which determines the number of times the teacher blows the whistle and the final number of pieces of candy for each student from the amount of candy each child starts with.

     

    (更多…)

    continue reading
  • 小结STL(未完)

    • STL 中栈的使用方法(stack)

     

    (更多…)

    continue reading