摘要:
链接:https://www.nowcoder.com/acm/contest/84/C来源:牛客网 题目描述 平面上有若干个点,从每个点出发,你可以往东南西北任意方向走,直到碰到另一个点,然后才可以改变方向。 请问至少需要加多少个点,使得点对之间互相可以到达。 输入描述: 第一行一个整数n表示点数
阅读全文
posted @ 2018-04-30 21:05
Kevin_Zzzzz
阅读(195)
推荐(0)
摘要:
题目链接; 题目描述: Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky
阅读全文
posted @ 2018-03-30 13:40
Kevin_Zzzzz
阅读(312)
推荐(0)
摘要:
题目链接; 题面: ...Once upon a time a man came to the sea. The sea was stormy and dark. The man started to call for the little mermaid to appear but alas, h
阅读全文
posted @ 2018-03-30 13:19
Kevin_Zzzzz
阅读(339)
推荐(0)
摘要:
全排列函数: next_permutation() 函数原型为:bool next_permutation(iterator start,iterator end) 需要传入一个升序序列,以及迭代器的首位指针,当当前序列不存在下一个排列时,函数返回false,否则返回true。 反转函数:rever
阅读全文
posted @ 2018-03-21 20:41
Kevin_Zzzzz
阅读(1633)
推荐(0)
摘要:
题目链接: https://nanti.jisuanke.com/t/24214 可爱的PLY有一个长度为nn的括号序列a[1-n]a[1−n](即仅由字符'('与字符')'组成的字符串)。某一天,PLY的心上人Gay王·齐齐去PLY家玩耍,他对这个括号序列很是喜欢,PLY说只要齐齐能答对一个问题就
阅读全文
posted @ 2018-03-20 18:00
Kevin_Zzzzz
阅读(499)
推荐(0)
摘要:
题意:给一个数字字符串,让你删除尽可能少的数位,使得这个数能够被3整除,并且不能有前导0存在。 思路:所有数位加起来%3得到的值mod,那么就有三种情况 mod==0:直接输出 mod==1:要么删除一个数位%3=1的数,要么删除两个数位%3=2的数 mod==2:要么删除一个数位%3=2的数,要么
阅读全文
posted @ 2017-10-26 13:43
Kevin_Zzzzz
阅读(314)
推荐(0)
摘要:
C. Vacations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Vacations time limit per
阅读全文
posted @ 2017-10-22 20:27
Kevin_Zzzzz
阅读(361)
推荐(0)
摘要:
用到的python第三方库:bs4、requests、execjs(在python中调用js脚本) 目标网站: www.beiwo.tv 通过分析网页源码发现,网页通过调用一个加密JS脚本来加密网页源码中的一段字符串从而获得迅雷电影链接,将分析网页得到的JS加密源码存放到encode.js文件中,通
阅读全文
posted @ 2017-09-14 20:57
Kevin_Zzzzz
阅读(1245)
推荐(0)
摘要:
#include #include bool cnt[30]; int main() { char t; int ans=0; //重复字符数 int num=0; //字符长度 memset(cnt,false,sizeof(cnt)); while(1) { t=getchar(); if(t=='\n'...
阅读全文
posted @ 2017-08-31 23:40
Kevin_Zzzzz
阅读(137)
推荐(0)
摘要:
爬虫入门新手,自学笔记,如果理解有错误请指正。 BeautifulSoup库的find_all函数可以搜索返回的网页源码中参数对应的标签对象。 尝试打印一下获取的img标签内容。 我们可以看到一大堆img标签内容,比如 <img src="http://static.nipic.com/images
阅读全文
posted @ 2017-08-26 22:35
Kevin_Zzzzz
阅读(251)
推荐(0)