摘要:
this example is from chapter 4 in 《the introduction to algorithm》the main idea is all showed in the book , i think maybe realizing the algorithm is a ... 阅读全文
摘要:
the problem is from PAT,which website is http://pat.zju.edu.cn/contests/pat-a-practise/1063 At first, i decide use a for loop to get the intersection, which time complexity is O(n * log(n)) ,but it t... 阅读全文
摘要:
the problem is from PAT,which website is http://pat.zju.edu.cn/contests/pat-a-practise/1085At first, i decide to write the code as follows:/*firstly: ... 阅读全文
摘要:
the problem is from PAT,which website is http://pat.zju.edu.cn/contests/pat-a-practise/1015 this problem is relatively easy.if there must be something which need to be noticed, i think “1 is not a pr... 阅读全文
摘要:
/*to solve the problem ,i think we can use stack to maintain the numbers,and list to keep it sorted,which is very important to find the Median number.... 阅读全文
摘要:
this problem is from PAT, which website is http://pat.zju.edu.cn/contests/pat-a-practise/1050.firstly i think i can use double circulation to solve it... 阅读全文
摘要:
the problem is from PAT,which website is http://pat.zju.edu.cn/contests/pat-a-practise/1083and the source code is as followed./*firstly: sort the arra... 阅读全文
摘要:
tips:the chinese problem is the basic level of pat ,neverthless And it makes sense that it isput under the dir of pat./*firstly: sort the array using ... 阅读全文
摘要:
the problem is from pat,which website is http://pat.zju.edu.cn/contests/pat-a-practise/1043 and the source code is as followed. #include
#include
#include using namespace std;
int pos; struct cell
... 阅读全文
摘要:
the problem is from pat,which website is http://pat.zju.edu.cn/contests/pat-a-practise/1020and the source code is as followed.#include#include#include... 阅读全文