原创 圖的深度搜索完整實現(鄰接表,DFS)

//構造鄰接表,深度優先搜索 #include<iostream> #include<malloc.h> #define null NULL using namespace std; typedef struct nd { int ke

原创 Help Captain Chen Ⅰ

Description Recently, more and more students pay attention to a funny game called ACM, including Captain Chen. He

原创 Shaping Regions //附錯誤解法

//#include<iostream> //#include<fstream> //using namespace std; //int color[810][810]={1}; //int values[1005]={0}; //in

原创 Humble Numbers

#include<iostream> #include<fstream> using namespace std; ifstream fin ("humble.in"); ofstream fout ("humble.out"); int

原创 Tautology

#include<iostream> #include<stack> #include<string> using namespace std; int main() { string s; while(cin>>s) { bo

原创 1328

#include<iostream> #include<cmath> using namespace std; float min(float a,float b) { return a<b?a:b; } int main() { i

原创 Score Inflation 完全揹包 註釋部分是錯誤的解法

#include<fstream> #include<iostream> using namespace std; ifstream fin ("inflate.in"); ofstream fout ("inflate.out"); i