結果

問題 No.1460 Max of Min
ユーザー kotatsugamekotatsugame
提出日時 2021-03-31 22:28:45
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 424 bytes
コンパイル時間 834 ms
コンパイル使用メモリ 74,356 KB
実行使用メモリ 11,804 KB
最終ジャッジ日時 2024-05-09 08:50:36
合計ジャッジ時間 105,942 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
11,648 KB
testcase_01 AC 6 ms
11,648 KB
testcase_02 AC 13 ms
11,648 KB
testcase_03 AC 1,718 ms
11,624 KB
testcase_04 AC 1,736 ms
11,804 KB
testcase_05 AC 7 ms
11,648 KB
testcase_06 AC 1,477 ms
11,648 KB
testcase_07 AC 1,431 ms
11,648 KB
testcase_08 WA -
testcase_09 AC 15 ms
11,648 KB
testcase_10 AC 1,678 ms
11,772 KB
testcase_11 WA -
testcase_12 AC 698 ms
11,648 KB
testcase_13 AC 1,378 ms
11,776 KB
testcase_14 AC 840 ms
11,776 KB
testcase_15 AC 607 ms
11,776 KB
testcase_16 AC 1,334 ms
11,652 KB
testcase_17 AC 1,011 ms
11,648 KB
testcase_18 WA -
testcase_19 AC 939 ms
11,636 KB
testcase_20 WA -
testcase_21 AC 381 ms
11,708 KB
testcase_22 AC 1,020 ms
11,648 KB
testcase_23 AC 143 ms
11,648 KB
testcase_24 AC 1,090 ms
11,648 KB
testcase_25 AC 130 ms
11,520 KB
testcase_26 AC 1,359 ms
11,648 KB
testcase_27 AC 554 ms
11,728 KB
testcase_28 AC 306 ms
11,648 KB
testcase_29 AC 1,008 ms
11,520 KB
testcase_30 AC 1,392 ms
11,548 KB
testcase_31 AC 1,018 ms
11,588 KB
testcase_32 AC 1,283 ms
11,636 KB
testcase_33 AC 758 ms
11,648 KB
testcase_34 AC 896 ms
11,648 KB
testcase_35 AC 566 ms
11,496 KB
testcase_36 AC 335 ms
11,644 KB
testcase_37 AC 1,063 ms
11,688 KB
testcase_38 AC 1,361 ms
11,648 KB
testcase_39 AC 807 ms
11,688 KB
testcase_40 AC 673 ms
11,644 KB
testcase_41 AC 549 ms
11,616 KB
testcase_42 AC 416 ms
11,648 KB
testcase_43 AC 985 ms
11,636 KB
testcase_44 AC 1,219 ms
11,648 KB
testcase_45 AC 229 ms
11,648 KB
testcase_46 AC 874 ms
11,520 KB
testcase_47 AC 972 ms
11,648 KB
testcase_48 AC 1,284 ms
11,624 KB
testcase_49 AC 1,178 ms
11,648 KB
testcase_50 AC 299 ms
11,648 KB
testcase_51 AC 1,003 ms
11,776 KB
testcase_52 AC 515 ms
11,620 KB
testcase_53 AC 1,117 ms
11,724 KB
testcase_54 AC 1,457 ms
11,776 KB
testcase_55 AC 1,417 ms
11,648 KB
testcase_56 AC 1,439 ms
11,648 KB
testcase_57 AC 1,386 ms
11,648 KB
testcase_58 AC 1,446 ms
11,648 KB
testcase_59 AC 1,426 ms
11,776 KB
testcase_60 AC 1,427 ms
11,648 KB
testcase_61 AC 1,387 ms
11,776 KB
testcase_62 AC 1,479 ms
11,644 KB
testcase_63 AC 1,390 ms
11,648 KB
testcase_64 AC 1,447 ms
11,648 KB
testcase_65 AC 1,400 ms
11,668 KB
testcase_66 AC 1,421 ms
11,648 KB
testcase_67 AC 1,443 ms
11,648 KB
testcase_68 AC 1,417 ms
11,648 KB
testcase_69 AC 1,403 ms
11,628 KB
testcase_70 AC 1,419 ms
11,548 KB
testcase_71 AC 1,462 ms
11,708 KB
testcase_72 AC 1,445 ms
11,728 KB
testcase_73 AC 1,432 ms
11,648 KB
testcase_74 AC 1,465 ms
11,712 KB
testcase_75 AC 1,407 ms
11,540 KB
testcase_76 AC 1,377 ms
11,520 KB
testcase_77 AC 1,436 ms
11,672 KB
testcase_78 AC 1,426 ms
11,648 KB
testcase_79 AC 1,412 ms
11,636 KB
testcase_80 AC 1,428 ms
11,684 KB
testcase_81 AC 1,415 ms
11,776 KB
testcase_82 AC 1,469 ms
11,648 KB
testcase_83 AC 1,521 ms
11,768 KB
testcase_84 AC 1,653 ms
11,648 KB
testcase_85 AC 1,643 ms
11,652 KB
testcase_86 AC 1,717 ms
11,732 KB
testcase_87 AC 1,648 ms
11,628 KB
testcase_88 AC 1,665 ms
11,648 KB
testcase_89 AC 1,676 ms
11,648 KB
testcase_90 AC 1,628 ms
11,672 KB
testcase_91 AC 1,660 ms
11,648 KB
testcase_92 AC 1,668 ms
11,524 KB
testcase_93 AC 1,667 ms
11,628 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:10:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   10 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;
long N;
int K;
long A[1010],B[1010];
long F[1<<20];
main()
{
	cin>>K>>N;
	for(int i=0;i<K;i++)cin>>A[i];
	for(int i=0;i<K;i++)cin>>B[i];
	for(int i=0;i<K;i++)F[i]=A[i];
	for(int i=K;i<1<<20;i++)
	{
		long nxt=-9e18;
		for(int j=0;j<K;j++)nxt=max(nxt,min(F[i-K+j],B[j]));
		F[i]=nxt;
	}
	if(N>=1<<20)N=(1<<20)-1;
	cout<<F[N]<<endl;
}
0