整理了一下SMT32标准外设库进行IAP升级的官方demo: 标准库版本 STM32F10xxx in-application programming using the USART (AN2557) STM32F2xx in-application programming using the USART (AN3374) STM32F4 in-application programming (IAP) using the USART (AN3965) STM32L1xx in-applicat
直接抄ppt好了--来自lyd 注意只用对根判断是否哟留下儿子 #include<iostream> #include<cstdio> using namespace std; const int N=100005; long long n,ans,h[N],cnt,fa[N],dis[N],d1,d2,l1,l2,c1,at[N],bt[N],a[N],b[N],tota,totb,nw,tmp,g[N]; bool del[N]; struct qwe { long long