原创 CodeForces 296C Greg and Array (線段樹)

Greg and Array time limit per test 1.5 seconds memory limit per test 256 megabytes input standard input outpu

原创 hdu1029 Ignatius and the Princess IV(DP求數列中出現次數過半的數)

Ignatius and the Princess IV Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32767 K (Java/Others) Tota

原创 TensorFlow問題總結(不斷更新)

確認TensorFlow是CPU版本還是GPU版本 用一個矩陣相乘的程序來確認: import tensorflow as tf a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shap

原创 Ubuntu16.04+python3.6+cuda9.0+cudnn7.1+TensorFlow-GPU

這兩天新裝了Ubuntu,裝TensorFlow,參考了好多教程,踩了好多坑。。記錄一下最終成功的教程。   全新的系統從0開始裝python配環境,可以參考 https://cloud.tencent.com/developer/art

原创 Linux下裝無線網卡(Ubuntu)

因爲需要在Linux系統下控制機器人,於是給我破破的小筆記本裝了雙系統,發現網卡不支持,在Linux下沒辦法連無線。飛快地買了一個無線網卡,發現要裝驅動,過程好麻煩,怎麼都找不到小巧又免驅動的無線網卡,突然想到可以直接給電腦的無線網卡裝個

原创 UVALive 4857 Halloween Costumes(區間DP)

題意:某人一晚上要參加n個聚會,每場聚會都要穿對應的衣服,在參加下一場聚會之前,他可以選擇穿上下一場聚會對應的衣服,也可以選擇由外向裏脫衣服,直到露出下一場聚會對應的衣服。規定脫下的衣服不能再穿,也就是說,若在脫下2號衣服之後的某一場聚會

原创 CodeForces 353B Two Heaps

Two Heaps time limit per test 1 second memory limit per test 256 megabytes input standard input output standa

原创 hdu3549 Flow Problem(最大流)

Flow Problem Time Limit: 5000/5000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s

原创 poj1274 The Perfect Stall(二分圖匹配 / 最大流)

The Perfect Stall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 20547   Accepted: 9263 Description

原创 hdu3789/九度OJ1007 奧運排序問題

題目描述: 按要求,給國家進行排名。 輸入: 有多組數據。 第一行給出國家數N,要求排名的國家數M,國家號從0到N-1。 第二行開始的N行給定國家或地區的奧運金牌數,獎牌數,人口數(百萬)。 接下來一行給出M個國家號。 輸出: 排序有

原创 UVALive 4853 Emoogle Balance

題意:題目很長,其實主要就是題中加粗的那個公式和輸入輸出。給n個數,用非零數的個數減去零的個數。 水題啦~ #include <cstdio> #include <cstring> #include <algorithm> using

原创 poj2417 Discrete Logging(BSGS:Baby Step Giant Step)

Discrete Logging Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 4283   Accepted: 1970 Description G

原创 UVALive 4855 Hyper Box

題意:要將一個n維空間分成若干個小立方體,要求小n方體的邊長是斐波那契數。求小n方體的數量的最小值。 分析:數據不大,暴力就可以過了。求出n條邊分別最少可以寫成多少個斐波那契數的和,最後將n個數相乘就是小n方體的數量的最小值。 第一步打表

原创 CodeForces 85D Sum of Medians(線段樹 + 離散化)

Sum of Medians time limit per test 3 seconds memory limit per test 256 megabytes input standard input ou

原创 hdu4638 Group(離線線段樹)

Group Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1723