- 博客(8)
- 收藏
- 关注
原创 The Falling Leaves UVA - 699(递归map)
#include <iostream>#include <map>using namespace std;map<int,int>mp;int cont=0;void tree(int n){ int t; cin>>t; if(t==-1) return ; mp[n]+=t;...
2019-01-31 22:58:51 122
原创 Not so Mobile UVA - 839(递归)
#include <iostream>using namespace std;bool solve(int& w){ int w1,r1,w2,r2; cin>>w1>>r1>>w2>>r2; bool t1=true,t2=true; if(!w1) t1=solve...
2019-01-31 13:29:44 133
原创 Tree UVA - 548(中序后序建树)
后续遍历的最后一个数字就是根节点所以用递归把一棵树的子树看成单独的一棵树就能用递归建树了#include <iostream>#include <stdio.h>#include <string>#include <sstream>#include <algorithm>using namespace std;const...
2019-01-31 11:53:46 156
原创 Trees on the level UVA - 122(层序遍历bfs)
#include <iostream>#include <cstdio>#include <vector>#include <queue>#include <cstring>using namespace std;struct Node{ int v; Node* left ,*right; in...
2019-01-30 19:49:51 108
原创 Dropping Balls UVA - 679(找规律)
把每个点看成两部分左子树与右子树#include <iostream>using namespace std;int main(){ int n; while(scanf("%d",&n)&&n!=-1) { int a,b; for(int i=0;i<n;i++) ...
2019-01-30 17:36:17 137
原创 Boxes in a Line UVA - 12657(双链表)
#include <iostream>using namespace std;typedef long long ll;const int MAXN=100000+10;int Left[MAXN],Right[MAXN];void link(int l,int r){ Left[r]=l; Right[l]=r; }int main(){...
2019-01-30 15:26:33 156
原创 Broken Keyboard (a.k.a. Beiju Text) UVA - 11988(链表)
链表模拟#include<iostream>#include<algorithm>#include<cstdio>#include<cstring>using namespace std; char s[101000];int Next[101000]; int main(){ int cur,last;//cur为...
2019-01-30 14:02:13 224
原创 Android Stdio CoordinatorTabLayout运行时出现This Activity already has an action bar supplied by the windo
我的处理反方法是将style.xml里面的<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">改成上面这句运行就可以了希望能给大家参考
2019-01-01 00:43:14 97
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人