【OJ比赛日历】快周末了,不来一场比赛吗? #09.16-09.22 #12场

本文提供了2023年9月期间多个在线编程比赛的时间、平台和链接,包括ACM和IOI赛制,适合竞赛爱好者关注。

CompHub[1] 实时聚合多平台的数据类(Kaggle、天池…)和OJ类(Leetcode、牛客…)比赛。本账号会推送最新的比赛消息,欢迎关注!


以下信息仅供参考,以比赛官网为准

目录

2023-09-16(周六) #3场比赛

第 121 场周赛
🖥 AcWing · ⚖️ ACM赛制
🥳 19:00开始 · ⏳ 时长1h 15min
https://www.acwing.com/activity/content/3469/


Toyota Programming Contest 2023#5(AtCoder Beginner Contest 320)
🖥 AtCoder · ⚖️ ACM赛制
🥳 20:00开始 · ⏳ 时长1h 40min
https://atcoder.jp/contests/abc320


第 113 场双周赛
🖥 Leetcode · ⚖️ ACM赛制
🥳 22:30开始 · ⏳ 时长1h 30min
https://leetcode.cn/contest/biweekly-contest-113


2023-09-17(周日) #3场比赛

第 363 场周赛
🖥 Leetcode · ⚖️ ACM赛制
🥳 10:30开始 · ⏳ 时长1h 30min
https://leetcode.cn/contest/weekly-contest-363


牛客周赛 Round 12
🖥 牛客(Nowcoder) · ⚖️ IOI赛制
🥳 19:00开始 · ⏳ 时长1h 30min
#牛客系列赛
https://ac.nowcoder.com/acm/contest/65051


AtCoder Regular Contest 165
🖥 AtCoder · ⚖️ ACM赛制
🥳 20:00开始 · ⏳ 时长2h
https://atcoder.jp/contests/arc165


2023-09-18(周一) #2场比赛

Codeforces Round (Div. 2)
🖥 Codeforces · ⚖️ ACM赛制
🥳 22:35开始 · ⏳ 时长2h
https://codeforces.com/contests?complete=true


CodeTON Round 6 (Div. 1 + Div. 2, Rated, Prizes!)
🖥 Codeforces · ⚖️ ACM赛制
🥳 22:35开始 · ⏳ 时长2h
https://codeforces.com/contestRegistration/1870


2023-09-19(周二) #无比赛

2023-09-20(周三) #2场比赛

Starters 108
🖥 Codechef · ⚖️ IOI赛制
🥳 22:30开始 · ⏳ 时长2h
https://www.codechef.com/START108


Starters 101
🖥 Codechef · ⚖️ IOI赛制
🥳 22:30开始 · ⏳ 时长2h
https://www.codechef.com/START101


2023-09-21(周四) #1场比赛

Codeforces Round 898 (Div. 4)
🖥 Codeforces · ⚖️ ACM赛制
🥳 22:35开始 · ⏳ 时长2h 30min
https://codeforces.com/contests?complete=true


2023-09-22(周五) #1场比赛

牛客练习赛116
🖥 牛客(Nowcoder) · ⚖️ ACM赛制
🥳 19:00开始 · ⏳ 时长2h 30min
#牛客系列赛 #牛客练习赛
https://ac.nowcoder.com/acm/contest/65259


参考资料

[1] 

CompHub: https://comphub.notion.site/CompHub-c353e310c8f84846ace87a13221637e8

