結果
問題 | No.2790 Athena 3 |
ユーザー | _a |
提出日時 | 2024-06-21 22:45:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 2,311 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 13,056 KB |
実行使用メモリ | 12,032 KB |
最終ジャッジ日時 | 2024-06-21 22:45:15 |
合計ジャッジ時間 | 2,364 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
12,032 KB |
testcase_01 | AC | 37 ms
12,032 KB |
testcase_02 | AC | 37 ms
12,032 KB |
testcase_03 | AC | 38 ms
12,032 KB |
testcase_04 | AC | 34 ms
12,032 KB |
testcase_05 | AC | 39 ms
11,904 KB |
testcase_06 | AC | 33 ms
11,904 KB |
testcase_07 | AC | 34 ms
12,032 KB |
testcase_08 | AC | 34 ms
11,904 KB |
testcase_09 | AC | 33 ms
12,032 KB |
testcase_10 | AC | 33 ms
12,032 KB |
testcase_11 | AC | 33 ms
12,032 KB |
testcase_12 | AC | 34 ms
12,032 KB |
testcase_13 | AC | 33 ms
12,032 KB |
testcase_14 | AC | 35 ms
12,032 KB |
testcase_15 | AC | 33 ms
11,904 KB |
testcase_16 | AC | 34 ms
12,032 KB |
ソースコード
import os, sysimport math, decimal, queue, heapq, bisect, itertools, functools, collections, stringfrom bisect import bisect, bisect_leftfrom collections import defaultdict, OrderedDict, deque, Counterfrom functools import cmp_to_key, lru_cache, reducefrom heapq import heapify, heappush, heappushpop, heappop, heapreplace, nlargest, nsmallestfrom itertools import accumulate, chain, combinations, combinations_with_replacement, compress, count, cycle, dropwhile, filterfalse, groupby, islice,permutations, product, repeat, starmap, takewhile, tee, zip_longestfrom math import gcd, factorial, isqrt, comb, perm, prod, inffrom queue import Queue, PriorityQueue, LifoQueuefrom string import ascii_letters, ascii_lowercase, ascii_uppercase, digits, hexdigits, octdigitsaz, AZ, mod = ascii_lowercase, ascii_uppercase, 1_000_000_007def solve():def _area(x1, y1, x2, y2, x3, y3):def area(x1, y1, x2, y2, x3, y3):return abs(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2coords = [(x1 + 1, y1), (x1 - 1, y1), (x1, y1 + 1), (x1, y1 - 1),(x2 + 1, y2), (x2 - 1, y2), (x2, y2 + 1), (x2, y2 - 1),(x3 + 1, y3), (x3 - 1, y3), (x3, y3 + 1), (x3, y3 - 1)]max_area = 0for x1_mod, y1_mod in coords[:4]:for x2_mod, y2_mod in coords[4:8]:for x3_mod, y3_mod in coords[8:]:max_area = max(max_area, area(x1_mod, y1_mod, x2_mod, y2_mod, x3_mod, y3_mod))return max_areadef run(W):x1, y1, x2, y2, x3, y3 = Wres = _area(x1, y1, x2, y2, x3, y3)return resprint(run(W))if __name__ == '__main__':LOCAL = sys.argv[0] if '4a' in sys.argv[0] else NoneP = lambda *p: [print(i, end=' ') for i in p] if LOCAL else NonePI = lambda *p: print(' '.join(map(str, p))) or NonePII = lambda X: [PI(*row) for row in X]sys.stdin = open(os.path.join(os.getcwd(), 'a1.txt'), 'r') if LOCAL else sys.stdinI = lambda: [int(a) for l in sys.stdin for a in l.strip().split()]S = lambda: [a for l in sys.stdin for a in l.strip().split()]IM = lambda: [[int(a) for a in l.split()] for l in sys.stdin]SM = lambda: [[a for a in l.split()] for l in sys.stdin]W = I()# P(W)solve()