原创 牛客網廣工大 因子個數 L題加F題

牛客網廣工大 因子個數 L題 F題 L題 //#include <bits/stdc++.h> #include<stdio.h> #include<string.h> #include<string> #include<mat

原创 dp 求數學期望 概率 HDU - 5236

HDU - 5236 題意: 你現在要打n個字符,但是程序隨時可能會崩潰概率爲P。 你可以在恰當的時機保存但會消耗x秒全部打完後需要保存一次纔算成功。 崩潰後,會從最後一次保存的情況繼續開始打字。 分析: 先不考慮可以

原创 KMP hdu1686

hdu1686 詳細解釋參見博客 //#include <bits/stdc++.h> #include<stdio.h> #include<string.h> #include<string> #include<math.h>

原创 poj 3487 穩定婚姻問題

poj 3487 詳細解釋請點擊 //#include <bits/stdc++.h> #include<stdio.h> #include<string.h> #include<string> #include<math.h>

原创 manacher 最長迴文子串 hdu3068

hdu 3068 Manacher 算法 (馬拉車) 空間複雜度:插入分隔符形成新串,佔用了線性的空間大小;RL數組也佔用線性大小的空間 ,因此空間複雜度是線性的。 時間複雜度:儘管代碼裏面有兩層循環,通過amortized

原创 poj 2954 pick公式

poj 2954 S=a+b/2-1 #include <cstdio> #include <cstdlib> #define inf 0x7fffffff #define linf 0x7fffffffffffffff #de

原创 hdu 1007 平面最近點對

hdu 1007 詳細解釋 #include<bits/stdc++.h> #define inf 0x7fffffff #define linf 0x7fffffffffffffff #define fil(x,y) mems

原创 Linux

VI的使用: 1)首先使用VI,輸入如下的文件內容,存盤爲1-1.txt: Bill Jones,     HI-TEK Corporation ,  CA, 95011 Sharon Lee Smith,  Design Works

原创 使用C語言在Win控制檯中輸出帶顏色的文字

#include <conio.h> #include <stdio.h> #include <windows.h> int main(int argc, char *argv[]) { HANDLE hOut; hO

原创 bitset 巧妙用法 hdu5972

題目鏈接 bitset用法整理 #include<stdio.h> #include<string.h> #include<string> #include<math.h> #include<algorithm> #include<io

原创 hdu 6319 多校第三場 Ascending Rating

題目鏈接 從後往前維護最大值的單調隊列,所以單調隊列中的元素從走到右遞增,且左邊沒比他大的元素在隊列中,所以隊列中元素個數就是count的個數。 注意q*i爆int,wa了我好久。 //#include <bits/stdc++.h>

原创 python學習 庫安裝 打包exe文件

1 python庫安裝方法 1.Win + R 打開運行窗口,輸入cmd回車 2.找到pip安裝路徑——x:\Python xx\Scripts 3. 在命令行中切換至該目錄cd x:\Python xx\Scripts 4.輸入 pip

原创 hdu6373 多校第6場 Pinball

Problem Description There is a slope on the 2D plane. The lowest point of the slope is at the origin. There is a small

原创 POJ 2763 樹鏈剖分 或LCA加樹狀數組

地址 樹鏈剖分 //#include <bits/stdc++.h> #include<stdio.h> #include<string.h> #include<string> #include<math.h> #include<algo

原创 半平面交 poj 2451

poj 2451   #pragma GCC optimize(2) #include<stdio.h> #include<string.h> #include<string> #include<math.h> #include<alg