"""J.VIP: compare explicitly mentioned multiplier-Wild reel sets. Not-mentioned is unknown, not forbidden. An absent reel is not applicable. Python 3 standard library; read input.json, print deterministic JSON only. Usage: python reproduce.py.txt input.json """ from pathlib import Path import json,sys def calculate(data): assert data['resultId']=='jvip-result-dog-wild-scope' assert data['kind']=='product_summary_mentioned_reels_not_full_client_permission' models=data['models'];assert len(models)==2 for model in models: n=model['reelCount'];v=model['explicitlyMentionedMultiplierWildReels'] assert type(n)is int and n>0 and len(v)==len(set(v)) assert all(type(x)is int and 1<=x<=n for x in v) a,b=[set(m['explicitlyMentionedMultiplierWildReels'])for m in models] table=[] for axis in range(1,max(m['reelCount']for m in models)+1): states={} for model in models: states[model['id']]='not_applicable'if axis>model['reelCount']else'explicitly_mentioned'if axis in model['explicitlyMentionedMultiplierWildReels']else'not_mentioned_unknown' table.append({'reel':axis,'states':states}) return {'schemaVersion':1,'resultId':data['resultId'],'artifactVersion':data['artifactVersion'], 'method':'three-state evidence classification and set comparison', 'axisEvidenceTable':table,'mentionedIntersection':sorted(a&b), 'additionalMentionedReelsInMegaways':sorted(b-a),'mentionedOnlyInOriginal':sorted(a-b), 'notMentionedMeansForbidden':False,'completeEligibilityTable':False, 'empiricalGameData':False,'currentClientVerified':False} if __name__=='__main__': p=Path(sys.argv[1])if len(sys.argv)==2 else Path(__file__).with_name('input.json') sys.stdout.buffer.write((json.dumps(calculate(json.loads(p.read_text('utf-8-sig'))),ensure_ascii=False,indent=2)+'\n').encode('utf-8'))