結果
問題 | No.2094 Symmetry |
ユーザー | 👑 p-adic |
提出日時 | 2023-05-22 14:05:03 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 466 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 87,136 KB |
実行使用メモリ | 118,564 KB |
最終ジャッジ日時 | 2023-08-23 22:57:59 |
合計ジャッジ時間 | 5,422 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 72 ms
71,348 KB |
testcase_01 | AC | 71 ms
71,072 KB |
testcase_02 | AC | 72 ms
71,392 KB |
testcase_03 | AC | 72 ms
71,272 KB |
testcase_04 | AC | 72 ms
71,220 KB |
testcase_05 | AC | 72 ms
71,256 KB |
testcase_06 | AC | 70 ms
71,516 KB |
testcase_07 | AC | 72 ms
71,416 KB |
testcase_08 | AC | 72 ms
71,368 KB |
testcase_09 | TLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
ソースコード
I=input def J(): return map(int,I().split()) def S(D): return sorted(D.items(),reverse=1) N,K=J() R=range(N*2) b=0 for i in R: for c in I():b+=c=="#" D,E={},{} for i in R: C=list(J()) for c in C: if c in D:D[c]+=1 else:D[c]=1 for i in R: c=C[i]+C[N*2-i-1] if c in E:E[c]+=i<N else:E[c]=1 F,G=S(D),S(E) s=1-b%2 m=[0]*2 for a,e,k in [b,F,0],[b//2,G,1]: while (a>0)*len(e): i,j=e.pop(0) a,m[k]=max(0,a-j),m[k]+min(a,j)*i print(max(m[0],(K+m[1])*s))