odrefresh: ART APEX version 360910040 02-20 04:37:24.288055 1660 1660 I odrefresh: Updated ART APEX mounted 02-20 04:37:24.288543 1660 1660 I odrefresh: APEX (com.android.art) version code mismatch (before: 360729160, now: 360910040) 02-20 04:37:24.288611 1660 1660 I odrefresh: Checking boot images /data (arm64) 02-20 04:37:24.378279 1660 1660 I odrefresh: Compiling boot classpath (arm64, primary): /apex/com.android.art/bin/dex2oat64 --android-root=out/empty --no-abort-on-hard-verifier-error --no-abort-on-soft-verifier-error --compilation-reason=boot --image-format=lz4 --force-determinism --resolve-startup-const-strings=true --avoid-storing-invocation --generate-mini-debug-info --strip --instruction-set=arm64 --instruction-set-features=default --instruction-set-variant=kryo300 --cache-info-fd=9 --dex-file=/apex/com.android.art/javalib/core-oj.jar --dex-fd=10 --dex-file=/apex/com.android.art/javalib/core-libart.jar --dex-fd=11 --dex-file=/apex/com.android.art/javalib/okhttp.jar --dex-fd=12 --dex-file=/apex/com.android.art/javalib/bouncycastle.jar --dex-fd=13 --dex-file=/apex/com.android.art/javalib/apache-xml.jar --dex-fd=14 --dex-file=/system/framework/framework.jar --dex-fd=15 --dex-file=/system/framework/framework-graphics.jar --dex-fd=16 --dex-file=/system/framework/framework-location.jar --dex-fd=17 --dex-file=/system/framework/ext.jar --dex-fd=18 --dex-file=/system/framework/telephony-common.jar --dex-fd=19 --dex-file=/system/framework/voip-common.jar --dex-fd=20 --dex-file=/system/framework/ims-common.jar --dex-fd=21 --dex-file=/system/framework/framework-ondeviceintelligence-platform.jar --dex-fd=22 --dex-file=/system/framework/framework-nfc.jar --dex-fd=23 --dex-file=/system/framework/tcmiface.jar --dex-fd=24 --dex-file=/system/framework/qcom.fmradio.jar --dex-fd=25 --dex-file=/system/framework/QPerformance.jar --dex-fd=26 --dex-file=/system/framework/UxPerformance.jar --dex-fd=27 --dex-file=/system/framework/WfdCommon.jar --dex-fd=28 --dex-file=/system/framework/oplus-framework.jar --dex-fd=29 --dex-file=/system/framework/subsystem-framework.jar --dex-fd=30 --dex-file=/apex/com.android.i18n/javalib/core-icu4j.jar --dex-fd=31 --runtime-arg -Xbootclasspath:/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/framework-location.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/framework-ondeviceintelligence-platform.jar:/system/framework/framework-nfc.jar:/system/framework/tcmiface.jar:/system/framework/qcom.fmradio.jar:/system/framework/QPerformance.jar:/system/framework/UxPerformance.jar:/system/framework/WfdCommon.jar:/system/framework/oplus-framework.jar:/system/framework/subsystem-framework.jar:/apex/com.android.i18n/javalib/core-icu4j.jar --runtime-arg -Xbootclasspathfds:-1:-1:-1:-1:-1:32:33:34:35:36:37:38:39:40:41:42:43:44:45:46:47:-1 --image-fd=48 --oat-fd=49 --output-vdex-fd=50 --single-image --profile-file-fd=4 --profile-file-fd=5 --compiler-filter=speed-profile --base=0x70000000 --dirty-image-objects-fd=6 --dirty-image-objects-fd=7 --preloaded-classes-fds=8 --oat-location=/data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat --runtime-arg -Xms64m --runtime-arg -Xmx64m [timeout 120s] 02-20 04:37:24.422362 1661 1661 I dex2oat64: /apex/com.android.art/bin/dex2oat64 --android-root=out/empty --no-abort-on-hard-verifier-error --no-abort-on-soft-verifier-error --compilation-reason=boot --image-format=lz4 --force-determinism --resolve-startup-const-strings=true --avoid-storing-invocation --generate-mini-debug-info --strip --instruction-set=arm64 --instruction-set-features=default --instruction-set-variant=kryo300 --cache-info-fd=9 --dex-file=/apex/com.android.art/javalib/core-oj.jar --dex-fd=10 --dex-file=/apex/com.android.art/javalib/core-libart.jar --dex-fd=11 --dex-file=/apex/com.android.art/javalib/okhttp.jar --dex-fd=12 --dex-file=/apex/com.android.art/javalib/bouncycastle.jar --dex-fd=13 --dex-file=/apex/com.android.art/javalib/apache-xml.jar --dex-fd=14 --dex-file=/system/framework/framework.jar --dex-fd=15 --dex-file=/system/framework/framework-graphics.jar --dex-fd=16 --dex-file=/system/framework/framework-location.jar --dex-fd=17 --dex-file=/system/framework/ext.jar --dex-fd=18 --dex-file=/system/framework/telephony-common.jar --dex-fd=19 --dex-file=/system/framework/voip-common.jar --dex-fd=20 --dex-file=/system/framework/ims-common.jar --dex-fd=21 --dex-file=/system/framework/framework-ondeviceintelligence-platform.jar --dex-fd=22 --dex-file=/system/framework/framework-nfc.jar --dex-fd=23 --dex-file=/system/framework/tcmiface.jar --dex-fd=24 --dex-file=/system/framework/qcom.fmradio.jar --dex-fd=25 --dex-file=/system/framework/QPerformance.jar --dex-fd=26 --dex-file=/system/framework/UxPerformance.jar --dex-fd=27 --dex-file=/system/framework/WfdCommon.jar --dex-fd=28 --dex-file=/system/framework/oplus-framework.jar --dex-fd=29 --dex-file=/system/framework/subsystem-framework.jar --dex-fd=30 --dex-file=/apex/com.android.i18n/javalib/core-icu4j.jar --dex-fd=31 --runtime-arg -Xbootclasspath:/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/framework-location.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/framework-ondeviceintelligence-platform.jar:/system/framework/framework-nfc.jar:/system/framework/tcmiface.jar:/system/framework/qcom.fmradio.jar:/system/framework/QPerformance.jar:/system/framework/UxPerformance.jar:/system/framework/WfdCommon.jar:/system/framework/oplus-framework.jar:/system/framework/subsystem-framework.jar:/apex/com.android.i18n/javalib/core-icu4j.jar --runtime-arg -Xbootclasspathfds:-1:-1:-1:-1:-1:32:33:34:35:36:37:38:39:40:41:42:43:44:45:46:47:-1 --image-fd=48 --oat-fd=49 --output-vdex-fd=50 --single-image --profile-file-fd=4 --profile-file-fd=5 --compiler-filter=speed-profile --base=0x70000000 --dirty-image-objects-fd=6 --dirty-image-objects-fd=7 --preloaded-classes-fds=8 --oat-location=/data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat --runtime-arg -Xms64m --runtime-arg -Xmx64m 02-20 04:37:24.441691 1661 1661 I dex2oat64: setting boot class path to /apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/framework-location.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/framework-ondeviceintelligence-platform.jar:/system/framework/framework-nfc.jar:/system/framework/tcmiface.jar:/system/framework/qcom.fmradio.jar:/system/framework/QPerformance.jar:/system/framework/UxPerformance.jar:/system/framework/WfdCommon.jar:/system/framework/oplus-framework.jar:/system/framework/subsystem-framework.jar:/apex/com.android.i18n/javalib/core-icu4j.jar 02-20 04:37:24.928504 1661 1661 I dex2oat64: Using CollectorTypeCMC GC. 壮哥是什么为什么一开机就进行dex2oat
11-11
<think>我们正在分析开机时立即进行dex2oat操作的原因,特别是结合odrefresh和dex2oat64日志信息。 根据Android系统的工作机制,开机时进行dex2oat操作通常是由于以下原因之一: 1. 系统检测到有应用(包括系统应用或预置应用)的ART优化文件(.oat/.odex文件)缺失、过期或无效。 2. 系统升级或首次启动后,需要重新优化系统应用。 3. 设备启动时,系统服务(如PackageManagerService)扫描应用目录,发现新的或需要优化的应用。 具体到odrefresh和dex2oat64: - odrefresh是ART模块的一部分,负责在系统启动时检查并更新启动类路径(boot classpath)的ART优化文件(如系统框架的dex文件)。 - dex2oat64则是将dex文件编译为oat文件的工具。 根据日志信息,我们可以推测开机就进行dex2oat操作的原因可能是: a) 系统检测到启动类路径(如/system/framework下的jar包)的编译产物缺失或无效(例如,版本不匹配、文件损坏等),触发odrefresh重新生成。 b) 设备启动时,系统扫描/data/app目录下的非系统应用,发现某些应用需要重新编译(例如,应用更新后未优化)。 但是,由于用户特别提到了odrefresh和dex2oat64日志,我们应重点关注系统框架部分的编译。 常见的触发odrefresh重新编译的原因包括: 1. ART升级:系统OTA后,ART编译器版本变化,需要重新编译系统框架。 2. 预编译文件损坏或丢失。 3. 系统启动参数改变(如分辨率、语言等),导致需要重新生成映像。 4. 启动类路径发生变化(如系统更新了framework下的jar包)。 因此,结合日志,我们可以这样解释: 在开机过程中,odrefresh程序被调用,它检查现有的启动类路径的编译输出(通常位于/dalvik-cache目录下)是否有效。如果检查失败(例如,编译输出不存在或与当前的系统环境不匹配),则会触发重新编译。 具体步骤: 1. odrefresh读取当前启动类路径(由环境变量BOOTCLASSPATH指定)中的jar文件。 2. 检查这些jar文件对应的预编译文件(在dalvik-cache目录下)是否存在,并且是否与当前的ART版本、设备架构(如arm64-v8a)等匹配。 3. 如果不匹配,则调用dex2oat64工具重新编译这些jar文件,生成新的oat文件。 这个过程在开机时进行,会导致启动时间变长。 为了更具体地解释,我们可以假设日志中出现了以下关键信息(根据常见的odrefresh日志): - “Compilation needed” -> 表示需要编译 - “Stale artifact” -> 表示预编译产物过期 - “Missing artifact” -> 预编译产物丢失 - “Executing dex2oat” -> 正在执行dex2oat命令 因此,如果日志中出现了上述信息,就说明odrefresh检测到启动类路径的编译产物不可用,因此触发重新编译。 另外,对于非系统应用,如果应用安装后没有进行dex优化(例如,在首次启动时安装的系统应用或用户应用),系统也会在开机扫描时触发dex2oat操作。但这个过程通常由PackageManagerService控制,而不是odrefresh。 总结开机就进行dex2oat操作的原因: - 系统启动类路径(framework等)的编译产物需要更新(由odrefresh触发)。 - 非系统应用需要优化(由PackageManagerService触发)。 由于问题中提到了odrefresh和dex2oat64,我们重点解释odrefresh部分。 因此,回答可以组织如下: --- 根据提供的`odrefresh`和`dex2oat64`日志信息,开机立即进行dex2oat操作的主要原因如下: ### 1. **系统启动类路径需要重新优化** Android系统启动时,`odrefresh`程序会检查系统框架(位于`BOOTCLASSPATH`)的ART优化文件(如`.oat`或`.odex`文件)是否有效。如果检测到以下情况之一,将触发`dex2oat64`重新编译[^1]: - **预编译产物缺失**:设备首次启动、系统升级或缓存清除后,`/data/dalvik-cache`目录下的优化文件不存在。 - **版本不匹配**:当前ART编译器版本与生成预编译文件的版本不一致(例如系统OTA更新后ART模块升级)。 - **配置更改**:系统语言、分辨率等环境参数变化导致现有优化文件失效。 - **文件损坏**:预编译文件无法通过完整性校验。 在日志中,如果出现以下关键字,即可确认此原因: ```log I/odrefresh: Compilation needed for the following reason(s): ... I/odrefresh: Generating new artifacts... I/odrefresh: Executing dex2oat: ... ``` ### 2. **非系统应用需要优化** 系统服务`PackageManagerService`在开机扫描应用时会检查: - 新安装的非系统应用(位于`/data/app`)尚未进行ART优化。 - 已优化应用的编译产物与当前系统环境不兼容(如系统升级后ABI变更)。 此过程会触发单独的`dex2oat`进程,日志通常包含: ```log I/dex2oat: Compiling ... package=com.example.app ``` ### 3. **日志分析示例** 假设日志片段如下: ```log I/odrefresh: Artifacts for boot classpath are invalid. Reason: Missing primary boot image I/odrefresh: Generating new boot image profile... I/odrefresh: Calling dex2oat: ... --dex-file=/system/framework/framework.jar ... ``` 这表明启动类路径的核心文件(`framework.jar`)优化缺失,导致`odrefresh`主动调用`dex2oat64`重新编译。 ### 根本原因解决建议 若需避免开机dex2oat耗时: - **系统开发者**:确保设备出厂时预置有效的ART优化文件。 - **普通用户**:避免频繁清除dalvik缓存或非正常关机(可能损坏缓存文件)。 §§相关问题§§ 1. 如何通过系统配置减少开机dex2oat耗时? 2. odrefresh在Android启动流程中的具体调用时机是什么? 3. 系统升级后ART优化文件的管理机制是怎样的? 4. 如何手动触发或取消dex2oat操作? [^1]: Android源码: `art/odrefresh/odrefresh.cc` </think>根据 `odrefresh` 和 `dex2oat64` 日志信息,开机立即触发 dex2oat 操作的核心原因是 **ART 优化文件缺失或失效**,导致系统必须在启动时重新编译关键组件。以下是具体分析: --- ### 一、根本原因:ART 优化文件状态异常 Android 系统在启动时通过 `odrefresh` 检查核心组件的 ART 优化文件(如 `.oat`、`.vdex` 文件),日志中通常出现以下关键提示: ```log I/odrefresh: Artifacts for boot classpath are invalid. Reason: Missing primary boot image I/odrefresh: Generating new boot image profile... ``` 这表明: 1. **启动类路径优化文件缺失** `/system/framework` 下的核心框架(如 `framework.jar`、`core-oj.jar`)未生成有效的 ART 优化文件。 2. **版本不匹配** 系统升级后,原有优化文件与当前 ART 编译器版本不一致(日志中常见 `Stale artifact` 提示)。 3. **文件损坏或完整性校验失败** 优化文件被意外删除、磁盘损坏或签名校验失败(日志中可能出现 `Integrity check failed`)。 --- ### 二、触发 dex2oat 的操作路径 #### 步骤 1:`odrefresh` 检测异常(关键日志) ```log I/odrefresh: Compilation needed for the following reason(s): - Missing boot image - Incompatible compiler filter ``` `odrefresh` 会检查以下目录的优化文件状态: $$ \text{优化文件路径} = \begin{cases} \text{系统框架:} & \texttt{/system/framework/*.jar} \\ \text{启动类路径:} & \texttt{/data/dalvik-cache/\$ARCH/*.oat} \\ \text{预编译配置:} & \texttt{/etc/art-config} \end{cases} $$ #### 步骤 2:调用 `dex2oat64` 重新编译(日志示例) ```log I/dex2oat64: Generating oat files for: [/system/framework/framework.jar] D/dex2oat64: CompilerFilter=kSpeed, TargetArch=arm64 ``` 编译过程涉及: - **输入**:原始 DEX 文件(如 `framework.jar`) - **输出**:优化的 OAT 文件(如 `/data/dalvik-cache/arm64/system@framework@framework.jar@classes.oat`) --- ### 三、深度分析日志线索 结合典型日志信息,可定位具体问题: | **日志关键词** | **含义** | **触发原因** | |----------------|----------|-------------| | `Missing artifact` | 优化文件缺失 | 首次开机、恢复出厂设置、手动删除缓存 | | `Stale version` | 版本过期 | 系统 OTA 升级后 ART 编译器更新 | | `Integrity failure` | 文件损坏 | 非正常关机、磁盘错误 | | `Incompatible ABI` | ABI 不匹配 | 系统架构变更(如 arm → arm64) | --- ### 四、优化建议 1. **系统开发者** - 预置有效的 ART 优化文件到出厂镜像(减少首次编译)。 - 确保 OTA 包包含匹配的编译器版本。 2. **普通用户** - 避免频繁清除 `/data/dalvik-cache` 目录。 - 减少非正常关机操作(防止文件损坏)。 --- ### 五、技术原理图 ```mermaid graph LR A[系统启动] --> B{odrefresh 检测} B -->|优化文件有效| C[正常启动] B -->|优化文件异常| D[调用 dex2oat64] D --> E[编译系统框架] E --> F[生成 oat/vdex 文件] F --> G[完成启动] ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值