days

568. Maximum Vacation Days

拈花ヽ惹草 提交于 2020-02-01 09:03:09
LeetCode wants to give one of its best employees the option to travel among N cities to collect algorithm problems. But all work and no play makes Jack a dull boy, you could take vacations in some particular cities and weeks. Your job is to schedule the traveling to maximize the number of vacation days you could take, but there are certain rules and restrictions you need to follow. Rules and restrictions: You can only travel among N cities, represented by indexes from 0 to N-1. Initially, you are in the city indexed 0 on Monday. The cities are connected by flights. The flights are represented

568. Maximum Vacation Days

瘦欲@ 提交于 2020-02-01 09:01:29
LeetCode wants to give one of its best employees the option to travel among N cities to collect algorithm problems. But all work and no play makes Jack a dull boy, you could take vacations in some particular cities and weeks. Your job is to schedule the traveling to maximize the number of vacation days you could take, but there are certain rules and restrictions you need to follow. Rules and restrictions: You can only travel among N cities, represented by indexes from 0 to N-1. Initially, you are in the city indexed 0 on Monday. The cities are connected by flights. The flights are represented

Leetcode 568. Maximum Vacation Days

醉酒当歌 提交于 2020-02-01 08:59:35
Problem: LeetCode wants to give one of its best employees the option to travel among N cities to collect algorithm problems. But all work and no play makes Jack a dull boy, you could take vacations in some particular cities and weeks. Your job is to schedule the traveling to maximize the number of vacation days you could take, but there are certain rules and restrictions you need to follow. Rules and restrictions: You can only travel among N cities, represented by indexes from 0 to N-1. Initially, you are in the city indexed 0 on Monday . The cities are connected by flights. The flights are

568. Maximum Vacation Days

纵饮孤独 提交于 2020-02-01 08:57:12
Problem statement: LeetCode wants to give one of its best employees the option to travel among N cities to collect algorithm problems. But all work and no play makes Jack a dull boy, you could take vacations in some particular cities and weeks. Your job is to schedule the traveling to maximize the number of vacation days you could take, but there are certain rules and restrictions you need to follow. Rules and restrictions: You can only travel among N cities, represented by indexes from 0 to N-1. Initially, you are in the city indexed 0 on Monday. The cities are connected by flights. The

kaggle竞赛-Instacart Market Basket Analysis(推荐)-特征工程

