|
Download math/math-0152.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/d517dc97f4cfcf6f6f9b7fafc368554f077178b3/math/math-0152.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm@d517dc97f4cfcf6f6f9b7fafc368554f077178b3/math/math-0152.jsonl
-
curl -L -o math-0152.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/d517dc97f4cfcf6f6f9b7fafc368554f077178b3/math/math-0152.jsonl
1.01 kB
| {"type": "session", "harness": "opencode", "id": "math-0152", "name": "Bit Manipulation Math"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert mathematician and programmer."}} | |
| {"type": "message", "message": {"role": "user", "content": "Explain bit manipulation mathematics"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "Popcount: number of set bits. Kernighan: x & (x-1) clears lowest set bit. Loop until x=0.\nXOR properties: a^a=0, a^0=a, commutative/associative. Missing number: XOR all nums and indices.\nBitmasks for subsets: iterate subsets of {0..n-1}: for(mask=0; mask<(1<<n); mask++) for(i=0; i<n; i++) if(mask&(1<<i)).\nSubsets of subsets: for(sub=mask; sub; sub=(sub-1)&mask) iterates all non-empty submasks.\nSingle-bit operations: isolate lowest bit (x&(-x)), position (__builtin_ctz), count (__builtin_popcount).\nBit DP: dp[mask] = best value for subset represented by mask. TSP: dp[mask][i] = min cost visiting nodes in mask ending at i."}} | |