摘要: Substring时间限制:1000ms | 内存限制:65535KB难度:1描述You are given a string input. You are to find the longest substring of input such that the reversal of the substring is also a substring of input. In case of a tie, return the string that occurs earliest in input.Note well: The substring and its reversal may 阅读全文
posted @ 2014-04-12 10:19 CastleDrv 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Problem Description有一个在位图上画出矩形程序,一开始位图都被初始化为白色(RGB颜色表示为R=G=B=255)。该程序能够按照顺序绘出N个矩形。新绘制的矩形能够覆盖位图上原有的颜色。程序执行完毕后,需要查询M个点的颜色,输出这些点的RGB值。每组数据都是在初始化后开始绘制。Input第一行包含参数N和M,分别表示矩形个数和需要查询的像素个数(1 ≤N, M≤ 1000 );剩下N行每行包含7个参数x1, y1, x2, y2, r, g, b,表示绘制一个(x1,y1),(x2,y2)为顶点的矩形,填充颜色为RGB(r, g, b),其中x1≤x2, y1≤y2数据在整型. 阅读全文
posted @ 2014-04-12 10:04 CastleDrv 阅读(178) 评论(0) 推荐(0) 编辑