diff --git a/.github/rank.py b/.github/rank.py index 253cf9f..3d27253 100644 --- a/.github/rank.py +++ b/.github/rank.py @@ -1,4 +1,4 @@ -from scoring import file_score, best_file_score +from scoring import file_score, best_file_score, filter_ext from pathlib import Path if __name__ == '__main__': @@ -11,7 +11,7 @@ if player.stem.startswith('.'): continue - result = best_file_score([x for x in player.glob('**/*') if x.is_file()]) + result = best_file_score([x for x in player.glob('**/*') if x.is_file() and not x.suffix in filter_ext]) if result: path, score = result score_list.append((player.stem, path, score)) diff --git a/.github/scoring.py b/.github/scoring.py index 56b4d31..53a1760 100644 --- a/.github/scoring.py +++ b/.github/scoring.py @@ -3,6 +3,9 @@ import pathlib +filter_ext = [".md", ".txt", ".png", ".jpg", ".gif", ".bmp"] + + def file_score(path: pathlib.Path) -> typing.Optional[typing.Tuple[int, int, int]]: """Return the score of a file based on its length and number of used characters.""" @@ -68,5 +71,5 @@ def best_file_score(path_list: typing.List[pathlib.Path]) -> typing.Optional[typ print('Usage: python scoring.py ') exit() - paths = [pathlib.Path(arg) for arg in sys.argv[1:]] + paths = [pathlib.Path(arg) for arg in sys.argv[1:] if not pathlib.Path(arg).suffix in filter_ext] best_file_score(paths) diff --git a/.github/workflows/auto_rank.yml b/.github/workflows/auto_rank.yml index 1859a56..01f22c4 100644 --- a/.github/workflows/auto_rank.yml +++ b/.github/workflows/auto_rank.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: jobs: - build: + rank: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/Cherry-mma/main.wl b/Cherry-mma/main.wl new file mode 100644 index 0000000..d472296 --- /dev/null +++ b/Cherry-mma/main.wl @@ -0,0 +1 @@ +Range[9^9] \ No newline at end of file diff --git "a/Cherry-mma/\346\210\252\345\233\276.jpg" "b/Cherry-mma/\346\210\252\345\233\276.jpg" new file mode 100644 index 0000000..faca07f Binary files /dev/null and "b/Cherry-mma/\346\210\252\345\233\276.jpg" differ diff --git a/Cherry/main.c b/Cherry/main.c new file mode 100644 index 0000000..8838162 --- /dev/null +++ b/Cherry/main.c @@ -0,0 +1 @@ +main(){while(1)malloc(9);} diff --git "a/Cherry/\346\210\252\345\233\276.png" "b/Cherry/\346\210\252\345\233\276.png" new file mode 100644 index 0000000..da665a7 Binary files /dev/null and "b/Cherry/\346\210\252\345\233\276.png" differ diff --git a/HisAtri/oom.png b/HisAtri/oom.png new file mode 100644 index 0000000..8f8b5bf Binary files /dev/null and b/HisAtri/oom.png differ diff --git a/Moeweb647252/IMG_20240209_220214.jpg b/Moeweb647252/IMG_20240209_220214.jpg new file mode 100644 index 0000000..06c897d Binary files /dev/null and b/Moeweb647252/IMG_20240209_220214.jpg differ diff --git a/Moeweb647252/Screenshot_20240209_220554.png b/Moeweb647252/Screenshot_20240209_220554.png new file mode 100644 index 0000000..8d54504 Binary files /dev/null and b/Moeweb647252/Screenshot_20240209_220554.png differ diff --git a/Moeweb647252/oom.bat b/Moeweb647252/oom.bat new file mode 100644 index 0000000..36b9269 --- /dev/null +++ b/Moeweb647252/oom.bat @@ -0,0 +1 @@ +%0|%0 diff --git a/Moeweb647252/readme.md b/Moeweb647252/readme.md new file mode 100644 index 0000000..480dc09 --- /dev/null +++ b/Moeweb647252/readme.md @@ -0,0 +1 @@ +fork炸弹,理论上能占满内存 diff --git a/Ns2Kracy/main.go b/Ns2Kracy/main.go new file mode 100644 index 0000000..24318a2 --- /dev/null +++ b/Ns2Kracy/main.go @@ -0,0 +1 @@ +package main;func main(){for{_=make([]byte,1<<32)}} diff --git a/Ns2Kracy/oom.png b/Ns2Kracy/oom.png new file mode 100644 index 0000000..9977496 Binary files /dev/null and b/Ns2Kracy/oom.png differ diff --git a/Ns2Kracy/oom2.png b/Ns2Kracy/oom2.png new file mode 100644 index 0000000..37afd2c Binary files /dev/null and b/Ns2Kracy/oom2.png differ diff --git a/README.md b/README.md index 886b418..7f7ec22 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ ## 比赛规则 - 使用最短的代码占满内存!考虑大家设备各不相同,为方便比赛计量,实际占用 4G 及以上的内存即可 +- 要求在不使用断点等调试手段的情况下,使用 任务管理器 / htop / top 等第三方主流工具 **截图** 并上传 + 即要占用一定的时间,申请内存后立刻进程结束这种无法截图的不行 - 计分规则为:代码字符数量 乘 字符种类。最小者获胜! - 对于类似 Matlab 等解释器本身占用极大的语言,实际占用需减去解释器本身占用 - 不准联网;不准通过环境变量、文件名、编译参数等耍赖;不准使用专门为本次比赛设计的编程语言、操作系统、API 等。总之不准卡 bug,主办方享有比赛规则解释权( @@ -22,15 +24,27 @@ | Rank | Player | File | Length | Category | Score | | ---- | ------ | ---- | ------ | -------- | ----- | -| 1 | [wanz](wanz) | [oom.py](wanz/oom.py) | 9 | 3 | 27 | -| 2 | [dragove](dragove) | [oom.py](dragove/oom.py) | 9 | 5 | 45 | -| 3 | [HisAtri](HisAtri) | [new.py](HisAtri/new.py) | 10 | 5 | 50 | -| 4 | [mr_cino](mr_cino) | [oom.wo](mr_cino/oom.wo) | 26 | 17 | 442 | +| 1 | [Moeweb647252](Moeweb647252) | [oom.bat](Moeweb647252/oom.bat) | 6 | 4 | 24 | +| 2 | [wanz](wanz) | [oom.py](wanz/oom.py) | 9 | 3 | 27 | +| 3 | [dragove](dragove) | [oom.py](dragove/oom.py) | 9 | 5 | 45 | +| 4 | [HisAtri](HisAtri) | [new.py](HisAtri/new.py) | 10 | 5 | 50 | +| 5 | [Cherry-mma](Cherry-mma) | [main.wl](Cherry-mma/main.wl) | 10 | 9 | 90 | +| 6 | [lovemilk](lovemilk) | [oom.rb](lovemilk/oom.rb) | 14 | 10 | 140 | +| 7 | [Rear_Sagittar](Rear_Sagittar) | [fuckwin.ps1](Rear_Sagittar/fuckwin.ps1) | 13 | 12 | 156 | +| 8 | [Zhilu](Zhilu) | [simple-oom.js](Zhilu/simple-oom.js) | 17 | 13 | 221 | +| 9 | [yusuixian](yusuixian) | [main.cpp](yusuixian/main.cpp) | 26 | 17 | 442 | +| 10 | [mr_cino](mr_cino) | [oom.wo](mr_cino/oom.wo) | 26 | 17 | 442 | +| 11 | [Cherry](Cherry) | [main.c](Cherry/main.c) | 27 | 18 | 486 | +| 12 | [RaySky_Rt](RaySky_Rt) | [oom.cpp](RaySky_Rt/oom.cpp) | 30 | 19 | 570 | +| 13 | [lianhong](lianhong) | [main.go](lianhong/main.go) | 43 | 24 | 1032 | +| 14 | [wzyisyyds](wzyisyyds) | [rust.rs](wzyisyyds/rust.rs) | 48 | 27 | 1296 | +| 15 | [Ns2Kracy](Ns2Kracy) | [main.go](Ns2Kracy/main.go) | 52 | 32 | 1664 | ## 奖品 -- 第一名:一箱难喝的黑咖啡。由 [@MistEO](https://github.com/MistEO) 赞助! +- 第一名:一箱难喝的黑咖啡。由 @MistEO 赞助! +- 最佳创意奖:10 美元 苹果 或 Google Play 礼品卡。由 @守夜人 赞助! 欢迎老板们赞助更多奖品~ diff --git a/RaySky_Rt/Readme.md b/RaySky_Rt/Readme.md new file mode 100644 index 0000000..f153536 --- /dev/null +++ b/RaySky_Rt/Readme.md @@ -0,0 +1 @@ +~~我cpp还能再压.jpg~~ \ No newline at end of file diff --git a/RaySky_Rt/oom.cpp b/RaySky_Rt/oom.cpp new file mode 100644 index 0000000..b428bb3 --- /dev/null +++ b/RaySky_Rt/oom.cpp @@ -0,0 +1 @@ +int main(){for(;;)new int[9];} \ No newline at end of file diff --git a/RaySky_Rt/oom.png b/RaySky_Rt/oom.png new file mode 100644 index 0000000..e625373 Binary files /dev/null and b/RaySky_Rt/oom.png differ diff --git a/Rear_Sagittar/IMG_20240209_220556_edit_92676361140374.jpg b/Rear_Sagittar/IMG_20240209_220556_edit_92676361140374.jpg new file mode 100644 index 0000000..c9864c8 Binary files /dev/null and b/Rear_Sagittar/IMG_20240209_220556_edit_92676361140374.jpg differ diff --git a/Rear_Sagittar/fuckwin.ps1 b/Rear_Sagittar/fuckwin.ps1 new file mode 100644 index 0000000..39266ae --- /dev/null +++ b/Rear_Sagittar/fuckwin.ps1 @@ -0,0 +1 @@ +for(){&calc} diff --git a/Zhilu/simple-oom-zhilu.png b/Zhilu/simple-oom-zhilu.png new file mode 100644 index 0000000..1bd0e53 Binary files /dev/null and b/Zhilu/simple-oom-zhilu.png differ diff --git a/Zhilu/simple-oom.js b/Zhilu/simple-oom.js new file mode 100644 index 0000000..62ca620 --- /dev/null +++ b/Zhilu/simple-oom.js @@ -0,0 +1 @@ +Array(1e9).fill() \ No newline at end of file diff --git a/lianhong/main.go b/lianhong/main.go new file mode 100644 index 0000000..4f1208b --- /dev/null +++ b/lianhong/main.go @@ -0,0 +1 @@ +package main;func main(){_=make([]int,9e9)} \ No newline at end of file diff --git "a/lianhong/\344\273\273\345\212\241\347\256\241\347\220\206.png" "b/lianhong/\344\273\273\345\212\241\347\256\241\347\220\206.png" new file mode 100644 index 0000000..5c211c1 Binary files /dev/null and "b/lianhong/\344\273\273\345\212\241\347\256\241\347\220\206.png" differ diff --git a/lovemilk/oom.rb b/lovemilk/oom.rb index 23138f1..dd5e1f6 100644 --- a/lovemilk/oom.rb +++ b/lovemilk/oom.rb @@ -1 +1 @@ -(9..9**9).to_a \ No newline at end of file +(9..9**9).to_a diff --git "a/wzyisyyds/QQ\346\210\252\345\233\27620240209210626.png" "b/wzyisyyds/QQ\346\210\252\345\233\27620240209210626.png" new file mode 100644 index 0000000..050d0c9 Binary files /dev/null and "b/wzyisyyds/QQ\346\210\252\345\233\27620240209210626.png" differ diff --git a/wzyisyyds/rust.rs b/wzyisyyds/rust.rs new file mode 100644 index 0000000..d0c6aed --- /dev/null +++ b/wzyisyyds/rust.rs @@ -0,0 +1 @@ +fn main() {let mut v = vec![];loop {v.push(0);}} \ No newline at end of file diff --git a/yusuixian/README.md b/yusuixian/README.md new file mode 100644 index 0000000..45f65ad --- /dev/null +++ b/yusuixian/README.md @@ -0,0 +1,6 @@ +msvc + +![image](https://github.com/InvoluteHell/OutOfMemory/assets/47711102/d4e62dd5-bce3-40b1-ac79-c56df300a974) + +https://github.com/InvoluteHell/OutOfMemory/blob/master/yusuixian/main.cpp + diff --git a/yusuixian/main.cpp b/yusuixian/main.cpp new file mode 100644 index 0000000..4436bf9 --- /dev/null +++ b/yusuixian/main.cpp @@ -0,0 +1 @@ +int main(){new int[9e9];}