自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(108)
  • 收藏
  • 关注

转载 Markdown emoji 收藏

表情符的使用人物syntaxpreviewsyntaxpreviewsyntaxpreview:bowtie::bowtie::smile:????:laughing:????:blush:????:smiley:????:relaxed:☺️:smirk:????:heart_eyes:????:kissing_heart:????:kissing_clos...

2019-11-09 17:00:40 2184

原创 编译原理 Tiny编译器和TM虚拟机

编译器的设计流程词法分析语法分析语义分析Lex & YaccLex首先,lex和yacc是开源工具,帮助开发者实现语法,词法分析。如果作为一个开发者去使用它们,就需要阅读它们的说明书,直到你会用,一句话,就是个工具而已。当然,如果你对编译原理很清楚,可以更好地理解它,甚至可以分析它们的源代码哦。Lex和yacc都是贝尔实验室在20世纪70年代发明的。lex 代表 lexi...

2019-10-24 09:14:06 2976

原创 ibus-setup-sunpinyin 打不开

ibus-setup-sunpinyin 打不开提示Traceback (most recent call last): File "/usr/share//ibus-sunpinyin/setup/main.py", line 42, in <module> import ibusImportError: No module named ibus解决办法误打误...

2019-10-20 21:47:19 1977

原创 网易云音乐网络问题修复 (加载失败)

