原创 VideoView無法播放此視頻 open failed: EACCES(Permission denied)

在用videoview的時候,明明已經申請了權限,也動態獲取了權限,但是現實無法播放此視頻。最終解決方法: 在AndroidManifest.xml中加入: android:requestLegacyExternalStorage

原创 智慧爺的蛋糕

題目 hash+二分 一直錯,氣死了,後來發現a,b,c,d是從0開始的 #include<iostream> #include<string.h> #include<stdio.h> #include<algorithm> #i

原创 HDU 3966 Aragorn's Story(樹鏈剖分 點權+線段樹)

Our protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn finds a lot

原创 1036: [ZJOI2008]樹的統計Count (樹鏈剖分+線段樹)https://blog.csdn.net/weixin_43326028

題目: 樹鏈剖分,維護一個max的值,一個sum的值 #include<iostream> #include<string.h> #include<stdio.h> #include<algorithm> #include<que

原创 1001: [BeiJing2006]狼抓兔子 (網絡流最小割 dinic算法)

題目: 用Edmonds_Karp複雜度O(nm^2),超時了,改成dinic(O(m根號n)) #include<iostream> #include<string.h> #include<stdio.h> #include<a

原创 Extend to Palindrome UVA - 11475(Hash/KMP)

題目: 用hash把正序、逆序字符串的值計算一遍,如果一樣,那麼就是迴文,如果不一樣,計算從那一段開始是迴文,然後輸出不在迴文串的字母,形成迴文 #include<iostream> #include<string.h> #inc

原创 Multiplication Puzzle (區間DP)

The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move

原创 Drainage Ditches HDU 1532 (網絡流 最大流 EK模板)

Every time it rains on Farmer John’s fields, a pond forms over Bessie’s favorite clover patch. This means that the

原创 Polygon POJ - 1179 (區間DP)

題目: #include<iostream> #include<string.h> #include<stdio.h> #include<algorithm> #include<queue> #include<stack> #in

原创 Soldier and Traveling (網絡流最大流)

In the country there are n cities and m bidirectional roads between them. Each city has an army. Army of the i-th c

原创 Palindrome POJ - 3974(Manacher || Hash+二分)

題目: Manacher 版本(學習這個板子) #include<iostream> #include<string.h> #include<stdio.h> #include<algorithm> #include<queue>

原创 Cornfields(二維ST表模板)

FJ has decided to grow his own corn hybrid in order to help the cows make the best possible milk. To that end, he’s

原创 A Famous City HDU - 4252(單調棧)

題目 最少能見到的建築物如下所示 左圖:兩個橙色的高度一樣,如果按最少的算,它們可能是同一個建築物,但是前面的建築物比它們高,所以遮住了2-3位置的橙色建築物,而綠色的比紅色的矮,如果綠色的在紅色建築物後面,就會被紅色的遮住,從而

原创 Largest Submatrix of All 1’s POJ - 3494 (單調棧 poj 2559升級版)

POJ 2559 AC: #include<iostream> #include<string.h> #include<stdio.h> #include<algorithm> #include<queue> #include<s

原创 Jamie's Contact Groups POJ - 2289(二分圖多重匹配+二分)

題目 二分最少每個分組能有多少人,然後用匈牙利算法去匹配,如果這個分組的人少於給定的最少人數,則匹配,如果大於,去找增廣路,更換匹配對象。 #include<iostream> #include<string.h> #includ