Commit ae3c902
committed
docs: add solution contract spec and update to polymorphic architecture
BREAKING CHANGE: Remove deprecated wrapper template and --wrapper option
- Create docs/solution_contract.md as canonical specification for:
- Solution file structure (SOLUTIONS + get_solver() pattern)
- SOLUTIONS metadata schema (required: class, method)
- Judge/validation contract (JUDGE_FUNC, COMPARE_MODE priority)
- Static/dynamic tests and generator requirements
- Metadata layers and consistency checklist
- Update templates to polymorphic architecture:
- template_solution.py: Add SOLUTIONS dict + get_solver()
- template_solution_multi.py: Use multiple classes, same method name
- Delete template_solution_wrapper.py (deprecated)
- Update scripts:
- new_problem.bat/sh: Remove --wrapper option
- run_tests.bat: Fix argument passing (use %* for all args)
- Update documentation:
- README.md: Replace wrapper example with polymorphic pattern
- README_zh-TW.md: Same updates in Chinese
- ARCHITECTURE_MIGRATION.md: Mark Phase 4 complete
- Clean up temporary files:
- Delete test_debug.py
- Delete test_output.py1 parent eee00b4 commit ae3c902
File tree
12 files changed
+966
-337
lines changed- docs
- templates
12 files changed
+966
-337
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
| 546 | + | |
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
550 | 551 | | |
551 | 552 | | |
552 | 553 | | |
553 | | - | |
| 554 | + | |
| 555 | + | |
554 | 556 | | |
555 | 557 | | |
556 | 558 | | |
557 | 559 | | |
558 | | - | |
| 560 | + | |
| 561 | + | |
559 | 562 | | |
560 | 563 | | |
561 | 564 | | |
562 | 565 | | |
563 | | - | |
| 566 | + | |
| 567 | + | |
564 | 568 | | |
565 | 569 | | |
566 | 570 | | |
567 | 571 | | |
568 | 572 | | |
569 | | - | |
570 | | - | |
| 573 | + | |
| 574 | + | |
571 | 575 | | |
572 | 576 | | |
573 | | - | |
574 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
575 | 580 | | |
576 | 581 | | |
577 | | - | |
578 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
579 | 585 | | |
580 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
581 | 593 | | |
582 | 594 | | |
583 | 595 | | |
| |||
604 | 616 | | |
605 | 617 | | |
606 | 618 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
| 619 | + | |
637 | 620 | | |
638 | 621 | | |
639 | 622 | | |
| |||
784 | 767 | | |
785 | 768 | | |
786 | 769 | | |
787 | | - | |
788 | | - | |
| 770 | + | |
789 | 771 | | |
790 | 772 | | |
791 | 773 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
434 | 435 | | |
435 | 436 | | |
436 | 437 | | |
437 | | - | |
| 438 | + | |
| 439 | + | |
438 | 440 | | |
439 | 441 | | |
440 | 442 | | |
441 | 443 | | |
442 | | - | |
| 444 | + | |
| 445 | + | |
443 | 446 | | |
444 | 447 | | |
445 | 448 | | |
446 | 449 | | |
447 | | - | |
| 450 | + | |
| 451 | + | |
448 | 452 | | |
449 | 453 | | |
450 | 454 | | |
451 | 455 | | |
452 | 456 | | |
453 | | - | |
454 | | - | |
| 457 | + | |
| 458 | + | |
455 | 459 | | |
456 | 460 | | |
457 | | - | |
458 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
459 | 464 | | |
460 | 465 | | |
461 | | - | |
462 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
463 | 469 | | |
464 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
465 | 477 | | |
466 | 478 | | |
467 | 479 | | |
| |||
488 | 500 | | |
489 | 501 | | |
490 | 502 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 503 | + | |
521 | 504 | | |
522 | 505 | | |
523 | 506 | | |
| |||
668 | 651 | | |
669 | 652 | | |
670 | 653 | | |
671 | | - | |
672 | | - | |
| 654 | + | |
673 | 655 | | |
674 | 656 | | |
675 | 657 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
423 | 430 | | |
0 commit comments