// 2019.10.7 练习赛 // 赛题来源:2018 ICPC 焦作区域赛 // CF链接:http://codeforces.com/gym/102028 A Xu Xiake in Henan Province 题目大意 有四个旅游地,给出 n 个人去四个地方的旅游次数,根据他去过旅游地个数输出相应等级. 思路 签到题...(队友在干嘛呀,10min过去了600人交题了啊我们怎么还没AC AC代码 #include<iostream> #include<cstdio> u…
队名:Unlimited Code Works(无尽编码)  队员:Wu.Wang.Zhou 先说一下队伍:Wu是大三学长:Wang高中noip省一:我最渣,去年来大学开始学的a+b,参加今年区域赛之前只学了大部分图论内容,以及一些数据结构.动态规划等内容,水平不及两个队友... ... 首先流水账式的记录一下比赛过程吧,最后再写这一年的感想.体会与将来的学习计划. 先从长春站说起... ... 长春站是我加入ACM以来参加的第一场ICPC,因此无比的激动!从杭州出发,乘了整整24小时的火车,终…
摸银结束回来,整个人都轻松了. 自CCPC打铁以来的这两个月真的太痛苦了. 俱乐部退役的退役停训的停训,好冷清啊. 前期切题很稳,前四题两个小时1A. 过了四题之后好像心态有点飘,然后开题就慢了,想题的速度也慢了. 其实后期状态变差也很正常. 所以实际上目前我们的水平重要的就是前面切easy-medium的基本功. 切题一定要稳,所以codeforce要多打.而且如果前期磕磕绊绊,非常影响心态. A题水题,不说了.觉得自己读题够快了. E题大数,先打表找了个规律,后来czc上去敲c++大数模板.…
球队内线我也总水平,这所学校得到了前所未有的8地方,因为只有两个少年队.因此,我们13并且可以被分配到的地方,因为13和非常大的数目.据领队谁oj在之上a谁去让更多的冠军.我和tyh,sxk,doubleq运的在大二就有机会參加亚洲现场赛,非常激动.牡丹江赛区是我和sxk和doubleq组成rainbow战队,我们对这次区域赛事实上就是去张张见识,添加大赛经验(外加公费旅游2333),但是当我们真正来到赛场的时候不知道为上面我非常渴望拿一块牌子. 第一天热身赛,double迅速切下水题.我一直再…
2019上海区域赛现场赛总结 补题情况(以下通过率为牛客提交): 题号 标题 已通过代码 通过率 我的状态 A Mr. Panda and Dominoes 点击查看 5/29 未通过 B Prefix Code 点击查看 249/1019 通过 C Maze 点击查看 8/110 未通过 D Spanning Tree Removal 点击查看 88/211 通过 E Cave Escape 点击查看 53/553 通过 F A Simple Problem On A Tree 点击查看 66…
题意:四个操作,区间加,区间每个数乘,区间的数变成 2^64-1-x,求区间和. 题解:2^64-1-x=(2^64-1)-x 因为模数为2^64,-x%2^64=-1*x%2^64 由负数取模的性质可知 也就 =(2^64-1)*x%2^64 所以 2^64-1-x=2^64-1+(2^64-1)*x 所以第三个操作也就变成了区间乘 和区间加.  然后就是树剖加线段树多重标记.表示这是第一次写多重标记,整体凭感觉,细节看题解,树剖有点点遗忘,不过还好.今天看群里说邀请赛没什么价值,,细想一下那…
不知道怎样说起-- 感觉还没那个比赛的感觉呢?如今就结束了. 9号.10号的时候学校还评比国奖.励志奖啥的,由于要来比赛,所以那些事情队友的国奖不能答辩.自己的励志奖班里乱搞要投票,自己又不在,真是无语了--烦得要死.然后在这些事情还没处理好之前我们就这样10号中午从地大去北京站上火车了--那时真感觉这场带着这样的心情来现场赛感觉要打铁了-- 然后10号晚上队友的国奖让琦神帮答辩完了.得国奖无疑了.然后自己的励志奖也定下来一定得了.在火车上的我们也松了一口气.不能由于来比赛国奖励志奖都不得是不-…
昨晚乱入学弟的训练赛,想了一下这个题.推导的过程中,加深了对公理化的概率论理解.$\newcommand{\d}{\mathop{}\!\mathrm{d}}$ 解法一 考虑 $ d < L$ 的情形. \begin{equation*} P(X = 1) = \frac{d}{L} \end{equation*} \begin{align*} P(X = 2) &= \int_0^{L - d} \frac{\d x}{L} \frac{d}{L - x} \\ &= \frac{…
Jessie has a magic mirror. Every morning she will ask the mirror: 'Mirror mirror tell me, who is the most beautiful girl in the world?' If the mirror says her name, she will praise the mirror: 'Good guy!', but if the mirror says the name of another p…
Known Notation Time Limit: 2 Seconds      Memory Limit: 65536 KB Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also known as postfix notation since every operator in an expres…
题意: 你的房子在0点,1,2,3,...,n(n<=1e5)点每个点都有一颗高度为0的花,浇一次水花会长a[i]. 你有一个机器人刚开始在你家,最多走m步,每一步只能往前走或者往后走,每走到一个地方除了房子都会给花浇水,问m步以后最低那朵花的高度最大是多少. 思路:二分,并且可以证明左右横跳(即这一个点不够我们就来回走一直到够高度为止). 需要注意步数用完直接break,每一朵花浇够次数立刻走向下一朵花(如果还有步数). 代码: #include<bits/stdc++.h> #def…
In Chinese mythology, Pangu is the first living being and the creator of the sky and the earth. He woke up from an egg and split the egg into two parts: the sky and the earth. At the beginning, there was no mountain on the earth, only stones all over…
Description In country Light Tower, a presidential election is going on. There are two candidates,  Mr. X1 and Mr. X2, and both of them are not like good persons. One is called a liar and the other is called a maniac. They tear(Chinese English word,…
Problem Description The sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes the stars can form a regular polygon in the sky if we connect them properly. You want to record the…
Problem Description Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pang decides to solve the following problem:Consider a bidirectional graph G with N vertices and M edges. All…
题意: 有一排n个石子(注意n可以为0),每次可以取1~K个连续的石子,Adrien先手,Austin后手,若谁不能取则谁输. 思路: (1) n为0时的情况进行特判,后手必胜. (2) 当k=1时,很容易可以发现:若n为偶数则后手赢,n为奇数则先手赢. (3) 当k>1时,只要先手保证这一排石子两边对称,则后手必败,所以可知k>1时先手必胜. #include<bits/stdc++.h> using namespace std; int main() { ios::sync_w…
Hello everyone! I am your old friend Rikka. Welcome to Xuzhou. This is the first problem, which is a problem about the minimum spanning tree (MST). I promise you all that this should be the easiest problemeasiest problem for most people. A minimum sp…
P2 : Heshen's Account Book Time Limit:1000ms Case Time Limit:1000ms Memory Limit:512MB Description Heshen was an official of the Qing dynasty. He made a fortune which could be comparable to a whole country's wealth by corruption. So he was known as t…
P1 : Jin Yong’s Wukong Ranking List Time Limit:1000ms Case Time Limit:1000ms Memory Limit:512MB Description Jin Yong was the most famous and popular Chinese wuxia (The one who fight bad people by his Wukong i.e. Wushu and Kongfu) novelist who lived i…
Problem Description Consider a un-rooted tree T which is not the biological significance of tree or plant, but a tree as an undirected graph in graph theory with n nodes, labelled from 1 to n. If you cannot understand the concept of a tree here, plea…
There are N different kinds of transport ships on the port. The ith kind of ship can carry the weight of V[i]V[i] and the number of the ith kind of ship is 2c[i]-12^{C[i]} - 12. How many different schemes there are if you want to use these ships to t…
Problem Description Here N (N ≥ 3) rabbits are playing by the river. They are playing on a number line, each occupying a different integer. In a single move, one of the outer rabbits jumps into a space between any other two. At no point may two rabbi…
There are N children in kindergarten. Miss Li bought them N candies. To make the process more interesting, Miss Li comes up with the rule: All the children line up according to their student number (1...N), and each time a child is invited, Miss Li r…
Average Score Time Limit: 2 Seconds      Memory Limit: 65536 KB Bob is a freshman in Marjar University. He is clever and diligent. However, he is not good at math, especially in Mathematical Analysis. After a mid-term exam, Bob was anxious about his…
Information Entropy Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Information Theory is one of the most popular courses in Marjar University. In this course, there is an important chapter about information entropy. Entropy is t…
链接:https://nanti.jisuanke.com/t/A1607 题面:   Consider an array AA with n elements . Each of its element is A[i]A[i] (1 \le i \le n)(1≤i≤n) . Then gives two integers QQ, KK, and QQ queries follow . Each query , give you LL, RR, you can get ZZ by the fo…
题意: 给你数字或 * 的串,你可以交换一个*和数字.在最前面添1.在一个地方插入*,问你使串满足入栈出栈的(RNP)运算法则. 思路: 引用:https://blog.csdn.net/u011580493/article/details/40077119 由于一个 * 能消除2个数字,然后生成一个数字.因此首先要保证数字个数大于等于 ‘*’ 个数+1. 如果数字个数不够,就在最前面添加. 然后开始从头开始遍历,遇到*就看当前的数字个数是否有两个或以上.不够的话,从最后面开始找第一个不是‘*’…
131072K   A digit sum S_b(n)Sb​(n) is a sum of the base-bb digits of nn. Such as S_{10}(233) = 2 + 3 + 3 = 8   S10​(233)=2+3+3=8, S_{2}(8)=1 + 0 + 0 = 1S2​(8)=1+0+0=1, S_{2}(7)=1 + 1 + 1 = 3S2​(7)=1+1+1=3. Given NN and bb, you need to calculate \sum_…
Resistors in Parallel Gym - 102028E 吐槽一下,网上搜索的题解一上来都是找规律,对于我这种对数论不敏感的人来说,看这种题解太难受了,找规律不失为一种好做法,但是题解仅仅包括找规律又有什么意义呢? 定义 \[f[i] = \begin{cases}\infin & \text{如果 i 有平方因子, 即$\exist d, d\ge 2$,使得 $i$ 能够被 $d^2$ 整除} \\i & otherwise\end{cases} \] 又定义 \[s[i…
11月23日 大清早,跟着wyb的脚步,早起跑过去听方伟的编译原理,然鹅一点都没听进去,在焦作胡辣汤群里疯狂灌水... 听说焦作那边冷得不行,前一天看天气预报说那边已经是2℃了,都快零下了,然鹅学校里正好都没有厚的衣服.看队友一个披着黑色大衣,另一个全身裹得严严实实,而我只有秋装三件套,外套毛衣T恤衫,我慌得不行,生怕冻死在焦作.... 上动车,迷迷糊糊地晃到了焦作...感觉整辆车上的人都一起下了车?走到南广场却发现,一辆出租车都没有...G1810号高铁给焦作带来了几百只JBer,然后把他们留…