声明(置顶)
本网站属个人分享网站,非营利性网站!
你梦到了那片熟悉的童年小巷,风光依旧,阳光刺破黑暗倾泻而下、道路两侧鲜艳的鲜花、破旧的茅草屋,只是那里.....似乎没有人,前面是希望、后面是梦魇。
继续向前,你来到了以前住的屋子,那些陈设还在,罩着白色防尘布的老式大头电视、孩童时吃剩的罐头、印有橘子纹样的旧玻璃杯,上面沾满了污渍。
往窗外看,是那片熟悉的街道,你感到既熟悉又陌生,清晰又混沌的记忆夹杂着清新的空气向你扑来,老式蓝玻璃、筒楼、城乡结合部的大楼。
试探着往前走,你来到了那去过无数次的游乐场,破旧的滑梯,随风摇摆的槐树,还有缓慢旋转的旋转木马。
你可以回去,但那里已经没有人了。
Another sunrise, another sunset
Soon it'll all be yesterday
Another good day, another bad day
What did you do today
Why do we choose to chase what we'll lose
What you want isn't what you have
What you have may not be yours to keep
If I could find love at a stop in a park with open arms
I would save all my love in a jar made of sparks
Sealed in my beating heart
Could it be yours to keep the jar of love
Another left turn another head turns
Could he be someone I deserve
Another right turn another lesson learned
Never leave an open flame to burn
Why do we choose to chase what we'll lose
What you want isn't what you have
What you have may not be yours to keep
If I could find love at a stop in a park with open arms
I would save all my love in a jar made of sparks
Sealed in my beating heart
Could it be yours to keep the jar of love
Could you be my love
Could you be my love
Could you be my love
Could you be my love
If I could find love at a stop in a park with open arms
I would save all my love in a jar made of sparks
Sealed in my beating heart
Could it be yours to keep
If I could find love at a stop in a park with open arms
I would save all my love in a jar made of sparks
Sealed in my beating heart
Could it be yours to keep the jar of love
Could you be my love
Could you be my love
Could you be my love
Could you be my love
Another sunrise another sunset
Soon it'll all be yesterday
Homeworks are many, but nothing much than chinese homework, we need to remember many crazy contents in a moment, it is quite a crazy thing.
void search(int t) //t: 第几次选择
{
for(int i=1;i<=/*阈值*/;i++){
if(/*t没有被选中过*/){
//选中并保存目标(标记该目标为已经查看并且保存至答案数组)
if(/*t达到阈值*/){
//输出整个结果数组(遍历输出)
}else{
search(t+1); //search自增调用
//回退状态和结果(和选中并保存结果正好相反)
}
}
}
}#include<bits/stdc++.h>
using namespace std;
#define m 2147483647
int result[1000]={1};
int n=0,s;
int total=0;
void search(int t){
// cout<<n<<","<<s;
for(int i=result[t-1];i<=s;i++){
if(i<n){
//Bypass select
s-=i;
result[t]=i;
if(s==0){
for(int j=1;j<=t;j++){
cout<<result[j]<<"+";
}cout<<"\b \b";cout<<"\r\n";total+=1;
}else{
search(t+1);
}s=s+i;result[t]=1;
}
}
}
int main()
{
//write
cin>>n;s=n;
search(1);
cout<<"\n\nTotal:"<<total;
return 0;
}↑一道例题:任何一个大于一的自然数可以差分成若干小于n的自然数之和,解题过程
出行阶段:
D2134次
青岛站06:36开
和谐号CRH2B型动车组列车
五点左右准备出门,到青岛站进站后仍余10-20分钟,在候车厅座位上稍作等待,上车后静待4个小时到达张家港站
到达张家港站后,打车前往酒店
中途:
到达苏州观前后,我在酒店稍微收拾了一下行李,便叫我朋友来,他很快就来了,第一天下午我们先玩了一会儿游戏,然后出发去观前街逛了一圈,再吃了个饭,就回酒店继续玩游戏,一天就这么结束了
第二天一早,他带我去拙政园玩(排大长队,20分钟才排完),玩完后回酒店研究东方之门上层的结构。
第三天,去东方之门上方探察,看看是否能直接爬到顶端,结果被值守避难层的保安拦下,未能成功上楼,只好作罢
第四天,决定晚一天回家,上午,三个人再次尝试登顶,被一扇木门挡住,决定先复制东方之门的电梯卡,于是中途去工业园区的一个小区进行了交易,买了一个写卡器,晚上七点左右,人数再次增加,带着五个人,我们再次尝试登顶,这次终于成功,上方具体风景详见图片
回程:
D2906次
苏州站09:11开
和谐号CRH2A重联型动车组列车
一早到达苏州站后还剩30分钟左右,先吃了顿麦当劳,然后上车回家
int a=3; //这里a是一个正常的整型变量 int *p=&a; //单个*的指针进行传参的内容是正常变量的地址 int **q=&p; //多个*的指针须指向指针的地址 //详见图片
先序遍历顺序: DLR
中序遍历顺序: LDR
后序遍历顺序: LRD
一个简易的先序、中序、后序遍历和指针传参的示例:
#include<iostream>
#include<cstring>
using namespace std;
struct BiTree{
BiTree *lchild;
BiTree *rchild;
string data;
};
void preorder(BiTree *Target){
if(Target!=NULL){
cout<<Target->data;
preorder(Target->lchild);
preorder(Target->rchild);
}
}
void inorder(BiTree *Target){
if(Target!=NULL){
inorder(Target->lchild);
cout<<Target->data;
inorder(Target->rchild);
}
}
void postorder(BiTree *Target){
if(Target!=NULL){
postorder(Target->lchild);
postorder(Target->rchild);
cout<<Target->data;
}
}
void createBiTree(BiTree **T){
string Input;
cin>>Input;
if(Input=="#"){
//为空
*T=NULL;
}else{
//不为空
*T = new BiTree;
// *T->lchild=NULL;
// *T->rchild=NULL;
(*T)->data=Input;
createBiTree(&((*T)->lchild));
createBiTree(&((*T)->rchild));
}
}
int main()
{
//write
// BiTree *A = new BiTree;
// A->data="A";
// A->lchild=NULL;
// A->rchild=NULL;
//
// BiTree *B = new BiTree;
// B->data="B";
// A->lchild=B;
// B->lchild=NULL;
// B->rchild=NULL;
//
// BiTree *C = new BiTree;
// C->data="C";
// B->rchild=C;
// C->lchild=NULL;
// C->rchild=NULL;
//
BiTree *T;
createBiTree(&T);
preorder(T); //先序
cout<<endl;
inorder(T); //中序
cout<<endl;
postorder(T); //后序
cout<<endl;
return 0;
}