原创 POJ 1958 變形漢諾塔
DescriptionBackgroundCharlie Darkbrown sits in another one of those boring Computer Science lessons: At the moment the
原创 map與set的使用
1, map的兩種遍歷<span style="font-size:14px;"> map<string,int>::iterator it; for(it=MAP.begin();it!=MAP.end();++it){ cout
原创 CodeForces 254C 字典序
Descriptioninputinput.txtoutputoutput.txtString x is an anagram of string y, if we can rearrange the letters in string
原创 HDU 1071 解方程
DescriptionIgnatius bought a land last week, but he didn't know the area of the land because the land is enclosed by a
原创 hdu5773 LIS+貪心
題意,有一串數字,求出最長上升序列,其中0可以當做任意一個整數(包括負數)。思路:0用的越多越好,所以我們把0全部用上,再從剩下的數字中選出LIS,爲保證嚴格遞增,每一個數字都減去其之前0的個數(保證0都被順利的使用)注意用vis存儲0的
原创 CodeForces 105A
DescriptionIn Disgaea as in most role-playing games, characters have skills that determine the character's ability to u
原创 hdu5762 鴿籠原理
題意:問n個點中是否存在兩對不同的點的曼哈頓距離相等。思路:因爲0<n,m<100000,所以曼哈頓距離最多爲200000,直接暴力求沒對點的曼哈頓距離,當計算次數>200000,一定存在兩對點曼哈頓距離相同。注意判斷是否存在相同的點。#
原创 hdu5726
題意:給定一個序列,多次詢問[L,R],輸出這段區間的最大公約數,以及爲此公約數的區間個數。思路,用RMQ處理,然後對每個左端點i,二分搜索最遠的右端點R,使i到這個端點區間內最大公約數相同,用MAP記錄此段區間個數,一直處理到R=n;二
原创 hdu5734
Problem DescriptionDeep neural networks (DNN) have shown significant improvements in several application domains includ
原创 CodeForces 257D
DescriptionVasya has found a piece of paper with an array written on it. The array consists of n integers a1, a2, ...,
原创 POJ 3154 貪心
DescriptionProgramming contests became so popular in the year 2397 that the governor of New Earck — the largest human-i
原创 hdu5753
題意:h爲1~n的一個排列,若hi大於左右兩邊的值,f+=ci。問f的期望。思路:對每個ci求可能出現的次數xi,結果就爲sum(ci*xi)/n!。公式如下我的字好醜啊。。#include<cstdio> #include<algori
原创 upper_bound與lower_bound
都應用於單調非遞減序列函數lower_bound()原型爲ForwardIter lower_bound(ForwardIter first, ForwardIter last,const _Tp& val),在first和last中的前
原创 hdu5763 KMP+DP
題意:給一個文本串和一個模式串,模式串能被*代替,問文本串有幾種表達方式思路,首先用KMP把模式串找出來,在其末尾用vis標記,然後DP,若i被標記,則dp[i]=dp[i-1]+dp[i-m],否則dp[i]=dp[i-1]。#incl
原创 Unpaired Image-to-Image Translationusing Cycle-Consistent Adversarial Networks
貢獻 使用不成對的圖像,進行圖像生成、圖像風格轉換等,關鍵點:訓練圖像可以是不成對的 方法 循環一致性loss L1損失, Adversarial Loss