Search found 5 matches

by panthenia
Thu Nov 04, 2010 2:15 pm
Forum: Volume 7 (700-799)
Topic: 705 - Slash Maze
Replies: 13
Views: 11212

Re: 705 - Slash Maze

plz endure my poor english
I hold that the biggest puzzle of this problem is how to build a map form the input to a graph,then we can use DFS to solve it.
we can build a matrix 2*mx2*n,every four rect describe a character '\'or'/',then its very easy to program.
I sole it in 0.020s.
by panthenia
Sat Aug 07, 2010 10:27 am
Forum: Volume 101 (10100-10199)
Topic: 10152 - ShellSort
Replies: 33
Views: 9378

10152--PRE why??who can help me!!

it's drive me crazy... #include<iostream> #include<fstream> #include<string> #include<vector> #include<map> using namespace std; struct nd{ nd():a(-1),b(0){} int a,b; }; int main() { int t; cin>>t; while(t--) { int dnum; string fuck; cin>>dnum; getline(cin,fuck); map<string,int> mp; vector<nd> avec(...
by panthenia
Sun Jul 11, 2010 4:52 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54589

Re: 102 WA who can help me!!!

#include<iostream> #include<cstdio> using namespace std; long bo[3][3],maxs,maxt,cot[3],cos[3],maxa; bool flag[3]; char cr[3]={'B','G','C'}; void se(int b) { if(b==0){int i; for(i=0;i<3;++i) { maxs=0; flag[i]=false; maxs+=(bo[i][1]+bo[i][2]); cot[b]=i; se(1); flag[i]=true; }} else if(b==1) { int i;...
by panthenia
Sun Jul 11, 2010 4:52 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54589

102 WA who can help me!!!

#include<iostream> #include<cstdio> using namespace std; long bo[3][3],maxs,maxt,cot[3],cos[3],maxa; bool flag[3]; char cr[3]={'B','G','C'}; void se(int b) { if(b==0){int i; for(i=0;i<3;++i) { maxs=0; flag =false; maxs+=(bo [1]+bo [2]); cot =i; se(1); flag =true; }} else if(b==1) { int i; for(i=0;i...
by panthenia
Sun Jul 11, 2010 4:08 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54589

Re: 102, WA

who can tell me if all input is zero what string should be output?

Go to advanced search