10月18日随笔

author author     2022-08-11     243

关键词:

 1 #include<iostream>
 2 #include<algorithm>
 3 #include<cmath>
 4 #include<cstring>
 5 #include<cstdio>
 6 #include<queue>
 7 using namespace std;
 8 typedef long long LL;
 9 inline int read()
10 {
11     int x=0,f=1;char c=getchar();
12     while(!isdigit(c)){if(c==-)f=-1;c=getchar();}
13     while(isdigit(c)){x=x*10+c-0;c=getchar();}
14     return x*f;
15 }
16 bool ok[50001];
17 int a[5001],b[5001],f[5001],n,k,maxn,num;
18 int main()
19 {
20     n=read();
21     for(int i=1;i<=n;i++)a[i]=read();
22     b[1]=1;f[1]=1;
23     for(int i=1;i<=n+1;i++)//边界定为n+1,这里默认a[i]为0,满足最长下降序列 
24     {
25         maxn=0;
26         f[i]=1;
27         for(int j=i-1;j>=1;j--)//从以前的找 
28             if(a[i]<a[j])//
29                 if(b[j]>maxn)//更新 
30                 {
31                     maxn=b[j];
32                     memset(ok,1,sizeof(ok));
33                     ok[a[j]]=false;
34                     f[i]=f[j];//更新方案数 
35                 }
36                 else if(b[j]==maxn && ok[a[j]])// 
37                 {
38                     ok[a[j]]=false;
39                     f[i]+=f[j];
40                 }
41         b[i]=maxn+1;
42     }
43     printf("%d %d
",b[n+1]-1,f[n+1]);//以0为结尾的最长下降序列, 
44     return 0;
45 }
46 /*
47 12
48 68 69 54 70 68 64 70 67 78 62 98 87
49 */

今天是10月18日,还有几天就开始初赛了。昨天出月考排名了,本以为会颓废,结果发现排名还凑活:64,按理说这个排名很低了,但是以我这个分数排名这么靠前已经非常出乎我的意外了。希望期中能考好一点。

10月7日星期五--出埃及记exodus18:18

2016年10月7日星期五--出埃及记Exodus18:18Youandthesepeoplewhocometoyouwillonlywearyourselvesout.Theworkistooheavyforyou;youcannothandleitalone.你和这些百姓必都疲惫,因为这事太重,你独自一人办理不了。 查看详情

10月10日星期一--出埃及记exodus18:21

2016年10月10日星期一--出埃及记Exodus18:21Butselectcapablemenfromallthepeople--menwhofearGod,trustworthymenwhohatedishonestgain--andappointthemasofficialsoverthousands,hundreds,fiftiesandtens.并要从百姓中拣选有才能的人,就是敬畏  查看详情

减肥log

减肥背景:2018年08月19日,体重180.9斤,并且近期正在以比较快的速度继续增重中。这不是一个健康的现象,因此决心减肥,科学减肥。目标第一个月(2018年08月19日-2018年09月18日)减掉10.9斤,体重降到170斤。第二个月(2018年09... 查看详情

10月3日星期一--出埃及记exodus18:14

2016年10月3日星期一--出埃及记Exodus18:14Whenhisfather-in-lawsawallthatMoseswasdoingforthepeople,hesaid,"Whatisthisyouaredoingforthepeople?Whydoyoualonesitasjudge,whileallthesepeoplestandaroundyoufrommorningtill 查看详情

10月18日星期二--出埃及记exodus19:2

2016年10月18日星期二--出埃及记Exodus19:2AftertheysetoutfromRephidim,theyenteredtheDesertofSinai,andIsraelcampedthereinthedesertinfrontofthemountain.他们离了利非订,来到西乃的旷野,就在那里的山下安营。 查看详情

10月1日星期六--出埃及记exodus18:12

2016年10月1日星期六--出埃及记Exodus18:12ThenJethro,Moses‘father-in-law,broughtaburntofferingandothersacrificestoGod,andAaroncamewithalltheeldersofIsraeltoeatbreadwithMoses‘father-in-lawinthepresenceofGod.摩西的岳父叶 查看详情

10月15日星期六--出埃及记exodus18:26

2016年10月15日星期六--出埃及记Exodus18:26Theyservedasjudgesforthepeopleatalltimes.ThedifficultcasestheybroughttoMoses,butthesimpleonestheydecidedthemselves.他们随时审判百姓,有难断的案件就呈到摩西那里,但各样小事他们自己审判。 查看详情

10月5日星期三--出埃及记exodus18:16

2016年10月5日星期三--出埃及记Exodus18:16Whenevertheyhaveadispute,itisbroughttome,andIdecidebetweenthepartiesandinformthemofGod‘sdecreesandlaws."他们有事的时候就到我这里来,我便在两造之间施行审判,我又叫他们知道 神的律例和法度。 查看详情

10月2日星期日--出埃及记exodus18:13

2016年10月2日星期日--出埃及记Exodus18:13ThenextdayMosestookhisseattoserveasjudgeforthepeople,andtheystoodaroundhimfrommorningtillevening.第二天,摩西坐着审判百姓,百姓从早到晚都站在摩西的左右。 查看详情

10月14日星期五--出埃及记exodus18:25

2016年10月14日星期五--出埃及记Exodus18:25HechosecapablemenfromallIsraelandmadethemleadersofthepeople,officialsoverthousands,hundreds,fiftiesandtens.摩西从以色列人中拣选了有才能的人,立他们为百姓的首领,作千夫长,百夫长,五十夫长,十夫长。 查看详情

10月8日星期六--出埃及记exodus18:19

2016年10月8日星期六--出埃及记Exodus18:19ListennowtomeandIwillgiveyousomeadvice,andmayGodbewithyou.Youmustbethepeople‘srepresentativebeforeGodandbringtheirdisputestohim.现在你要听我的话。我为你出个主意,愿 神与你同在。你要替百姓到 神面前,将案件奏... 查看详情

9月29日星期四--出埃及记exodus18:10

2016年9月29日星期四--出埃及记Exodus18:10Hesaid,"PraisebetotheLORD,whorescuedyoufromthehandoftheEgyptiansandofPharaoh,andwhorescuedthepeoplefromthehandoftheEgyptians.叶忒罗说,耶和华是应当称颂的,他救了你们脱离埃及人和法老的手,将这百姓从埃及人的手... 查看详情

学习笔记(10月18日)--pycharm基本使用方法

一周三次课(10月18日)1.     学会通过pycharm给python程序传递参数设置python的传递参数:【Run】->【EditConfigurations】->【Scriptparameters】->按顺序写上需要的参数2.     Pycharm常用快捷键总结... 查看详情

你如何以这种格式显示日期? “2018 年 7 月 18 日上午 10:02”

】你如何以这种格式显示日期?“2018年7月18日上午10:02”【英文标题】:Howdoyoudisplaydateinthisformat?"Jul18,2018at10:02AM"【发布时间】:2018-07-3022:28:29【问题描述】:letdateFormatter=DateFormatter()dateFormatter.locale=Locale(identifier:"UTC")date... 查看详情

7月18日

#while条件:#循环体的代码1#循环体的代码2#循环体的代码3#count=0#whilecount<10:#print(count)#count+=1#whileTrue:#死循环#print(‘ok‘)#while1:#死循环#print(‘ok‘)#break:跳出本层循环#count=0#whilecount<10:#ifcount==5:#break#print(coun 查看详情

10月18日cf

f**k写完前两题睡觉去了。   A.BuyaShovel题意:给定两个数k,r表示一个铲子卖k元,现在你手上有无数个十元钱和一张r元的钱,问最少买几个铲子能让你用掉这张r元钱,或不用这张钱。题解:“灭顶之灾”这不就是一道... 查看详情

一周第三次课(10月18日)

1.9使用putty远程连接linux在官方网站或百度下载putty软件。putyy设置如图:650)this.width=650;"src="http://note.youdao.com/yws/res/972/951DA179CD564B9A97605660ACDE22A5"/>650)this.width=650;"src="http://note.youdao.com/yws/res/97 查看详情

每周例行报告

...间delta时间立会汇报昨天的成绩,分配任务,部署计划10月27日18:0010月27日18:36036分钟准备工作查阅有关资料,学习C#10月27日29:2319月27日20:45577分钟立会汇报工作,每个人对自己实现的功能进行讲解10月28日14:3010月28日15:1204... 查看详情