自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

kitalekita的博客

一个很笨又很懒人的博客

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

原创 【fight for first wrong answer】的训练记录

队员:pp__qq、Andy01_、kitalekita本篇文章主要是用来记录fight for first wrong answer队伍的日常训练的记录(打过的那几个训练赛的赛时做出的题以及赛后所补的题)和一些赛后的总结,便于更好的查漏补缺。自主训练:2020/11/7:The 14th Chinese Northeast Collegiate Programming Contest(题数:5/12)...

2020-12-01 17:29:22 128

原创 html学习日记(自用)

道阻且长,且行且珍惜。

2022-09-07 22:03:45 264

原创 CodeForces-1438D Powerful Ksenia(构造)

Powerful Ksenia(构造)题目链接Problem statmentKsenia has an array aaa consisting of nnn positive integers a1,a2,…,ana_1, a_2, \ldots, a_na1​,a2​,…,an​.In one operation she can do the following:choose three distinct indices i,j,ki, j, ki,j,k, and thenchange

2021-10-26 09:42:43 182

原创 ARC 115A Two Choices(思维)

Two Choices 题目链接题意​ 给你N个人的M选项的答案,让你去统计有几对无论怎么构造正确答案,它们的得分结果都不相同。思路​ 显然,如果两个答案x,yx,yx,y不相等的位置数量为偶数的话,那么一定能够构造出来答案使得两个人的得分结果一样。那么我们可以发现当两个答案分别存在奇数个111和偶数个111的时候,这个时候我无论怎么构造我都不可能使得其答案相同,原因如下:假设a1a_1a1​和b1b_1b1​中相同111的个数为zzz,a1a_1a1​中111的个数为xxx,b1b_1b1​

2021-10-20 22:39:15 134

原创 ABC221E LEQ

ABC221E(树状数组+乘法逆元)题目链接Problem StatementGiven is a sequence of NNN integers:$ A = (A_1, A_2, \dots, A_N)$Find the number of (not necessarily contiguous) subsequences A′=(A1′,A2′,…,Ak′)A'=(A'_1,A'_2,\ldots,A'_k)A′=(A1′​,A2′​,…,Ak′​) of length at least 22

2021-10-20 22:36:17 309

原创 ARC116C Multiple Sequences(隔板法,枚举)

ARC116C(隔板法,枚举)题目链接Problem StatementGiven are integers NNN and MMM. How many sequences AAA of NNN integers satisfy the following conditions?1≤Ai≤M(i=1,2,…,N)1 \leq A_i \leq M \left(i = 1, 2, \ldots, N\right)1≤Ai​≤M(i=1,2,…,N)Ai+1A_{i+1}Ai+1​ is a mul

2021-10-20 22:31:30 191

原创 CodeForces - 294C_Shaass and Lights(组合数学)

CodeForces - 294C_Shaass and LightsThere are nnn lights aligned in a row. These lights are numbered 1 to nnn from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on

2021-09-16 20:41:27 111

原创 AtCoder abc156_E_Roaming(组合数学,隔板法)

