Google Code Jam 2020 Round1B Join the Ranks】的更多相关文章

题意 给你一个形如\(1,2,\cdots,R,1,2,\cdots,R,1\cdots\)的序列,共重复\(C\)次.你每次可以选择一个区间\([L,R]\)将其平移到序列首部,最终使得序列具有\([1,1,\cdots,1,2,2,\cdots,2,\cdots,R,R,\cdots,R]\)的形式.问最少需要多少次,并输出具体步骤. 解题思路 比赛的时候只来得及写前两道,这道题是赛后看dls录播后补的.啥都不说了,dlstxdy! 对于相邻且相同的元素,我们就把他合并成\(1\)个元素,要…
题意 你初始位于\((0,0)\),然后你想要到\((x,y)\)去,第\(i\)步的步长是\(2^{i-1}\),要求用最少的步数走到\((x,y)\). 解题思路 首先可以推出,走\(i\)步可以走到一个正方形范围内横纵坐标之和为奇数的所有点. 如,走3步可以走到所有红色直线围成的正方形内横纵坐标之和为奇数的点. 这样,我们就可以直接算出是否可达以及若可达最少步数是多少. 然后考虑从最后一步开始从\((x,y)\)往\((0,0)\)走,枚举4个方向,向这个方向走了这一步之后到达的点的最少步…
总结 这一题是道交互题,平时写的不多,没啥调试经验,GYM上遇到了少说交个十几发.一开始很快的想出了恰烂分的方法,但是没有着急写,果然很快就又把Test Set3的方法想到了,但是想到归想到,调了快一个多小时调不出来,一直拖到了结尾才调好,然后一个常量忘记初始化导致第三个点还RE了,幸好凭着烂分还是苟进下一轮了. 题意 在一个\(2e9 * 2e9\)的平面中,有一个圆,圆的圆心位于整数点,圆的半径\(R\)是整数且\(10^9/2 \leq R \leq 10^9\).你每次可以询问一个点,判…
Problem B. Cookie Clicker Alpha   Introduction Cookie Clicker is a Javascript game by Orteil, where players click on a picture of a giant cookie. Clicking on the giant cookie gives them cookies. They can spend those cookies to buy buildings. Those bu…
Problem A. Magic Trick Small input6 points You have solved this input set.   Note: To advance to the next rounds, you will need to score 25 points. Solving just this problem will not give you enough points. Problem Recently you went to a magic show.…
Google Code Jam Qualification Round Africa 2010 的第一题,很简单. Problem You receive a credit C at a local store and would like to buy two items. You first walk through the store and create a list L of all available items. From this list you would like to b…
Google Code Jam 2008 资格赛的第一题:Saving the Universe. 问题描述如下: Problem The urban legend goes that if you go to the Google homepage and search for "Google", the universe will implode. We have a secret to share... It is true! Please don't try it, or te…
Google Code Jam Africa 2010 Qualification Round Problem B. Reverse Words https://code.google.com/codejam/contest/351101/dashboard#s=p1 Problem Given a list of space separated words, reverse the order of the words. Each line of text contains L letters…
Google Code Jam Qualification Round Africa 2010 Problem A. Store Credit https://code.google.com/codejam/contest/351101/dashboard#s=p0 Problem You receive a credit C at a local store and would like to buy two items. You first walk through the store an…
Google Code Jam 2010 Round 1C Problem A. Rope Intranet https://code.google.com/codejam/contest/619102/dashboard#s=p0 Problem A. Rope Intranet A company is located in two very tall buildings. The company intranet connecting the buildings consists of m…