- 博客(5)
- 资源 (2)
- 收藏
- 关注
原创 zoj-1003
#include using namespace std; void Dfs(int to,long int numa,long int numb); int flagA,flagB; int main() { long int numA,numB; while(cin >> numA >> numB) { if(numA swap(numA,numB); flagA=0
2013-04-25 22:00:28 495
原创 zoj1006
#include using namespace std; int turn(char a) { if(a=='_') return 0; if(a=='.') return 27; if(a>='a' && a return a-'a'; return -1; } char turn(int t) { if(t>=0 && t { if(t==0) r
2013-04-25 21:59:20 465
原创 zoj1007
这个题是看别人写的才有做对了的 这个题主要是时间问题,根据提示,先对原式进行调整,并将循环次数减少,思路较完整的http://hi.baidu.com/qhh_2008/item/85480a3cd5dc595e80f1a71c(耐心看下哦!)与他不同的是,我有多找了0.0008和1.0008的关系以下是程序~ #include int main() { double psix[200
2013-04-25 21:57:49 769
原创 zoj 1008
#include using namespace std; int n,k[25],t; int s[25][4]; int count[25]; //是在组织过后的图上进行DFS,直接搜索会有重复的 bool canT(int x) { int i; if(x==n*n) return true; for(i=0;i { if(count[i]>0) {
2013-04-25 21:50:47 525
原创 ZOJ-1009
最开始以为很复杂呢,认真想了一下,就是理清逻辑!不涉及时间空间越界问题~虽然调了好一会儿,但最后还是做出来了~而且是一次过,太难得了!分享一下~ #include #include using namespace std; int main() { int i,j,m,n,cases=1; int A[26],B[26],C[26]; while(cin >> m && m) {
2013-04-25 21:33:07 692
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人