|
Download math/math-0171.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/7fe6853bcbe998c7aec3aa0f7086f584cc091586/math/math-0171.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm@7fe6853bcbe998c7aec3aa0f7086f584cc091586/math/math-0171.jsonl
-
curl -L -o math-0171.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/7fe6853bcbe998c7aec3aa0f7086f584cc091586/math/math-0171.jsonl
1.23 kB
| {"type": "session", "harness": "opencode", "id": "math-0171", "name": "Computational Geometry"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert mathematician and programmer."}} | |
| {"type": "message", "message": {"role": "user", "content": "Explain computational geometry for competitive programming"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "Point/vector: struct with x,y. Operations: +, -, dot (a.x*b.x+a.y*b.y), cross (a.x*b.y-a.y*b.x).\nCross product: |a||b|sin(theta). Positive=left turn, negative=right, zero=collinear.\nDot product: |a||b|cos(theta). Zero=perpendicular.\n\nConvex hull: Graham scan O(n log n). Sort by angle, maintain stack, pop on right turn.\nLine intersection: solve 2x2 system. Two forms: point-slope or parametric.\nPolygon area: shoelace formula. Area = 0.5*|sum(x_i*y_{i+1} - x_{i+1}*y_i)|.\nPoint in polygon: ray casting or winding number.\nClosest pair: divide and conquer O(n log n).\nRotating calipers: diameter, width, min bounding rectangle of convex polygon.\nHalf-plane intersection: intersect n half-planes, O(n log n).\nCircle-circle intersection: up to 2 points.\nLine-circle intersection: substitute line into circle equation."}} | |