ICode9

精准搜索请尝试: 精确搜索
  • The Way to Home2022-01-31 21:06:41

    题目描述 A frog lives on the axis OxOx and needs to reach home which is in the point nn . She starts from the point 11 . The frog can jump to the right at a distance not more than dd . So, after she jumped from the point xx she can reach the point

  • CF53C Little Frog 题解2021-12-17 14:34:45

    Content 有一只小青蛙想游历 \(n\) 块土堆,它现在在 \(1\) 号土堆上,每次可以跳跃任意距离到达另外的一个土堆。它想让每次跳跃的距离都不相等,试找到这样的一个方案。 数据范围:\(1\leqslant n\leqslant 10^4\)。 Solution 我们可以尝试左右横跳的方式,从 \(1\) 跳到 \(n\),再从 \(n\)

  • 【无标题】6. 青蛙与蚊子2021-12-11 23:34:26

     有 n 只青蛙位于坐标轴 OX 上,对于每只青蛙,有两个已知值 xi、ti,表示第 i 只青蛙在坐标的位置(各不相同)以及它的舌头的长度。同样有 m 只蚊子一只接一只的落到坐标轴上,对于每只蚊子,有两个已知值, pj 表示第 j 只蚊子所在的位置,bj 为第 j 只蚊子的重量。青蛙和蚊子表示为坐标上

  • CF1601 B. Frog Traveler2021-11-06 11:32:31

    Problem - 1601B - Codeforces   题意: 井下深度为n,在井下深度为i的地方可以往上跳[0,ai]米 如果没有跳出井,则要下滑bi米 问最少跳几次可以跳出井   假设跳[1,d]可以出井的位置都求出来了 现在求跳d+1次可以出井的位置 枚举跳d次可以出井的位置v,若从位置u可以滑倒位置v,即u+b[u]=v

  • Codeforces Round #751 (Div. 2) D. Frog Traveler(DP)2021-11-02 01:33:52

    题目链接 题意: 你位于地下\(n\)米的井里,位于位置\(i\)时可以向上跳\(0\)~\(a_i\)米,当你跳到位置\(k\)时,你会下降\(b_k\)米,请问最少跳多少次能到达地面。 思路: 逆向枚举,从\(n\)开始跳,每个位置维护向上跳到当前位置的最少次数。对于位置\(j\)可以跳到位置\(i+b_i\)(先跳到位置\(i\)),应

  • Codeforces Round #751 (Div. 2)D. Frog Traveler2021-10-26 21:00:34

    D. Frog Traveler 题目大意:每个高度有ai,bi,爬到高度i可以选择跳0~ai米,落在高度j后会向下滑bj米,问跳到最高点的最小步数,和方案 思路:只会最捞的线段树优化建图 拆点后,每个点分为滑落点和跳落点,不拆点的话按照题意建图是错的,跳落点向滑落点连0的边,i可以跳到i~i-a[i],区间用线段树记

  • 如何快速抓取网站SEO元素2021-10-19 17:04:27

    大家需要一款能够快速抓取网站SEO元素的Mac软件吗?那就来试试这款名为Screaming Frog SEO Spider的网络爬虫软件吧。Screaming Frog SEO Spider收集关键的现场SEO元素(URL,页面标题,元描述,标题等),以便SEO能够做出明智的决策尖叫青蛙 SEO蜘蛛可以让你快速抓取,分析和审计一个网站的现场

  • C - The Frog‘s Games2021-10-01 22:05:11

    The annual Games in frogs’ kingdom started again. The most famous game is the Ironfrog Triathlon. One test in the Ironfrog Triathlon is jumping. This project requires the frog athletes to jump over the river. The width of the river is L (1<= L <= 10

  • 跳台阶2021-09-26 19:00:44

    def frog(n): if n <= 2: return n t1, t2 = 1, 2 for i in range(3, n+1): t1, t2 = t2, t1+t2 return t2 n = int(input()) print(frog(n))    

  • 【题解】hdu5037 Frog2021-08-04 20:02:34

    awsl #include <cstdio> #include <algorithm> using namespace std; const int MAXN = 200005; int T, N, M, K, A[MAXN]; int main() { scanf("%d", &T); for (int cas=1; cas<=T; cas++) { scanf("%d%d%d", &N, &M, &a

  • GOGOUP-11. 接口和多态2021-07-09 13:32:30

    万丈高楼平地起-接口和多态 一、接口基本定义和使用 多态就是同一个接口,使用不同的实例而执行不同操作。 官方术语:一个类型如果拥有一个接口需要的所有方法,那么这个类型就实现了这个接口。 golang接口和dotnet 不同之处在于不需要显示的继承接口,只要实现接口的方法那么就认为实现

  • Frogger2021-07-07 19:35:03

    题目: https://vjudge.net/problem/POJ-2253 注意这题的输出:For each test case, print a line saying "Scenario #x" and a line saying "Frog Distance = y" where x is replaced by the test case number (they are numbered from 1) and y is replaced by t

  • Sth about Educational DP Contest2021-07-04 17:00:50

    \(\begin{array}{c|C|c|c} n & Task & Status & Algorithm \\ \hline A & Frog 1 & & \text{简单线性DP} \\ \hline B & Frog 2 & & \\ \hline C & Vacation & & \\ \hline D & Knapsack 1 & &

  • 403. Frog Jump(Leetcode每日一题-2021.04.29)--抄答案2021-04-29 10:03:06

    Problem A frog is crossing a river. The river is divided into some number of units, and at each unit, there may or may not exist a stone. The frog can jump on a stone, but it must not jump into the water. Given a list of stones’ positions (in units) in

  • CF625E Frog Fights2021-01-22 18:35:46

    有\(n\)只青蛙在一个长度为\(m\)的环上打架;每只青蛙有一个初始位置\(p_i\),和一个跳跃数值\(a_i\)。从\(1\)号青蛙开始按序号循环行动,每次若第\(i\)只青蛙行动,则它会向前跳 \(a_i\)个格子,撞飞它遇见的所有青蛙,包括终点格子上的,之后它的\(a_i\)减少等同于撞飞的青蛙只数,若\(a_i<0\),

  • 青蛙跳阶问题如何处理2021-01-11 10:00:12

    //青蛙跳阶问题 //n个台阶 //1次可以跳一个台阶,也可以跳两个台阶 //这只青蛙要跳到第n个台阶,有多少种跳法 //因为每次只能跳一阶或两阶 //把第n阶的次数看成f(n)函数的话 //第一次跳1阶,则有f(n-1)种跳法 //第一次跳2阶,则有f(n-2)种跳法 //这里n>2 //这就形成了一个斐波那契数

  • 1419. Minimum Number of Frogs Croaking (python)2020-11-27 12:28:54

    题目 解法: 这个题目有点意思的,比较巧妙。 我们需要找的是,这五个字母在某个时间出现的最大次数。限制条件是,每当遇到一个k的时候,放掉一只青蛙。同时需要检查给的字符串是不是无效,依照两个规则判断: 如果出现了一个字符,但是应该出现在他之前的字符没有出现,比如直接来个r,那就无

  • Codeforces Round #305 (Div. 1) A Mike and Frog 循环节,EXCRT2020-07-24 09:31:57

       此题主要学到了处理循环节的问题。 对于每个生物而言,有可能有无数能到a1,有可能仅1次到a1,也可能一次也到不了a1 对于一次也到不了,直接输出-1 对于仅1次跑到a1,for m次,如果没有就没有了 对于无数次,联立同余方程,可以用EXGCD或者EXCRT求解。 #pragma warning(disable:4996) #in

  • [20-05-04][Thinking in Java 6]Java Inheritance 4 - Upcasting2020-05-04 13:57:37

    1 package test_1_4; 2 3 public class Amphibian { 4 5 public Amphibian(int i) { 6 7 System.out.println("this is Amphibian"); 8 } 9 10 public void print(Amphibian i) { 11 12 System.out.

  • CF1324C Frog Jumps 题解2020-03-23 09:04:58

    原题链接 简要题意: 现在河面上有 \(n+2\) 块石头,编号 \(0\) 到 \(n+1\),\(1\)~\(n\) 块石头每块上有一个方向,如果是 \(L\),那么青蛙到这块石头上之后只能往左跳,如果是 \(R\) 只能往右,当然,第 \(0\) 块石头的方向是 \(R\). 现在青蛙要从 \(0\) 跳到 \(n+1\),请问他应该怎么跳才能让他跳

  • Frog2020-03-17 14:01:02

    Description有一只叫做Freddy的青蛙坐在湖中央的一块石头上,突然间他发现另一只青蛙(她的名字是Fiona)坐在另一颗石头上。他想要过去找她,但是因为湖水很脏,到处充满着游客的防晒油,所以他决定用跳的,而不要用游的。不妙的是Fiona的石头离他的距离超出他所能跳的范围。因此Freddy考虑利用

  • C. Frog Jumps2020-03-16 13:04:31

    C. Frog Jumps 题意 一行字符串由L和R组成,数组从1标号到n。青蛙从0的位置开始起跳,想到达n+1的位置,当他跳到L的时候只能往左跳,跳到R的时候只能往右跳,跳的范围由你来定。问最小的d是多少 思路 d = 连续最长的L+1。 代码实现 #include<bits/stdc++.h> using namespace std; int main(

  • POJ 2253-Frogger(Floyd变形)2020-03-08 10:37:32

    Frogger Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 78072 Accepted: 23723 Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but

  • WOJ1474 Young Frog's Life Cycle2020-02-05 17:36:17

    Time Limit: 1 second Memory Limit: 512 mebibytes As we know, frog is one of the world’s oldest amphibious animal, so the frogs have a special counting method of their own, each of them has a deck of nnn mogic stones labeled with 0,1,2,....(n−1)0,1,2,.

  • 算法题 最短路径-02-Frogger2020-02-01 12:04:50

    Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists’ sunscreen, he wants to avoid swimming and instead reach

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有