原创 1483 區間價值

題目3 : 區間價值 時間限制:10000ms 單點時限:1000ms 內存限制:256MB 描述 給定n個數A1...An,小Ho想了解AL..AR中有多少對元素值相同。小Ho把這個數目定義爲區間[L,R]的價值,用

原创 Facebook Hacker Cup 2016 Qualification Round The Price is Correct

The Price is Correct25 points Download Input Choose Output No output file selected Submit You've man

原创 hihoCoder #1116 : 計算

描述 現在有一個有n個元素的數組a1, a2, ..., an。 記f(i, j) = ai * ai+1 * ... * aj。 初始時,a1 = a2 = ... = an = 0,每次我會修改一個ai的值,你需要實時反饋

原创 Codeforces Round #395 (Div. 2)D. Timofey and rectangles

D. Timofey and rectangles time limit per test 2 seconds memory limit per test 256 megabytes input standard inpu

原创 hiho 1469 福字

#1469 : 福字 時間限制:6000ms 單點時限:1000ms 內存限制:256MB 描述 新年到了,你收到了一副畫。你想找到裏面最大的福字。 一副畫是一個n × n的矩陣,其中每個位置都是一個非負整數。 一個福

原创 hiho1305區間求差

#1305 : 區間求差 時間限制:10000ms 單點時限:1000ms 內存限制:256MB 描述 給定兩個區間集合 A 和 B,其中集合 A 包含 N 個區間[ A1, A2 ], [ A3, A4 ], .

原创 Codeforces Round #368 (Div. 2)C.Pythagorean Triples 本原勾股數組

C. Pythagorean Triples time limit per test 1 second memory limit per test 256 megabytes input standard inpu

原创 memset函數的使用原理

競賽中經常使用memset函數進行數組初始化,但只能初始爲0, -1。哪怕寫成: int num[N]; memset(num, 1, sizeof(num)); num[0]也是個很大的數。 今天看了一下C標準庫裏面memset函數的源

原创 Facebook Hacker Cup 2017 Round 1 Pie Progress

Facebook Hacker Cup 2017 Round 1 Some pies are sweet, full of fruit and jam and sugar. Some pies are

原创 Codeforces Round #403 (Div. 2) B. The Meeting Place Cannot Be Changed

B. The Meeting Place Cannot Be Changed time limit per test 5 seconds memory limit per test 256 megabytes input

原创 AtCoder Go Home

C - Go Home Time limit : 2sec / Memory limit : 256MB Score : 200 points Problem Statement There is a kangaroo at

原创 Codeforces Round #403 (Div. 2) C. Andryusha and Colored Balloons

C. Andryusha and Colored Balloons time limit per test 2 seconds memory limit per test 256 megabytes input stand

原创 hiho1482出勤記錄II

題目2 : 出勤記錄II 時間限制:10000ms 單點時限:1000ms 內存限制:256MB 描述 小Hi的算法課老師每次上課都會統計小Hi的出勤記錄。遲到會被記錄一個L,缺席會被記錄一個A,按時上課會被記錄一個O

原创 Facebook Hacker Cup 2016 Round 1 Laundro, Matt

Facebook Hacker Cup 2016 Round 1 注意 Laundro, Matt20 points Download Input Choose Output No o

原创 Problem A. Password Attacker

Problem A. Password Attacker This contest is open for practice. You can try every problem as many times as you lik