• 2024-06-20基于Python中的tkinter和pygame库创建一个简单音乐播放器
    importosimporttimeimporttkinterastkfromtkinterimportfiledialog,messagebox,ttkimportpygameimportmutagen.mp3#用于获取MP3文件时长classMusicPlayer:def__init__(self,root):pygame.init()self.root=rootsel
  • 2024-04-01G. Shuffling Songs
    G.ShufflingSongsVladislavhasaplaylistconsistingof$n$songs,numberedfrom$1$to$n$.Song$i$hasgenre$g_i$andwriter$w_i$.Hewantstomakeaplaylistinsuchawaythateverypairofadjacentsongseitherhavethesamewriterorarefromt
  • 2024-03-06ABC323E Playlist 题解
    考虑第\(i\)时刻时,第\(j\)首歌刚好结束与第\(i-j\)时刻有关,因此设\(dp_{i,j}\)表示第\(i\)时刻第\(j\)首歌刚好结束的概率,那么\(dp\)转移方程为:\[dp_{i,j}=\sum\limits_{k=1}^ndp_{i-t_j,k}\]很容易想到记录\(\sum\limits_{j=1}^ndp_{i,j}\)的值为\(sum_i\),
  • 2023-11-04linux - 命令行下的播放器cmus
    cmu是一款运行在命令行终端的音乐播放器,具有和vim类似的操作模式1.安装cmus安装sudoaptinstallcmus启动cmus2.播放控制x播放或重播c暂停b下一首z上一首.快进60s,快退60sp选中曲目向下移动P选中曲目向上移动D移除曲目q退出程序3.循环模式s
  • 2023-06-12Codeforces Round #375 (Div. 2)-C. Polycarp at the Radio
    原题链接C.PolycarpattheRadiotimelimitpertestmemorylimitpertestinputoutputa1, a2, ..., an,where ai isaband,whichperformsthe i-thsong.Polycarplikesbandswiththenumbersfrom 1 to 
  • 2023-04-22【m3u8】python使用m3u8库下载视频
    1、m3u8库https://pypi.org/project/m3u8/ 2、安装pipinstallm3u8  3、使用importtimefromCrypto.Util.PaddingimportpadfromCrypto.CipherimportAESimportrequestsimportm3u8headers={"User-Agent":"Mozilla/5.0(WindowsNT10.
  • 2023-01-03osx安装mpd和ncmpcpp
    简介mdp是一款开源的音乐播放软件,全名为mediaplayerdaemon,从字面意思理解,就是一个后台播放进程.不同于传统的音乐播放软件集成了播放解码和界面,mpd只是一
  • 2022-11-21 Playlist for Polycarp (hard version)
    本题显然只需要知道\(typ=1/2/3\)的歌的数量分别为什么就可以求出答案了。先随便求一下\(f_{i,j,k}\)表示取\(i\)个\(1\),\(j\)个\(2\),\(k\)个\(3\)的贡献
  • 2022-10-17vue3中的defineProps,watch,computed
    在vue3的setup语法糖中,defineProps不需要引入了<scriptsetup>import{computed}from'@vue/reactivity';import{onMounted,watch}from'vue';letprops=de