
PAT
zjjee
这个作者很懒,什么都没留下…
展开
-
1002. A+B for Polynomials
#include#includefloat a[1001];// 数组要设置为全局变量 否则会出错int main(){ float q; int m,n,t; memset(a,0,sizeof(int)); scanf("%d",&m); while(m --){ scanf("%d%f",&t,&q); a[t] = q; } scanf("%d",&n); while(n --){ sca原创 2014-01-31 23:17:16 · 1326 阅读 · 0 评论 -
1070. Mooncake
#include #include using namespace std; struct cake{ double z; double j; double s; }buf[1001]; bool cmp(cake a,cake b){ return a.s > b.s; } int main(){ int n,d; double ans =原创 2014-02-25 20:19:56 · 560 阅读 · 0 评论 -
1069. The Black Hole of Numbers
#include #include #include using namespace std; bool cmp(char a,char b){ return a > b; } int main(){ int n,a,b,c; char s[4]; scanf("%d",&n); do{ for(int i = 3;i >= 0;i -原创 2014-02-25 19:32:49 · 575 阅读 · 0 评论 -
1071. Speech Patterns
#include #include #include #include using namespace std; bool isAlpha(char c){ return (c >= '0' && c = 'a' && c = 'A' && c <= 'z'); } int main(){ string str; getline(cin,str); mapword原创 2014-02-27 11:56:48 · 785 阅读 · 0 评论 -
1072. Gas Station
#include #include #include #include #include using namespace std; #define N 1012 #define M 100001 struct E{ int next; int dis; }; vector edge[N]; int dis[11][M]; int sum[11]; bool mark[11][原创 2014-02-28 22:00:34 · 706 阅读 · 0 评论