結果
問題 | No.2094 Symmetry |
ユーザー | 👑 p-adic |
提出日時 | 2023-05-22 14:04:42 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 466 bytes |
コンパイル時間 | 108 ms |
コンパイル使用メモリ | 10,956 KB |
実行使用メモリ | 68,432 KB |
最終ジャッジ日時 | 2023-08-23 22:57:53 |
合計ジャッジ時間 | 6,379 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
12,440 KB |
testcase_01 | AC | 16 ms
8,096 KB |
testcase_02 | AC | 17 ms
7,836 KB |
testcase_03 | AC | 16 ms
8,056 KB |
testcase_04 | AC | 17 ms
8,100 KB |
testcase_05 | AC | 16 ms
7,940 KB |
testcase_06 | AC | 16 ms
8,056 KB |
testcase_07 | AC | 16 ms
8,024 KB |
testcase_08 | AC | 16 ms
8,064 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))