- 博客(22)
- 收藏
- 关注
原创 2019CCPC哈尔滨站题解(F、I、J、K)
2019CCPC哈尔滨站题解(F、I、J、K)F - Fixing BannersI - Interesting PermutationJ - Justifying the ConjectureK - Keeping Rabbits
2021-11-25 11:50:23
2978
1
原创 atcoder:arc129(a,b,c),abc228(a,b,c)题解
arc129A题:题意:输入N,L,R,求L~R这个区间内,有多少个数与N异或运算后小于N?(N^X<N)。思路:异或运算:在二进制下,0^0=1,1^1=0,0^1=1,1^0=1.不难发现,当一个数的最高位1与同位置的1异或后,得到的数一定小于本身。所以只需要反复找N中的1位然后与该位置为1的数异或,结果一定小于本身...
2021-11-23 20:05:05
672
1
原创 10月8日训练总结
A有一个人买东西付钱只用一元钱和二元钱, 现在他要付 n nn 元, 他使用一元钱的数量和二元钱数量的差值要最小, 问他付 n nn 元使用了多少一元钱和二元钱?每份都使用的 n / 3 n / 3n/3 ,最后只要判断一下剩下的钱是0 , 1 , 2 0, 1, 20,1,2 元的情况即可。代码如下:#include<bits/stdc++.h>using namespace std;typedef long long ll;int main(){ s.
2021-10-10 22:50:23
90
原创 10月6日训练总结
A题,分蛋糕,输入蛋糕个数,以及每一个的半径,以及宾客的人数,要求每个宾客得到的蛋糕体积一样,自己也要一块,问最大分到的是多少。思路,对答案二分,检查是否可以成功分那么多快蛋糕。代码如下:#include<cstdio>#include<algorithm>#include<iostream>#include<cmath>#define p1 acos(-1.0) using namespace std;double a[10000+
2021-10-10 22:44:27
76
原创 10月4日训练总结
A:题意:输入A,B,C,请输出A-B之间C的倍数(任意一个)代码如下#include<bits/stdc++.h>using namespace std;typedef long long ll;int main(void){ ll a,b,c; cin>>a>>b>>c; ll k=c; for(k;k<=b;k+=c) { if(a<=k&&k
2021-10-10 19:48:27
117
原创 Codeforces Round #739 (Div. 3)题解A-E
A.Dislike of ThreesProblem - A - Codeforces题意:Polycarp不喜欢在十进制表示中可以被3整除的整数或以数3字结尾的整数。Polycarp 也不喜欢同时满足这两个条件的整数。Polycarp 开始写出正数(大于00) 他喜欢的整数:1,2,4,5,7,8,10,11,14,16,...1,2,4,5,7,8,10,11,14,16,….输出克克- 此序列的第 - 个元素(元素编号从11)。...
2021-09-23 15:48:34
129
原创 H - Kiki & Little Kiki 1 HDU - 2275
Day2—EEvery girl likes shopping,so does dandelion.Now she finds the shop is increasing the price every day because the Spring Festival is coming .She is fond of a shop which is called "memory". Now she wants to know the rank of this shop's price after th
2021-08-31 19:43:58
102
原创 G - 产生冠军 HDU - 2094
Day2—G有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。根据这个规则,无需循环较量,或许就能确定冠军。你的任务就是面对一群比赛选手,在经过了若干场撕杀之后,确定是否已经实际上产生了冠军。Input输入含有一些选手群,每群选手都以一个整数n(n<1000)开头,后跟n对选手的比
2021-08-31 18:59:41
67
原创 F - pairs HDU - 5178
Day2—Fohn hasnnpoints on the X axis, and their coordinates are(x[i],0),(i=0,1,2,…,n−1)(x[i],0),(i=0,1,2,…,n−1). He wants to know how many pairs<a,b><a,b>that|x[b]−x[a]|≤k.(a<b)|x[b]−x[a]|≤k.(a<b)InputThe first line contains a s...
2021-08-31 18:16:03
85
原创 E - Shopping HDU - 2648
Day2—FJohn hasnnpoints on the X axis, and their coordinates are(x[i],0),(i=0,1,2,…,n−1)(x[i],0),(i=0,1,2,…,n−1). He wants to know how many pairs<a,b><a,b>that|x[b]−x[a]|≤k.(a<b)|x[b]−x[a]|≤k.(a<b)InputThe first line contains a ...
2021-08-31 18:11:25
80
原创 D - Let the Balloon Rise HDU - 1004
Day2—DContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and find the resul
2021-08-31 16:12:11
72
原创 C - Running Median HDU - 3282
Day2—CFor this problem, you will write a program that reads in a sequence of 32-bit signed integers. After eachodd-indexedvalue is read, output the median (middle value) of the elements received so far.InputThe first line of input contains a single..
2021-08-31 15:28:19
114
原创 B - Stones HDU - 1896
Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a little tired, so Sempr always play some games this time.There are many stones on the road, when he meet a stone, he
2021-08-31 15:20:33
93
原创 A - The Balance of the World
Day2—AThe world should be finely balanced. Positive vs. negative, light vs. shadow, and left vs. right brackets. Your mission is to write a program that judges whether a string is balanced with respect to brackets so that we can observe the balance of th
2021-08-31 13:39:42
95
原创 G - 度度熊学队列 HDU - 6375
度度熊正在学习双端队列,他对其翻转和合并产生了很大的兴趣。初始时有NN个空的双端队列(编号为11到NN),你要支持度度熊的QQ次操作。①11uuwwvalval在编号为uu的队列里加入一个权值为valval的元素。(w=0w=0表示加在最前面,w=1w=1表示加在最后面)。②22uuww询问编号为uu的队列里的某个元素并删除它。(w=0w=0表示询问并操作最前面的元素,w=1w=1表示最后面)③33uuvvww把编号为vv的队列“接在”...
2021-08-31 00:28:50
96
原创 F - Buy and Resell
Day1—FThe Power Cube is used as a stash of Exotic Power. There arenncities numbered1,2,…,n1,2,…,nwhere allowed to trade it. The trading price of the Power Cube in theii-th city isaiaidollars per cube. Noswal is a foxy businessman and wants to quie...
2021-08-31 00:11:23
93
原创 E - Potions (Hard Version)
Day1—EThis is the hard version of the problem. The only difference is that in this versionn≤200000n≤200000. You can make hacks only if both versions of the problem are solved.There arennpotions in a line, with potion11on the far left and potionnn...
2021-08-30 17:13:43
254
原创 D - Equal Sums
Day1—DYou are givenkksequences of integers. The length of theii-th sequence equals tonini.You have to choose exactly two sequencesiiandjj(i≠ji≠j) such that you can remove exactly one element in each of them in such a way that the sum of the cha...
2021-08-30 16:30:49
165
原创 C - Shaolin HDU - 4585
Day1—CShaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every year, trying to be a monk there. The master of Shaolin evaluates a young man mainly by his talent on understanding the Buddism scripture, but fighting
2021-08-29 23:25:51
87
原创 B - Queue Aizu - ALDS1_3_B
Day1—BThere arenprocesses in a queue. Each process has nameiand timei. The round-robin scheduling handles the processes in order. A round-robin scheduler gives each process aquantum(a time slot) and interrupts the process if it is not completed by t...
2021-08-29 14:53:59
96
原创 A - Stack Aizu - ALDS1_3_A
Day 1—A,Reverse Polish notation is a notation where every operator follows all of its operands. For example, an expression (1+2)*(5+4) in the conventional Polish notation can be represented as 1 2 + 5 4 + * in the Reverse Polish notation. One of advantag
2021-08-29 14:01:35
59
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人