原创 XF&X

Please do not leave me alone. I am going to die. Give me a hand and pull me out of the darkness.

原创 【數學 逆元】zoj 3609 Modular Inverse

#include <iostream> #include <cmath> #include <algorithm> #include <cstdio> using namespace std; int x,y,q; void

原创 編寫who命令

Refer:編寫who命令 #include<stdio.h> #include<utmp.h> #include<string.h> #include<stdlib.h> #include<time.h> #define SH

原创 hdu 5423 Rikka with Tree

參考:http://blog.csdn.net/aaaaacmer/article/details/48093767 #include <stdio.h> #include <string.h> #include <algorit

原创 【暴力】ZOJ 1856 Happy Life

【ZOJ】1856 Happy Life 暴力求解,只要每次改變happiness值爲負的人的符號即可。 這題是保證有解的,至於爲何難以證明。 #include <iostream> #include <stdio.h> #i

原创 fastjson的SerializerFeature

0X00 先來一下SerializerFeature的源碼吧。 /* * Copyright 1999-2101 Alibaba Group. * * Licensed under the Apache License, V

原创 【DP】ZOJ 2852 Deck of Cards

ZOJ 2852 Deck of Cards 參考自:AC_Von f[j][k][l]表示slot x1, x2, x3的值爲j,k,l時的最優值。pre[j][k][l]表示他的前一個狀態。 #include <iostrea

原创 【二分圖】專題

refer:http://blog.csdn.net/hackbuteer1/article/details/7398008 http://poj.org/problem?id=1469 #include <iostream> #in

原创 【Python】刪除重複文件 並重命名

轉:!@¥%¥% Python: # -*- coding: utf-8 -*- import os import hashlib from time import clock as now def getmd5(filenam

原创 【打表 or 規律】ZOJ 2965 Accurately Say "CocaCola"!

題目鏈接:ZOJ 2965 Accurately Say “CocaCola”! 我先用打表做了下,也是能A的 #include <iostream> #include <algorithm> #include <stdio.h>

原创 ubuntu 手動安裝flash 插件

1.下載flash插件,選擇tar.gz的包 2.解壓 3.將libflashplayer.so拷到firefox的插件目錄/usr/lib/mozilla/plugin/下: sudo cp libflashplayer.so /usr

原创 【overthewire】Vortex

 Level 0 → Level 1 原題看這裏:!@#¥%……&* 大概意思是讓你鏈接vortex.labs.overthewire.org的5842端口,會給你4個 unsigned integers,計算出他們的結果,輸入,然後會返

原创 Ubuntu登陸密碼忘記後找回方式

[轉自]:Ubuntu登陸密碼忘記後找回方式 長久沒用了,再次登陸Ubuntu的時候提醒密碼錯誤,然後就進入了guest session,依然可以進入系統進行工作但身份是guest,於是開始了找回密碼的漫漫長路。 首先,在gue

原创 【百度之星資格賽】 1002 列變位法解密

Problem Description 列變位法是古典密碼算法中變位加密的一種方法,具體過程如下 將明文字符分割成個數固定的分組(如5個一組,5即爲密鑰),按一組一行的次序整齊排列,最後不足一組不放置任何字符,完成後按列讀取即成

原创 ubuntu 編寫自己的ls命令

Refer: ubuntu 編寫自己的ls命令 #include <stdio.h> #include <sys/types.h> #include <dirent.h> #include <sys/stat.h> #includ