feat: 한지승 지각 가능성 대비 제약 추가
- 한지승 4명팀 배치 금지 (지각 시 3명 방지) - 한지승 팀에 다른 시니어 ≥1 필수 (지각 시 시니어 0 방지) - 출력에 ⏰ 마크 추가 결과: 한지승 → 팀5 (5명), 팀5 다른 시니어 김병훈 동행 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -139,6 +139,18 @@ def validate(teams):
|
||||
if max(senior_per_team) - min(senior_per_team) > 1:
|
||||
return False, f"시니어 분포 불균등: {senior_per_team}"
|
||||
|
||||
# 한지승(지각 가능) 특수 제약
|
||||
# 1. 4명 팀에 배치 금지 (지각 시 3명 → 너무 적음)
|
||||
# 2. 한지승 팀에 다른 시니어 ≥1명 (지각 시 시니어 0 방지)
|
||||
for team in teams:
|
||||
names = [n for n, _ in team]
|
||||
if "한지승" in names:
|
||||
if len(team) < 5:
|
||||
return False, "한지승 4명팀 배치 (지각 시 3명)"
|
||||
other_seniors = sum(1 for n in names if n in SENIORS and n != "한지승")
|
||||
if other_seniors < 1:
|
||||
return False, "한지승 팀에 다른 시니어 0명 (지각 시 시니어 0)"
|
||||
|
||||
return True, "OK"
|
||||
|
||||
|
||||
@@ -186,10 +198,14 @@ def main():
|
||||
)
|
||||
n_senior = sum(1 for n, _ in team if n in SENIORS)
|
||||
size = len(team)
|
||||
print(f"## {team_name} ({size}명, 시니어 {n_senior}, {dept_summary})")
|
||||
late_note = " ⏰한지승 지각시 -1" if any(n == "한지승" for n, _ in team) else ""
|
||||
print(f"## {team_name} ({size}명, 시니어 {n_senior}, {dept_summary}){late_note}")
|
||||
for name, dept in team:
|
||||
tag = " ⭐시니어" if name in SENIORS else ""
|
||||
tag += " 🌱최주니어" if name == "김재현" else ""
|
||||
if name == "김재현":
|
||||
tag += " 🌱최주니어"
|
||||
if name == "한지승":
|
||||
tag += " ⏰지각가능"
|
||||
print(f" - {name} ({dept}){tag}")
|
||||
mapping[name] = team_name
|
||||
print()
|
||||
|
||||
Reference in New Issue
Block a user