自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

人间烟火气,最抚凡人心

阅读有风险,参考需谨慎

  • 博客(89)
  • 资源 (1)
  • 收藏
  • 关注

转载 【重大消息】 搬家啦,搬家啦~

Update:欢迎访问我的新的网站:https://fireworks99.github.io/

2019-02-15 16:05:11 384 1

原创 JS sort方法踩坑

例如,对于[2, 11]这个数组,按照字符串的排序规则,数字2的字符串表示比数字11的字符串表示要大(因为2开头的字符串比11开头的字符串在字典序上大)。因此,经过默认的sort()排序后,会得到[11, 2]这个结果。JavaScript的sort()方法在默认情况下将数组元素视为字符串进行排序,而不是按照数字的大小。因此,对于包含数字的数组,sort()方法会按照字符串的排序规则进行排序。

2024-04-13 23:39:49 168

原创 JS 时间戳踩坑

如果这个字符串具体到月份或者日期,则对应的是当月1日/当日 0点整。将一个年份的字符串转为时间戳对应的是当年1月1日8点整。时间戳0对应的是1970年1月1日8点整。

2024-03-14 18:23:29 332

原创 关于“为什么创建Vue实例时传入的参数中的data属性的值应该是函数而非对象”

为什么创建Vue实例时传入的参数中的data属性的值应该是函数而非对象

2022-11-02 14:15:30 128 1

原创 VS Code 安装了C# 插件后,编写C#代码时”空格键“会触发自动补全

VSCode 安装C#扩展后,空格键会自动补全

2022-10-11 18:30:34 566 1

原创 单个html文件调用highlight.js

单个文件调用highlight.js

2022-09-08 12:36:23 227

原创 JS异步请求回调函数替代方案——轮询

轮询

2022-08-14 09:36:30 410

原创 计算机名词解释

计算机名词解释

2022-06-11 17:20:54 93

原创 JS执行过程

JS执行过程

2022-03-23 19:24:19 1191

原创 中缀式借栈转后缀式

考点:转换过程中同时保存在栈中的操作符的最大个数。swust oj 1042 中缀式转后缀式#include <bits/stdc++.h>using namespace std;map<char, int> isp; ///in stack prioritymap<char, int> icp; ///in coming priorityvoid init(){ isp['('] = 1; isp[')'] = 6;

2021-06-17 14:13:42 162

原创 顺序表再次动态申请空间时,计算机自动完成copy

顺序表的插入算法中,若n个空间已满,可再申请增加m个空间,若申请失败,说明内存中已没有n+m个连续‾\underline{n+m个连续}n+m个连续​可分配的空间。若申请成功,原位置的内容由计算机自动完成copy。#include <iostream>using namespace std;int main(){ int * a = (int *)malloc(sizeof(int) * 2); a[0] = 0; a[1] = 1; cout &lt

2021-06-14 23:11:26 901 1

原创 C++ sort(first_argument_is_more_back, second_argument_is_more_front)

#include <iostream>#include <algorithm>using namespace std;int arr[] = {4, 2, 3, 1};bool cmp(int back, int front){ for(int i = 0; i < 4; ++i) cout << arr[i] << ' '; cout << '\n'; cout << "f

2020-08-03 17:27:02 102

原创 Java没有指针,一切都是对象,一切都是引用。

#include<bits/stdc++.h>using namespace std;class node{public: int data; double t;};int main(){ node n1; n1.data = 4; n1.t = 3.14; node n2 = n1; cout <&l...

2020-04-22 16:15:17 472

原创 冒泡排序

#include <stdio.h>#include <iostream>using namespace std;void Sort(int * a, int len){ for(int i = len - 1; i >= 1; --i) for(int j = 0; j <= i - 1; ++j) i...

2019-09-29 19:37:50 92

转载 C++与G++

用C++代码敲代码,一般都会用C++提交,但是后由于一些细微的不同使用不同的编译方式还是会产生差别的,甚至是WR和AC的天壤之别。原来只知道C++能用C++提交,但是原来G++…从网上找了点资料:G++是GNU的那个C++编译器,也是Dev-CPP自带的编译器和NOI系列赛官方的编译器。。而C++是VC++,是微软出的编译器。。。一般来说,两个结果不一样,要么是因为G++效率略低被卡掉,要...

2019-05-06 17:52:54 518

转载 关于 ++i 快于 i++

当然,很多时候我们有的代码用C++提交通过了,但是G++却失败了呢?众所周知,不同的编译器,会对代码做出一些不同的优化。举一个最简单的例子。针对单个语句(注意,是单个语句,不是包含在语句中的那种前++和后++):a: a++;b: ++a;一般的讲,我们都知道,这两条语句的最终结果是一样的,就是a自己增加了1。但是,两者的差距还是有的。如果从标准C的角度去理解。a++这个语句等同于a: a ...

2019-03-28 12:13:24 895

原创 牛客练习赛37.A

链接:https://ac.nowcoder.com/acm/contest/342/A来源:牛客网题目描述筱玛是个快乐的男孩子。寒假终于到了,筱玛决定请他的朋友们一起来快乐。对于筱玛来说,最快乐的事情莫过于翻看万年历上的日期了。一个日期是“快乐”的,当且仅当这一年的年份是一个质数,且将月份、日期写成"MM-DD"的形式后是对称的。如:"2003-01-10"是“快乐”的。筱玛有n个...

