原创 Vertex Cover 湘潭CCPC邀請賽 (遞推)

鏈接:https://ac.nowcoder.com/acm/contest/1107/J 來源:牛客網   時間限制:C/C++ 1秒,其他語言2秒 空間限制:C/C++ 32768K,其他語言65536K Special Judge,

原创 Highway (樹的直徑 + dfs)

鏈接:https://ac.nowcoder.com/acm/contest/1109/H 來源:牛客網   時間限制:C/C++ 3秒,其他語言6秒 空間限制:C/C++ 32768K,其他語言65536K Special Judge,

原创 Intersection (線性基)(板子補充)

鏈接:https://ac.nowcoder.com/acm/contest/1109/C 來源:牛客網   時間限制:C/C++ 1秒,其他語言2秒 空間限制:C/C++ 32768K,其他語言65536K Special Judge,

原创 POJ - 2828 Buy Tickets (Splay模擬)

Buy Tickets Time Limit: 4000MS   Memory Limit: 65536K Total Submissions: 27051   Accepted: 12920 Description Railway ti

原创 CodeForces - 1264B (分類討論即可)

Examples input 2 2 2 1 output YES 0 1 0 1 2 3 2 input 1 2 3 4 output NO input 2 2 2 3 output NO #include <

原创 某巨文藝平衡樹(Splay模板)

洛谷 P3391 /*Splay只記模板是很困難的,而且真正運用時易生疏出錯,所以必須理解,在看代碼前先弄懂 Splay的原理,這篇代碼是帶註釋的Splay模板,題目來自洛谷P3391 ———————————by 520*/ #incl

原创 洛谷多校 - Earthquake(線段樹)

          線段樹維護,三個lazy數組表示這個區間分別有個從右到左,全部,從左到右的數據覆蓋。 #include<bits/stdc++.h> using namespace std; #define lson l,m,r

原创 2019牛客暑期多校訓練營(第八場) I Inner World(dfs序+線段樹)

鏈接:https://ac.nowcoder.com/acm/contest/888/I 來源:牛客網   題目描述 Gromah and LZR are transfered to a forest, maybe it is the i

原创 CSU - 2170 千萬別用樹套樹(線段樹)

鏈接:https://ac.nowcoder.com/acm/contest/1108/H 來源:牛客網   時間限制:C/C++ 1秒,其他語言2秒 空間限制:C/C++ 32768K,其他語言65536K Special Judge,

原创 牛客上偷到的全局最小割板子

namespace global_mincut{ #define INT_MAX 0x3f3f3f3f int mp[502][502]; int N; bool combine[502]; int mi

原创 Dynamic Graph (dp,bitset)

鏈接:https://ac.nowcoder.com/acm/contest/1110/D 來源:牛客網   時間限制:C/C++ 1秒,其他語言2秒 空間限制:C/C++ 32768K,其他語言65536K Special Judge,

原创 POJ - 3764 The xor-longest Path (字典樹入門)

  In an edge-weighted tree, the xor-length of a path p is defined as the xor sum of the weights of edges on p: ⊕ is th

原创 C Just h-index

鏈接:https://ac.nowcoder.com/acm/contest/1107/C 來源:牛客網   時間限制:C/C++ 1秒,其他語言2秒 空間限制:C/C++ 131072K,其他語言262144K Special Judg

原创 POJ - 1816 Wild Words (模糊狀態下字典樹匹配)

A word is a string of lowercases. A word pattern is a string of lowercases, '?'s and '*'s. In a pattern, a '?' matches

原创 瀋陽網絡賽 D Fish eating fruit(點分治)

State Z is a underwater kingdom of the Atlantic Ocean. This country is amazing. There are nn cities in the country and