省赛B题....手写链表..其实很简单的.... 比赛时太急了,各种手残....没搞出来....要不然就有金了...注:对相邻的元素需要特判..... Problem B Boxes in a Line You have n boxes in a line on the table numbered 1~n from left to right. Your task is to simulate 4 kinds of commands: 1 X Y: move box X to the lef…
C. Inna and Candy Boxes Inna loves sweets very much. She has n closed present boxes lines up in a row in front of her. Each of these boxes contains either a candy (Dima's work) or nothing (Sereja's work). Let's assume that the boxes are numbered fr…
题目来源:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=39 Stacking Boxes Background Some concepts in Mathematics and Computer Science are simple in one or two dimensions but become…
9.10 You have a stack of n boxes, with widths w., heights hir and depths drThe boxes cannot be rotated and can only be stacked on top of one another if each box in the stack is strictly larger than the box above it in width, height, and depth. Implem…
http://poj.org/problem?id=1475 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=249 Pushing Boxes Time Limit: 2000MS Memory Limit: 131072K Total Submissions: 4662 Accepted: 1608 Special Judge Description Imagine you are standing insid…