2019-01-11 21:10:59 329

原创 Catch That Cow POJ3278

DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0...

2019-01-11 19:27:00 184

原创 Dungeon Master POJ2251

DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit ...

2019-01-11 17:33:31 170

原创 1321棋盘问题

Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n &lt;= 8 , ...

2019-01-11 12:28:48 143

原创 单向链表的建立(封装)

链表在main函数里写是一回事,封装成独立函数会有新问题…#include&lt;bits/stdc++.h&gt;using namespace std;struct Node ///(结点形式){ int data; ///数据域 struct Node * next; ///指针域};type...

2019-01-09 21:29:11 279

原创 A. Boy or Girl

Those days, many boys use beautiful girls’ photos as avatars in forums. So it is pretty hard to tell the gender of a user at the first glance. Last year, our hero went to a forum and had a nice chat w...

2019-01-09 11:16:29 3874

原创 A. System Administrator

Polycarpus is a system administrator. There are two servers under his strict guidance — a and b. To stay informed about the servers’ performance, Polycarpus executes commands “ping a” and “ping b”. Ea...

2019-01-09 11:05:21 347

原创 A. Bear and Reverse Radewoosh

Limak and Radewoosh are going to compete against each other in the upcoming algorithmic contest. They are equally skilled but they won’t solve problems in the same order.There will be n problems. The...

2019-01-09 10:50:44 328

原创 A2. Good Matrix Elements

The Smart Beaver from ABBYY got hooked on square matrices. Now he is busy studying an n × n size matrix, where n is odd. The Smart Beaver considers the following matrix elements good:Elements of the ...

2019-01-08 21:46:50 688

原创 A. Team

One day three best friends Petya, Vasya and Tonya decided to form a team and take part in programming contests. Participants are usually offered several problems during programming contests. Long befo...

2019-01-08 21:24:20 603

原创 A. Domino piling

You are given a rectangular board of M × N squares. Also you are given an unlimited number of standard domino pieces of 2 × 1 squares. You are allowed to rotate the pieces. You are asked to place as m...

2019-01-08 21:17:49 532 1

原创 A. Word Capitalization

Capitalization is writing a word with its first letter as a capital letter. Your task is to capitalize the given word.Note, that during capitalization all the letters except the first one remains unc...

2019-01-08 20:50:27 288

原创 A. Tom Riddle's Diary

Harry Potter is on a mission to destroy You-Know-Who’s Horcruxes. The first Horcrux that he encountered in the Chamber of Secrets is Tom Riddle’s diary. The diary was with Ginny and it forced her to o...

2019-01-07 21:35:58 619

原创 A. Golden Plate

You have a plate and you want to add some gilding to it. The plate is a rectangle that we split into w×hw×h cells. There should be kk gilded rings, the first one should go along the edge of the plate,...

2019-01-07 21:23:14 294

原创 A. Way Too Long Words

Sometimes some words like “localization” or “internationalization” are so long that writing them many times in one text is quite tiresome.Let’s consider a word too long, if its length is strictly mor...

2019-01-07 15:38:50 506

原创 A. Fingerprints

You are locked in a room with a door that has a keypad with 10 keys corresponding to digits from 0 to 9. To escape from the room, you need to enter a correct code. You also have a sequence of digits....

2019-01-07 15:29:51 290

原创 A. Petya and Origami

Petya is having a party soon, and he has decided to invite his nn friends.He wants to make invitations in the form of origami. For each invitation, he needs two red sheets, five green sheets, and eig...

2019-01-07 15:14:15 250

原创 A. Dice Rolling

这题完全考英文翻译!!!Mishka got a six-faced dice. It has integer numbers from 22 to 77 written on its faces (all numbers on faces are different, so this is an almost usual dice).Mishka wants to get exactly x...

2019-01-06 21:58:13 888

原创 A. Make a triangle!

Masha has three sticks of length aa, bb and cc centimeters respectively. In one minute Masha can pick one arbitrary stick and increase its length by one centimeter. She is not allowed to break sticks....

2019-01-06 21:40:48 910

原创 A. Scarborough Fair

Willem is taking the girl to the highest building in island No.28, however, neither of them knows how to get there.Willem asks his friend, Grick for directions, Grick helped them, and gave them a tas...

2019-01-06 21:29:35 667

原创 A. Game

Two players play a game.Initially there are nn integers a1,a2,…,ana1,a2,…,an written on the board. Each turn a player selects one number and erases it from the board. This continues until there is on...

2019-01-06 21:18:52 326

原创 B. Teams Forming

There are nn students in a university. The number of students is even. The ii-th student has programming skill equal to aiai.The coach wants to form n2n2 teams. Each team should consist of exactly tw...

2019-01-06 21:00:42 448

原创 A. Vitaly and Night

One day Vitaly was going home late at night and wondering: how many people aren’t sleeping at that moment? To estimate, Vitaly decided to look which windows are lit in the house he was passing by at t...

2019-01-06 20:54:30 197

原创 A. Repeating Cipher

Polycarp loves ciphers. He has invented his own cipher called repeating.Repeating cipher is used for strings. To encrypt the string s=s1s2…sms=s1s2…sm (1≤m≤101≤m≤10), Polycarp uses the following algo...

2019-01-06 20:46:00 216

gif这里名称太短

首先,这是一张动态图片,我想上传然后用它,不过这里为什么要50多字

2018-12-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除