![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT
SonpKing
IT旅行者
展开
-
pat1001
#include#includeusing 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 · 388 阅读 · 0 评论 -
pat1016
题目非常繁琐,不过活用数据结构和注意细节处理,就不难解出。注意:若某用户没有任何匹配信息,则不要输出。这是pat惯例,题意模棱两可。For each test case, you must print a phone bill for each customer.真的each customer吗???#include#include#include#includeusing n原创 2017-09-12 17:26:37 · 272 阅读 · 0 评论 -
pat1014
#includeusing 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 · 288 阅读 · 0 评论 -
pat1008
#includeusing 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 · 157 阅读 · 0 评论 -
pat1007
#include#includeusing 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 · 304 阅读 · 0 评论 -
pat1006
#include#includeusing 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 · 408 阅读 · 0 评论 -
pat1005
#include#include#includeusing 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 · 188 阅读 · 0 评论 -
pat1004
#include#include#include#includeusing 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 · 257 阅读 · 0 评论 -
pat1003
...#include#include#include#include#includeusing 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 · 199 阅读 · 0 评论 -
pat1010
radix数值比较大。不能暴力,即使在二分搜索的时候也要注意,radix很大,计算可能会出现负数,那么比大小恰恰得到相反的结果,二分的结果就会Impossible。#include#includeusing namespace std;typedef long long ll;ll cton(char c){ if('0'<=c&&c<='9') return c-'0';原创 2017-09-12 21:05:01 · 258 阅读 · 0 评论