原创 codeforces 573A (數論)

題意描述 Limak is an old brown bear. He often plays poker with his friends. Today they went to a casino. There are n pl

原创 codeforces 698A(暴力)

題意描述 Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following

原创 B. Ternary String(貪心)

題意描述 You are given a string s such that each its character is either 1, 2, or 3. You have to choose the shortest co

原创 codeforce 1263C (整除分塊)

題意描述 給定你一個n,讓你求出所有的n/i(下取整) 思路 這道題想了很久,打表發現了規律,每個值相同的塊,最後一個因子都是n/(n/i),但找到規律以後不知道該如何實現,看了題解以後才發現這是一道整數分塊的問題。 核心代碼:

原创 codeforce893C (並查集)

題意描述 Vova promised himself that he would never play computer games… But recently Firestorm — a well-known game deve

原创 codeforce1178B (DP)

題意描述 Recall that string a is a subsequence of a string b if a can be obtained from b by deletion of several (possib

原创 codeforce1196C

題意描述 n robots have escaped from your laboratory! You have to find them as soon as possible, because these robots ar

原创 天清江月白,心靜海鷗知 (4.26每週總結)

個人總結         不知不覺間已經要步入五月份了,由於疫情的原因,從放假到現在已經過了三個月。在家的日子如何呢?自然是非常舒服的。但有利便有弊,在家的舒服換來的是學習效率的低下:同樣是學習,在學校學習一週學到的知識足足是在家

原创 Yet Another Walking Robot (Map)

題意描述 There is a robot on a coordinate plane. Initially, the robot is located at the point (0,0). Its path is descri

原创 B. Minimize the Permutation (貪心)

題意描述 You are given a permutation of length n. Recall that the permutation is an array consisting of n distinct inte

原创 189A Cut Ribbon(dp)

題意 Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two con

原创 4C - Registration System (Map)

題意描述 A new e-mail service “Berlandesk” is going to be opened in Berland in the near future. The site administration

原创 花開堪折直須折,莫待無花空折枝

花開堪折直須折,莫待無花空折枝         想要寫些什麼,卻又不知從何寫起;想要做些什麼,卻又不知如何來做。這就是我這段時間的內心活動。         由於疫情的原因,本該早早去學的我們,被迫呆在了家裏,在家裏學習和在學校學

原创 POJ3279 (二進制枚舉)

題意描述 Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged

原创 HDOJ 1018(數論)

題意描述 Problem Description In many applications very large integers numbers are required. Some of these applications