问题网易云一切网络功能正常,唯有在线播放时出现问题,提示加载失败问题解决查看log, 发现是不能建立到m7.music.126.net原因不知道。。联系舍友问能不能听歌,舍友说可以,正常听歌没有问题然后我让他ping m7.music.126.net 居然也通了而我ping的结果PING m7.music.126.net(240e:95d:1902::10 (240e:95d:19...

2019-10-17 10:20:54 8583 2

原创 Range type in c++

学弟的一个问题让我发现了自己的一个知识盲区问题:统计字符串中的字母,数字,符号的个数,并删除符号联想:问题本身是很简单的,但c++的range type 迭代怎么实现即怎么让自己写的类可以这样迭代: for(type foo: list)关键在于实现begin,end方法,返回一个类(称之为iterator)然后iterator中要实现!= * ++方法即可运用range ...

2019-10-04 15:35:30 1389

原创 实时显示网速

while [ "1" ]doeth=$1RXpre=$(cat /proc/net/dev | grep $eth | tr : " " | awk '{print $2}')TXpre=$(cat /proc/net/dev | grep $eth | tr : " " | awk '{print $10}')sleep 1RXnext=$(cat /proc/net/dev | ...

2019-10-02 10:50:22 2193

原创 AtCoder Beginner Contest 142 E.Get Everything

E.Get EverythingDescription:有n个宝箱,给定m个钥匙的价钱和它能开的宝箱,求开完所有宝箱要的最少钥匙数量Solution:直接想到的是网络流,但是当时手敲敲错了。。。疯狂出bug。。就该copy模板然后队友是DLX过的(nb!!)这题还可以状压dpAC Code(dp)://https://atcoder.jp/contests/abc142/tasks...

2019-09-29 19:55:52 1729

原创 记两条扫描线的题目 Rectangles(线段树),Intersecting Rectangles

Intersecting Rectangles大致意思是给定n个矩形,问是否会存在相交直接套扫描线区分左边和右边,如果在还没抵消时发现区间已经有数值,说明会相交AC Code:// http://115.157.200.87/front/problem?problemId=1202#include <iostream>#include <vector>#in...

2019-09-26 12:41:02 1390

原创 AtCoder Beginner Contest 141. E - Who Says a Pun? (后缀数组)

https://atcoder.jp/contests/abc141/tasks/abc141_eAC Code(Suffix array)[A foolish way to solve the problem]//#include<bits/stdc++.h>#include<iostream>#include<cstdio>#include&l...

2019-09-15 23:42:35 1574

原创 AtCoder Beginner Contest 141 F-XOR Sum 3(线性基)

F - Xor Sum 3 Time Limit: 2 sec / Memory Limit: 1024 MB <div id="task-statement"> <span class="lang">配点: 600600 点問題文NN となります。制約入力はすべて整数2≤N≤1052≤N≤105入力...

2019-09-15 23:34:46 1657

原创 The Preliminary Contest for ICPC Asia Shenyang 2019H. Texas hold'em Poker(模拟)

编辑代码 17.16% 1000ms 262144K ...

2019-09-14 22:22:11 1550

原创 The Preliminary Contest for ICPC Asia Shenyang 2019 F. Honk's pool ( 模拟)

F. Honk’s poolAs we all know, Honk has nnn pools, numbered as 111 ~ nnn . There is aia_iai​ liters water in the iii-th pool. Every day, Honk will perform the following operations in sequence.Find the...

2019-09-14 22:17:18 1511

原创 The Preliminary Contest for ICPC Asia Shenyang 2019 D.Fish eating fruit (容斥,点分治)

State Z is a underwater kingdom of the Atlantic Ocean. This country is amazing. There are nnn cities in the country and n−1n-1n−1 undirected underwater roads which connect all cities.In order to save ...

2019-09-14 22:10:29 1533

原创 湖南地区天翼网linux-clientV2.0-64客户端安装 (共享库的配置)

客户端的安装找工作人员要到了包,却无法运行。(如果有需要包的可以找我)提示error while loading shared libraries: libcurl.so说明我可能没有这个包到这个网站下载https://curl.haxx.se/download.html下载号后解压tar -zxvf curl-7.51.0.tar.gz进入文件夹,执行sudo ./configu...

2019-09-14 10:58:02 2477 3

原创 Codeforces Round #397 765E - Tree Folding

E. Tree Foldingtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputVanya wants to minimize a tree. He can perform the following operation multipl...

2019-09-14 10:02:51 1509

原创 K-th Number POJ - 2104 (主席树 | 划分树)(附动态区间主席树模板)

K-th Number POJ - 2104You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would...

2019-09-13 10:45:18 1537

原创 电脑发热严重:禁用独立显卡(Nvidia)/ TLP解决cpu占用率大

引言CPU温度经常居高不下,每天风扇嗡嗡响,尝试过许多办法都没有解决,最后用了一个工具,明显改善!TLP的安装sudo apt install tlpTLP的配置cd /etc/default/cp tlp ~/tlpsudo gedit tlp可以按照文件中的注释修改配置。我的配置:# ------------------------------------------...

2019-09-12 09:23:28 6332 1

原创 The Preliminary Contest for ICPC Asia Nanjing 2019 B. super_log (欧拉函数)(数论)

In Complexity theory, some functions are nearly O(1)O(1)O(1), but it is greater then O(1)O(1)O(1). For example, the complexity of a typical disjoint set is O(nα(n))O(nα(n))O(nα(n)). Here α(n)α(n)α(n) ...

2019-09-02 21:23:53 1524

原创 The Preliminary Contest for ICPC Asia Nanjing 2019 H. Holy Grail (图论,负权图)

As the current heir of a wizarding family with a long history,unfortunately, you find yourself forced to participate in the cruel Holy Grail War which has a reincarnation of sixty years.However,fortun...

2019-09-02 21:10:17 1479

原创 The Preliminary Contest for ICPC Asia Nanjing 2019 A. The beautiful values of the palace(离散化、树状数组)

https://nanti.jisuanke.com/t/41298Here is a square matrix of n∗nn * nn∗n, each lattice has its value (nnn must be odd), and the center value is n∗nn * nn∗n. Its spiral decline along the center of the...

2019-09-02 21:04:45 1498

原创 HNU 2019暑期训练赛之10

J. Jurassic JigsawProblem DescriptionThe famous Jurassic park biologist Dean O’Saur has dis- covered new samples of what he expects to be the DNA of a dinosaur. With the help of his assistant Petra...

2019-08-31 19:00:32 1736

原创 牛客假日团队赛12【为了抽奖闲来做题2】

A题链接:https://ac.nowcoder.com/acm/contest/1081/A来源:牛客网Bessie is trapped in a triangular maze with N rows (1 <= N <= 1,000,000). A three row maze is shown below:The i’th row of the maze conta...

2019-08-30 18:17:36 4105

原创 Rikka with Coin (思维)

Rikka with CoinTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 580 Accepted Submission(s): 144Problem DescriptionRikka hates coins, and...

2019-08-20 00:46:57 1623

原创 自编写简易OJ 【用于日常ACM训练,数据测试】(待完善)

今天下午算是被一题的数据恶心到了。。测试了一下午 WA了一下午,至今不知道是什么样例错了。。题目数据还没发出来,先写好代码准备迎接他!(*`・з・)ムッ (▼皿▼#)另外庆祝CSDN发博客终于取消掉文章分类这个框了(每次填那个框框都可尴尬了)使用方法:如下图,在前后附加代码效果:查看当前目录下的judge.result文件代码实现:头文件:static stora...

2019-08-19 20:09:22 1968

原创 牛客假日团队赛11 部分题解【为了抽奖闲来做题】

链接:https://ac.nowcoder.com/acm/contest/1077/A来源:牛客网A.级数求和题目描述已知:Sn= 1+1/2+1/3+…+1/n。显然对于任意一个整数K,当n足够大的时候,Sn大于K。现给出一个整数K(1<=k<=15),要求计算出一个最小的n;使得Sn>K。输入描述:输入k输出描述:输出n输入1输出2Solut...

2019-08-19 00:28:32 1832

原创 2018 ACM ICPC – Notheast Preliminary Regional Qualifier E. Karma Dice

Karma DiceProblem DescriptionRajas of the Ganges is a board game released in late 2017. Each player rolls dice during the game and uses the numbers on the dice to make various plays. One of these pl...

2019-08-18 18:33:53 1594

原创 2018 ACM ICPC – Notheast Preliminary Regional Qualifier I. Knight's Tour

Knight’s TourProblem DescriptionIn the board game chess, the knight can move in a L shape, moving 2 squares in one direction and 1 square in a perpendicular direction. Here are the 8 possible moves ...

2019-08-18 18:23:06 1518

原创 2018 ACM ICPC – Notheast Preliminary Regional Qualifier I. Water on the Stairs

Water on the StairsProblem DescriptionYou are the manager for Stair World amusement park, a 2-dimensional theme park that specializes in death-defying staircase walks (otherwise known as “rides”) fo...

2019-08-18 18:00:05 973

原创 2018 ACM ICPC – Notheast Preliminary Regional Qualifier H. The Words are Restless

The Words are RestlessProblem DescriptionPalindromes, strings that are the same forward and backward, get far too much attention, and everyday words are upset. Sure a racecar is fast, but the pen is...

2019-08-18 17:48:11 793

原创 2018 East Central Regional Contest/ ECNA2018 A. Car Vet (dfs)

Problem DescriptionBob Roberts is the self proclaimed “Car Vet” who owns several junk car lots where people can come and search for spare parts for their (ailing) cars. The cars in each lot are parke...

2019-08-18 11:12:49 736

原创 2018 East Central Regional Contest/ ECNA2018 C.Pear-wise Voting (dfs)

Problem DescriptionBob Roberts is ending his term as president of a local group of fruit aficionados call the Pear-wise Club. Being president is a plum position so many people are running, some of wh...

2019-08-17 20:53:51 610

原创 2018 East Central Regional Contest/ ECNA2018 E.The Punctilious Cruciverbalist

Problem DescriptionA crossword puzzle consists of a grid of squares in which intersecting words are placed, one letter per square. Some grid squares are filled black indicating that no letter should ...

2019-08-17 20:26:05 599

原创 2019 Multi-University Training Contest 7 A + B = C(思维)

第四个小时才从睡梦中醒来。。。匆匆忙忙乱搞了一份交上去。。TLE…A + B = CTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1655 Accepted Submission(s): 363Special Judg...

2019-08-13 22:00:43 502

原创 STL inline bool next_permutation(iterator first, iterator last)实现

不得不说,c++源码读起来也太难受了不过其实仔细看看,其实还是挺好的原理是找到最后一个相邻的升序元素,假设他们分别是a[i]和a[ii],找到后,再找到最后一个比a[i]大的下标j, 将a[i]和a[j]交换后,再把ii以后的全部元素反转(如果找不到相邻的升序元素,说明所有元素都是非升的,那么久找不到下一个排列,return false)例如 1 3 5 9 7 4找到...

2019-08-11 11:13:54 473

原创 HNU2019暑期训练赛之7 F. Left-Right-Win

Problem DescriptionThe game of Left-Right-Win is played by n players around a table with a spinner* which returns Leftwith probability P_left, Right with probability P_right and Win with probability...

2019-08-10 20:54:02 762

原创 HNU2019暑期训练赛之7 J. Pinemi Puzzles

Problem DescriptionA Pinemi Puzzle is a 10-by-10 array of squares with numbers in some of the squares and the other squares left blank.To solve the puzzle, add 1, 2, or 3 vertical strokes to each bl...

2019-08-10 19:14:38 521

原创 2019牛客暑期多校训练营(第七场) String (字符串,暴力)

链接:https://ac.nowcoder.com/acm/contest/887/A来源:牛客网题目描述A string is perfect if it has the smallest lexicographical ordering among its cyclic rotations.For example: “0101” is perfect as it is the sma...

2019-08-09 18:52:42 602

原创 2019牛客暑期多校训练营(第七场)Irreducible Polynomial (数学)

链接:https://ac.nowcoder.com/acm/contest/887/B来源:牛客网题目描述​输入描述:输出描述:For each test case, output “Yes” if it is irreducible, otherwise “No”.输入221 -2 121 0 1输出NoYesSolution 一开始想到通过判断有...

2019-08-09 18:42:20 553

原创 2019牛客暑期多校训练营(第六场) Move

链接:https://ac.nowcoder.com/acm/contest/886/D来源:牛客网题目描述After the struggle of graduating from college, TangTang is about to move from a student apartment to his new home.TangTang has n items to move...

2019-08-09 18:34:27 556

原创 2019杭电多校5 1007. permutation 2 (dp)

permutation 2Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Problem DescriptionYou are given three positiv...

2019-08-05 22:13:48 564

空空如也

空空如也

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

TA关注的人

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