1 import sys,time 2 for i in range(50): 3 sys.stdout.write('#') 4 time.sleep(0.1) 5 if i in[10,20,40,50]: 6 sys.stdout.flush() 7 8 if __name__ == '__m... ...
分类:
编程语言 时间:
2019-08-10 23:04:35
阅读次数:
109
2300. 【noip普及组第一题】模板题 (File IO): input:template.in output:template.out 时间限制: 1000 ms 空间限制: 262144 KB 具体限制 题目描述 输入 输出 样例输入 样例输出 数据范围限制 朴素算法 考试开始的前一个小时我 ...
分类:
其他好文 时间:
2019-08-10 21:08:13
阅读次数:
94
import subprocess cmd = input('cmd>>>:') obj = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) print(obj.stdout.read().... ...
分类:
其他好文 时间:
2019-08-07 22:29:31
阅读次数:
121
文件描述符是和文件的输入、输出相关联的 非负整数 ,Linux内核(kernel)利用文件描述符( "file" descriptor)来访问文件。打开现存文件或新建文件时,内核会返回一个文件描述符。读写文件也需要使用文件描述符来指定待读写的文件。常见的文件描述符是 stdin 、 stdout 和 ...
分类:
系统相关 时间:
2019-08-07 22:14:50
阅读次数:
140
"题面" 分析 题目非常好理解,难就难在需要用到的算法,我这个数据结构菜鸟一开始直接打了个LCA(因为树剖不会写),t掉了......只有$50pts$。现在暂时还只有这个代码....... 代码 50pts: c++ include include include include define i ...
分类:
其他好文 时间:
2019-08-06 10:56:10
阅读次数:
91
"UVA 12604 Caesar Cipher" 题意:给一个字母表s,一个标准串w,一个密文s,问w是否可能在密文的原文中出现且仅出现一次 cpp include using namespace std; const int maxn = 6e5; char a[maxn], b[maxn], ...
分类:
其他好文 时间:
2019-08-06 10:43:18
阅读次数:
98
摘自https://www.cnblogs.com/Dake-T/p/7376779.html 英文文档: print(*objects, sep=’ ‘, end=’\n’, file=sys.stdout, flush=False) Print objects to the text strea ...
分类:
编程语言 时间:
2019-08-05 09:19:23
阅读次数:
209
A. Best Subsegment 显然,选择数列中的最大值当做区间(长度为$1$)。只要尝试最大值这个区间是否能扩展(左右两边值是否跟它一样就行了) C. Magic Ship 二分答案。容易看出,时刻符合单调性。若$d$天能到,那么$d + 1$也能到。因为可以保持跟风相反的方向就可以保持不动 ...
分类:
其他好文 时间:
2019-08-04 01:45:15
阅读次数:
109
反弹shell 1.bash反弹 攻击机监听端口 -n: 不反向解析dns,即不通过ip解析域名 no dns -v: 详细信息输出 verbose -l: 监听 listen -p: 指定端口 port 靶机执行shell命令 bash -i:交互式shell >& :输入输出重定向:0 stdi ...
分类:
系统相关 时间:
2019-07-29 19:02:53
阅读次数:
333
from socket import * client = socket(AF_INET, SOCK_STREAM) client.connect(('127.0.0.1', 8081)) # 通信循环 while True: cmd=input('>>: ').strip() if len(cmd ...
分类:
其他好文 时间:
2019-07-29 09:28:01
阅读次数:
104