原创 我的友鏈
西窗夜雨 Phecda KRrrrrrrrr Hawking_llfz 準點的星辰 wyxdrqc 蟹蟹王 MoveToEx Vimin
原创 CF1230 致sb的A題和B題
首先,第一題fst了 2333 #include <bits/stdc++.h> #define int long long using namespace std ; int s = 0; signed main () {
原创 P4999 煩人的數學作業
考慮統計出每一個數位的出現次數,然後乘i求和 #include <bits/stdc++.h> #define int long long using namespace std ; const int ha = 1e9+7 ; i
原创 CF938D Buy a Ticket
4 2 1 2 4 2 3 7 6 20 1 25 6 14 1 25 3 3 1 2 1 2 3 1 1 3 1 30 10 20 12 10 12 思路: 建立虛點把點券轉化成邊權 #include <iostream>
原创 洛谷P1508Likecloud-喫、喫、喫 ----- Only my water can help me
題目背景 問世間,青春期爲何物?答曰:“甲亢,甲亢,再甲亢;捱餓,捱餓,再捱餓!” 題目描述 正處在某一特定時期之中的李大水牛由於消化系統比較發達,最近一直處在飢餓的狀態中。某日上課,正當他餓得頭昏眼花之時,眼前突然閃現出了一個nm(
原创 Atcoder abc 139
A #include <bits/stdc++.h> using namespace std ; string s , t ; int num ; int main () { cin >> s >> t ; for(
原创 CF449B Jzzhu and Cities
5 5 3 1 2 1 2 3 2 1 3 3 3 4 4 1 5 5 3 5 4 5 5 5 2 2 2 3 1 2 2 2 1 3 2 1 2 2 2 3 2 思路 : 剪完圖後,記錄一個最小邊權的個數,如果從1到v的距離有多
原创 P3413 SAC#1 - 萌數
是的,我又去偷題面了 解析在代碼裏 #include <bits/stdc++.h> #define int long long using namespace std ; const int maxn = 1e3+105 ; co
原创 CF161B Discounts
3 2 2 1 3 2 3 1 5.5 2 1 2 1 3 4 3 4 1 1 2 2 2 3 2 8.0 1 1 2 4 2 1 3 按照大小排下序,你會發現,如果按照從大到小的順序,那麼給凳子打折一定是最優的 於是,我們就可
原创 P1836 數頁碼_NOI導刊2011提高(04)
和某道題出奇的相似 #include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <vector> #include
原创 考前錯題整理和注意
錯誤 1.線段樹的l,r,ll,rr打錯了 2.spfa出隊元素忘記清理標記 3.該輸出空格的地方輸出了換行 4.輸入要看數據大小 5.pair<>是按照第一關鍵字排序的!! 6.匈牙利算法的時候,記得每次枚舉的時候清空vis數組 7.
原创 P4127 [AHOI2009]同類分佈
#include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <vector> #include <map> #inc
原创 P4124 [CQOI2016]手機號碼
#include <bits/stdc++.h> #define int long long using namespace std ; int l , r , num[15] ; int f[15][15][15][2][2][2]
原创 考試套路整理
floyd 災後重建 每個點有特定的點權(如修復時間和危險值),且詢問還與這玩意有關係的時候,考慮floyd的實質算法 f[k][i][j] 代表經過k個點後i到j的最短路,只要把k按照特定的順序排序即可 樹狀數組 主要是運用了樹狀數
原创 lwPcyXNsZP
QAQ