10月18日cf

author author     2022-08-09     328

关键词:

f**k写完前两题睡觉去了。

 

技术分享

 

 

A. Buy a Shovel

题意:给定两个数k,r表示一个铲子卖k元,现在你手上有无数个十元钱和一张r元的钱,问最少买几个铲子能让你用掉这张r元钱,或不用这张钱。

题解:“灭顶之灾” 这不就是一道思博题吗。。不说题解了

技术分享
 1 #include <iostream>
 2 #include <stdio.h>
 3 using namespace std;
 4 int main()
 5 {
 6     int k,r,i=1;
 7     cin>>k>>r;
 8     while(1)
 9       {
10           long long faq=i*k;
11           if (faq%10==r || faq%10==0) break;
12           else i++;
13       }
14     cout<<i;
15     return 0;
16 }
A

B. Cormen — The Best Friend Of a Man

题意:给你n个数和一个k,n表示天数,相邻的两个数之和至少要k,问你最少要在原序列增加多少,使得满足每两个相邻的数的和至少要k,并输出序列。

题解:还不是思博题,随便做一下。。

技术分享
 1 #include <iostream>
 2 #include <stdio.h>
 3 using namespace std;
 4 int a[233333];
 5 int main()
 6 {
 7     int n,k,i;
 8     scanf("%d%d",&n,&k);
 9     for (i=1;i<=n;i++)
10       scanf("%d",&a[i]);
11     if (n==1)
12       {
13         if (a[1]<k) cout<<k-a[1]<<endl<<k;
14         else cout<<0<<endl<<a[1];
15         return 0;
16       }
17     if (n==2)
18       {
19           if (a[1]+a[2]>=k)
20             cout<<0<<endl<<a[1]<<" "<<a[2];
21           else
22             cout<<k-a[1]-a[2]<<endl<<k-a[2]<<" "<<a[2];
23           return 0;
24       }
25     long long ans=0;
26     for (i=2;i<=n;i++)
27       {
28         if (a[i]+a[i-1]<k)
29           ans+=(k-a[i-1])-a[i],a[i]+=(k-a[i-1])-a[i];
30       }
31     cout<<ans<<endl;
32     for (i=1;i<=n;i++)
33       cout<<a[i]<<" ";
34     return 0;
35 }
B

C. Sanatorium

题意:告诉你吃了几次的早餐,午餐,晚餐,你可以在某天的早餐前,午餐前,晚餐前,晚餐后来,在某天的早餐前,午餐前,晚餐前或晚餐后走。问你最少会错过几次的吃饭。

题解:啊好细节啊我不会写,睡觉。

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

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

10月18日随笔

1#include<iostream>2#include<algorithm>3#include<cmath>4#include<cstring>5#include<cstdio>6#include<queue>7usingnamespacestd;8typedeflonglongLL;9inlineintread()10{1 查看详情

减肥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日)

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... 查看详情

软件工程第七周psp

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