ICode9

精准搜索请尝试: 精确搜索
  • 【ybt高效进阶1-3-3】最大均值2020-12-31 22:30:05

    最大均值 题目链接:ybt高效进阶1-3-3 题目大意 求一个序列里面平均值最大的,长度不小于 L 的连续字段。 输出最大的平均值乘 1000 向下取整的东西。 思路 这道题很明显是二分平均值。 那我们可以把序列里的每个数都减平均值,那问题就变成了要找长度不小于 L 的字段使字段和大于

  • #力扣 LeetCode496. 下一个更大元素 I @FDDLC2020-12-29 23:02:54

    题目描述: https://leetcode-cn.com/problems/next-greater-element-i/   Java代码: class Solution { public int[] nextGreaterElement(int[] nums1, int[] nums2) { int[] answer=new int[nums1.length]; for(int i=0,j;i<nums1.length;i++){

  • 面试题2020-12-28 19:59:38

    1、两电脑都在同一个网络环境中,A 电脑访问不到 B 电脑的共享文件。此现象可能是哪些 方面所导致?怎样处理? answer:首先你要确定是不是在一个工作组内,只有在一个工作组内才可以共享文件,然后看一个看一看有没有防火墙之类的,然后确定文件是不是已经共享 2、 电脑开机时风扇转, 但

  • 攻防世界answer_to_everything2020-12-24 19:04:17

    攻防世界answer_to_everything 打开ida 看到not_the_flag函数 根据题目提示,直接对kdudpeh进行sha解密 http://ontool.cn/sha/ 得到flag:

  • 知乎推荐上万的,400集python,K-NN算法的简单实现精讲!2020-12-24 16:02:11

    ##KNN使用场景 电影可以按照题材分类,那么如何区分 动作片 和 爱情片 呢? 动作片:打斗次数更多 爱情片:亲吻次数更多 基于电影中的亲吻、打斗出现的次数,使用 k-近邻算法构造程序,就可以自动划分电影的题材类型。 本期推送整理了初学者可能会用到的Python资料,含有书籍/视频/在线

  • 2020.11.30 字符串2020-12-23 15:34:30

    一个字符串用于存储一系列字符就像 "John Doe". 一个字符串可以使用单引号或双引号: var carname="Volvo XC60";var carname='Volvo XC60'; 用位置(索引)可以访问字符串中任何的字符: var character=carname[7]; 字符串的索引从零开始, 所以字符串第一字符为 [0],第二个字符为 [1]

  • 用户答题接收答案,并存入数据库2020-12-15 13:59:34

    用户答题接收答案,并存入数据库 接收方式:键值对接收 @GetMapping("/answers") @ApiImplicitParams({ @ApiImplicitParam(name = "djPaperid", value = "试卷编号", required = true, dataType = "Integer"), @ApiImplicitParam(na

  • 2020-12-082020-12-08 18:03:49

    /*把m个苹果放入n个盘中,允许有空盘,且1、2和2、1视为同一种情况,问一共有多少种方案*/ #include<stdio.h> int fun(int m,int n) { if(m==0||n=1) return 1;//当只有一个盘或没有苹果(情况3递归时可能会遇到)时只有一种放法 else if(m<n) return fun(m,m);//等同于往m个

  • 2020-12-072020-12-07 18:01:07

    使用python做出的第一个游戏 要求:1.能多次使用 2.数字是随机的 我们导入一个模块叫random。answer=random.randint(a,b)就是answer从a到b的数值中随机取数。再引用while循环

  • 爬虫answer2020-12-06 18:57:40

    爬虫爬取学堂某课程答案经验记录: 课程url: https://www.xuetangx.com/learn/WHUT08091001005/WHUT08091001005/4230486/video/6227457 进入单元测试页面,打开调试窗口 经过一番查找,找到该请求。答案就在这个请求的响应里,通过分析这个响应,写下了py脚本。(其实可以按单元查看答

  • #力扣 LeetCode829. 连续整数求和 @FDDLC2020-12-03 13:59:41

    题目描述: 829. 连续整数求和 - 力扣(LeetCode) (leetcode-cn.com)   Java代码一: class Solution { public int consecutiveNumbersSum(int N) { //1 <= N <= 10 ^ 9,连续个数>=1;试求有多少组连续正整数满足所有数字之和为 N int answer=0; for(int amount=1

  • 17. Letter Combinations of a Phone Number2020-12-02 09:03:15

    1 题目理解 给定一个字符串string,字符范围是[2,9]之间的数字。数字表示电话上的一个按钮。返回字符串的可能所有组合方式。每个数字对应的字母如下图所示。 Example 1: Input: digits = “23” Output: [“ad”,“ae”,“af”,“bd”,“be”,“bf”,“cd”,“ce”,“cf”] E

  • 力扣刷题记录——猜数字2020-11-30 23:30:01

    题目: 小A 和 小B 在玩猜数字。小B 每次从 1, 2, 3 中随机选择一个,小A 每次也从 1, 2, 3 中选择一个猜。他们一共进行三次这个游戏,请返回 小A 猜对了几次? 输入的guess数组为 小A 每次的猜测,answer数组为 小B 每次的选择。guess和answer的长度都等于3。 方法: 执行用时: 28 m

  • C语言写猜数字(随机数、循环、if判断)2020-11-27 23:02:17

    //头文件 rand函数需要头文件stdlib.h //time函数需要头文件time.h #include <stdio.h> #include <stdlib.h> #include <time.h> //主函数 int main() { //随机数种子,没有随机数种子不能真的生成随机数 srand(time(NULL)); //定义接收用户输入的数据类型 //answ

  • 模板方法模式(行为型)2020-11-19 12:01:37

      设计模式的3个分类:创建型模式、结构型模式、行为型模式 模板方法模式(Template Method Pattern)的意图: 模板方法模式是在超类中定义了一个算法的框架, 允许子类在不修改结构的情况下重写算法的特定步骤。   使用场景: 1、有多个子类共有的方法,且逻辑相同。 2、重要的、复杂的

  • 实现进制转换伪代码2020-11-08 23:01:51

    用Python或Scratch实现下面伪代码描述的进制转换程序,提交运行结果截图,至少三张,包含转换为二进制,八进制,十六进制的截图。Write "Enter the new base"Read newBaseWrite "Enter the number to be converted"Read decimalNumberSet quotient to 1WHILE (quotient is not zero) Set q

  • 进制转换2020-11-08 19:31:44

    Write "Enter the new base"Read newBaseWrite "Enter the number to be converted"Read decimalNumberSet quotient to 1WHILE (quotient is not zero)Set quotient to decimalNumber DIV newBaseSet remainder to decimalNumber REM newBaseMake the re

  • 实现进制转化伪代码2020-11-08 15:32:34

    伪代码: Write "Enter the new base"Read newBaseWrite "Enter the number to be converted"Read decimalNumberSet quotient to 1WHILE (quotient is not zero) Set quotient to decimalNumber DIV newBase Set remainder to decimalNumber REM ne

  • 实现进制转化伪代码2020-11-08 14:32:25

    实现进制转化伪代码 Write "Enter the new base" Read newBase Write "Enter the number to be converted" Read decimalNumber Set quotient to 1 WHILE (quotient is not zero) Set quotient to decimalNumber DIV newBase Set remainder to decimalNumber REM n

  • 进制转换为伪代码2020-11-07 18:34:13

    实现进制转化伪代码 作业要求 用Python或Scratch实现下面伪代码描述的进制转换程序,提交运行结果截图,至少三张,包含转换为二进制,八进制,十六进制的截图。 Write "Enter the new base" Read newBase Write "Enter the number to be converted" Read decimalNumber Set quotient to 1 W

  • 如何找一个程序员做男朋友?2020-11-01 15:51:00

    众所周知,在互联网高速发展的今天,程序员这个行业已成为众多人向往的职业香饽饽,这个群体渐渐成为了目前相亲市场的一只主力军,更是成为了当代丈母娘的钦点“女婿”。图片来自 Pexels最近,微博上有位女网友提问:从什么渠道可以认识程序员男孩子?于是幽默的程序员开始了自黑模式:你哪是看中

  • mybatis-generator 类型转化插件2020-10-27 10:02:23

    因为mybatis的tinyint默认映射为bit类型,代码不方便操作和转换。因此需要对类型进行转化 插件地址:(https://github.com/suyin58/mybatis-generator-tddl/blob/master/generator-plugin/src/main/java/com/toolplat/generator/plugins/JavaTypeResolverMybatisDefaultImpl.java) 插件

  • GSS1 - Can you answer these queries I 题解2020-10-26 18:33:56

    Link GSS1 - Can you answer these queries I Solve GSS1 - Can you answer these queries III的降级版,不带修改的,直接用线段树即可。 Code 直接改了下3的代码我懒 #include<bits/stdc++.h> using namespace std; const int maxn=50005; int N,Q,a[maxn]; struct node{ int l,r,s

  • 实验一(GPB)2020-10-17 22:35:02

    /* A simple C program */ #include <stdio.h> int main(){ printf("202083290318"); printf("hello,C\n"); printf("you're the best!"); return 0; } #include<stdio.h> int main (){ while (1)

  • Scriptable制作iOS14小组件(1)2020-09-30 16:32:11

    iOS14小组件的到来,把一直隐藏在幕后的大佬Scriptable给带出来了。 看了文档才知道这兄弟能上天能入地,能力可谓无限大

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

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

ICode9版权所有