- 博客(21)
- 资源 (1)
- 收藏
- 关注
原创 Codeforces Round #465 (Div. 2) C. Fifa and Fafa(计算几何)
描述 Fifa and Fafa are sharing a flat. Fifa loves video games and wants to download a new soccer game. Unfortunately, Fafa heavily uses the internet which consumes the quota. Fifa can access t...
2018-02-20 15:03:46 1018
原创 Bash学习笔记(4)----流程控制与函数
Bash学习笔记(4)—-流程控制与函数流程控制一、if else和Java、PHP等语言不一样,sh的流程控制不可为空在sh/bash里可不能这么写,如果else分支没有语句执行,就不要写这个else。if else1.ifif 语句语法格式:if conditionthen command1 command2 ......
2018-02-17 17:56:01 277
原创 Bash学习笔记(3)----变量与运算符
Bash学习笔记(3)变量和参数一、 变量定义概念变量的名字就是变量保存值的地方。引用变量的值就叫做变量替换。 如果 variable 是一个变量的名字,那么 $variable 就是引用这变量的值,即这变量所包含的数据。 $variable事实上只是${variable}的简写形式。在某些上下文中 $variable可能会引起错误,这时候你就需要用${variabl...
2018-02-17 17:35:06 351
原创 Bash学习笔记(2)----bash中的特殊字符
Bash学习笔记(2)bash中的特殊字符(上)# 注释: 行首以# 开头(除#!之外)的是注释。#!是用于指定当前脚本的解释器,我们这里为bash,且应该指明完整路径,所以为/bin/bash,bash并不是只有一种,还有zsh,例如:#! /bin/zsh例如:# $vim test.sh#!/bin/bashecho "The # here does ...
2018-02-14 22:04:32 505
原创 Bash学习笔记(1)-----bash初步及介绍
Bash学习笔记(1)简介:Bash(GNU Bourne-Again Shell)是一个为GNU计划编写的Unix shell,它是许多Linux平台默认使用的shell。shell是一个命令解释器,是介于操作系统内核与用户之间的一个绝缘层。准确地说,它也是能力很强的计算机语言,被称为解释性语言或脚本语言。它可以通过将系统调用、公共程序、工具和编译过的二进制程序”粘合“在一起来建...
2018-02-14 00:41:04 414
原创 搭建一个简易的成绩管理系统的数据库(实验楼)
题目 搭建一个简易的成绩管理系统的数据库 介绍 现需要构建一个简易的成绩管理系统的数据库,来记录几门课程的学生成绩。数据库中有三张表分别用于记录学生信息、课程信息和成绩信息。 数据库表的数据如下: 学生表(student):学生 id 、学生姓名和性别 课程表:课程 id 和课程名 成绩表:成绩 id 、学...
2018-02-13 23:07:51 5090
原创 MySQL学习笔记(1)---基本使用以及基本操作
MySQL学习笔记安装及基本操作安装:#安装 MySQL 服务端、核心程序sudo apt-get install mysql-server#安装 MySQL 客户端sudo apt-get install mysql-client登录:mysql -u root -p 会登录到root账户,输入密码即可查看数据库:show databases;选择连接其中一个...
2018-02-13 20:38:17 406
原创 2018年全国多校算法寒假训练营练习比赛(第四场) D.小明的挖矿之旅(图论,图连通)
题目描述 这个挖矿游戏会给出一个n*m个格子的地图,每个格子都有黄金。在游戏开始时小明会随机出现在地图的某一个格子当中。小明可以将他所在的格子的黄金收归囊中,并且还可以向下或者向右移动,然后继续收集黄金。地图上某些格子是障碍物,小明不能移动到有障碍物的格子上。不过,在游戏开始时,小明可以随意地在地图上放置传送门。传送门可以传送到地图上某一个确定的格子,传送门放置的位置和该传送门传送的位置在...
2018-02-13 00:21:38 590
原创 2018年全国多校算法寒假训练营练习比赛(第四场) E.通知小弟(Tarjan,缩点)
题目描述 在战争时期,A国派出了许多间谍到其他国家去收集情报。因为间谍需要隐秘自己的身份,所以他们之间只是单向联系。所以,某个间谍只能单向联系到一部分的间谍。同时,间谍也不知道跟他联系的是谁。 HA是间谍们的老大,但他也只能联系到部分的间谍。HA现在有一项命令有告诉所有的间谍。HA想要知道他至少要告诉多少个他能联系上的间谍才能通知到所有的间谍。输入描述: 有多个测试...
2018-02-11 22:15:53 243
原创 Educational Codeforces Round 37 (Rated for Div. 2) F. SUM and REPLACE(线段树,区间更新)
描述 Let D(x) be the number of positive divisors of a positive integer x. For example, D(2) = 2 (2 is divisible by 1 and 2), D(6) = 4 (6 is divisible by 1, 2, 3 and 6). You are given an a...
2018-02-09 00:52:39 338
原创 Codeforces Round #461 (Div. 2) D. Robot Vacuum Cleaner(贪心,思路)
描述 Pushok the dog has been chasing Imp for a few hours already. Fortunately, Imp knows that Pushok is afraid of a robot vacuum cleaner. While moving, the robot generates a string ...
2018-02-08 14:57:12 289
原创 Codeforces Round #461 (Div. 2) B. Magic Forest(异或的性质)
描述 Imp is in a magic forest, where xorangles grow (wut?) A xorangle of order n is such a non-degenerate triangle, that lengths of its sides are integers not exceeding n, and the xor-su...
2018-02-08 13:43:46 387
原创 Educational Codeforces Round 37 (Rated for Div. 2) E. Connected Components?(连通分量的个数,STL)
描述 You are given an undirected graph consisting of n vertices and edges. Instead of giving you the edges that exist in the graph, we give you m unordered pairs (x, y) such that there is no
2018-02-03 11:14:48 679
原创 容斥原理总结
容斥原理总结概述:先引入百度百科的定义: 在计数时,必须注意没有重复,没有遗漏。为了使重叠部分不被重复计算,人们研究出一种新的计数方法,这种方法的基本思想是:先不考虑重叠的情况,把包含于某内容中的所有对象的数目先计算出来,然后再把计数时重复计算的数目排斥出去,使得计算的结果既无遗漏又无重复,这种计数的方法称为容斥原理。推荐博客:Math-组合学】容斥原理的拓展以及乱序排列
2018-02-02 17:56:50 965
原创 母函数总结
母函数总结概述母函数,又称生成函数,是ACM竞赛中经常使用的一种解题算法,常用来解决组合方面的题目。 母函数有两种,一种是指数型母函数一种是普通型母函数普通型母函数普通型母函数通常解决类似如下的问题: 给5张1元,4张2元,3张5元,要得到15元,有多少种组合? 某些时候会规定至少使用3张1元、1张2元、0张5元。 某些时候会规定有无数张1元、2元、5元。
2018-02-02 16:32:16 565
原创 HDU1521 排列组合(指数型母函数,有限制的)
Problem Description 有n种物品,并且知道每种物品的数量。要求从中选出m件物品的排列数。例如有两种物品A,B,并且数量都是1,从中选2件物品,则排列有”AB”,”BA”两种。Input 每组输入数据有两行,第一行是二个数n,m(1Output 对应每组数据输出排列数。(任何运算不会超出2^31的范围)Sample Input2 21
2018-02-02 10:03:34 315
原创 HDU1059 Dividing(母函数,有限制)
Problem Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if
2018-02-01 16:10:25 245
原创 HDU1709 The Balance(母函数,有限制的)
Problem Description Now you are asked to measure a dose of medicine with a balance and a number of weights. Certainly it is not always achievable. So you should find out the qualities which
2018-02-01 14:50:50 246
原创 HDU1398 Square Coins(母函数,无限制的)
Problem Description People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2
2018-02-01 10:44:42 447
原创 Codeforces Round #460 (Div. 2) D. Substring(图论,记忆化DFS)
描述 You are given a graph with n nodes and m directed edges. One lowercase letter is assigned to each node. We define a path’s value as the number of the most frequently occurring letter. For
2018-02-01 10:03:57 552
原创 Codeforces Round #460 (Div. 2) C. Seat Arrangements(思路)
描述 Suppose that you are in a campus and have to go for classes day by day. As you may see, when you hurry to a classroom, you surprisingly find that many seats there are already occupied. To
2018-02-01 09:14:11 468
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人