![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ZJU_PAT
Matrix_Reloaded
这个作者很懒,什么都没留下…
展开
-
ZJU PAT 1011. World Cup Betting
#include#includeusing namespace std;double sum=1.0;string select(double a[]){ if(a[0]>a[1] && a[0]>a[2]) { sum=sum*a[0]; return "W"; } else if(a[1]>a[2] && a[1]>a[3]) {原创 2013-03-29 17:55:59 · 668 阅读 · 0 评论 -
ZJU-PAT 1065. A+B and C (64bit) (20)
Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number of test cases, T (Output原创 2014-06-23 00:11:24 · 3791 阅读 · 3 评论 -
ZJU-PAT 1057. Stack (30) 浙大2013年上机复试第三题
#pragma warning (disable:4786)#include#include#include#include#includeusing namespace std;int n,d;;int A[10005],B[10005];int select(int num){ for(int i=1;i<=d;i++) B[i]=A[i];原创 2013-04-18 15:15:51 · 1802 阅读 · 2 评论 -
ZJU-PAT 1081. Rational Sum (20)
模拟题#pragma warning (disable:4786)#include#include#include#include#include#include#includeusing namespace std;long long int sum,ans,sum1;int n;struct Node{ long long int numerato原创 2014-07-08 23:42:54 · 1513 阅读 · 0 评论 -
ZJU-PAT 1070. Mooncake (25)
Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the region's culture. Now原创 2014-06-29 22:33:35 · 1794 阅读 · 0 评论 -
ZJU-PAT 1010. Radix (25)
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number.Now for any pair of positive原创 2014-06-30 00:28:22 · 4588 阅读 · 3 评论 -
ZJU-PAT 1078. Hashing (25) 浙大2014年上机复试第二题
#include#include#include#include#includeusing namespace std;const int MaxN=20001;int n,m;bool Position[MaxN];void special_process(int cur){ for(int i=1; i<m; i++) { int po原创 2014-04-04 11:03:45 · 1909 阅读 · 0 评论 -
ZJU-PAT 1079. Total Sales of Supply Chain (25) 浙大2014年上机复试第三题
#include#includeusing namespace std;struct Node{ int parent; //父节点 bool flag; //是否是retailers int level; //第几层 int num; //销售多少个};Node tt[100005];int n;double p,r,sum;原创 2014-04-03 16:49:00 · 1890 阅读 · 0 评论 -
ZJU-PAT 1080. Graduate Admission (30) 浙大2014年上机复试第四题
#include#include#include#includeusing namespace std;const int maxn=40005;const int maxm=101;int n,m,k;int num[maxm];int lastRank[maxm];vector mm[maxm];struct stu{ int id; int G原创 2014-04-04 09:37:32 · 2317 阅读 · 0 评论 -
ZJU-PAT 1077. Kuchiguse (20) 浙大2014年上机复试第一题
#include#include#include#includeusing namespace std;string longest_common_suffix(string a,string b){ string tmp=""; int len1=a.size()-1; int len2=b.size()-1; while(len1>=0 && len2>=0) {原创 2014-04-03 09:32:15 · 1307 阅读 · 0 评论 -
ZJU-PAT 1054. The Dominant Color (20) 浙大2013年上机复试第一题
#pragma warning (disable:4786)#include#include#include#includeusing namespace std;int main(){ int m,n; while(scanf("%d%d",&m,&n)!=EOF) { int i,j; string s; map ans;原创 2013-04-18 13:58:01 · 1471 阅读 · 0 评论 -
ZJU-PAT 1056. Mice and Rice (25) 浙大2013年上机复试第四题
#pragma warning (disable:4786)#include#include#include#include#include#includeusing namespace std;int n,m;int B[100005];int flag;int cnt;//第几轮次被淘汰 int group[1005],num_i原创 2013-04-18 16:36:42 · 1247 阅读 · 0 评论 -
zju-pat 1008.Elevator
#include#includeusing namespace std;int n;int a[105];void run(){ int i; for(i=0;i<n;i++) scanf("%d",&a[i]); int ans=0; int cur=0; for(i=0;i<n;i++) { if(a[i]>cur) { ans=ans+(a原创 2013-03-27 22:17:50 · 647 阅读 · 0 评论 -
ZJU-PAT 1051 Pop Sequence
#include#include#includeusing namespace std;int m,n,cases;stack f;int a[1005];bool Judge(){ while(f.empty()==false) f.pop(); int i,j; for(i=0;i<n;i++) scanf("%d",&a[i]); if(a[0]>m) re原创 2013-03-24 22:00:12 · 690 阅读 · 0 评论 -
ZJU-PAT 1050
#include#includeusing namespace std;/*Sample Input:They are students.aeiouSample Output:Thy r stdnts.*/bool myhash[150];string s1,s2;void run(){ getline(cin,s2); int i; string原创 2013-03-24 22:04:04 · 825 阅读 · 0 评论 -
ZJU PAT 1012 The Best Rank
#include#include#include#includeusing namespace std;#define Min(a,b)(a<b?a:b)int n,m;struct student{ int id,ctest,math,english; double avg; int crank,mrank,erank,arank; int bestrank; st原创 2013-03-28 22:30:15 · 924 阅读 · 0 评论 -
ZJU-PAT 1055. The World's Richest (25) 浙大2013年上机复试第二题
#pragma warning (disable:4786)#include#include#include#include#includeusing namespace std;int m,n;int num,Min,Max;struct people{ string name; int age,money;};people TT[原创 2013-04-18 14:25:00 · 1245 阅读 · 0 评论