- 博客(11)
- 收藏
- 关注
原创 新的一年
今年是2019年了...新的一年,感觉什么都初始化了呢。从情感到各个方面,感觉自己变得越来越脆弱了。队友也换了,我自己好像也开始向数学选手发展了(哭希望自己经常更新blog吧,大概写点学习笔记之类的,心好累。...
2019-02-16 22:33:44
211
1
原创 C++STL入门
C++语言的一大精髓就是STL,这篇blog会介绍什么是STL以及STL的简单应用。一、什么是STL?STL(Standard Template Library,标准模板库)是惠普实验室开发的一系列软件的统称。它是由Alexander Stepanov、Meng Lee和David R Musser在惠普实验室工作时所开发出来的。现在虽说它主要出现在C++中,但在被引入C++之前该技术就已...
2018-12-22 00:56:07
318
原创 C++数组及常用运算符
数组是各种语言都具有的一种数据类型,数组起到了将同一类数据集合在一起的作用。如何声明一个数组类型?数组的声明格式一般是 data_type array_name[first_size][second_size]...,data_type是指数据的类型,array_name是指数组名,而后面的括号个数表示数组的维数,里面的数值表示该维的大小。如何使用数组的元素?数组其实是一种很灵...
2018-12-21 23:55:47
4290
原创 2018 ICPC shenyang G题
现场赛两个队友写了一句memset(arr, 0, sizeof(arr))// arr -> 6000 * 6000。于是我们自闭了3个小时。今天总算是在Gym上面把题补了,真的是巨感动。#include<iostream>#include<algorithm>#include<set>#include<utility>#inc...
2018-11-28 11:25:44
347
原创 C++语法介绍(一) —— C++初步
大家好,我是Eterna丶King。这是讲解C++类设计的前置基础介绍,我会尽力用通俗易懂的语言使大家明白C++语言的部分特性。 一、读入和输出对于C++来说,读入和输出并没有任何函数可以用来调用,而是专门使用了一个全面的标准库来提供IO机制(input/output)。大多数时候,iostream库已经可以解决大部分问题了。C++是一门OOP语言(Object Oriented Pr...
2018-11-23 00:38:10
397
原创 HDU 3507 Print Article
斜率优化入门题。#include<iostream>#include<cstdio>#include<algorithm>#include<deque>#include<cmath>#include<cstring>#include<utility>using namespace std;co
2018-10-31 16:51:39
143
原创 HDU 1394 Minimum Inversion Number
The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj. For a given sequence of numbers a1, a2, ..., an, if we move...
2018-10-30 12:13:14
283
1
原创 HDU 1025 Constructing Roads In JGShining's Kingdom
JGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines. Half of these cities are rich in resource (we call them rich cities) while the ot...
2018-10-25 16:09:32
180
原创 HDU 1022题解
As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all ov...
2018-10-25 12:59:08
324
原创 A. Theatre Square
A. Theatre Squaretime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTheatre Square in the capital city of Berland has a rectangular sha...
2018-06-07 22:18:23
402
原创 C++四则运算计算器(能够处理模运算)
闲着没事做(疯狂被清华大佬BB说不会写项目,我怎么可能不会写这种计算器,决定疯狂爆肝写完证明给他看),决定写一下博客,这几天生活相当不顺,转专业也失败了,唉。有注释需要的私聊我,我可以加注释。这个计算器主要是用的表达式树进行运算,用了4个部分联合处理表达式。首先是一个Operator类,这个类里面包含了将要用到的运算符,通过继承的方式分别定义各个运算符。也方便对未来可能的运算符进行扩展,可以认为除...
2018-04-27 11:23:14
1390
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人