摘要:
水平有限,我只能尽我所能的简单讲一下一些经验以及如何将代码调试正确。 先求求大家不要PTA直接写代码,除非你很有把握,不然真的还是去编译器写完调试完样例测试无误后提交到PTA上。别再拿没有调试过的代码问我了,我遭不住,自己先调试。调试不对检查思路,最后再来问我。 首先讲一下我最近遇到的常见几种错误: 阅读全文
摘要:
##一、在阿里云租用一个服务器 这个没太多说法,镜像为ubuntu,时长尽可能拉满 ##二、添加用户 adduser XXX #创建用户 usermod -aG sudo XXX #添加sudo权限 ##三、安装tmux sudo apt-get update sudo apt-get instal 阅读全文
摘要:
##1108 Finding Average (20 分) The basic task is simple: given N real numbers, you are supposed to calculate their average. But what makes it complicat 阅读全文
摘要:
##1107 Social Clusters (30 分) When register on a social network, you are always asked to specify your hobbies in order to find some potential friends 阅读全文
摘要:
##1105 Spiral Matrix (25 分) This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral mat 阅读全文
摘要:
##1102 Invert a Binary Tree (25 分) The following is from Max Howell @twitter: Google: 90% of our engineers use the software you wrote (Homebrew), but 阅读全文
摘要:
##1167 Cartesian Tree (30 分) A Cartesian tree is a binary tree constructed from a sequence of distinct numbers. The tree is heap-ordered, and an inord 阅读全文
摘要:
##1166 Summit (25 分) A summit (峰会) is a meeting of heads of state or government. Arranging the rest areas for the summit is not a simple job. The idea 阅读全文
摘要:
###1165 Block Reversing (25 分) Given a singly linked list L. Let us consider every K nodes as a block (if there are less than K nodes at the end of th 阅读全文
摘要:
###1163 Dijkstra Sequence (30 分) Dijkstra's algorithm is one of the very famous greedy algorithms. It is used for solving the single source shortest p 阅读全文
摘要:
###1162 Postfix Expression (25 分) Given a syntax tree (binary), you are supposed to output the corresponding postfix expression, with parentheses refl 阅读全文