Create a gist now

Instantly share code, notes, and snippets.

@fjzzq2002 /result.txt Secret
Last active Feb 18, 2018

Embed
What would you like to do?
goodbye dingyou 抱枕
FizzyDavid 0.384929376229
fateice 0.403071303607
lastans7 0.41944206383
whzzt 0.499392801455
JOHNKRAM 0.407450050838
peehs_moorhsum 0.438503195104
hhzzkk 0.311460743859
EtaoinWu 0.24338748395
Marco_L_Tsien 0.443738584087
248926 0.277560371638
laofu 0.390422481454
ShichengXiao 0.271445704809
zhou888 0.242773892987
dofy 0.319592708596
xjr 0.26799254335
diamond_duke 0.42814883654
zx2003 0.209294052148
skyline 0.459507402417
F_Darcy 0.282371831506
wh2001 0.32089550479
TLEbyc 0.274096826654
Starria 0.14978094195
pw384 0.346362741804
wearry 0.324655616426
masanzhou 0.353062057389
richway2 0.361479683915
supy 0.321871480471
zhouyuyang 0.0729613733906
f321dd 0.238850889193
Cyanic 0.266401803809
zjp_shadow 0.226241836533
oscar 0.17375
huangsi 0.138028553597
commonc 0.286037146614
tqyaaaaang 0.519556570132 (WINNER)
liuyiding 0.209421630287
suncongbo 0.22483985966
csy2005 0.279408106048
2653457495 0.302500690799
kscnfe 0.306710161703
ljj 0.179868019897
dogther 0.252750933927
zhhx 0.29033448255
zhouzhendong 0.213322786987
Acheing 0.181701877934
cjwssb 0.142857142857
jjikkollp 0.101351351351
ez_zwl 0.0963391136802
BackCloud 0.0764331210191
whzxp 0.152941176471
CQzhangyu 0.104651162791
zhoutb 0.0926829268293
owen_creeper 0.106796116505
s_circle 0.111821086262
iamqzh 0.0550458715596
XHRlyb 0.11590296496
CHNFTQ 0.107142857143
WAAutoMaton 0.142231947484
cwbc 0.16170212766
wxjor 0.107055961071
AntiLeaf 0.177914110429
LiM_817 0.104417670683
superay 0.151724137931
PhoenixEclipse 0.113333333333
fighter_OI 0.103703703704
miaom 0.065306122449
orbitingflea 0.276171457472
fjzzq2002 0.113799283154
Thinkwice 0.0966386554622
GQH123 0.11186440678
dreamoon 0.250699562729
planaria 0.19811767347
qyf123 0.178303629041
zhangjunyi 0.182219956671
q234rty 0.21353658369
Magolor 0.254495825305
WHZ 0.233853859283
EMOAIRX 0.128
hhu_17_wzl 0.112266112266
big_yellow_doge 0.109375
SunIsMe 0.113585746102
shadowsocks 0.101596516691
zj713300 0.284221743984
Hany01 0.222810734463
cnyali_lk 0.147880981659
nansns 0.133333333333
mathematician 0.199081360372
rushcheyo 0.19910952984
1124828077 0.162199321801
bestFy 0.107975460123
ridiculos 0.123475609756
FTS 0.0509478672986
Hybrid 0.0833333333333
diaosipan 0.118181818182
122333abcd 0
1549515433 0
99hgz 0
Allen 0
Anoxia 0
Bill_Yang 0
CenariusYZ 0
Challenge2017 0
Charlie_ 0
DawnMint 0
Doggu 0
EntropyIncreaser 0
Ferric 0
HowarLI 0
Imperfect 0
KingSann 0
Kukoc 0
LZHlzh 0
NOIRP 0
NiceTooMeetYou 0
Senji 0
SkqLiao 0
Strork 0
Stump 0
Thomas 0
TobiasWong 0
Trisolaris 0
XJY0327 0
Ycrpro 0
YuhangQ 0
_WAautomaton 0
beginend 0
cdsfcesf 0
cn_suqingnain 0
cty 0
czgj 0
dsl2002 0
dxymaster 0
fengchanghn 0
fpdqwq 0
function5 0
heroic 0
igronemyk 0
infinitygyf 0
jhkk 0
jzqjzq 0
kalili 0
kevinshuai 0
ljl 0
orzGEOTCBRL 0
ryycpp 0
stone41123 0
tankoldable 0
tianfuzhen 0
u123 0
wifly 0
ws_zzyer 0
wuminghui 0
xIightgod 0
ysyakioi 0
zawedx 0
zck 0
zjczzzjc 0
zjq 0
zwc 0
from urllib2 import *
from sgmllib import SGMLParser
import HTMLParser
class Spider_For_Source_Code(SGMLParser) :
in_code = 0
source_code = ""
def start_code(self, attrs) :
self.in_code = 1
def end_code(self) :
self.in_code = 0
def handle_data(self, text) :
if (self.in_code) :
self.source_code = self.source_code + HTMLParser.HTMLParser().unescape(text)
sfsc = Spider_For_Source_Code()
def GetSourceCode(s_no) :
content = urlopen("http://uoj.ac/submission/" + str(s_no)).read()
sfsc.source_code = ""
sfsc.feed(content)
return sfsc.source_code
def dogv(s_no):
t=GetSourceCode(s_no)
ca,cb=0,0
for g in t:
if g>='a' and g<='z':
ca+=1
if g=='d' or g=='o' or g=='g':
cb+=1
if g>='A' and g<='Z':
ca+=1
if g=='D' or g=='O' or g=='G':
cb+=1
#print s_no,ca,cb
if not cb:
return 0
return cb*1.0/ca
standings=[[390,57644,["FizzyDavid",1966],1],[360,52608,["fateice",1835],2],[312,69548,["lastans7",1500],3],[297,46558,["whzzt",1884],4],[292,60300,["JOHNKRAM",2143],5],[275,35571,["peehs_moorhsum",2026],6],[220,18844,["hhzzkk",1500],7],[212,19764,["EtaoinWu",1455],8],[204,47736,["Marco_L_Tsien",1619],9],[202,33058,["248926",1500],10],[202,43134,["laofu",1815],11],[192,41885,["ShichengXiao",1500],12],[192,44235,["zhou888",1500],13],[187,41327,["dofy",1415],14],[177,37637,["xjr",1710],15],[174,37863,["diamond_duke",1500],16],[170,28110,["zx2003",1711],17],[169,58196,["skyline",1621],18],[160,35483,["F_Darcy",1724],19],[157,43643,["wh2001",1529],20],[155,38369,["TLEbyc",1585],21],[150,14949,["Starria",1500],22],[150,33646,["pw384",1500],23],[147,46623,["wearry",1459],24],[145,22701,["masanzhou",1795],25],[145,45916,["richway2",1500],26],[142,30985,["supy",1500],27],[140,19244,["zhouyuyang",1500],28],[132,28368,["f321dd",1678],29],[130,27568,["Cyanic",1500],30],[127,27081,["zjp_shadow",1500],31],[127,29523,["oscar",1732],32],[127,31144,["huangsi",1761],33],[127,37224,["commonc",1872],34],[127,38933,["tqyaaaaang",1907],35],[125,26573,["liuyiding",1531],36],[125,30298,["suncongbo",1500],37],[120,8427,["csy2005",1500],38],[120,14332,["2653457495",1500],39],[120,18226,["kscnfe",1500],40],[120,19964,["ljj",1467],41],[115,44178,["dogther",1947],42],[107,12908,["zhhx",1581],43],[105,12737,["zhouzhendong",1500],44],[105,31713,["Acheing",1391],45],[100,1438,["cjwssb",1375],46],[100,1692,["jjikkollp",1500],47],[100,1826,["ez_zwl",1381],48],[100,1873,["BackCloud",1430],49],[100,1953,["whzxp",1500],50],[100,1985,["CQzhangyu",1686],51],[100,2188,["zhoutb",1430],52],[100,2926,["owen_creeper",1553],53],[100,2954,["s_circle",1536],54],[100,3352,["iamqzh",1500],55],[100,3855,["XHRlyb",1500],56],[100,4199,["CHNFTQ",1670],57],[100,4479,["WAAutoMaton",1452],58],[100,5505,["cwbc",1500],59],[100,5661,["wxjor",1500],60],[100,5713,["AntiLeaf",1770],61],[100,5931,["LiM_817",1500],62],[100,7384,["superay",1500],63],[100,8009,["PhoenixEclipse",1393],64],[100,8991,["fighter_OI",1500],65],[100,10881,["miaom",1474],66],[100,41088,["orbitingflea",1510],67],[90,22675,["fjzzq2002",1921],68],[82,14998,["Thinkwice",1620],69],[82,16036,["GQH123",1633],70],[80,5903,["dreamoon",1872],71],[80,6728,["planaria",1500],72],[70,18032,["qyf123",1500],73],[70,24637,["zhangjunyi",1746],74],[70,24992,["q234rty",1432],75],[65,24645,["Magolor",1644],76],[65,30039,["WHZ",1500],77],[60,2357,["EMOAIRX",1500],78],[60,2888,["hhu_17_wzl",1500],79],[60,3436,["big_yellow_doge",1500],80],[60,4532,["SunIsMe",1500],81],[60,7501,["shadowsocks",1500],82],[55,29281,["zj713300",1500],83],[45,12162,["Hany01",1500],84],[45,29876,["cnyali_lk",1518],85],[27,26137,["nansns",1500],86],[25,10257,["mathematician",1500],87],[25,16462,["rushcheyo",1500],88],[25,29484,["1124828077",1588],89],[20,16463,["bestFy",1500],90],[15,12503,["ridiculos",1668],91],[5,9485,["FTS",1500],92],[5,10323,["Hybrid",1500],93],[5,15188,["diaosipan",1584],94],[0,0,["122333abcd",1500],95],[0,0,["1549515433",1500],95],[0,0,["99hgz",1500],95],[0,0,["Allen",1305],95],[0,0,["Anoxia",1500],95],[0,0,["Bill_Yang",1500],95],[0,0,["CenariusYZ",1500],95],[0,0,["Challenge2017",1500],95],[0,0,["Charlie_",1500],95],[0,0,["DawnMint",1500],95],[0,0,["Doggu",1500],95],[0,0,["EntropyIncreaser",1500],95],[0,0,["Ferric",1757],95],[0,0,["HowarLI",1420],95],[0,0,["Imperfect",1500],95],[0,0,["KingSann",1500],95],[0,0,["Kukoc",1500],95],[0,0,["LZHlzh",1500],95],[0,0,["NOIRP",1640],95],[0,0,["NiceTooMeetYou",1500],95],[0,0,["Senji",1500],95],[0,0,["SkqLiao",1500],95],[0,0,["Strork",1500],95],[0,0,["Stump",1500],95],[0,0,["Thomas",1500],95],[0,0,["TobiasWong",1500],95],[0,0,["Trisolaris",1500],95],[0,0,["XJY0327",1500],95],[0,0,["Ycrpro",1500],95],[0,0,["YuhangQ",1500],95],[0,0,["_WAautomaton",1500],95],[0,0,["beginend",1463],95],[0,0,["cdsfcesf",1375],95],[0,0,["cn_suqingnain",1500],95],[0,0,["cty",1358],95],[0,0,["czgj",1904],95],[0,0,["dsl2002",1500],95],[0,0,["dxymaster",1500],95],[0,0,["fengchanghn",1407],95],[0,0,["fpdqwq",1500],95],[0,0,["function5",1500],95],[0,0,["heroic",1500],95],[0,0,["igronemyk",1430],95],[0,0,["infinitygyf",1500],95],[0,0,["jhkk",1500],95],[0,0,["jzqjzq",1500],95],[0,0,["kalili",1399],95],[0,0,["kevinshuai",1500],95],[0,0,["ljl",1394],95],[0,0,["orzGEOTCBRL",1521],95],[0,0,["ryycpp",1500],95],[0,0,["stone41123",1500],95],[0,0,["tankoldable",1500],95],[0,0,["tianfuzhen",1500],95],[0,0,["u123",1643],95],[0,0,["wifly",1500],95],[0,0,["ws_zzyer",1500],95],[0,0,["wuminghui",1500],95],[0,0,["xIightgod",1500],95],[0,0,["ysyakioi",1430],95],[0,0,["zawedx",1433],95],[0,0,["zck",1500],95],[0,0,["zjczzzjc",1500],95],[0,0,["zjq",1500],95],[0,0,["zwc",1500],95]];
score={"1124828077":[[0,0,226656],[0,0,227038],[5,13393,226937],[20,16091,227002],[0,0,227094]],"122333abcd":[],"1549515433":[],"248926":{"0":[60,1752,226583],"2":[100,5466,226709],"3":[20,13500,226939],"4":[22,12340,226909]},"2653457495":{"0":[100,2129,226607],"2":[20,12203,226907]},"99hgz":[],"Acheing":{"0":[100,14476,226962],"2":[5,17237,227045],"3":[0,0,226965]},"Allen":{"0":[0,0,226579],"3":[0,0,226733]},"Anoxia":[],"AntiLeaf":[[100,5713,226724]],"BackCloud":[[100,1873,226591]],"beginend":[[0,0,226546]],"bestFy":{"0":[0,0,226722],"3":[20,16463,227014]},"big_yellow_doge":[[60,3436,226645]],"Bill_Yang":[],"cdsfcesf":[],"CenariusYZ":[],"Challenge2017":[],"Charlie_":[],"CHNFTQ":[[100,4199,226662]],"cjwssb":[[100,1438,226562]],"cnyali_lk":{"0":[0,0,226605],"2":[35,14230,226956],"3":[10,15646,226994]},"cn_suqingnain":[],"commonc":[[60,1314,226552],[0,0,226676],[35,7586,226763],[10,10443,226851],[22,17881,227084]],"CQzhangyu":[[100,1985,226601]],"csy2005":[[60,655,226527],[0,0,226619],[40,4752,226688],[20,3020,226637]],"cty":[],"cwbc":[[100,5505,226712],[0,0,226894]],"Cyanic":{"0":[60,764,226530],"2":[60,11694,226896],"3":[10,15110,226981],"4":[0,0,227000]},"czgj":[],"DawnMint":[[0,0,226990]],"diamond_duke":[[100,1297,226549],[12,4678,226684],[20,7809,226765],[20,11288,226881],[22,12791,226919]],"diaosipan":{"0":[0,0,226880],"2":[5,15188,226983],"3":[0,0,227068]},"dofy":{"0":[60,1887,226592],"2":[45,7847,226766],"3":[60,14823,226971],"4":[22,16770,227023]},"Doggu":[],"dogther":{"0":[100,11155,226877],"2":[5,17909,227087],"3":[10,15114,226982]},"dreamoon":[[60,387,226519],[20,5516,226713]],"dsl2002":[],"dxymaster":[],"EMOAIRX":[[60,2357,226614]],"EntropyIncreaser":[],"EtaoinWu":{"0":[100,1762,226584],"2":[90,8509,226780],"4":[22,9493,226821]},"ez_zwl":[[100,1826,226588]],"f321dd":[[100,10602,226856],[32,17766,227070]],"fateice":[[100,692,226528],[100,9537,226823],[100,14777,226969],[20,16657,227017],[40,10945,226870]],"fengchanghn":[],"Ferric":[[0,0,226639],[0,0,226908]],"fighter_OI":[[100,8991,226801]],"FizzyDavid":[[100,551,226523],[100,9041,226805],[50,17836,227078],[100,12984,226927],[40,17232,227044]],"fjzzq2002":{"0":[0,0,226522],"1":[0,0,227081],"2":[50,12360,226910],"4":[40,10315,226843]},"fpdqwq":[[0,0,226617]],"FTS":[[0,0,226611],[0,0,226972],[5,9485,226819],[0,0,227074],[0,0,227067]],"function5":[[0,0,226830],[0,0,226867],[0,0,226848],[0,0,226834],[0,0,226860]],"F_Darcy":[[0,0,226615],[20,7403,226760],[100,11408,226883],[0,0,226928],[40,16672,227018]],"GQH123":{"0":[60,3342,226641],"3":[0,0,227061],"4":[22,12694,226917]},"Hany01":{"0":[40,2946,226635],"2":[5,9216,226811],"3":[0,0,226783]},"heroic":[],"hhu_17_wzl":[[60,2888,226631]],"hhzzkk":{"0":[100,1037,226539],"2":[70,6139,226730],"3":[50,11668,226893],"4":[0,0,226964]},"HowarLI":[[0,0,226624]],"huangsi":{"0":[100,5951,226727],"2":[5,16445,227012],"4":[22,8748,226791]},"Hybrid":[[0,0,226575],[0,0,226706],[5,10323,226845]],"iamqzh":[[100,3352,226643]],"igronemyk":[[0,0,226672]],"Imperfect":[],"infinitygyf":[[0,0,226664]],"jhkk":[],"jjikkollp":[[100,1692,226576]],"JOHNKRAM":[[100,3073,226638],[100,12727,226918],[50,16850,227028],[20,17319,227050],[22,10331,226846]],"jzqjzq":[],"kalili":[],"kevinshuai":[],"KingSann":[],"kscnfe":{"0":[100,2712,226627],"3":[20,15514,226992],"4":[0,0,227090]},"Kukoc":[[0,0,226699]],"laofu":{"0":[60,2076,226604],"1":[100,12153,226906],"3":[20,15318,226987],"4":[22,13587,226943]},"lastans7":[[100,2697,226626],[100,17207,227040],[70,14453,226961],[20,17912,227088],[22,17279,227047]],"LiM_817":{"0":[100,5931,226726],"3":[0,0,226828]},"liuyiding":{"0":[100,9648,226824],"2":[25,16925,227029]},"ljj":{"0":[100,4112,226657],"3":[20,15852,226996]},"ljl":[[0,0,226729]],"LZHlzh":[[0,0,226655]],"Magolor":{"0":[60,6695,226744],"2":[5,17950,227093],"3":[0,0,226989]},"Marco_L_Tsien":[[100,985,226535],[12,16727,227019],[50,13781,226947],[20,9487,226820],[22,6756,226746]],"masanzhou":[[100,1711,226578],[20,4663,226682],[5,9283,226812],[20,7044,226753],[0,0,226872]],"mathematician":[[0,0,226670],[0,0,227042],[5,4663,226683],[20,5594,226716]],"miaom":[[100,10881,226868]],"nansns":{"0":[0,0,226625],"2":[5,12020,226904],"3":[0,0,226976],"4":[22,14117,226953]},"NiceTooMeetYou":[],"NOIRP":[],"orbitingflea":[[0,0,226545],[30,17089,227035],[50,6152,226732],[20,17847,227079]],"orzGEOTCBRL":[[0,0,226532]],"oscar":{"0":[100,1397,226560],"1":[0,0,227075],"2":[5,13095,226929],"4":[22,15031,226977]},"owen_creeper":[[100,2926,226634],[0,0,227043]],"peehs_moorhsum":[[100,733,226529],[100,3349,226642],[15,12968,226926],[20,6816,226748],[40,11705,226897]],"PhoenixEclipse":[[100,8009,226770]],"planaria":{"0":[60,1575,226568],"3":[20,5153,226705]},"pw384":{"0":[80,13562,226941],"2":[50,4863,226693],"3":[20,15221,226984]},"q234rty":{"0":[0,0,227095],"2":[50,14950,226974],"3":[20,10042,226831]},"qyf123":{"0":[60,922,226531],"3":[10,17110,227037]},"richway2":[[100,3232,226640],[20,8163,226776],[15,17573,227062],[10,16948,227030]],"ridiculos":{"0":[0,0,226599],"2":[15,12503,226911],"3":[0,0,227072],"4":[0,0,227039]},"rushcheyo":{"0":[0,0,226602],"2":[5,10318,226844],"3":[20,6144,226731]},"ryycpp":[[0,0,226768],[0,0,226826],[0,0,227066],[0,0,227001]],"Senji":[[0,0,226678]],"shadowsocks":[[60,7501,226761]],"ShichengXiao":{"0":[100,1985,226600],"2":[50,13298,226933],"3":[20,8725,226788],"4":[22,17877,227083]},"SkqLiao":[],"skyline":[[100,1386,226559],[12,12813,226922],[15,16288,227008],[20,17088,227034],[22,10621,226857]],"Starria":{"0":[100,1338,226554],"2":[50,13611,226944],"3":[0,0,226797]},"stone41123":[],"Strork":[],"Stump":[[0,0,226542]],"suncongbo":{"0":[100,2113,226606],"2":[5,17934,227091],"3":[20,10251,226840]},"SunIsMe":[[60,4532,226679]],"superay":[[100,7384,226759]],"supy":[[100,1304,226551],[12,17902,227086],[30,11779,226898],[0,0,226970]],"s_circle":[[100,2954,226636]],"tankoldable":[],"Thinkwice":{"0":[60,5040,226702],"1":[0,0,226751],"4":[22,9958,226829]},"Thomas":[],"tianfuzhen":[],"TLEbyc":{"0":[100,3756,226650],"2":[35,16758,227022],"3":[20,17855,227080]},"TobiasWong":[],"tqyaaaaang":[[60,1494,226566],[27,10406,226849],[20,12866,226924],[20,14167,226955]],"Trisolaris":[],"u123":[],"WAAutoMaton":[[100,4479,226675]],"wearry":{"0":[100,2630,226620],"2":[5,11003,226873],"3":[20,16160,227004],"4":[22,16830,227027]},"wh2001":{"0":[100,1912,226594],"2":[15,17036,227032],"3":[20,16299,227009],"4":[22,8396,226779]},"WHZ":{"0":[60,16751,227021],"2":[5,13288,226932],"3":[0,0,227046]},"whzxp":[[100,1953,226597]],"whzzt":[[100,975,226533],[100,10949,226871],[55,15881,226997],[20,11603,226889],[22,7150,226755]],"wifly":{"2":[0,0,226988]},"ws_zzyer":[],"wuminghui":[[0,0,226663]],"wxjor":[[100,5661,226719]],"XHRlyb":[[100,3855,226652]],"xIightgod":[[0,0,227060],[0,0,226758],[0,0,226757],[0,0,227049],[0,0,227096]],"xjr":[[100,1652,226571],[0,0,226786],[5,6572,226741],[50,14318,226957],[22,15095,226980]],"XJY0327":[],"Ycrpro":[[0,0,226646]],"ysyakioi":[[0,0,226835],[0,0,226855],[0,0,226853],[0,0,226839]],"YuhangQ":[[0,0,226661]],"zawedx":[],"zck":{"0":[0,0,226912],"2":[0,0,227057],"3":[0,0,226985]},"zhangjunyi":[[0,0,226590],[0,0,226689],[50,8377,226778],[20,16260,227006]],"zhhx":[[60,2675,226622],[47,10233,226838]],"zhou888":{"0":[100,2595,226618],"2":[50,14988,226975],"3":[20,8740,226790],"4":[22,17912,227089]},"zhoutb":[[100,2188,226608]],"zhouyuyang":{"0":[100,1670,226574],"1":[0,0,227077],"4":[40,17574,227063]},"zhouzhendong":[[100,1800,226587],[0,0,226827],[5,10937,226869]],"zj713300":{"0":[40,4208,226665],"2":[5,13927,226949],"3":[10,11146,226876]},"zjczzzjc":[],"zjp_shadow":{"0":[100,2283,226612],"2":[5,8021,226771],"3":[0,0,226721],"4":[22,16777,227024]},"zjq":[],"zwc":[],"zx2003":{"0":[100,985,226534],"2":[50,12806,226921],"3":[20,14319,226958]},"_WAautomaton":[]};
for p in standings:
id=p[2][0]
sc=score[id]
pp=0
for p in sc:
g=p
if str(p).isdigit():
g=sc[g]
if g[0]<=0:
continue
pp=pp+dogv(g[2])
print id,pp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment