2016年3月8日
摘要: 竟然从没写过链表!!!struct node { int num; node *next; }; node *head, *p, *q; void Init(){ head = new node(); q = head; } void Insert(int x){ //尾插x; p = new node(); ... 阅读全文
posted @ 2016-03-08 11:27 yoyo_sincerely 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 连接:Print Check 题意:n行m列的矩阵,有k次涂色,每一涂一行或者一列,求最后的涂色结果。 从数据的大小看,暴力肯定要TLE; 问题是如何存储数据。 首先:我们只要最后的涂色结果。 其次:没有必要用for每个数据涂一遍。 所以如果能一次直接涂一行就可以了; #include <iostr 阅读全文
posted @ 2016-03-08 11:14 yoyo_sincerely 阅读(362) 评论(0) 推荐(0) 编辑