結果

問題 No.1460 Max of Min
ユーザー kotatsugamekotatsugame
提出日時 2021-03-31 22:31:57
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 467 bytes
コンパイル時間 966 ms
コンパイル使用メモリ 74,456 KB
実行使用メモリ 11,776 KB
最終ジャッジ日時 2024-05-09 08:59:00
合計ジャッジ時間 123,496 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
11,740 KB
testcase_01 AC 8 ms
11,632 KB
testcase_02 AC 16 ms
11,612 KB
testcase_03 TLE -
testcase_04 TLE -
testcase_05 AC 8 ms
11,648 KB
testcase_06 AC 1,720 ms
11,560 KB
testcase_07 AC 1,638 ms
11,648 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 1,928 ms
11,660 KB
testcase_11 AC 1,948 ms
11,628 KB
testcase_12 AC 811 ms
11,720 KB
testcase_13 AC 1,611 ms
11,776 KB
testcase_14 AC 984 ms
11,648 KB
testcase_15 WA -
testcase_16 AC 1,555 ms
11,648 KB
testcase_17 AC 1,169 ms
11,648 KB
testcase_18 WA -
testcase_19 AC 1,107 ms
11,648 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 1,178 ms
11,648 KB
testcase_23 AC 168 ms
11,648 KB
testcase_24 AC 1,279 ms
11,648 KB
testcase_25 AC 152 ms
11,732 KB
testcase_26 AC 1,598 ms
11,648 KB
testcase_27 AC 651 ms
11,648 KB
testcase_28 AC 361 ms
11,648 KB
testcase_29 AC 1,186 ms
11,648 KB
testcase_30 AC 1,594 ms
11,732 KB
testcase_31 AC 1,187 ms
11,648 KB
testcase_32 AC 1,446 ms
11,648 KB
testcase_33 AC 882 ms
11,636 KB
testcase_34 AC 1,052 ms
11,648 KB
testcase_35 AC 648 ms
11,612 KB
testcase_36 AC 393 ms
11,648 KB
testcase_37 AC 1,240 ms
11,648 KB
testcase_38 AC 1,530 ms
11,648 KB
testcase_39 AC 947 ms
11,652 KB
testcase_40 AC 795 ms
11,648 KB
testcase_41 AC 651 ms
11,484 KB
testcase_42 AC 493 ms
11,648 KB
testcase_43 AC 1,157 ms
11,520 KB
testcase_44 AC 1,421 ms
11,648 KB
testcase_45 AC 268 ms
11,648 KB
testcase_46 AC 1,020 ms
11,520 KB
testcase_47 AC 1,146 ms
11,648 KB
testcase_48 AC 1,514 ms
11,624 KB
testcase_49 AC 1,376 ms
11,648 KB
testcase_50 AC 351 ms
11,648 KB
testcase_51 AC 1,174 ms
11,628 KB
testcase_52 AC 601 ms
11,648 KB
testcase_53 AC 1,303 ms
11,704 KB
testcase_54 AC 1,718 ms
11,648 KB
testcase_55 AC 1,672 ms
11,648 KB
testcase_56 AC 1,683 ms
11,624 KB
testcase_57 AC 1,640 ms
11,520 KB
testcase_58 AC 1,667 ms
11,624 KB
testcase_59 AC 1,673 ms
11,648 KB
testcase_60 AC 1,670 ms
11,648 KB
testcase_61 AC 1,625 ms
11,700 KB
testcase_62 AC 1,653 ms
11,648 KB
testcase_63 AC 1,621 ms
11,648 KB
testcase_64 AC 1,630 ms
11,584 KB
testcase_65 AC 1,640 ms
11,652 KB
testcase_66 AC 1,663 ms
11,520 KB
testcase_67 AC 1,688 ms
11,628 KB
testcase_68 AC 1,671 ms
11,648 KB
testcase_69 AC 1,644 ms
11,560 KB
testcase_70 AC 1,649 ms
11,644 KB
testcase_71 AC 1,707 ms
11,648 KB
testcase_72 AC 1,699 ms
11,744 KB
testcase_73 AC 1,656 ms
11,648 KB
testcase_74 AC 1,678 ms
11,648 KB
testcase_75 AC 1,641 ms
11,776 KB
testcase_76 AC 1,622 ms
11,648 KB
testcase_77 AC 1,687 ms
11,592 KB
testcase_78 AC 1,672 ms
11,648 KB
testcase_79 AC 1,641 ms
11,520 KB
testcase_80 AC 1,673 ms
11,720 KB
testcase_81 AC 1,653 ms
11,648 KB
testcase_82 AC 1,701 ms
11,672 KB
testcase_83 AC 1,633 ms
11,648 KB
testcase_84 AC 1,924 ms
11,608 KB
testcase_85 AC 1,912 ms
11,648 KB
testcase_86 AC 1,959 ms
11,648 KB
testcase_87 AC 1,922 ms
11,648 KB
testcase_88 AC 1,949 ms
11,648 KB
testcase_89 AC 1,937 ms
11,648 KB
testcase_90 AC 1,905 ms
11,648 KB
testcase_91 AC 1,936 ms
11,648 KB
testcase_92 AC 1,942 ms
11,736 KB
testcase_93 AC 1,910 ms
11,520 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:11:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   11 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;
long N;
int K;
long A[1010],B[1010];
const int LIM=1<<20;
long F[LIM+1];
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<=LIM;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>=LIM)
	{
		N-=LIM;
		N%=K;
		N=LIM-K+N;
	}
	cout<<F[N]<<endl;
}
0