摘要: 控制worker的移动,推动箱子到目标位置。Point.java(点,用以计算人当前的位置)package edu.pushbox.util;public class Point { public int row; public int column; public Point(i... 阅读全文
posted @ 2014-05-15 10:59 剑风云 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 利用二维数组不同数字表示不同含义,然后在根据数字画出该位置的图像。MapList.java(工具包,能够得到总共有多少关,得到各关的二维数组)package edu.phshbox;public class MapList { /** * 用不同的数字表示不同的含义,用三维数组表示各个... 阅读全文
posted @ 2014-05-15 10:37 剑风云 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 画出矩形,并能通过键盘控制小方块在矩形内移动MainActivity.javapackage cn.lesson.test;import android.app.Activity;import android.os.Bundle;import android.view.KeyEvent;import... 阅读全文
posted @ 2014-05-15 10:26 剑风云 阅读(369) 评论(0) 推荐(1) 编辑
摘要: //#define LOCAL#include#include#include#includeint const MAX_N=1001;typedef struct Point{ double x,y; bool operatorVec[i].y) { ... 阅读全文
posted @ 2014-05-15 09:40 剑风云 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 为了照到点Point(x0,y0),圆心可以在一个范围内移动,我们设该范围为(x,y)(Vec[i].x,Vec[i].y)表示第如果圆心在这个范围内,则第i个点就一定能照到,sum表示为了能照到前i个点,最靠近右边的圆的边界坐标。#define LOCAL#include#include#incl... 阅读全文
posted @ 2014-05-15 09:23 剑风云 阅读(301) 评论(0) 推荐(0) 编辑
摘要: DiscountStrategy.javapackage edu.strategy;abstract public class DiscountStrategy{ abstract public double calculateDiscount();}FlatRateStrategy.java... 阅读全文
posted @ 2014-05-14 21:40 剑风云 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 注意是>=//#define LOCAL#include#include#include#include#includeusing namespace std;int T,maxx;std::map word_count;std::map::iterator be,ed,result;string ... 阅读全文
posted @ 2014-05-13 20:25 剑风云 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 注意java不要有包名(并且严格按照输出,一个换行符都不能少):import java.math.BigInteger;import java.util.Scanner;public class Main { public static void main(String[] args) { ... 阅读全文
posted @ 2014-05-13 17:53 剑风云 阅读(145) 评论(0) 推荐(0) 编辑
摘要: //#define LOCAL#include#includeint const MAX_N=10001;int N,T;std::pair P[MAX_N];void solve(){ char c_now='#',c_next; int i=0,sum=0; while(tru... 阅读全文
posted @ 2014-05-13 16:57 剑风云 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 观察可以发现,0,1,2,……,n结尾的分组中,maxsum a[0] = a[0]maxsum a[1] = max( a[0] + a[1] ,a[1]) = max( maxsum a[0] + a[1] ,a[1])maxsum a[2] = max( max ( a[0] + a[1] +... 阅读全文
posted @ 2014-05-13 15:50 剑风云 阅读(330) 评论(0) 推荐(0) 编辑