PAT
SonpKing
IT旅行者
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
pat1001
#include #include using namespace std; struct Node{ int exp; float value; }; stack q1,q2,q3; int main() { int k,exp; float value; while(scanf("%d",&k)!=EOF){ for(int i=0原创 2017-09-11 00:06:10 · 429 阅读 · 0 评论 -
pat1016
题目非常繁琐,不过活用数据结构和注意细节处理,就不难解出。注意:若某用户没有任何匹配信息,则不要输出。这是pat惯例,题意模棱两可。 For each test case, you must print a phone bill for each customer.真的each customer吗??? #include #include #include #include using n原创 2017-09-12 17:26:37 · 321 阅读 · 0 评论 -
pat1014
#include using namespace std; int main() { int k; while(scanf("%d",&k)!=EOF){ int floor,pre=0,sum=0; for(int i=0;i<k;i++) { scanf("%d",&floor);原创 2017-09-11 00:20:44 · 347 阅读 · 0 评论 -
pat1008
#include using namespace std; int main() { int k; while(scanf("%d",&k)!=EOF){ int floor,pre=0,sum=0; for(int i=0;i<k;i++) { scanf("%d",&floor);原创 2017-09-11 00:20:03 · 208 阅读 · 0 评论 -
pat1007
#include #include using namespace std; const int maxn=10000+10; int first,last,maxx; int main() { int k,d,sum,cur_f; while(scanf("%d",&k)==1){ scanf("%d",&d); maxx=fir原创 2017-09-11 00:19:33 · 362 阅读 · 0 评论 -
pat1006
#include #include using namespace std; const int maxn=20; string first_id,last_id; int first_time,last_time; int convert(string str){ int num=0; num+=((str[0]-'0')*10+str[1]-'1')*3600; nu原创 2017-09-11 00:19:04 · 465 阅读 · 0 评论 -
pat1005
#include #include #include using namespace std; string num[]={ "zero","one","two","three","four", "five","six","seven","eight","nine" }; int compute(string str){ int sum=0; for(int i=原创 2017-09-11 00:18:34 · 228 阅读 · 0 评论 -
pat1004
#include #include #include #include using namespace std; const int maxn=105; vector tree[maxn]; int layer[maxn],maxly; void dfs(int node,int ly) { maxly=max(ly,maxly); if(tree[node].size()==原创 2017-09-11 00:18:03 · 303 阅读 · 0 评论 -
pat1003
... #include #include #include #include #include using namespace std; const int maxn=510; int peo[maxn],dis[maxn],vis[maxn]; int N,M,c1,c2,route[maxn],sum[maxn]; struct Node{ int t, w; bool原创 2017-09-11 00:17:07 · 244 阅读 · 0 评论 -
pat1010
radix数值比较大。不能暴力,即使在二分搜索的时候也要注意,radix很大,计算可能会出现负数,那么比大小恰恰得到相反的结果,二分的结果就会Impossible。 #include #include using namespace std; typedef long long ll; ll cton(char c){ if('0'<=c&&c<='9') return c-'0';原创 2017-09-12 21:05:01 · 312 阅读 · 0 评论
分享