随笔分类 - hash
摘要:/*调用算法中函数求写一个排序*/#include #include#include#include#include#include#include#includeusing namespace std;#define maxn 2600000typedef int State[9];State st[maxn],goal;int dist[maxn];const int dx[]= {-1,1,0,0};const int dy[]= {0,0,-1,1};int vis[36288],fact[9];/*void init_lookup_table(){ int i; fact...
阅读全文
摘要:/*经典移动小球*/#include #include#include#include#include#include#include#includeusing namespace std;#define maxn 26000int left1[maxn],right1[maxn];void link(int x,int y){ right1[x]=y; left1[y]=x;}int main(){ int i,n,casen,x,y,k; char type[2]; while(~scanf("%d%d",&n,&casen)) { for...
阅读全文
摘要:/*Problem ETime Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem DescriptionMatrix multiplication problem is a typical example of dynamical programming.Suppose you
阅读全文
摘要:Problem FTime Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 3 Accepted Submission(s) : 2Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description“Point, point, life of student!” This is a ballad(歌谣)well known in colleges, and you must
阅读全文
浙公网安备 33010602011771号