浙大pat
Virtuous花生
希望自己努力学习的人
展开
-
05浙大机试 排名
#include #include #include using namespace std;typedef struct Stu{int score;char no[25];bool operator if(score != a.score){return (score > a.score);}int tmp = strcmp(no, a.no);原创 2014-03-20 15:59:16 · 572 阅读 · 0 评论 -
浙大pat Advance 1003
#include #include #define MAXLEN 500using namespace std;typedef struct Node{int next; //相邻节点的几点编号int len;}Node;int main(){vector v[MAXLEN];int n, m, c1, c2;while(cin >> n >> m原创 2014-03-16 14:48:24 · 487 阅读 · 0 评论 -
浙大05机试 开门人和关门人
#include #include #include using namespace std;typedef struct Stu{char no[25];int h1, h2;int m1, m2;int s1, s2;bool operator if(h1 != a.h1){return (h1 }else if(m1 != a.m1){原创 2014-03-20 15:57:28 · 421 阅读 · 0 评论 -
浙大05机试A + B
#include #include using namespace std;int GetNum(string a){if(a == "one"){return 1;}if(a == "two"){return 2;}if(a == "three"){return 3;}if(a == "four"){return 4;}if(a =原创 2014-03-20 15:48:53 · 414 阅读 · 0 评论 -
浙大05机试 最大连续子序列
#include using namespace std;int main(){int n;int a[10005];while(cin >> n){int i;if(n == 0){break;}for(i = 0; i cin >> a[i];}int s = -1, t = -1, tmp = 0;int max = -1, sum原创 2014-03-20 15:51:15 · 425 阅读 · 0 评论 -
浙大05机试 畅通工程
#include using namespace std;int tree[1005];int Find_Root(int x){if(tree[x] == -1){return x;}else{int tmp = Find_Root(tree[x]);tree[x] = tmp;return tmp;}}int main(){int n原创 2014-03-20 15:54:38 · 435 阅读 · 0 评论