李景旺的博客

www.jingwangl.com

548:Tree

Tree首先根据中序遍历和后序遍历递归地构造二叉树(后续遍历的最后一个节点为二叉树的根节点),然后前序遍历。输入有点坑,你说你直接告诉多少个节点多好。。。我想的是先用fets读取整个串,然后用atoi转化为数字,本地运行没问题可是一提交就报错,暂时还没找到原因,大概是因为回车符的问题,参考了别人的...

2018-05-29 23:22:48

阅读数:25

评论数:0

12504:Updating a Dictionary

Updating a Dictionaryversion 1:#include<cstdio> #include<iostream> #include<map> #i...

2018-04-22 16:55:33

阅读数:19

评论数:0

1593:Alignment of Code

Alignment of Code#include<iostream> #include<cstring> #include<vector> #include&...

2018-04-21 01:13:42

阅读数:17

评论数:0

814:The Letter Carrier's Rounds

The Letter Carrier's Rounds注意可能有重复的收件人。version 1(20ms):#include<cstdio> #include<iostream> #include&a...

2018-04-20 17:09:35

阅读数:33

评论数:0

207:PGA Tour Prize Money

PGA Tour Prize Money 这道题太麻烦了,先放这儿,日后再说。。。#include<cstdio> #include<cstring> #include<algorithm...

2018-04-19 19:17:52

阅读数:25

评论数:0

1592:Database

Database思路:只枚举c1和c2,然后从上到下扫描各行。每次碰到一个新的行r,把c1,c2两列的内容作为一个二元组存到一个map中。如果map的键值中已经存在这个二元组,该二元组映射到的就是所要求的r1,而当前行就是r2。在主循环之前先做一个预处理——给所有字符串分配一个编号,则整个数据库中...

2018-04-17 23:59:59

阅读数:19

评论数:0

400:Unix ls

Unix ls #include<iostream> #include<vector> #include<algorithm> using namespace std...

2018-04-17 21:21:18

阅读数:12

评论数:0

220:Othello

Othello我的这道题的代码还是比较简洁的哈哈。version 1:#include<cstdio> #include<cstring> using namespace std; int n,wn,bn; i...

2018-04-13 13:30:19

阅读数:22

评论数:1

213:Message Decoding

Some message encoding schemes require that an encoded message be sent in two parts. The first part, called the header, contains the characters of the...

2018-04-11 10:17:46

阅读数:8

评论数:0

227:Puzzle

A children’s puzzle that was popular 30 years ago consisted of a 5×5 frame which contained 24 smallsquares of equal size. A unique letter of the alph...

2018-04-05 13:17:58

阅读数:28

评论数:0

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