07 2021 档案

摘要:Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given 阅读全文
posted @ 2021-07-19 23:08 XA科研 阅读(38) 评论(0) 推荐(0) 编辑
摘要:Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given s 阅读全文
posted @ 2021-07-16 23:27 XA科研 阅读(26) 评论(0) 推荐(0) 编辑
摘要:Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, 阅读全文
posted @ 2021-07-15 23:51 XA科研 阅读(45) 评论(0) 推荐(0) 编辑
摘要:A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key  阅读全文
posted @ 2021-07-13 22:47 XA科研 阅读(36) 评论(0) 推荐(0) 编辑
摘要:To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same s 阅读全文
posted @ 2021-07-12 23:12 XA科研 阅读(32) 评论(0) 推荐(0) 编辑
摘要:字符串反转: string s; reverse(s.begin(),s.end()); 单个数字转字符: string s=""; int n=9; s+=(n+'0'); cout<<s<<endl; 单个字符转数字: char c='9'; int n=c-'0'; cout<<c<<endl 阅读全文
posted @ 2021-07-11 23:15 XA科研 阅读(161) 评论(0) 推荐(1) 编辑
摘要:The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the s 阅读全文
posted @ 2021-07-11 23:01 XA科研 阅读(41) 评论(0) 推荐(0) 编辑
摘要:Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+- 阅读全文
posted @ 2021-07-10 23:34 XA科研 阅读(50) 评论(0) 推荐(0) 编辑
摘要:Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... where D is in [0, 9] except 1. The (n+1)s 阅读全文
posted @ 2021-07-10 22:34 XA科研 阅读(37) 评论(0) 推荐(0) 编辑
摘要:getline用来读入带空格的字符串 使用方式 getline(cin,st); 注意点: 若scanf或cin与getline一起使用,需要清空scanf或cin的缓冲内容 scanf("%d",&n); char c=getchar(); getline(cin,st); 其中c=getchar 阅读全文
posted @ 2021-07-05 23:03 XA科研 阅读(84) 评论(0) 推荐(0) 编辑
摘要:A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years 阅读全文
posted @ 2021-07-04 22:58 XA科研 阅读(38) 评论(0) 推荐(0) 编辑
摘要:People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzi 阅读全文
posted @ 2021-07-02 23:29 XA科研 阅读(35) 评论(0) 推荐(0) 编辑
摘要:If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0 with simple c 阅读全文
posted @ 2021-07-01 23:05 XA科研 阅读(30) 评论(0) 推荐(0) 编辑
摘要:To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords 阅读全文
posted @ 2021-07-01 22:30 XA科研 阅读(35) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示