ICode9

精准搜索请尝试: 精确搜索
  • 2021“MINIEYE杯”中国大学生算法设计超级联赛(10)1003. / HDU7079 Pty loves lines(bitset优化DP)2021-08-20 02:01:33

    Problem Description You are required to put n straight lines on a plane, guaranteeing no three lines share a common point and no lines are coincident. They will form some intersections, please output all possible numbers of intersections. Input The first

  • Pty loves lines 题解(dp)2021-08-19 20:35:28

    题目链接 题目思路 emmm这种dp真的有点小技巧 转换了dp的思维 同时这个dp的转移设置的也是有点不同qwq 代码 #include<bits/stdc++.h> #define fi first #define se second #define debug printf(" I am here\n"); using namespace std; typedef long long ll; typedef unsigned

  • git按人和日期统计代码量2021-08-03 17:02:36

    1、统计本人2021-08-02到2021-08-03之间提交的代码行数  (不含8月2号) git log --author="coco" --since=2021-08-02 --until=2021-08-03 --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s,

  • 用C语言写一个统计单词的程序2021-08-03 16:58:14

    编写一个统计单词数量的小程序,该程序可读取并报告单词的数量。 该程序要逐个字符读取输入,知道何时停止读取。该程序能识别并计算这些内容:字符、行数和单词。 #include <stdio.h> #include <ctype.h> //为isspace()函数提供原型 #include <stdbool.h> //为bool、true、false

  • 扫雷小游戏2021-07-29 18:31:31

    一、游戏设计要求 1.输入坐标,显示周围雷的数目 2.附近没有雷的位置全部展开 3.玩家下第一步棋时,如果踩雷了,判定玩家不死,重新分布雷 二、代码功能 1.菜单界面 选择1开始游戏,0退出游戏 void menu() { printf("***************************\n"); printf("*********1.开始游戏**

  • unity 文件操作_(txt文件按行读写)2021-07-20 21:03:12

    StreamWriter sw = CreateAppendTxt(writePath); //按行写入 sw.WriteLine(lines[i] + " " + dic[list_4[i]] + "_分块4"); sw.Close(); //按行读取txt string[] lines = File.ReadAllLines(readPat

  • buu刷题7.162021-07-16 22:00:36

    目录[SUCTF2018]followme[UTCTF2020]docx[RCTF2019]draw蜘蛛侠呀 [SUCTF2018]followme 直接过滤ip contains "SUCTF" 得到flag SUCTF{password_is_not_weak} [UTCTF2020]docx 打开doc文档,没有发现东西,改成zip解压,发现图片 得到flag [RCTF2019]draw LOGO解释器 跑一下得到flag

  • WPF 鼠标左键捕获点,用polyline连接起来2021-07-04 12:57:41

    WPF 鼠标左键捕获点,用polyline连接起来 Polyline lines; Line dot; Polyline cach; public Window1() { InitializeComponent(); lines=new Polyline(); lines.Stroke =new SolidColorB

  • Python 列数据加标点2021-07-03 20:00:59

    工作中遇到sql查询时,使用select * from where proj_num in( ) 时,需要对一列数据加标点,可以使用如下方法: 目标文件内容:    代码: #-*-coding:utf-8-*- ''' with open是python用来打开本地文件的,它会在使用完毕后,自动关闭文件,无需手动书写close(),所以读写文件尽量使用with

  • 2.rcParams画图参数详解(转)2021-07-02 10:00:17

    plt(matplotlib.pyplot)使用rc配置文件来自定义图形的各种默认属性,称之为rc配置或rc参数。通过rc参数可以修改默认的属性,包括窗体大小、每英寸的点数、线条宽度、颜色、样式、坐标轴、坐标和网络属性、文本、字体等。rc参数存储在字典变量中,通过字典的方式进行访问。 序号 属性 说明

  • 【Python】PEP8规范2021-06-21 08:33:34

    简介 PEP8是Python编程规范,是一些关于如何让程序更具可读性的建议。 详解 提示 翻译 备注 PEP 8:expected 2 blank lines,found 0 有两个空白行,但是没有发现 通常指在声明函数的上方必须有两行的空行 PEP 8:missing whitespace after ',' 在使用逗号时,需要在后面加一个空格

  • wukong-robot 日志模块2021-06-12 11:03:46

    wukong-robot 日志模块 日志文件: import logging import os from robot import constants from logging.handlers import RotatingFileHandler PAGE = 4096 DEBUG = logging.DEBUG INFO = logging.INFO WARNING = logging.WARNING ERROR = logging.ERROR def tail(filepath, n=

  • 微信小程序 笔记 wx:key用法2021-06-12 09:32:08

    什么时候用:数组内容会动态改变,要使用wx:key保持项目自己的特征和状态;不使用key的话会整个销毁再创建,导致性能下降 什么时候不需要:数组是静态的不需要改变,不关注顺序,就可以不适用 之前一直不理解wx:key是什么用法,举两个例子。 在没引入wx:key之前 <!--my.wxml--><view wx:for="{{

  • c语言中统计文件字符数2021-06-10 18:32:24

    c语言中统计文件字符数 1、   #include <stdio.h> int main(void) { FILE *fp; char c1[128]; int lines = 0; fp = fopen("a.txt", "r"); while(fscanf(fp, "%s", c1) == 1) { lines++; }

  • c语言 13 - 62021-06-08 23:04:52

    1、 #include <stdio.h> int main(void) { FILE *fp; int ch; char filename[FILENAME_MAX]; printf("please input filename: "); scanf("%s", filename); if((fp = fopen(filename, "r")) == NULL)

  • 二级指针-文件操作2021-06-08 19:01:01

    读取配置文件信息 ,并且将信息存放到 数组中 标题 注意: 释放堆区,关闭文件 需要注意的是: 对文件操作后,指针会移动,那么此时若想从头读取文件信息时, 需要rewind()回到文件开始位置 二级指针使用要注意是 主调函数创建 还是被调函数创建 学会封装,将模块化思想牢记于心 算法思

  • c语言 13-32021-06-07 19:04:59

    1、 #include <stdio.h> typedef struct{ char name[128]; double height; double weight; }Type1; void swap(Type1 *x, Type1 *y) { Type1 tmp = *x; *x = *y; *y = tmp; } void sort(Type1 x[], int n) { int i, j; for(i = 0; i

  • c语言 13 - 32021-06-07 16:33:02

    1、 #include <stdio.h> typedef struct{ char name[128]; double height; double weight; }Typex; void swap(Typex *x, Typex *y) { Typex tmp = *x; *x = *y; *y = tmp; } void sort(Typex x[], int n) { int i, j; for(i = 0; i

  • 03Spark RDD编程基础2021-06-06 21:03:17

    准备文本文件  从文件创建RDD lines=sc.textFile() 筛选出含某个单词的行 lines.filter() lambda 参数:条件表达式      生成单词的列表   从列表创建RDD words=sc.parallelize() 筛选出长度大于10 的单词 words.filter()

  • RDD编程初级实践2021-06-05 13:34:33

    RDD编程初级实践 一、pyspark交互式编程二、编写独立应用程序实现数据去重三、编写独立应用程序实现求平均值问题 一、pyspark交互式编程 本作业提供分析数据data.txt,该数据集包含了某大学计算机系的成绩,数据格式如下所示: Tom,DataBase,80 Tom,Algorithm,50 Tom,DataStru

  • bash多终端history纪录如何存储及行为2021-06-04 19:36:32

    一、为什么有这个问题 在一台服务器上,可能存在多个用户共用一个账号的问题;或者使用同一个用户打开多个终端,这些终端就构成了很多的会话(session)。当然这些会话在使用的过程中必然不会相互干扰,问题在于它们生成的历史记录该如何相互交互?下面分析结合bash4.0源码分析。 二、history的

  • js根据坐标判断构成单个多边形是否合法2021-06-04 15:02:53

    安装 npm install @turf/helpers @turf/line-intersect 代码 /** * 几何工具库 * @author maybe * @license https://gitee.com/null_639_5368 */ import * as turf from "@turf/helpers" import lineIntersect from "@turf/line-intersect" /** * 坐标转线段

  • NameError: name ‘file‘ is not defined2021-06-01 14:30:29

    原程序 原因:python版本升级,函数使用有所变化 解决方法:将file函数改为open函数 fp = open('data.txt') lines = [] for line in fp: lines.append(line) fp.close() lines.insert(1, 'a new line') # 在第二行插入 s = '\n'.join(lines) fp = open('data.txt'

  • [USACO08JAN]Telephone Lines2021-05-29 19:05:07

    嘟嘟嘟   题意概括一下,就是在无向图上求一条1到n的路径,使路径上第k + 1大的边权尽量小。   考虑dp,令dp[i][j] 表示走到节点 i,路线上有 j 条电话线免费时,路径上最贵的电缆花费最小是多少。则对于一条从u到v,长度为w的边,转移方程是:     1.这条电缆要付费:dp[v][p] = min(dp[v][p

  • 使用DOSCommand-master组件下载视频2021-05-29 11:57:57

    1、下载组件。 https://codeload.github.com/TurboPack/DOSCommand/zip/refs/heads/master 2、安装组件。     D:\riocomponents\DOSCommand-master\DOSCommand-master\Packages\Rio\Delphi   D:\riocomponents\DOSCommand-master\DOSCommand-master\Source     3、

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

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

ICode9版权所有