結果

問題 No.2094 Symmetry
ユーザー tailstails
提出日時 2022-10-07 21:41:05
言語 cLay
(20240104-1)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 5,214 ms
コンパイル使用メモリ 208,380 KB
実行使用メモリ 12,748 KB
最終ジャッジ日時 2023-09-03 00:59:54
合計ジャッジ時間 8,240 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,548 KB
testcase_01 AC 3 ms
7,604 KB
testcase_02 AC 2 ms
7,548 KB
testcase_03 AC 3 ms
7,496 KB
testcase_04 AC 2 ms
7,536 KB
testcase_05 AC 2 ms
7,620 KB
testcase_06 AC 2 ms
7,696 KB
testcase_07 AC 3 ms
7,620 KB
testcase_08 AC 2 ms
7,496 KB
testcase_09 AC 19 ms
12,596 KB
testcase_10 AC 19 ms
12,736 KB
testcase_11 AC 19 ms
12,544 KB
testcase_12 AC 19 ms
12,684 KB
testcase_13 AC 17 ms
12,560 KB
testcase_14 AC 19 ms
12,596 KB
testcase_15 AC 19 ms
12,616 KB
testcase_16 AC 19 ms
12,556 KB
testcase_17 AC 17 ms
12,656 KB
testcase_18 AC 17 ms
12,604 KB
testcase_19 AC 19 ms
12,600 KB
testcase_20 AC 19 ms
12,564 KB
testcase_21 AC 19 ms
12,748 KB
testcase_22 AC 19 ms
12,732 KB
testcase_23 AC 17 ms
12,556 KB
testcase_24 AC 17 ms
12,608 KB
testcase_25 AC 19 ms
12,544 KB
testcase_26 AC 20 ms
12,612 KB
testcase_27 AC 2 ms
7,500 KB
testcase_28 AC 11 ms
10,684 KB
testcase_29 AC 2 ms
7,688 KB
testcase_30 AC 11 ms
10,560 KB
testcase_31 AC 12 ms
10,736 KB
testcase_32 AC 12 ms
10,628 KB
testcase_33 AC 2 ms
7,548 KB
testcase_34 AC 13 ms
12,556 KB
testcase_35 AC 9 ms
10,548 KB
testcase_36 AC 9 ms
10,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll c[500][500],e[500*500];
ll f(ll h,ll w,ll b){
	ll i=0;
	rep(y,h){
		rep(x,w){
			e[i++]=-c[y][x];
		}
	}
	sortA(h*w,e);
	return-sum(e(b));
}
{
	ll@n,@k,b=0;
	rep(2n){
		string@s;
		for(char d:s){
			b+=d&1;
		}
	}
	rd(c(2n,2n));
	ll z=f(2n,2n,b);
	if(!(b&1)){
		rep(y,2n){
			rep(x,n){
				c[y][x]+=c[y][2n+~x];
			}
		}
		z>?=f(2n,n,b/2)+k;
	}
	wt(z);
}
0