原创 BZOJ2243

給定一棵有n個節點的無根樹和m個操作,操作有2類: 1、將節點a到節點b路徑上所有點都染成顏色c; 2、詢問節點a到節點b路徑上的顏色段數量(連續相同顏色被認爲是同一段),如“ 112221 ” 由3段組成:“ 11 ” 、“

原创 use api in pygal

import requests import pygal from pygal.style import LightColorizedStyle as LCS,LightenStyle as LS url='https://ap

原创 process json in pygal

import json from random_walk import get_country_code from pygal.maps.world import World from pygal.style import Rot

原创 hdu6133

Though being cruel and merciless in the battlefields, the total obedience to the command hierarchy makes message de

原创 hdu6154CaoHaha's staff

Problem Description “You shall not pass!” After shouted out that,the Force Staff appered in CaoHaha’s hand. As w

原创 vim常用命令總結

三種模式:命令模式,末行模式,插入模式 esc:將任何模式切換到命令模式 從命令模式切換到插入模式: i:在當前光標之前插入字符 I:在行首插入字符 a:在當前光標之後插入字符 A:在行末插入字符 o:在下一行新建一行並

原创 zoj3800線段樹+離線

You are given a sequence {A0, A1, …, AN-1} and an integer set called GS. Defined a function called G(L, R) on A, wh

原创 hdu 6155 - Subsequence Count 線段樹+dp+矩陣

參考的原博客:http://www.cnblogs.com/iRedBean/p/7398272.html #include <bits/stdc++.h> #define lson l,m,rt<<1 #define rso

原创 ***hdu6183

轉載自:http://blog.csdn.net/oranges_c/article/details/77800825 Do you like painting? Little D doesn’t like painting, e

原创 HYSBZ2038 小Z的襪子(莫隊算法)

原地址:http://www.cnblogs.com/chanme/p/3681999.html 今天學了一下傳說中的解決離線詢問不修改的一種算法。題目的意思非常簡單,就是詢問在一個[L,R]區間裏的取兩個物品,然後這兩個物品顏

原创 hdu4348To the moon

Background To The Moon is a independent game released in November 2011, it is a role-playing adventure game power

原创 hdu3533bfs+預處理

The students of the HEU are maneuvering for their military training. The red army and the blue army are at war to

原创 hdu3085雙向bfs+曼哈頓距離判斷

Last night, little erriyue had a horrible nightmare. He dreamed that he and his girl friend were trapped in a big m

原创 poj3728並查集+LCA

題目大意: 對於一棵樹,樹上的每點都有一個權值,對於一個詢問u,v,求從u 點到v點的路徑上進行買賣所能得到的最大值,並且,買在賣之前。 There are N cities in a country, and there i

原创 multiprocessing_Manager().Queue()_Pool

This code is to realize copy multiple files in one file to the other file by Pool in multiprocessing ,to reduce the