コード例 #1
0
def test_05():
    assert Solution().maxArea([
        840, 199, 223, 80, 818, 770, 797, 613, 636, 804, 376, 791, 613, 449,
        826, 861, 850, 158, 519, 414, 232, 947, 908, 528, 925, 814, 768, 275,
        814, 241, 286, 184, 667, 82, 49, 209, 886, 217, 701, 857, 191, 295,
        527, 523, 798, 221, 600, 450, 499, 712, 143, 980, 921, 707, 210, 426,
        375, 240, 488, 109, 386, 706, 129, 475, 728, 234, 903, 959, 954, 408,
        518, 406, 456, 852, 976, 822, 531, 713, 719, 129, 589, 296, 712, 516,
        814, 809, 318, 643, 114, 442, 335, 39, 912, 599, 604, 740, 227, 889,
        284, 346
    ]) == 81480
コード例 #2
0
def test_02():
    assert Solution().maxArea([1, 2]) == 1
コード例 #3
0
def test_06():
    assert Solution().maxArea([
        335, 706, 228, 133, 442, 426, 451, 698, 529, 697, 548, 66, 969, 213,
        40, 523, 721, 484, 85, 495, 470, 620, 689, 330, 372, 919, 428, 681,
        941, 858, 586, 4, 221, 895, 327, 548, 780, 561, 988, 949, 257, 323,
        323, 69, 974, 469, 977, 602, 901, 123, 774, 703, 500, 521, 449, 122,
        518, 893, 8, 251, 685, 483, 335, 886, 633, 725, 972, 389, 101, 461,
        308, 874, 96, 576, 597, 998, 195, 113, 275, 303, 878, 830, 720, 476,
        281, 835, 50, 170, 579, 697, 329, 847, 854, 365, 261, 755, 750, 650,
        944, 992, 540, 958, 5, 479, 69, 345, 412, 144, 138, 797, 864, 241, 789,
        128, 157, 727, 376, 761, 916, 375, 942, 527, 785, 44, 714, 105, 629,
        771, 742, 852, 782, 391, 472, 782, 452, 943, 846, 921, 692, 301, 990,
        5, 319, 64, 482, 657, 852, 39, 742, 431, 971, 249, 106, 344, 52, 712,
        613, 297, 5, 236, 520, 672, 177, 105, 418, 302, 39, 243, 211, 268, 73,
        103, 307, 666, 325, 882, 247, 480, 708, 31, 72, 301, 271, 675, 17, 357,
        110, 200, 532, 471, 761, 253, 922, 485, 306, 699, 133, 648, 682, 678,
        892, 0, 744, 32, 326, 833, 63, 774, 228, 439, 392, 756, 956, 695, 212,
        555, 121, 822, 293, 605, 852, 581, 941, 168, 632, 447, 106, 807, 885,
        821, 727, 947, 110, 226, 709, 904, 29, 51, 146, 0, 87, 407, 584, 947,
        461, 516, 393, 426, 344, 812, 461, 952, 63, 137, 9, 502, 903, 993, 92,
        888, 764, 209, 838, 934, 853, 773, 288, 463, 280, 189, 612, 820, 357,
        737, 691, 950, 328, 849, 66, 147, 274, 416, 125, 989, 989, 892, 621,
        747, 894, 382, 638, 407, 476, 727, 712, 233, 104, 648, 107, 256, 714,
        734, 11, 725, 715, 646, 165, 761, 703, 285, 616, 330, 539, 20, 941,
        115, 539, 689, 765, 675, 43, 845, 963, 668, 275, 817, 711, 949, 176,
        461, 979, 859, 554, 82, 334, 232, 828, 666, 765, 258, 293, 911, 516,
        841, 677, 276, 458, 204, 229, 535, 638, 242, 69, 159, 769, 683, 62,
        640, 773, 437, 134, 227, 129, 805, 779, 325, 219, 139, 424, 106, 74,
        205, 624, 86, 51, 281, 454, 758, 587, 352, 958, 496, 326, 574, 11, 442,
        878, 379, 72, 770, 941, 53, 939, 558, 429, 4, 329, 301, 715, 492, 644,
        852, 777, 569, 577, 985, 708, 370, 805, 775, 34, 17, 877, 240, 37, 228,
        110, 377, 148, 855, 164, 983, 244, 811, 712, 66, 753, 64, 125, 199,
        288, 599, 477, 455, 863, 575, 891, 373, 322, 526, 347, 631, 862, 640,
        955, 252, 613, 41, 322, 389, 956, 276, 242, 980, 933, 275, 328, 13,
        479, 57, 161, 382, 604, 460, 231, 882, 984, 521, 780, 440, 929, 685,
        443, 75, 897, 202, 717, 804, 717, 824, 953, 781, 520, 984, 143, 781,
        987, 132, 546, 679, 882, 430, 682, 19, 657, 330, 108, 36, 254, 791,
        362, 457, 657, 134, 903, 127, 975, 942, 446, 146, 440, 169, 217, 180,
        225, 714, 66, 664, 375, 980, 366, 152, 966, 14, 785, 396, 901, 752,
        123, 85, 390, 794, 982, 734, 424, 23, 452, 671, 181, 715, 564, 465,
        433, 212, 855, 325, 777, 498, 505, 251, 905, 485, 344, 804, 495, 698,
        753, 603, 881, 497, 383, 244, 353, 318, 189, 356, 293, 261, 416, 349,
        849, 212, 905, 232, 67, 833, 706, 791, 719, 116, 226, 248, 179, 959,
        983, 617, 959, 872, 587, 809, 570, 442, 965, 671, 449, 830, 139, 281,
        937, 692, 74, 229, 263, 482, 253, 443, 983, 526, 480, 344, 460, 162,
        814, 222, 903, 68, 69, 276, 309, 289, 867, 30, 642, 569, 352, 133, 170,
        542, 355, 411, 253, 258, 384, 982, 640, 371, 31, 409, 319, 519, 898,
        898, 83, 773, 858, 792, 568, 77, 21, 60, 593, 904, 732, 877, 363, 395,
        679, 41, 364, 858, 363, 152, 246, 484, 536, 213, 692, 708, 819, 165,
        550, 429, 902, 782, 526, 788, 132, 188, 464, 676, 760, 308, 752, 898,
        904, 299, 855, 317, 389, 530, 419, 788, 7, 900, 883, 801, 278, 302,
        196, 794, 556, 902, 23, 13, 277, 205, 428, 266, 215, 741, 156, 573,
        448, 955, 60, 251, 532, 694, 58, 767, 506, 615, 518, 513, 219, 590,
        400, 707, 837, 974, 655, 268, 260, 20, 349, 233, 156, 955, 409, 306,
        768, 606, 171, 382, 561, 264, 270, 494, 585, 280, 414, 576, 587, 51,
        893, 658, 399, 472, 454, 206, 498, 599, 200, 301, 340, 406, 53, 174,
        742, 7, 213, 164, 570, 103, 448, 561, 760, 713, 461, 86, 931, 599, 507,
        689, 386, 88, 443, 578, 244, 353, 703, 948, 416, 561, 4, 167, 103, 634,
        743, 821, 712, 782, 292, 707, 753, 881, 879, 123, 420, 375, 500, 704,
        632, 890, 785, 414, 928, 468, 358, 332, 440, 117, 110, 910, 474, 128,
        403, 763, 781, 724, 25, 428, 939, 401, 377, 926, 938, 696, 268, 591,
        559, 85, 510, 680, 270, 762, 477, 292, 845, 906, 778, 851, 943, 795,
        79, 711, 422, 652, 128, 777, 67, 760, 442, 603, 709, 164, 807, 566,
        869, 569, 298, 999, 792, 328, 341, 978, 186, 365, 975, 117, 928, 677,
        193, 8, 930, 70, 570, 726, 61, 663, 38, 365, 126, 258, 592, 516, 148,
        689, 321, 522, 879, 123, 546, 365, 125, 867, 48, 837, 175, 603, 355,
        126, 308, 737, 240, 721, 516, 634, 300, 493, 792, 205, 119, 783, 927,
        129, 35, 761, 812, 378, 45, 753, 774, 278, 528, 126, 208, 2, 130, 492,
        909, 749, 731, 842, 209, 272, 532, 507, 634, 417, 510, 884, 28, 509,
        977, 689, 12, 750, 396, 838, 803, 412, 478, 991, 149, 761, 488, 877,
        991, 257, 875, 654, 302, 159, 152, 76, 631, 499, 104, 352, 647, 911,
        246, 969, 153, 23, 903, 900, 924, 500, 583, 416, 779, 900, 710, 89,
        314, 699, 691, 526
    ]) == 940899
コード例 #4
0
def test_01():
    assert Solution().maxArea([1, 1]) == 1
コード例 #5
0
def test_04():
    assert Solution().maxArea(
        [683, 743, 968, 695, 461, 369, 31, 348, 208, 240]) == 2436
コード例 #6
0
def test_08():
    assert Solution().maxArea([2, 2, 1, 2]) == 6
コード例 #7
0
def test_03():
    assert Solution().maxArea([1, 2, 3]) == 2