結果
問題 | No.165 四角で囲え! |
ユーザー | roiti46 |
提出日時 | 2015-03-13 02:19:38 |
言語 | PyPy2 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 845 ms |
コンパイル使用メモリ | 77,916 KB |
実行使用メモリ | 80,720 KB |
最終ジャッジ日時 | 2023-09-11 08:15:31 |
合計ジャッジ時間 | 12,704 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 75 ms
76,436 KB |
testcase_02 | AC | 75 ms
76,120 KB |
testcase_03 | AC | 75 ms
76,260 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 204 ms
79,864 KB |
testcase_07 | WA | - |
testcase_08 | AC | 75 ms
76,708 KB |
testcase_09 | AC | 75 ms
76,708 KB |
testcase_10 | AC | 75 ms
76,704 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 767 ms
80,260 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
ソースコード
# coding: utf-8 N,B = map(int,raw_input().split()) xyp = [map(int,raw_input().split()) for i in xrange(N)] ans = 1 for i in xrange(N): x1,y1,p1 = xyp[i] for j in xrange(i+1,N): x2,y2,p2 = xyp[j] l,r,d,u = min(x1,x2),max(x1,x2),min(y1,y2),max(y1,y2) in_square = [p for x,y,p in xyp if r >= x >= l and u >= y >= d] if sum(in_square) <= B: ans = max(ans, len(in_square)) print ans