2 weixin_43244265



TA的排名 3w+


<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd...

2020-04-02 21:08:42

Codeforces Round #623 (Div. 2)C. Restoring Permutation

You are given a sequence b1,b2,…,bn. Find the lexicographically minimal permutation a1,a2,…,a2n such that bi=min(a2i−1,a2i), or determine that it is impossible.InputEach test contains one or more te...

2020-02-26 21:41:23

Codeforces Round #624 (Div. 3)C. Perform the Combo

You want to perform the combo on your opponent in one popular fighting game. The combo is the string s consisting of n lowercase Latin letters. To perform the combo, you have to press all buttons in t...

2020-02-25 18:12:56

Codeforces Round #624 (Div. 3)B. WeirdSort

You are also given a set of distinct positions p1,p2,…,pm, where 1≤pi<n. The position pi means that you can swap elements a[pi] and a[pi+1]. You can apply this operation any number of times for eac...

2020-02-25 12:02:12

Codeforces 219C Color Stripe

A colored stripe is represented by a horizontal row of n square cells, each cell is pained one of k colors. Your task is to repaint the minimum number of cells so that no two neighbouring cells are of...

2020-02-23 13:18:28


Bajtek is learning to skate on ice. He’s a beginner, so his only mode of transportation is pushing off from a snow drift to the north, east, south or west and sliding until he lands in another snow dr...

2020-02-22 23:55:44

uva 11237 - Halloween treats(鸽笼原理)

题意:有c个小孩要到邻居家去要糖果,有n户邻居,每户邻居只会提供固定数量的糖果,熊孩子们为了不发生冲突,决定将取来的糖果平均分配,问说取那几家邻居的糖果可以做到平均分配,注意n ≥ c思路:因为n<m,所以m个前缀和分别对孩子数(n)求余,至少有两个余数一样的一组(鸽笼原理),这两组的差肯定是n的倍数,输出两个前缀和序号之间的数就可以。AC代码:#include<iostream...

2020-02-22 20:09:31



2020-02-21 15:22:11


Peter and his friends are on holiday, so they have decided to make a trip by car to know the north ofSpain. They are seven people and they think that two cars are enough for their luggage.It’s time ...

2020-02-20 17:23:09

UVA - 1404 Prime k-tuple【筛素数】

{p1, . . . , pk : p1 < p2 < . . . < pk} is called a prime k-tuple of distance s if p1, p2, . . . , pk are consecutiveprime numbers and pk − p1 = s. For example, with k = 4, s = 8, {11, 13, 1...

2020-02-19 17:17:44

UVA 10236 - The Fibonacci Primes(斐波那契素数)

The Fibonacci number sequence is 1, 1, 2, 3, 5, 8, 13 and so on. You can see that except the first twonumbers the others are summation of their previous two numbers. A Fibonacci Prime is a Fibonacci...

2020-02-19 16:37:39



2020-02-17 20:22:50

UVA10689-Yet another Number Sequence(矩阵快速幂)

Let’s define another number sequence, given by the following function:f(0) = af(1) = bf(n) = f(n − 1) + f(n − 2), n > 1When a = 0 and b = 1, this sequence gives the Fibonacci Sequence. Changing...

2020-02-17 17:14:21



2020-02-13 01:10:34

UVA701 LA5637 The Archeologists' Dilemma

An archeologist seeking proof of the presence of extraterrestrials in the Earth’s past, stumbles upon apartially destroyed wall containing strange chains of numbers. The left-hand part of these lines...

2020-02-11 15:52:56



2020-02-10 00:11:56

UVA 10515 - Powers Et Al

Finding the exponent of any number can be very troublesome as it grows exponentially. But in thisproblem you will have to do a very simple task. Given two non-negative numbers m and n, you willhave ...

2020-02-08 16:46:34

POJ 1320 Street Numbers(佩尔方程)

DescriptionA computer programmer lives in a street with houses numbered consecutively (from 1) down one side of the street. Every evening she walks her dog by leaving her house and randomly turning l...

2020-02-07 15:07:09



2020-02-05 22:39:09

Codeforces C. Yet Another Walking Robot(2月5日)

There is a robot on a coordinate plane. Initially, the robot is located at the point (0,0). Its path is described as a string s of length n consisting of characters ‘L’, ‘R’, ‘U’, ‘D’.Each of these c...

2020-02-05 17:00:20


勋章 我的勋章
  • 持之以恒
  • 1024勋章
  • 勤写标兵Lv4