2 weixin_43244265

尚未进行身份认证

暂无相关简介

等级
TA的排名 3w+

JSP统计网站访问人数及JSP中application用法

<%@ 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

Codeforces134Div.2-C(并查集)

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

扩展欧几里得求通解、最小正整数解

扩欧求出来的解x,y是方程:ax+by=gcd(a,b)的解x0=x*c/gcdy0=y*c/gcdx0,y0是方程ax+by=c的解那么怎么求方程ax+by=c的通解呢?让x0向左、右平移n格,y的变化(n为整数)y0=(c-a*x0)/by1=(c-ax1)/b=(c-a(x0+n))/b=y0-a/b*n也就是说x1=x0+n;y1=y0-a/b*n把a/b转换为整数:x...

2020-02-21 15:22:11

UVA_10664_Luggage(水题)

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

2.17训练日记

过混了头了,昨天忘了总结了,罪过罪过。本来以为前天的CF打的还行,前两个题一遍过,第二个题一开始看错题了但好歹最后出来了,第三个没时间出了也没觉得亏,一般情况也出不来,可谁知道前天的c题这么简单,亏了亏了。。。这两天过的浑浑噩噩的,感觉刷题有困难了就去补课,可也没给自己定个计划,祸祸了好几天也没感觉学了点什么,还是回来刷题比较安心。...

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

2.12训练日记

最近做题有点烦躁,一个是题目比较难了,大多都现靠研究题解弄明白的,没有了自己做的成就感,再就是CF一直在掉分,Div2要想得分至少得做出三个,可现在就两个题的水平,Div3手慢了掉的比Div’2还狠,眼看着分往下掉,菜到不行。今天做到一个题,大数的质数筛法,用的是先筛小数然后用小数筛大数,不是很难理解但愣是看了一下午,之前这些基础性的知识看博客的时候看过去一遍就没再去看,用的时候还得现看模板,现在...

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

2.9训练日记

啊,今晚的CF亏大了,记错时间了,一直以为是十点半,开始打的时候人家已经开始半个小时了,前两个水的不要不要的,很快就过了,第三个的位运算是真玩不转,本来能拿个两个题的前排来就算加不了分也不至于扣分,这次直接调到后排去这次肯定扣惨了,亏大了。以后得长点心吧。。。...

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

2.5训练日记

现在发现数学推导是多么的重要,很多题目不在纸上推一遍根本不行,但对自己的推导能力也是服了气了,很多都是是推到一半或推到一大半推不动了,就像那个分珠子的题,就最后一步死活推不动,数论里的推导不像数学考试那样给你头给你尾让你推过程,这里是只给你头,给你问题,整个过程中得不到半点方向的提示,尤其是面对新知识的时候,你能凭借的就是经验和感觉,就像上次那个欧拉降幂的题,和那个二项式定理化简f(x+1)=5*...

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

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 1024勋章
    1024勋章
    #1024程序员节#活动勋章,当日发布原创博客即可获得
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。