![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
zoj
伪神
伪神
展开
-
zoj_1542 Network
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=542 //C++代码//ps:本题的Sample Output有误#include#includeusing namespace std;struct Edge{ int u,v,w; bool operator <(const Edge a)原创 2013-05-24 11:50:53 · 611 阅读 · 0 评论 -
zoj_1657 Goldbach's Conjecture
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=657 //C++代码#includeusing namespace std;bool a[32769];int p[32769];void prim(){ //素数筛法,筛出1-32768里的素数 int i,j,num=0; for(i=0原创 2013-05-27 23:51:56 · 533 阅读 · 0 评论 -
zoj_1526 Big Number
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=526 //C++代码//log10(n!)=log10(1)+log10(2)+...+log10(n)#include#includeusing namespace std;int main(){ int t,n,i; cin>>t; whi原创 2013-05-27 23:37:26 · 640 阅读 · 0 评论 -
zoj_2481 Unique Ascending Array
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1481 //C++代码#include#includeusing namespace std;int main(){ int n,a; while(cin>>n,n){ set s; while(n--){ cin>>a; s.原创 2013-05-28 17:25:31 · 592 阅读 · 0 评论 -
zoj_2736 Daffodil number
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1736 //C++代码#includeusing namespace std;int main(){ int n; while(cin>>n){ int a=n%10,b=(n/10)%10,c=n/100; if(a*a*a+b*b*b+c原创 2013-05-28 18:52:31 · 605 阅读 · 0 评论 -
zoj_2987 Misspelling
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1986 //C++代码#include#includeusing namespace std;int main(){ int n,m,i,j; char a[85]; cin>>n; for(i=1;i<=n;i++){ cin>>m>>a原创 2013-05-28 19:07:23 · 561 阅读 · 0 评论 -
zoj_3100 ICPC Score Totalizer Software
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=2969 //C++代码#includeusing namespace std;int main(){ int n,m; while(cin>>n,n){ int sum=0,min=1000,max=0; for(int i=0;i<n;i+原创 2013-05-28 19:20:44 · 738 阅读 · 0 评论 -
zoj_2388 Beat the Spread!
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1364 //C++代码#includeusing namespace std;int main(){ int n,a,b; cin>>n; while(n--){ cin>>a>>b; if(a<b || (a+b)&1) cout<<"i原创 2013-05-28 17:00:55 · 849 阅读 · 0 评论 -
zoj_3621 Factorial Problem in Base K
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4745 //C++代码#include#include#includeusing namespace std;typedef long long LL;int main(){ string p; LL k; while(cin>>p>>k)原创 2013-05-30 22:02:35 · 584 阅读 · 0 评论 -
zoj_1095 Humble Numbers
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=95 //C++代码#include#includeusing namespace std;int main(){ int n,m=0; long long a[6000]; string b[4]={"th","st","nd","rd"};原创 2013-05-27 07:32:35 · 529 阅读 · 0 评论 -
zoj_3036 IP-TV
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=2034 //C++代码#include#include#include#includeusing namespace std;struct Edge{ int u,v,w; bool operator <(const Edge a) const原创 2013-05-27 18:36:24 · 599 阅读 · 0 评论 -
zoj_1586 QS Network
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=586 //C++代码#include#includeusing namespace std;struct Edge{ int u,v,w; bool operator <(const Edge a) const{ return w>a.w;原创 2013-05-24 10:47:30 · 628 阅读 · 0 评论 -
zoj_1203 Swordfish
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=203 //C++代码#include#include#include#includeusing namespace std;struct Edge{ int u,v; double w; bool operator <(const Edge原创 2013-05-23 23:51:25 · 610 阅读 · 0 评论 -
zoj_2326 Tangled in Cables
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1381 //C++代码#include#include#include#include#includeusing namespace std;struct Edge{ int u,v; double w; bool operator <(c原创 2013-05-23 19:31:16 · 490 阅读 · 0 评论 -
zoj_1372 Networking
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=372 //C++代码#include#includeusing namespace std;struct Edge{ int u,v,w; bool operator <(const Edge a) const{ return w>a.w;原创 2013-05-23 13:04:12 · 478 阅读 · 0 评论 -
zoj_2966 Build The Electric System
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1965 //C++代码#include#includeusing namespace std;struct Edge{ int u,v,w; bool operator <(const Edge a) const{ return w>a.w;原创 2013-05-23 13:20:25 · 1041 阅读 · 0 评论 -
zoj_1406 Jungle Roads
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=406 //C++代码#include#includeusing namespace std;struct Edge{ int u,v,w; bool operator <(const Edge a) const{ return w>a.w;原创 2013-05-23 00:56:25 · 784 阅读 · 0 评论 -
zoj_1076 Gene Assembly
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=76 //C++代码#include#includeusing namespace std;struct Point{ int x,y,id; bool operator <(const Point a) const{ if(y==a.y) re原创 2013-05-26 22:56:39 · 702 阅读 · 0 评论 -
zoj_2812 Quicksum
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2812 //C++代码#include#includeusing namespace std;int ctoi(char c){ if(c==' ') return 0; return c-'A'+1;}int main(){ char原创 2013-05-27 17:57:45 · 810 阅读 · 0 评论 -
zoj_2836 Number Puzzle
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1836 //C++代码#includeusing namespace std;int n,m,ans,a[11];int gcd(int a,int b){ return b==0? a:gcd(b,a%b);}int lcm(int a,i原创 2013-06-01 14:56:48 · 542 阅读 · 0 评论