08 2018 档案
摘要:Unlike in nowadays, the way that boys and girls expressing their feelings of love was quite subtle in the early years. When a boy A had a crush on a g
阅读全文
摘要:1、 char c = getchar(); 输入单个字符,可输入空格、换行符。 2、 cin >> s; 不读取空格或换行符。 3、 getline(cin, s); 输入一行到字符串s,输入包含空格,会读取换行符但是不输入到字符串中。 例: 先输入一个整数,再读取一行到字符串s,再读取一行中空格
阅读全文
摘要:An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any
阅读全文
摘要:This time, you are supposed to help us collect the data for family-owned property. Given each person's family members, and the estate(房产)info under hi
阅读全文
摘要:1、 段错误: 数组太小,下标越界 浮点错误: 除以零或求余零 格式错误: 少或多了空格或空行。 2、 注意id可能是等于0,比如5位id可能是00000。 3、 当函数参数参占用内存空间较大时(比如map等),用引用传递参数更节省时间,用形参可能会超时。 4、 当编号从1到N时,循环时条件为 i
阅读全文
摘要:A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, dependi
阅读全文
摘要:Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to ou
阅读全文
摘要:1、printf string型字符串 1 printf("%s", s.c_str()); 输入string型字符串 1 cin >> s; 而不能用 1 scanf_s("%s", &s); s1.compare(s2): 相等返回0;s1 > s2 返回 1;s1 < s2 返回-1. 2、m
阅读全文
摘要:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c
阅读全文
摘要:注意while循环判断条件是 i <= j。如果是 i < j 的话,当i,j指向一个元素时会不满足条件跳出循环。
阅读全文
摘要:To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mat
阅读全文

浙公网安备 33010602011771号