This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* compiled for x86‑64 (glibc) */ | |
/* addresses shown are for the public binary on chall.blackpinker.com */ | |
#include <bits/stdc++.h> | |
using namespace std; | |
static const int NMAX = 100; // the task fixes n = 100 | |
/* ------------------------------------------------------------------ */ | |
/* global objects live in .bss */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from pwn import * | |
# ——— Binary & context setup ——— | |
exe = ELF('./chall', checksec=False) # keep symbols for convenience | |
context.binary = exe | |
context.log_level = 'info' | |
HOST, PORT = 'chall.blackpinker.com', 33430 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import wave, sys, pathlib | |
def lsb_stream(byte_seq): | |
"""Yield bytes rebuilt from the MS‑bit‑first LSBs of *byte_seq*.""" | |
cur = 0 | |
bit = 7 | |
for b in byte_seq: | |
cur |= (b & 1) << bit # original big‑endian bit order |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from typing import Dict, List, Set, Tuple, Optional | |
from dataclasses import dataclass | |
@dataclass | |
class Cell: | |
type: str # "danger", "shield", or "gold" | |
count: int = 0 # Only used for gold cells | |
@dataclass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let () = print_endline "hi" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crim | zn | indus | chas | nox | rm | age | dis | rad | tax | ptratio | b | lstat | medv | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0.00632 | 18 | 2.31 | 0 | 0.538 | 6.575 | 65.2 | 4.09 | 1 | 296 | 15.3 | 396.9 | 4.98 | 24 | |
0.02731 | 0 | 7.07 | 0 | 0.469 | 6.421 | 78.9 | 4.9671 | 2 | 242 | 17.8 | 396.9 | 9.14 | 21.6 | |
0.02729 | 0 | 7.07 | 0 | 0.469 | 7.185 | 61.1 | 4.9671 | 2 | 242 | 17.8 | 392.83 | 4.03 | 34.7 | |
0.03237 | 0 | 2.18 | 0 | 0.458 | 6.998 | 45.8 | 6.0622 | 3 | 222 | 18.7 | 394.63 | 2.94 | 33.4 | |
0.06905 | 0 | 2.18 | 0 | 0.458 | 7.147 | 54.2 | 6.0622 | 3 | 222 | 18.7 | 396.9 | 5.33 | 36.2 | |
0.02985 | 0 | 2.18 | 0 | 0.458 | 6.43 | 58.7 | 6.0622 | 3 | 222 | 18.7 | 394.12 | 5.21 | 28.7 | |
0.08829 | 12.5 | 7.87 | 0 | 0.524 | 6.012 | 66.6 | 5.5605 | 5 | 311 | 15.2 | 395.6 | 12.43 | 22.9 | |
0.14455 | 12.5 | 7.87 | 0 | 0.524 | 6.172 | 96.1 | 5.9505 | 5 | 311 | 15.2 | 396.9 | 19.15 | 27.1 | |
0.21124 | 12.5 | 7.87 | 0 | 0.524 | 5.631 | 100 | 6.0821 | 5 | 311 | 15.2 | 386.63 | 29.93 | 16.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <optional> | |
#include <string> | |
#include <thread> | |
#include <atomic> | |
#include <limits> | |
#include <chrono> | |
#include <stop_token> | |
struct Jiffies { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rules | |
## Quy ước | |
Item = vàng, vật cản, khiên, kho báu | |
## Init pos | |
- Team quyết định init pos (phải là ô trống) | |
- 1 thuyền không hợp lệ -> random ô trống không trùng đội hợp lệ còn lại |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import hashlib | |
import sys | |
MESSAGE_LEN = 35 | |
ENCODED_SLICE = 12 | |
MESSAGE_SLICE = 10 | |
BLOCK_SLICE = 8 | |
random.seed(int(hashlib.sha256(sys.argv[1].encode('utf-8')).hexdigest(), 16)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
url = "https://tsdh.hcmus.edu.vn/ketqua" | |
headers = { | |
"Accept": "*/*", | |
"Content-Type": "application/x-www-form-urlencoded" | |
} |
NewerOlder