AtCoder abc156_e_RoamingProblem StatementThere is a building with n rooms, numbered 1 to n.We can move from any room to any other room in the building.Let us call the following event a move: a person in some room ii goes to another room j (iii≠\neq​=$

2021-09-16 19:49:17 250

原创 HDU7048 Link with EQ

题目链接题目大意:  有一张桌子长度为n,第一个人是随便坐的,但是接下来坐的一个人,要尽可能的远离旁边的人,就是要求与最近距离的人靠得尽可能的远,问你长度为n的桌子能够坐的期望人数是多少?思路:  通过推几个样例,我们可以发现当第一个人坐下以后,这张桌子能够坐总人数也已经可以知道了,那么我们就是要求1n∗∑i=1nq(x)\frac {1}{n}*\sum_{i=1}^{n}q(x)n1​∗∑i=1n​q(x)(1n\frac{1}{n}n1​为第一个人随机选择一个位置的概率,q(x)为选择x这个位

2021-08-24 10:03:35 167

原创 Light oj 1138 Trailing Zeroes (III) (二分)

Trailing Zeroes (III)You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1 * 2 * … * N. For example, 5! = 120, 120 contains one zero on the trail.inputInput starts with an

2021-03-22 16:21:52 76

原创 floyd && dijkstra

dijkstra#include<cstdio>#include<cstring>#include<iostream>#include<queue>#include<stack>#include<algorithm>#include<vector>#include<cmath>#include<map>#include<string>#include<set&g

2021-03-21 11:07:44 114

原创 2018-2019 ACM-ICPC, Asia Jiaozuo Regional Contest部分题解

题目ABCDEFGHIJKLsolve✔--✔✔????--✔---✔:比赛时通过;????:赛后通过;⚪:比赛时尝试了未通过;-:比赛时未尝试D.Keiichi Tsuchiya the Drift King(思维)solved by pp__qq、kitalekita这道题唯一难点就是考虑转弯的时候,汽车有无脱离直线赛道(根据角度判断),考虑重合的部分就可以了,这里不放图了。#include<cstdio>#inclu

2020-12-05 21:41:37 308

原创 The 14th Chinese Northeast Collegiate Programming Contest部分题解

题目ABCDEFGHIJKLsolved-????✔????--✔-????✔--✔:比赛时通过;????:赛后通过;⚪:比赛时尝试了未通过;-:比赛时未尝试这一场比赛是我们队伍队内自己第一次打的训练赛。配合的不是很到位,因为也没打过几场团体赛,平时训练都是自己打自己的。总体来说队友很强,就是我一个人在拖后腿,要努力变强,呜呜呜。B:Team...

2020-12-01 18:57:27 725

原创 10-28

Dubious Cyrpto题目的大致意思为:已知正整数 l, r, m 求任意一组 a, b, c 使得存在正整数 n 满足 n * a + b - c = m 且a, b, c 均在 [l, r] 这个范围之内,让你构造一个a,b,c使得na+b-c==m。题解: 这道题它确保了至少有一个a,b,c能够使得na+b-c=m,所以我只要让c=l,或者c=r,然后去遍历一遍l到r之间的值就行了。#include<cstdio>#include<cstring>#in

2020-10-28 14:19:10 203

原创 POJ1006 Biorhythms(暴力)

题目链接DescriptionSome people believe that there are three cycles in a person’s life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23, 28, and 33 days, respect

2020-09-12 21:43:01 140

原创 A Dangerous Maze(期望问题)

题目链接You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all doors.If you choose the ith door, it can either take you back to the same position where you begun

2020-09-11 22:29:04 238

原创 Codeforces Round #669 (Div. 2) A,B题解

A. AhahahahahahahahaAlexandra has an even-length array a, consisting of 0s and 1s. The elements of the array are enumerated from 1 to n. She wants to remove at most n2 elements (where n — length of array) in the way that alternating sum of the array will

2020-09-10 22:36:01 229

原创 HDU1808&&POJ3370 Halloween treats(鸽巢定理)

HDU题目链接POJ题目链接Problem DescriptionEvery year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets on that day, no matter how many children call on him, so it may happen that a child will get noth

2020-09-09 20:04:31 117

原创 HDU 5776 sum(鸽巢定理简单题)

题目链接Problem DescriptionGiven a sequence, you’re asked whether there exists a consecutive subsequence whose sum is divisible by m. output YES, otherwise output NOInputThe first line of the input has an integer T (1≤T≤10), which represents the number of

2020-09-08 20:23:04 234 1

原创 HDU 1205 吃糖果(鸽巢定理)

题目链接Problem DescriptionHOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。Input第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数N(0<N<=1000000),第二行是N个数,表示N种糖果的数目Mi(0<Mi<=10000

2020-09-07 19:31:58 221

原创 HDU 3791 二叉搜索树(模拟BST)

题目链接Problem Description判断两序列是否为同一二叉搜索树序列Input开始一个数n,(1<=n<=20) 表示有n个需要判断,n= 0 的时候输入结束。接下去一行是一个序列,序列长度小于10,包含(0~9)的数字,没有重复数字,根据这个序列可以构造出一颗二叉搜索树。接下去的n行有n个序列,每个序列格式跟第一个序列一样,请判断这两个序列是否能组成同一颗二叉搜索树。Output如果序列相同则输出YES,否则输出NOSample Input256743254

2020-09-06 20:21:20 134

原创 The order of a Tree(模拟BST的建树和访问)

题目链接Problem DescriptionAs we know,the shape of a binary search tree is greatly related to the order of keys we insert. To be precisely:insert a key k to a empty tree, then the tree become a tree withonly one node;insert a key k to a nonempty tree, if

2020-09-05 21:00:34 132

原创 HDU 1710 Binary Tree Traversals(二叉树的遍历)

题目链接Problem DescriptionA binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the left and right subtrees. There are three most important ways in which the vertices of a binary tree can

2020-09-04 20:08:28 239

原创 The Suspects(并查集)

题目链接DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to separate the suspects from others.In th

2020-09-03 20:43:35 105

原创 POJ-2236 Wireless Network(并查集)

Wireless NetworkDescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in the network were all broken. The

2020-09-02 21:31:20 79

原创 并查集简单题目其一

How Many TablesProblem DescriptionToday is Ignatius’ birthday. He invites a lot of friends. Now it’s dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each other, and all the friends d

2020-09-01 20:25:53 202

原创 Codeforces Round #666 A,B题解(Div. 2)

A——Juggling Letters这道题目的大致意思就是给T组数据,每组有n行字符串,让你去判断这n行字符串中进行个别字母的移动,是否是这n行字符串变成一样。思路:这n行字符串的字母可以随便移动,那么我们只需要去判断这n行字符串所含的各个字母数%n是否等于0,如果等于就输出“YES”,反之输出“NO”。代码如下:#include<algorithm>#include<cstdio>#include<iostream>#include<queue&g

2020-08-31 18:58:27 172

原创 Find a way(bfs,双起点)

题目链接Problem DescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yifenfei’s home is at the countryside, but Merceki’s home is

2020-08-30 21:10:46 170

原创 Maximum GCD(gcd)

题目链接Given the N integers, you have to find the maximum GCD (greatest common divisor) of every possible pair of these integers.InputThe first line of input is an integer N (1 < N < 100) that determines the number of test cases.The following N line

2020-08-29 19:39:47 242

原创 Oulipo(字符串hash)

题目链接DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter ‘e’. He was a member of the Oulipo group. A quote from the book:Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fair normal,

2020-08-28 21:51:15 120

原创 POJ2478 Farey Sequence(欧拉函数)

题目链接DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. The first few areF2 = {1/2}F3 = {1/3, 1/2, 2/3}F4 = {1/4,

2020-08-26 22:12:35 194

原创 线性DP简单题

Common SubsequenceProblem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, …, xm> another sequence Z = <z1, z2, …, zk> is a subsequence of X if there

2020-08-26 18:21:06 249

原创 POJ 3070 Fibonacci(矩阵快速幂)

题目链接In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …An alternative formula for the Fibonacci sequence isGiven an in

2020-08-25 22:03:04 174

原创 菜鸡学习数论的第六天 之同余 ,费马小定理

同余  定义:如果整数a和整数b除以正整数m,则称 a ,b 摸 m 同余,记为 a ≡ b (mod m).同余类与剩余类  同余类也称剩余类。对于任意的a属于[ 0, m - 1 ],集合[ a + k * m](k属于整数)中的所有元素摸m同余,余数都是a。这个集合[ a + k * m ]称为一个模m的同余类,简记为ā。模m的同余类一定有 m 个,分别为[0],[1],[2],[3],……,[m-1]。这些同余类构成m的完全剩余系。1 ~ m 中与m互质的数代表的同余类共有φ(m

2020-08-24 22:50:16 364

原创 菜鸡学习数论的第五天之 最大公约数,扩展欧几里得

最大公约数与最小公倍数  若自然数d同时是自然数a和b的约数,这称d是a和b的公约数。在所有a和b的公约数中最大的一个称为a和b的最大公约数,记为gcd(a,b)。  若自然数m同时是自然数a和b的倍数,这称m是a和b的公倍数。在所有a和b的公倍数中最小的一个称为a和b的最小公倍数,记为lcm(a,b)。对于任意a,b属于自然数,gcd(a,b)*lcm(a,b)=a*b证明:设d=gcd( a , b ),a0 = a / d,b0=b/d,gcd(a0,b0)=1,lcm(a0,b0)=a0

2020-08-23 22:29:13 136

原创 牛客小白月赛27部分题解(持续更新)

今天打了一场牛客网的小白月赛,只做出来3题,自己好菜,怎么办呢,只能记录下来,用以砥砺自己,多刷题。QAQ比赛连接:连接首先是E题E-使徒袭来题目描述神秘的使徒袭击了第三新东京市,少男少女们驾驶着决战兵器EVA守护着人类的和平。牛可乐是NERV特务机关的指挥官,他必须时刻了解牛牛/牛妹/牛能三人的战斗状态。现在牛可乐获得了这三位EVA驾驶员的战斗力之积,在保证三位驾驶员战斗力均为正实数的情况下,请你帮助牛可乐计算这三位驾驶员的战斗力之和最低是多少?输入描述:一个正整数n,表示三位驾驶员的战斗

2020-08-22 22:31:25 875

原创 HDU 2588 GCD(欧拉函数)

题目链接Problem DescriptionThe greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to a and b,For example,(1,2)=1,(12,18)=6.(a,b) can be easily found by the Euclidean algorithm. Now Carp is

2020-08-21 21:12:34 148

原创 Goldbach`s Conjecture(素数筛)

题目链接Goldbach’s conjecture is one of the oldest unsolved problems in number theory and in all of mathematics. It states:Every even integer, greater than 2, can be expressed as the sum of two primes [1].Now your task is to check whether this conjecture ho

2020-08-20 20:31:28 181

原创 Aladdin and the Flying Carpet(唯一分解定理)

LightOJ - 1341 Aladdin and the Flying CarpetIt’s said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first mystery.Aladdin was about to enter to a magical cave, le

2020-08-19 21:20:04 272

原创 set的简单练习

HDU 2094产生冠军产生冠军Problem Description有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。根据这个规则,无需循环较量,或许就能确定冠军。你的任务就是面对一群比赛选手,在经过了若干场撕杀之后,确定是否已经实际上产生了冠军。Input输入含有一些选手群,每群选手都

2020-08-18 17:07:08 304

空空如也

空空如也

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

TA关注的人

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