自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

天翼之城的博客

菜鸟的记录

  • 博客(22)
  • 收藏
  • 关注

原创 hdu5288 OO’s Sequence ——求每个数的贡献

OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there’s no j(l<=j<=r,j<>i) satisfy a i mod a j=0,now OO want to knowInputThere...

2018-10-31 21:04:40 151

原创 Gym - 101908F Music Festival —— dp,二进制枚举

Music festivals should be fun, but some of them become so big that cause headache for the goers. The problem is that there are so many good attractions playing in so many stages that the simple task o...

2018-10-30 14:43:02 257

原创 CodeForces - 940F Machine Learning —— 带修改莫队

You come home and fell some unpleasant smell. Where is it coming from?You are given an array a. You have to answer the following queries:You are given two integers l and r. Let ci be the number of o...

2018-10-29 21:27:26 249

原创 CodeForces - 935F Fafa and Array —— 线段树

Fafa has an array A of n positive integers, the function f(A) is defined as∑i=1n−1∣ai−ai+1∣\displaystyle\sum_{i=1}^{n-1} |a_{i}-a_{i+1}|i=1∑n−1​∣ai​−ai+1​∣. He wants to do q queries of two types:1 l ...

2018-10-28 19:47:44 225

原创 Gym - 101908L Subway Lines —— lca处理树上两个线段相交部分

The subway system of a major city is formed by a set of stations and tunnels that connect some pairs of stations. The system was designed so that there is exactly one sequence of tunnels linking any p...

2018-10-28 19:38:05 510

原创 Gym - 101908C Pizza Cutter —— 树状数组,横竖切割平面

Grandpa Giuseppe won a professional pizza cutter, the kind of type reel and, to celebrate, baked a rectangle pizza to his grandchildren! He always sliced his pizzas into pieces by making cuts over con...

2018-10-28 19:22:06 443

原创 c# 字符串分割问题

,假设string s是待分割的字符串分割 s 字符串的时候,我们需要一个标记来解决需要分割什么字符,可以在split里直接写或者写一个数组放到split中。分割好之后当然是多个字符串,那么我们需要string[] ans数组来存放分割好的字符。那么程序就是string[] ans = s.Split(new char[1] {','});之后访问是用foreach函数 foreach(s...

2018-10-26 18:49:20 464

原创 C#学习 有关类

一开始创建项目的时候新建的是控制台应用程序,之后在解决方案里添加类,注意如果要改名一开始就改掉,否则之后会出现错误。之后就是写自己需要的东西了,拿学生的类举个例子using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{...

2018-10-26 18:40:12 112

原创 Temple Build Gym - 101656J —— 类似背包

Temple BuildThe Dwarves of Middle Earth are renowned for their delving and smithy ability, but they arealso master builders. During the time of the dragons, the dwarves found that above ground theb...

2018-10-26 13:43:58 158

原创 Seating Chart Gym - 101656H —— 逆序对

Seating ChartBilbo’s birthday is coming up, and Frodo and Sam are in charge of all the party planning! Theyhave invited all the hobbits of Middle Earth to the party, and everyone will be sitting in ...

2018-10-25 09:37:06 253

原创 Saruman’s Level Up Gym - 101656G —— 记忆化搜索

Saruman’s Level UpSaruman’s army of orcs and other dark minions continuously mine and harvest lumber out ofthe land surrounding his mighty tower for N continuous days. On day number i, Saruman eithe...

2018-10-24 17:18:56 220

原创 Triple HDU - 5517 —— 二维树状数组

Given the finite multi-set A of n pairs of integers, an another finite multi-set B of m triples of integers, we define the product of A and B as a multi-setC=A∗B={⟨a,c,d⟩∣⟨a,b⟩∈A, ⟨c,d,e⟩∈B and b=e}...

2018-10-23 09:33:03 181

原创 Jumbled String Gym - 101933J —— 还原01串

Recall that a subsequence of a string is any string obtained by removing some subset of characters from the string, for instance “string”, “sing”, “i” and “sg” are all subsequences of “string”. If the...

2018-10-23 08:50:57 544

原创 Frogs HDU - 5514 —— 青蛙跳环,容斥

There are m stones lying on a circle, and n frogs are jumping over them.The stones are numbered from 0 to m−1 and the frogs are numbered from 1 to n. The i-th frog can jump over exactly ai stones in ...

2018-10-20 20:04:58 262

原创 Jimi Hendrix—— 树上dfs搜包含目标串的两个端点

You are given a tree T consisting of n vertices and n−1 edges. Each edge of the tree is associatedwith a lowercase English letter ci.You are given a string s consisting of lowercase English letters...

2018-10-17 19:43:14 143

原创 Gym 100962E Elvis Presley—— 读题,深搜

Consider a possibly infinite directed graph G = (V, E) without loops (that is, for each (u, v) ∈ E,u ̸= v). Let’s define its transitive closure G+ = (V, E+) as the directed graph having the same set...

2018-10-15 21:44:11 220

原创 ICPC Latin American Regional – 2017 Jumping Frog

Pog the Frog wants to compete in the World Frog Jump competition, which will take place in Nlogonia.In the competition, each frog must perform a sequence of acrobatic jumps in a specially built arena...

2018-10-14 19:54:42 511

原创 Problem I – Imperial roads —— 树上主席树+lca+

The roads of Cubiconia are in a dire state, after years of neglect and lack of maintenance. Each roadconnects two different cities A and B and can be traveled in both ways (from A to B or from B toA...

2018-10-08 20:56:28 410

原创 Problem J - Non Super Boring Substring —— 马拉车+树状数组(求不包含回文串区间的个数)

You’ll be given a string S​ and an integer K​. You have to find the number of nonsuper-boring substring inside S​. A substring is called super-boring if it contains anypalindromic substring of lengt...

2018-10-07 19:12:42 415

原创 Problem L - School Reunion —— 思维

So, the alumni association of your school is arranging it’s annual reunion tomorrow. N+1people will attend the ceremony, which includes Mr. Kashem, a notable alumnus of theschool. But he can’t stay ...

2018-10-07 08:45:54 226

原创 Problem F Plug It In! —— 二分图

Adam just moved into his new apartment and simply placed everything into it at random. Thismeans in particular that he did not put any effort into placing his electronics in a way that eachone can h...

2018-10-05 17:19:56 280

原创 Problem F – Fundraising

A prestigious politician aiming for presidency next year is planning a fundraising dinner for her campaign.She has a list of some wealthy people in the country and wants to invite them in a way that ...

2018-10-05 15:55:28 486 4

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除