很简单使用java GUI 制作一个简单的拼图游戏
// main
package HW1;
import java.io.IOException;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
public cl...
分类:
编程语言 时间:
2014-10-06 12:21:00
阅读次数:
775
N-Queens
Total Accepted: 15603 Total
Submissions: 60198My Submissions
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other...
分类:
其他好文 时间:
2014-10-01 12:42:01
阅读次数:
139
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1098题目的关键是函数式f(x)=5*x^13+13*x^5+k*a*x;事实上,由于x取任何值都需要能被65整除.那么用数学归纳法.只需找到f(1)成立的a,并在假设f(x)成立的基础上,证明f(x+1)...
分类:
其他好文 时间:
2014-09-26 20:40:38
阅读次数:
141
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1097核心思想! 只有个位乘以个位才可能是个位各位有 0 1 2 3 4 5 6 7 8 9 超时的代码#includeint main(void){ int i,j,k,a,b;...
分类:
其他好文 时间:
2014-09-26 19:12:28
阅读次数:
194
A*是一个比较经典的启发式寻路算法。是基于dijkstra算法,但是加入了启发函数,使路径搜索效率更高。实现起来很简单。不过要做到通用性高,比如支持各种不同类型的地图,甚至不仅仅是地图,而是个图结构如解决拼图游戏N-puzzle会用到的,就需要多花点心思。用C++实现的话,可以使用模板来适应不同的需...
分类:
其他好文 时间:
2014-09-15 19:26:29
阅读次数:
312
原题地址:https://oj.leetcode.com/problems/sudoku-solver/题意:Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated b...
分类:
编程语言 时间:
2014-09-13 10:34:04
阅读次数:
291
给出如图三角形里的五个角度,求出x
我的做法:
直接写出表达式解
我的代码:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const double pi=acos(-1.0);
struct dot...
分类:
其他好文 时间:
2014-09-12 20:48:24
阅读次数:
181
Problem A
The Most Distant State
Input: standard input
Output: standard output
The 8-puzzle is a square tray in which eight square tiles are placed. The remaining ninth square is uncovered. Eac...
分类:
其他好文 时间:
2014-09-12 17:16:43
阅读次数:
203
鏈接: http://acm.hdu.edu.cn/showproblem.php?pid=1116
Problem Description
Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that do...
分类:
其他好文 时间:
2014-09-11 17:17:12
阅读次数:
320
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.这是一道NP的题目,解题套路与Sudoku Solver类似,类...
分类:
其他好文 时间:
2014-09-11 11:05:21
阅读次数:
224