原创 Educational Codeforces Round 5 C. The Labyrinth

題目鏈接~~ 題意:求矩陣中’*’爲阻塞,’.’爲空,求每個阻塞塊相鄰的連通塊有多少空塊 如下: input 3 3 * . * . * . * . * output 3.3 .5. 3.3 由於每個’*’都

原创 Codeforces Round #342 (Div. 2) 題解

A. Guest From the Past time limit per test 1 second memory limit per test 256 megabytes input standard inpu

原创 Educational Codeforces Round 7 題解

A. Infinite Sequence time limit per test1 second memory limit per test256 megabytes i

原创 hdu1233 還是暢通工程 最小生成樹(kruskal算法)

還是暢通工程 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description 某省調查鄉

原创 c++之精確度

#include <bits/stdc++.h>//含iomanip頭文件 using namespace std; int main() { double pi=31415.9265333; cout<<fix

原创 Educational Codeforces Round 6 C. Pearls in a Row

題目鏈接~~ 題意:求一個數列中最多的“good segments” 的數量,只要一個區間有且僅有兩個相同的元素就是“good segments”,還有就是區間長度儘可能長。 這個是貪心思想,只要從”good segments”最後元素