开发记录
文章平均质量分 58
yc5_yc
这个作者很懒,什么都没留下…
展开
-
PHP登入登出系统
------------------------------------~index.php-------------------------------------------欢迎访问yc综合系统 if(isset($_GET["debug"])) setcookie("login","",time()-3600); if(isset原创 2012-09-16 12:15:01 · 979 阅读 · 0 评论 -
迷宫游戏代码OpenGL
#include // Must have for Windows platform builds//#include "gl\glee.h" // OpenGL Extension ¡°autoloader¡±#include // Microsoft OpenGL headers (version 1.1 by themselves)#include // OpenGL Utili原创 2012-10-24 17:21:33 · 793 阅读 · 0 评论 -
用Python实现的基本版的线段树
class node: def __init__(self,x,y): self.l=x self.r=y self.key=0 if x mid=(x+y)/2 self.left=node(x,mid) self.right=node(原创 2012-11-26 20:57:04 · 1712 阅读 · 0 评论 -
用 Python实现C的读入方式
A=[]N=int(input("N:"))x=""tot=0while True: flag=0 y=x.split(" ") for j in y: if j!='': j=int(j) A.append(j) tot=tot+1原创 2012-11-26 17:59:43 · 350 阅读 · 0 评论 -
完整版线段树求最小值,支持区间减
def Min(a,b): if a return a else: return bclass node: def __init__(self,x,y): self.l=x self.r=y self.key=0 self.lazy=0 i原创 2012-11-26 21:45:27 · 541 阅读 · 0 评论 -
Haskell线段树建树
调了一晚上……data Tree=Tree Int Int [Tree] [Tree]|Empty deriving (Show)build :: (Int,Int)->Treebuild (x,y)=if x<y then Tree x y [build (x,(div (x+y) 2))] [build ((div (x+y) 2)+1,y)] else Tree x y [Emp原创 2012-11-30 22:23:47 · 720 阅读 · 0 评论 -
Haskell读入一个字符串,把它转换成数字
toint :: String->Inttoint' :: Char->Inttoint' s |s=='1' =1 |s=='2' =2 |s=='3' =3 |s=='4' =4 |s=='5' =5 |s=='6' =6 |s=='7' =7 |s=='8' =8 |s=='9' =9 |s=='0' =0 |otherwise = 0原创 2012-12-01 10:37:01 · 3412 阅读 · 0 评论