結果

問題 No.2596 Christmas Eve (Heuristic ver.)
ユーザー 👑 p-adicp-adic
提出日時 2023-12-26 01:13:10
言語 cLay
(20240104-1)
結果
TLE  
実行時間 -
コード長 983 bytes
コンパイル時間 3,390 ms
コンパイル使用メモリ 202,444 KB
実行使用メモリ 16,808 KB
スコア 0
最終ジャッジ日時 2023-12-26 01:13:19
合計ジャッジ時間 9,011 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
testcase_67 -- -
testcase_68 -- -
testcase_69 -- -
testcase_70 -- -
testcase_71 -- -
testcase_72 -- -
testcase_73 -- -
testcase_74 -- -
testcase_75 -- -
testcase_76 -- -
testcase_77 -- -
testcase_78 -- -
testcase_79 -- -
testcase_80 -- -
testcase_81 -- -
testcase_82 -- -
testcase_83 -- -
testcase_84 -- -
testcase_85 -- -
testcase_86 -- -
testcase_87 -- -
testcase_88 -- -
testcase_89 -- -
testcase_90 -- -
testcase_91 -- -
testcase_92 -- -
testcase_93 -- -
testcase_94 -- -
testcase_95 -- -
testcase_96 -- -
testcase_97 -- -
testcase_98 -- -
testcase_99 -- -
testcase_100 -- -
testcase_101 -- -
testcase_102 -- -
testcase_103 -- -
testcase_104 -- -
testcase_105 -- -
testcase_106 -- -
testcase_107 -- -
testcase_108 -- -
testcase_109 -- -
testcase_110 -- -
testcase_111 -- -
testcase_112 -- -
testcase_113 -- -
testcase_114 -- -
testcase_115 -- -
testcase_116 -- -
testcase_117 -- -
testcase_118 -- -
testcase_119 -- -
testcase_120 -- -
testcase_121 -- -
testcase_122 -- -
testcase_123 -- -
testcase_124 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:341:12: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
  341 |       auto&[V]=*O.begin();
      |            ^
main.cpp:345:12: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
  345 |       auto&[V]=*O.rbegin();
      |            ^
main.cpp:365:10: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
  365 |     auto&[V]=*j++;
      |          ^

ソースコード

diff #

#define I insert
#define D erase
#define S second
#define V h,u,v,w,x
#define U upper_bound
#define l get<0>(*O.begin())
#define L get<0>(*O.rbegin())
ll@N,@K,@a[8N],H,p;set<pair<ll,ll>>A,C,E;rep(i,N)A.I({a[i],i}),C.I({a[2N+2i],2i}),C.I({a[2N+2i+1],2i+1}),E.I({a[6N+i],i});set<tuple<ll,ll,ll,ll,ll>>O;rep(K){auto x=E.begin(),u=A.U({x->first,N}),w=C.U({u->first,2N}),v=w++;O.I({a[N+u->S]+a[4N+v->S]+a[4N+w->S]+a[7N+x->S],u->S,v->S,w->S,x->S});A.D(u),C.D(v),C.D(w),E.D(x);}vector<ll>c,d,s={N,4N,4N,7N};decltype(A)*P[4]={&A,&C,&C,&E};Rand R;rep(n,1d6){if(n%2){auto&[V]=*O.begin();c={V};}else{auto&[V]=*O.rbegin();c={V};}d=c;p=R.get()%4;auto j=P[p]->begin();REP(R.get()%P[p]->size())j++;if(l<(H=c[0]-a[s[p]+c[p+1]]+a[s[p]+(d[p+1]=j->S)])<L&&a[6N+d[4]]<a[d[1]]<min(a[2N+d[2]],a[2N+d[3]])){O.I({H,d[1],d[2],d[3],d[4]}),P[p]->I({a[s[p]+c[p+1]],c[p+1]}),O.D({c[0],c[1],c[2],c[3],c[4]}),P[p]->D({a[s[p]+j->S],j->S});}}auto j=O.begin(),e=O.end();while(j!=e){auto&[V]=*j++;wt(u+1,v+1,w+1,x+1);}
0