╄→гoц情女王★ 提交于 2020-01-31 22:42:33
紧接上次的分析 初探 ,进行进一步特征工程的详细分析。 1.数据准备 1.1导入工具包 import pandas as pd import numpy as np import matplotlib . pyplot as plt import seaborn as sns import lightgbm as lgb import gc % matplotlib inline 1.2导入数据 path = '/home/WLY/learn/Kaggle_example_learn/Instacart/Data/' aisles = pd . read_csv ( path + 'aisles.csv' ) departments = pd . read_csv ( path + 'departments.csv' ) products = pd . read_csv ( path + 'products.csv' ) orders = pd . read_csv ( path + 'orders.csv' ) order_products__train = pd . read_csv ( path + 'order_products__train.csv' ) order_products__prior = pd . read_csv ( path + 'order

蘑菇街IM

落爺英雄遲暮 提交于 2020-01-30 17:44:12
https://github.com/mogutt TTServer 蘑菇街TeamTalk之消息服务器 Updated 2 days ago Shell 122 208 TTAutoDeploy The server auto deploy script of mogutt Updated 2 days ago Objective-C 458 17 TTiOSClient The iphone client of mogutt Updated 2 days ago 322 152 README 蘑菇街开源的一款企业办公即时通信软件 Updated 2 days ago Objective-C 113 12 TTMacClient The mac client of mogutt Updated 2 days ago PHP 308 351 TTPHPServer 蘑菇街TeamTalk之服务端管理后台 Updated 2 days ago Java 527 22 TTAndroidClient The android client of mogutt Updated 2 days ago C 146 0 TTWinClient The windows client of mogutt Updated 19 days ago 来源: https://www.cnblogs.com

C语言初阶——4.扩展:数组

…衆ロ難τιáo~ 提交于 2020-01-30 10:04:58
C语言初阶——4.扩展:数组 1. 返回值含义 返回值有时存在两种情况:合法值和非法值。 如果有非法值的情况,通常使用一些特定的值指代特殊情况。例如:数组下标只能是0和正数。我们实现数组查找元素下标时,存在找不到元素的情况,这时,使用 -1 可以作为这种情况的返回值。 返回值的含义以及值是人为定义的。 2. 二维数组指针用法 一维数组指针用法 No. 操作 下标 指针 1 第 i 个元素值 arr[i] *(arr+i) 2 第 i 个元素地址 &arr[i] arr+i 二维数组指针用法 No. 操作 下标 指针 1 第 i 行第 j 列元素值 arr[i][j] *(*(arr+i)+j) 2 第 i 行第 j 列元素地址 &arr[i][j] *(arr+i)+j 在二维数组中 a[i] 就是一个一维数组。 问题 二维数组数组名是第一个元素的首地址吗? 试一下下面的代码 # include <stdio.h> int main ( ) { int days [ 4 ] [ 3 ] = { 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 } ; printf ( "days[0]\t\t = %p\n&days[0][0]\t = %p\n" , days [ 0 ] , & days [ 0 ] [ 0 ]

Linux uptime指令查看系统负载

て烟熏妆下的殇ゞ 提交于 2020-01-29 14:25:25
uptime 04:03:58 up 10 days, 13:19, 1 user, load average: 0.54, 0.40, 0.20 当前时间 04:03:58 系统已运行的时间 10 days, 13:19 当前在线用户 1 user 平均负载:0.54, 0.40, 0.20,最近1分钟、5分钟、15分钟系统的负载 cat /proc/loadavg [root@iz5hy5uv81jaygz ~]# cat /proc/loadavg 0.04 0.03 0.05 1/116 4269 除了前3个数字表示平均进程数量外,后面的1个分数,分母表示系统进程总数,分子表示正在运行的进程数;最后一个数字表示最近运行的进程ID 来源: CSDN 作者: Java小白白又白 链接: https://blog.csdn.net/qq_36756682/article/details/104106071

linux设置密码过期时间/etc/login.defs

痞子三分冷 提交于 2020-01-28 16:32:13
Linux下对于新添加的用户,用户密码过期时间是从 /etc/login.defs 中 PASS_MAX_DAYS 提取的,普通系统默认就是99999, 而有些安全操作系统是90。更改此处,只是让新建的用户默认密码过期时间变化,已有用户密码过期时间仍然不变。 [root@linuxidc ~]# chage --help Usage: chage [options] user Options: -d, --lastday LAST_DAY set last password change to LAST_DAY -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE -h, --help display this help message and exit -I, --inactive INACTIVE set password inactive after expiration to INACTIVE -l, --list show account aging information -m, --mindays MIN_DAYS set minimum number of days before password change to MIN_DAYS -M, --maxdays MAX

Hackerank- 30 days of code-linked list

不羁的心 提交于 2020-01-28 02:17:50
insert function: 创建newNode(use constructor); 如果head = NULL,返回这个newNode 如果有head, 那么找到这个list的最后一个,用的方法是,while loop, 先用it = head,然后while(it->next!=NULL)当whileloop停止的时候, it指到list最后一个, it->next = newnode, return 整个linked list(head) Node* insert(Node *head,int data) { Node* newnode= new Node (data); if (head==NULL ){ return newnode; } Node* it = head; while (it->next!=NULL){ it= it->next; } it->next= newnode; return head; //Complete this method } 看到linked list 的insert 操作应该注意的两点: 1.head是否为null,如果为null ,将新node 插入并返回 2.从head 依次遍历到最后一个(next为null),然后插入新node 来源: CSDN 作者: 有态度的我 链接: https://blog.csdn.net