結果
問題 | No.5010 Better Mo's Algorithm is Needed!! (Unweighted) |
ユーザー | titia |
提出日時 | 2022-12-17 02:44:25 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 1,021 ms / 5,000 ms |
コード長 | 610 bytes |
コンパイル時間 | 466 ms |
実行使用メモリ | 66,140 KB |
スコア | 15,647,672,150 |
最終ジャッジ日時 | 2022-12-17 02:47:11 |
合計ジャッジ時間 | 161,584 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge16 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 996 ms
65,892 KB |
testcase_01 | AC | 982 ms
65,940 KB |
testcase_02 | AC | 995 ms
65,868 KB |
testcase_03 | AC | 982 ms
65,908 KB |
testcase_04 | AC | 993 ms
65,848 KB |
testcase_05 | AC | 991 ms
65,876 KB |
testcase_06 | AC | 1,019 ms
65,896 KB |
testcase_07 | AC | 1,018 ms
65,988 KB |
testcase_08 | AC | 1,011 ms
65,856 KB |
testcase_09 | AC | 1,020 ms
65,892 KB |
testcase_10 | AC | 1,013 ms
65,972 KB |
testcase_11 | AC | 986 ms
66,060 KB |
testcase_12 | AC | 1,020 ms
66,088 KB |
testcase_13 | AC | 1,000 ms
65,924 KB |
testcase_14 | AC | 1,021 ms
65,996 KB |
testcase_15 | AC | 1,014 ms
66,016 KB |
testcase_16 | AC | 963 ms
66,036 KB |
testcase_17 | AC | 983 ms
65,868 KB |
testcase_18 | AC | 981 ms
65,892 KB |
testcase_19 | AC | 991 ms
65,864 KB |
testcase_20 | AC | 1,010 ms
66,072 KB |
testcase_21 | AC | 998 ms
66,140 KB |
testcase_22 | AC | 1,015 ms
65,916 KB |
testcase_23 | AC | 987 ms
65,884 KB |
testcase_24 | AC | 952 ms
65,988 KB |
testcase_25 | AC | 970 ms
65,864 KB |
testcase_26 | AC | 982 ms
65,960 KB |
testcase_27 | AC | 950 ms
65,928 KB |
testcase_28 | AC | 1,001 ms
65,844 KB |
testcase_29 | AC | 959 ms
65,904 KB |
testcase_30 | AC | 962 ms
66,020 KB |
testcase_31 | AC | 987 ms
65,920 KB |
testcase_32 | AC | 950 ms
65,988 KB |
testcase_33 | AC | 978 ms
65,924 KB |
testcase_34 | AC | 991 ms
65,840 KB |
testcase_35 | AC | 965 ms
65,956 KB |
testcase_36 | AC | 988 ms
66,120 KB |
testcase_37 | AC | 949 ms
66,032 KB |
testcase_38 | AC | 956 ms
65,904 KB |
testcase_39 | AC | 1,001 ms
65,892 KB |
testcase_40 | AC | 975 ms
65,900 KB |
testcase_41 | AC | 1,005 ms
66,068 KB |
testcase_42 | AC | 994 ms
66,068 KB |
testcase_43 | AC | 956 ms
65,860 KB |
testcase_44 | AC | 972 ms
65,876 KB |
testcase_45 | AC | 1,016 ms
66,032 KB |
testcase_46 | AC | 1,004 ms
66,040 KB |
testcase_47 | AC | 989 ms
65,840 KB |
testcase_48 | AC | 984 ms
66,036 KB |
testcase_49 | AC | 968 ms
65,840 KB |
testcase_50 | AC | 967 ms
66,048 KB |
testcase_51 | AC | 989 ms
66,028 KB |
testcase_52 | AC | 959 ms
65,924 KB |
testcase_53 | AC | 987 ms
65,996 KB |
testcase_54 | AC | 979 ms
66,024 KB |
testcase_55 | AC | 959 ms
65,980 KB |
testcase_56 | AC | 969 ms
66,072 KB |
testcase_57 | AC | 972 ms
66,100 KB |
testcase_58 | AC | 994 ms
65,924 KB |
testcase_59 | AC | 972 ms
65,884 KB |
testcase_60 | AC | 968 ms
66,008 KB |
testcase_61 | AC | 993 ms
65,844 KB |
testcase_62 | AC | 961 ms
65,872 KB |
testcase_63 | AC | 1,006 ms
65,976 KB |
testcase_64 | AC | 996 ms
66,040 KB |
testcase_65 | AC | 982 ms
65,960 KB |
testcase_66 | AC | 966 ms
66,084 KB |
testcase_67 | AC | 995 ms
65,860 KB |
testcase_68 | AC | 950 ms
65,884 KB |
testcase_69 | AC | 988 ms
65,920 KB |
testcase_70 | AC | 1,013 ms
65,988 KB |
testcase_71 | AC | 954 ms
65,960 KB |
testcase_72 | AC | 997 ms
65,932 KB |
testcase_73 | AC | 983 ms
66,040 KB |
testcase_74 | AC | 975 ms
65,952 KB |
testcase_75 | AC | 1,010 ms
66,036 KB |
testcase_76 | AC | 943 ms
66,000 KB |
testcase_77 | AC | 962 ms
66,036 KB |
testcase_78 | AC | 1,004 ms
66,028 KB |
testcase_79 | AC | 968 ms
65,836 KB |
testcase_80 | AC | 962 ms
65,972 KB |
testcase_81 | AC | 975 ms
66,004 KB |
testcase_82 | AC | 949 ms
65,856 KB |
testcase_83 | AC | 988 ms
65,912 KB |
testcase_84 | AC | 1,009 ms
65,904 KB |
testcase_85 | AC | 968 ms
65,840 KB |
testcase_86 | AC | 993 ms
65,976 KB |
testcase_87 | AC | 977 ms
65,912 KB |
testcase_88 | AC | 980 ms
65,920 KB |
testcase_89 | AC | 1,005 ms
66,020 KB |
testcase_90 | AC | 947 ms
66,036 KB |
testcase_91 | AC | 962 ms
66,032 KB |
testcase_92 | AC | 1,015 ms
66,012 KB |
testcase_93 | AC | 979 ms
65,976 KB |
testcase_94 | AC | 1,010 ms
65,836 KB |
testcase_95 | AC | 982 ms
65,932 KB |
testcase_96 | AC | 947 ms
66,044 KB |
testcase_97 | AC | 996 ms
65,980 KB |
testcase_98 | AC | 989 ms
65,864 KB |
testcase_99 | AC | 973 ms
65,980 KB |
testcase_100 | AC | 978 ms
66,040 KB |
testcase_101 | AC | 967 ms
66,012 KB |
testcase_102 | AC | 1,011 ms
65,888 KB |
testcase_103 | AC | 1,019 ms
66,028 KB |
testcase_104 | AC | 949 ms
65,976 KB |
testcase_105 | AC | 940 ms
65,988 KB |
testcase_106 | AC | 984 ms
65,988 KB |
testcase_107 | AC | 980 ms
66,020 KB |
testcase_108 | AC | 1,012 ms
66,036 KB |
testcase_109 | AC | 992 ms
65,828 KB |
testcase_110 | AC | 952 ms
65,872 KB |
testcase_111 | AC | 988 ms
65,876 KB |
testcase_112 | AC | 969 ms
65,876 KB |
testcase_113 | AC | 965 ms
65,948 KB |
testcase_114 | AC | 1,008 ms
65,944 KB |
testcase_115 | AC | 961 ms
65,968 KB |
testcase_116 | AC | 972 ms
65,960 KB |
testcase_117 | AC | 999 ms
66,020 KB |
testcase_118 | AC | 946 ms
65,832 KB |
testcase_119 | AC | 993 ms
65,952 KB |
ソースコード
import sys input = sys.stdin.readline from operator import itemgetter N,Q,WT,ST=map(int,input().split()) W=list(map(int,input().split())) LR=[list(map(int,input().split()))+[i+1] for i in range(Q)] LR.sort(key=itemgetter(0)) LIST=[[] for i in range(1000)] for x,y,ind in LR: LIST[x//400].append((y,ind)) ANS=[] count=0 for i in range(1000): if LIST[i]==[]: continue if count%2==0: LIST[i].sort(key=itemgetter(0)) else: LIST[i].sort(key=itemgetter(0),reverse=True) for _,ind in LIST[i]: ANS.append(ind) count+=1 print(*ANS)