Codeforces round 1083
Div1 526 这个E考试的时候没调出来真的是耻辱.jpg A 求个直径就完事 #include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<iostream>
using namespace std;
#define ll long long
struct miku
{
int to,next,val;
}e[600010];
int a[300010];
int head[30001
飞机躲避炮弹---java
最近闲来无事,花了一天多的时间写了一个小游戏,虽然说游戏本身很无聊吧,但是自己也从这个过程中学到了许多东西。。。分享一下。 代码内容自行理解吧。。。 层次结构: 1 package cn.sxt.game;
2
3 import java.awt.Color;
4 import java.awt.Font;
5 import java.awt.Frame;
6 import java.awt.Graphics;
7 import java.awt.Im
Netty学习问题总结
目录 一、HTTP协议分包 二、WebSocket协议分包 三、HTTP和WebSocket协议共用一个端口的问题 四、TIME WAIT状态占用了什么资源 五、关于 本篇记录了Netty学习过程中想到的问题和自己的一些思考,对于应用层的协议也有了更好的理解,所以在此做一个记录。 一、HTTP协议分包 TCP是作为面来流的协议,所以需要应用层协议自己去分包。常见的分包格式如下: 定长: 比如100字节每个报文,不足的前面补0,这时候每次取消息就取到100字节算整包) 分隔符: 换行符其实是一种
Length of Last Word - LeetCode
目录 题目链接 注意点 解法 小结 题目链接 Length of Last Word - LeetCode 注意点 "a "这样的串应该return 1而不是0 有空串或者串中只有0的情况 解法 解法一:从尾巴开始,遇到非空格就字符+1,如果是空格,为了排除以空格结尾的串的影响,只有已经有字符出现了才返回当前统计的字符数。时间复杂度为O(n) class Solution {
public:
int lengthOfLastWord(string s) {
int i,
Assignment 2—Simulation Report LATEX
Assignment 2—Simulation Report Semester 2, 2018–2019 [Deadline: 13 February (5PM)] Write a 3 page simulation report with the goal of comparing the performance of the kernel density estimator with that of another density estimator. It is recommended
STA 032 Winter 2019
STA 032 Winter 2019 R Report I - Due Tuesday, February 5th by 5:00pm. R Report I FORMAT * Use complete sentences and proper grammar to answer all questions. * Use R Markdown to create an html document. * Code should not be in the body of the text, s
CSE 3521 Artificial Intelligence
Name(s):_______________________ CSE 3521 Artificial Intelligence SP’19 Homework Assignment #3 (26 points) Due: Friday, Feb. 1 This assignment requires coding in Javascript. Use the template files provided in HW3_template.zip to get started. 1. Imple
CSE 6363 - Machine Learning Homework MLE, MAP, and Basic Supervised Learning
CSE 6363 - Machine Learning Homework 1: MLE, MAP, and Basic Supervised Learning CSE 6363 - Machine Learning Homework 1- Spring 2019 Due Date: Feb. 8 2019, 11:59 pm MLE and MAP 1. In class we covered the derivation of basic learning algorithms to der
【转载】正则表达式全部符号解释
正则表达式全部符号解释 原文链接:http://www.cnblogs.com/yirlin/archive/2006/04/12/373222.html 字符 描述 \ 将下一个字符标记为一个特殊字符、或一个原义字符、或一个 向后引用、或一个八进制转义符。例如,'n' 匹配字符 "n"。'\n' 匹配一个换行符。序列 '\\' 匹配 "\" 而 "\(" 则匹配 "("。 ^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的 Multiline 属性,^ 也匹配 '\n' 或 '\
Monash University FIT2099 Object-Oriented Design and Implementation
Monash University FIT2099 Object-Oriented Design and Implementation 2019 SSB Assignment 3 Harry Potter: The Object of Fire In this assignment you will design and implement some new game functionality, and write a set of recommendations for changes t
Spring 2019 HW1 MAT 331
Spring 2019 HW1 MAT 331 Homework 1: MAT 331 Due: 11:59pm, Feb 5, 2019 Collaboration policy: You are welcome to work with others on this homework assignment. But the code and explanations you turn in should actually be written by you. In particular,
CSCI3180 – Principles of Programming Languages
CSCI3180 – Principles of Programming Languages – Spring 2019 Assignment 1 — Human Resources Management System in FORTRAN and COBOL Deadline: Feb 03, 2019 (Sunday) 23:59 1 Introduction In this assignment, you have to implement a system for processing
python实例变量-静态方法-类方法
一、 初谈
class A(object):
hobby = 'reading' #类变量,类属性为所有实例共享,实例可以访问类变量
def __init__(self,name): # 初始化函数
self.name = name #实例变量,每一个实例独有
self.name = name #实例变量,每一个实例独有
def foo(self):
print(self.name) #实例方法,实例方
python——方法重写 和 调用父类方法
一、 方法重写 当父类中的方法不符合我们的需求时,可以通过重写,实现我们的需求 方法重写后,默认调用子类的方法 1. 方法重写
class Foo(object):
def __init__(self):
self.name = 'Foo'
def hi(self):
print('hi,Foo')
class Foo2(Foo):
def hi(self):
print('hi,Foo2')
if __name_
python time模块和datetime模块 总结
time模块: 1. time.time() #获取当前时间戳
当前时间戳为: 1539691553.5574427 2. time.localtime(time.time()) #获取当前时间--时间元组
本地时间为 : time.struct_time(tm_year=2018, tm_mon=10, tm_mday=16, tm_hour=20, tm_min=6, tm_sec=43, tm_wday=1, tm_yday=289, tm_isdst=0) 3. time.asct
今日推荐
周排行