- 博客(6)
- 收藏
- 关注
原创 1143 Lowest Common Ancestor
两个点超时,没有选择先建树,可能导致递归太多,所以超时,代码: #include<iostream> #include<set> #include<vector> using namespace std; set<int> se; int a[10010]; int b[10010]; int n1,n2; set<int> father; vector<int> v; bool f1=false,f2=false; void func
2021-02-20 21:31:53 48
原创 1082 Read Number in Chinese (25 分)
下面展示一些 内联代码片。 #include<iostream> #include<string> #include<cstdio> using namespace std; string a[6]={"","Shi","Bai","Qian","Wan","Yi"}; string b[10]={"ling","yi","er","san","si","wu","liu","qi","ba","jiu"}; int main(){ string str;
2021-02-13 00:47:08 72
原创 1077 Kuchiguse (20 分)
#include<iostream> #include<cstring> using namespace std; int main(){ int n; cin>>n; getchar(); string str[110]; for(int i=0;i<n;i++){ getline(cin,str[i]); if(str[i].length()==0){ cout<
2021-02-10 11:06:55 56
原创 1057 Stack (30 分)
#include<cstdio> #include<stack> #include<string> #include<iostream> const int maxn=100010; using namespace std; #define lowbit(i) ((i)&(-i)) int c[maxn]={0}; stack<int> sta; void update(int n,int x){ for(int i=n;i<
2021-02-05 16:01:46 65
原创 PAT 1065 A+B and C (64bit)
#include<cstdio> #include<iostream> using namespace std; int main(){ int n; scanf("%d",&n); for(int i=0;i<n;i++){ long long a,b,c; scanf("%lld%lld%lld",&a,&b,&c); bool isyc1=false;
2021-02-04 02:06:59 91
原创 PAT甲级1022 Digital Library
PAT甲级1022 Digital Library #include<cstdio> #include<iostream> #include<map> #include<cstring> #include<utility> using namespace std; multimap<string,string> m[5]; int main(){ int n; cin>>n; string waste
2021-01-29 16:47:12 49
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人