惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
Y
Y Combinator Blog
博客园 - 三生石上(FineUI控件)
大猫的无限游戏
大猫的无限游戏
Help Net Security
Help Net Security
Security Latest
Security Latest
Recorded Future
Recorded Future
S
Secure Thoughts
P
Privacy International News Feed
L
Lohrmann on Cybersecurity
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Google DeepMind News
Google DeepMind News
L
LINUX DO - 热门话题
T
The Blog of Author Tim Ferriss
T
Threatpost
宝玉的分享
宝玉的分享
PCI Perspectives
PCI Perspectives
V
Vulnerabilities – Threatpost
WordPress大学
WordPress大学
C
CERT Recently Published Vulnerability Notes
GbyAI
GbyAI
S
Schneier on Security
S
Security @ Cisco Blogs
S
Securelist
SecWiki News
SecWiki News
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Jina AI
Jina AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
H
Heimdal Security Blog
D
DataBreaches.Net
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Schneier on Security
Schneier on Security
C
Check Point Blog
D
Docker

Louis C Deng's Blog

CS231n Lecture Note: Generative Models CS231n Lecture Note: Self-Supervised Learning CS231n Lecture Note: Large Scale Distributed Training 自動微分 | DIY 實現自己的 PyTorch From RNNs to Transformers CS231n Lecture Note VII: Recurrent Neural Networks Uncovering Batch & Layer Normalization CS231n Lecture Note VI: CNN Architectures and Training CS231n Lecture Note V: Convolution Neural Networks Basics Demystifying Softmax Loss: A Step-by-Step Derivation for Linear Classifiers Backpropagation: A Vector Calculus Perspective CS231n Lecture Note IV: Neural Networks and Backpropagation CS231n Lecture Note III: Optimization CS231n Lecture Note II: Linear Classifiers CS231n Lecture Note I: Image Classification CSAPP Cache Lab II: Optimizing Matrix Transposition CSAPP Cache Lab I: Let's simulate a cache memory! CS188 Search Lecture Notes III CS188 Search Lecture Notes II How to Use TouchID for Sudo Commands on macOS CS188 Search Lecture Notes I RECAP2025: 留白 CSAPP Bomb Lab 解析 x64 暫存器速查表 CSAPP Data Lab 解析 矩陣的 Modified Gram Schmidt 方法 聊一聊位掩碼(Bit Mask) 整數溢位與未定義行為 快速排序 幾種劃分方法討論 等待 記夢(DeepSeek 輔助創作) 午夜飛行 橋樑 黎明 或 2012 RECAP2024: 水檻臥聽雨 太陽、潮落 RECAP2023: 泡沫 題解 P1622 釋放囚犯 題解 P5888 傳球遊戲 殘陽似火 再會 飢餓藝術家 卡夫卡 Python 中的 zip() 和 enumerate() 泡沫 “救救孩子……”——談魯迅和《狂人日記》 想念 淺灘 蟬 · 夏 微風 觀星 浮塵 復活 【摘錄 | 轉載】普魯斯特 《追憶似水年華》第一卷 《在斯萬家那邊》(一) Time - Pink Floyd - The Dark Side of the Moon 【轉載】靜夜思變調 高樓 幻夢 冰 RECAP2022: 流星雨 清夜 割點 Tarjan 演算法 P3147 USACO16OPEN 262144 P 題解 P3354 Riv 河流 題解 馬拉車演算法 夜雨 層霧 從愚人節玩笑到真的玩笑(bushi): 淺談 lsnotes I made my own Hexo theme 題解 紀念品分組 題解 導彈攔截 如何高效使用搜尋引擎 用 GitHub Actions 格式化 C/C++ 程式碼 四季的天空 題解 最近公共祖先 (LCA) 用簡單的物理方法證明牛頓萊布尼茨公式 簡評榮耀手環6 海上生明月,天涯共此時。 我為什麼重新拿出了 iPod Swift 中的 SharedPreferance —— UserDefaults 凝視那一輪明月 用 GitHub Actions 部署 Hexo 部落格 遲來的日誌 - WWDC 2020 獎學金 vcpkg - 方便的 C/C++ 庫管理器 vimrc 配置指南 NextCloud - DIY NAS 解決方案 sudo shutdown -r now sudo shutdown -r now
洛谷 7 月月賽 Div.2 總結
Louis C Deng · 2021-07-15 · via Louis C Deng's Blog

昨天(7/14)參加了洛谷的 7 月月賽,感覺題目挺新穎的,就是資料有點。。。

比賽連結:這裡

我的程式碼在 這裡

A

乍一看好像沒思路,但是想一想,其實很簡單,就是會有幾種情況:

  1. 0個空格 全是數字的話,需要判斷一下 A. 兩者完全相同 B. 非A,情況 A 是可以輸出 Yes 的。
  2. 1個空格 這一種情況,從原理上分析,“選擇一個有正整數的格子和一個與之相鄰的空格子,將正整數移到那個空格子中”,可以得出,其實只要順時針轉一圈,初始和最終狀態順序相同,就符合條件。所以,只需要做三次判斷即可,簡單粗暴(在座的各位大佬要是有高階方法可以通知一下🙇)。
  3. 2、3、4個空格 這幾個情況,經過分析會發現,不管如何,都是滿足條件的。

所以,這樣分析下來,很簡單就 AC 了,拿到 100 分!

B

這道題。。。無語了。。。測試資料透過了,結果測評資料每次都卡一個,萬惡的捆綁測試。。。最後得不了 100 分了。。。

這道題最開始想的是貪心演算法,排序,但是會超時,就改了一下:開兩個陣列,不管順序,只管符號,放進去。這樣做基本上不超過 10ms。

原理就是,計算 +正數 +負數 *正數 *負數 出現的個數,進行排列,最後計算結果。

C

因為學業原因,離開了幾個小時,回來了之後都沒時間做了。。。有點思路,但沒寫完。。。

其實,可以根據數第一次出現的位置判斷從左、右數的位置,最後進行排列即可。

D

看了一眼就懶得寫。

小結

等題解吧!感覺題目很有意思,都是些需要仔細思考的題目。(奈何我太弱了。。。太弱小了!!!