原创 【CodeForces 676C 】 Vasya and String 二分法

High school student Vasya got a string of length n as a birthday present. This string consists of letters ‘a’ and ‘

原创 【CodeForces 550C 】Divisibility by Eight DFS 數學

You are given a non-negative integer n, its decimal representation consists of at most 100 digits and doesn’t conta

原创 【CodeForces 782B】 The Meeting Place Cannot Be Changed 二分

The main road in Bytecity is a straight line from south to north. Conveniently, there are coordinates measured in m

原创 【CodeForces 304A 】Pythagorean Theorem II 高斯素數 高效算法

In mathematics, the Pythagorean theorem — is a relation in Euclidean geometry among the three sides of a right-angl

原创 【CodeForces 591B 】 Rebranding 哈希

The name of one small but proud corporation consists of n lowercase English letters. The Corporation has decided to

原创 【CodeForces 577B】 Modulo Sum 鴿巢(抽屜)原理 DP

You are given a sequence of numbers a1, a2, …, an, and a number m. Check if it is possible to choose a non-empty su

原创 【HDU 2670】 Girl Love Value 動態規劃dp

Problem Description Love in college is a happy thing but always have so many pity boys or girls can not find it. No

原创 【CodeForces 682A 】Alyona and Numbers 思維

After finishing eating her bun, Alyona came up with two integers n and m. She decided to write down two columns of

原创 【CodeForces 676B 】 Pyramid of Glasses DFS模擬

Mary has just graduated from one well-known University and is now attending celebration party. Students like to dre

原创 【Codeforces】GCD Compression 唯一分解定理 思維

Ashishgup and FastestFinger play a game. They start with a number n and play in turns. In each turn, a player can m

原创 【CodeForces 577C】 唯一分解定理

Vasya and Petya are playing a simple game. Vasya thought of number x between 1 and n, and Petya tries to guess the

原创 Floyd算法的深入理解 嘗試魔改核心代碼

https://blog.csdn.net/qq_45492531/article/details/104452588 在我這個博客中,一次訓練的機會讓我接觸到了floyd算法。 對這個算法的思路理解之後,想追尋本源地挖掘一下這個

原创 【SCAU 14校賽】17998 Equality 簽到題 注意億點細節

Description Do you know the problem “Divisible” in SCAUCPC 2013? No? It does not matter. Today, I will introduce a

原创 【SCAU 16校賽】 18112 Play Ball 物理 最短路 floyd

Description One day, Xiaoming and his friends want to play the basketball, but there are not basketball court nearb

原创 【SCAU 19校賽】 18430 Aerial Photography DFS 暴力

Description Alice is preparing for her next trip during the summer vocation. She is now planing for the route of ae