Buckets:
| { | |
| "task_id": "wireless_electricity_layout", | |
| "name": "Wireless Electricity Layout", | |
| "category": "Combinatorial Optimization", | |
| "base_image": "cpp", | |
| "platform": "linux/amd64", | |
| "internet": false, | |
| "cwd": "/home/workspace/wirel", | |
| "submit_paths": [ | |
| "solution.cpp" | |
| ], | |
| "work": { | |
| "image_tag": "c3179795f69f", | |
| "specs_dir": "/home/workspace/wirel", | |
| "agent_query": "## Wireless Electricity - Wire Placement Optimization (CodeChef WIREL)\n\nWrite `solution.cpp` in the project root. It must read from stdin and write to stdout.\n\n---\n\n## Problem Overview\n\nChefland lies on a 2D plane with N=10,000 cities and M=2,500 wire segments.\n\n**Poles:**\n- Positive plate: (-1,0) to (0,-1)\n- Negative plate: (1000001,1000000) to (1000000,1000001)\n\nA wire is 'positive' if it intersects the positive plate or another positive wire (transitively). Similarly for 'negative'. No wire may be both.\n\n**Costs:**\n- For each city i: transmission cost = Si^2 + Ti^2, where Si=min dist to any positive wire endpoint, Ti=min dist to any negative wire endpoint\n- For each wire i: movement cost = hi^2 + vi^2, where (hi,vi) is your chosen translation\n- Total score = sum(transmission costs) + sum(movement costs). **Minimize.**\n\n**Constraints:**\n- N=10000, M=2500\n- City coords: random in [0, 1000000]\n- Wire lengths: L in {8000,10000,12000,14000,16000}\n- |hi|, |vi| <= 1000000\n- Must have >= 1 positive and >= 1 negative wire, no short circuits\n\n---\n\n## Input Format\n\n```\nN M\nX_1 Y_1\n... (N city lines)\nA_1 B_1 C_1 D_1\n... (M wire lines, endpoints (A,B)-(C,D))\n```\n\n## Output Format\n\nM lines, each: `h_i v_i` (integer translation for wire i)\n\n---\n\n## Evaluation\n\nYour solution is scored on **50 fixed hidden test cases**. Final score = sum of (P+Q) across all hidden cases. **Lower is better.**\n\nLocal generated cases are for validation only and are not the judge cases. Do not assume any local seed range corresponds to the judge cases.\n\n---\n\n## Local Testing\n\n```bash\n# Generate a random test case\n./tools/bin/gen <seed> > input.txt\n\n# Compile your solution\ng++ -std=c++17 -O2 -o solution solution.cpp\n\n# Run your solution\n./solution < input.txt > output.txt\n\n# Score output (lower is better)\n./tools/bin/tester input.txt output.txt\n# Outputs to stderr: Score = <N>\n```\n\nA valid baseline `solution.cpp` already exists. Improve it.\n\n---\n\n## Strategy Hints\n\n- Use the provided baseline as a validity sanity check before optimizing.\n- Reduce transmission cost by moving wires near city clusters.\n- Carefully choose which wires become positive/negative vs neutral.\n- Read `README.md` and `tools/README.md` for full problem details.\n- Iterate: test locally with `gen` + `tester`, then submit.\n\n## Rules\n\n- Write your solution as `solution.cpp` in the project root directory\n- Do NOT modify files in `tools/`\n- Use `tools/bin/gen` and `tools/bin/tester` for local testing\n- Your program should read from stdin and write to stdout\n- Run your solution to completion and verify with the tester before finishing" | |
| }, | |
| "judge": { | |
| "image_tag": "1b918c76e808", | |
| "eval_cmd": "cd /home/workspace/wirel && bash /tmp/eval_wirel.sh", | |
| "eval_timeout": 600, | |
| "parser": "score_sum", | |
| "score_direction": "minimize", | |
| "selection": "score_first", | |
| "rescale": { | |
| "kind": "piecewise_log_min", | |
| "baseline": 2.6059066264593484e+16, | |
| "rank30": 2444746514528109.0, | |
| "rank1": 362439546835871.0, | |
| "super_anchor": 181219773417935.5 | |
| } | |
| } | |
| } | |
Xet Storage Details
- Size:
- 3.55 kB
- Xet hash:
- 25e06ff55a6d10ecb34b25c50ccbed5df3ec2a0e96a218c1315dcf1c824aff7d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.