原创 近期感想學習安卓感想

安卓主要還是基於框架的泛型編程,構建整個項目,需要將功能需求列出來逐一解決,由於在Mac上運行,有時候會有一些bug存在,下載了grable(小象),感覺確實好用. 做了一個月的頭條新聞,發現其中有着很多設計性和重複性的工作,這可

原创 SDUT數據結構實驗之排序二:交換排序

數據結構實驗之排序二:交換排序 Time Limit: 1000 ms Memory Limit: 65536 KiB Problem Description 冒泡排序和快速排序都是基於"交換"進行的排序方法,你的任務是對題目給定

原创 小 C 的 01 序列

傳送門 #include<bits/stdc++.h> #define maxn 100010 using namespace std; int d[4]={0,1,0,0}; int n; int main() { cin>>

原创 TCP和UDP同時使用的影響

http://www.isoc.org/INET97/proceedings/F3/F3_1.HTM 這裏有一篇在同一個程序中同時使用TCP和UDP,UDP丟包率和TCP 窗口大小的論文。 論文中研究了,在一個程序中tcp的flo

原创 牛客網小白月賽21 A.Audio(三角形外心公式)

#include <iostream> #include <stdio.h> typedef long long ll; struct node { ll x; ll y; }a,b,c; int main(

原创 已知先序中序找後序

#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; int n, pos; vecto

原创 字符串的逆序實現

字符串的逆序 #include <string.h> #include <stdio.h> int main() { char str[1005]; int i, cnt = 0; char c;

原创 Codeforces Round #620 (Div. 2)Two Rabbits

A. Two Rabbits 題意:就講兩隻小兔子各在一端點往中間跳,相遇問題 傳送門 #include <stdio.h> typedef long long ll; int main() { int t; ll

原创 Manacher算法(後補)

Manacher算法,又叫“馬拉車”算法,可以在時間複雜度爲O(n)的情況下求解一個字符串的最長迴文子串長度的問題。

原创 KickStarter 2016 A country leader

KickStarter 2016 A The Constitution of a certain country states that the leader is the person with the name contain

原创 牛客算法周賽 青蛙過河(A) 遞推思維題

傳送門 n片荷葉,k個石墩 若k=0,那麼在每片荷葉上放一隻青蛙,最後從岸上直接跳到對面一隻青蛙,可以有 n+1 只青蛙過岸 若k=1,那麼我們可以在這個石墩上疊n+1只青蛙,然後就又變爲k=0的情況 然後,每多一個石墩就可以利用

原创 Game 牛客算法周賽 博弈

Nancy喜歡博弈! Johnson和Nancy得到了一個神奇的多重集合,僅包含一個正整數n,兩個人輪流進行操作。 一次操作可以將集合中一個數字分解爲它的任意兩個非1的因數,並加入集合中。 他們想知道,在Johnson和Nancy

原创 牛客算法周賽B華華對月月的忠誠(貝祖定理裸題)

傳送門 #include<iostream> #include<algorithm> using namespace std; char N[100005]; int main() { long long int A

原创 近期的一些小感悟

綜合計算機的知識,不僅知道是什麼,還要知道他的深層原理(爲什麼). 從基礎的做起,深入到底層結構,一點一點的探索,記錄,使用. 多麼美妙的過程

原创 LC 數組二分

數組補題 class Solution { public: int search(vector<int>& nums, int target) { int len=nums.size();