結果

問題 No.1460 Max of Min
ユーザー googol_S0googol_S0
提出日時 2021-03-31 21:59:10
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 442 bytes
コンパイル時間 1,960 ms
コンパイル使用メモリ 200,676 KB
実行使用メモリ 13,088 KB
最終ジャッジ日時 2023-08-22 01:49:16
合計ジャッジ時間 71,062 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
12,584 KB
testcase_01 AC 8 ms
12,648 KB
testcase_02 AC 10 ms
12,904 KB
testcase_03 AC 945 ms
12,900 KB
testcase_04 AC 945 ms
12,804 KB
testcase_05 AC 9 ms
12,836 KB
testcase_06 AC 931 ms
12,844 KB
testcase_07 AC 937 ms
12,792 KB
testcase_08 AC 10 ms
12,588 KB
testcase_09 WA -
testcase_10 AC 941 ms
12,748 KB
testcase_11 AC 938 ms
12,904 KB
testcase_12 AC 445 ms
12,840 KB
testcase_13 WA -
testcase_14 AC 545 ms
12,780 KB
testcase_15 AC 364 ms
12,752 KB
testcase_16 AC 867 ms
12,844 KB
testcase_17 AC 675 ms
12,728 KB
testcase_18 WA -
testcase_19 AC 618 ms
12,836 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 632 ms
12,720 KB
testcase_23 AC 108 ms
12,736 KB
testcase_24 AC 725 ms
12,680 KB
testcase_25 AC 99 ms
12,884 KB
testcase_26 AC 938 ms
12,768 KB
testcase_27 AC 381 ms
12,840 KB
testcase_28 AC 211 ms
12,644 KB
testcase_29 AC 702 ms
12,792 KB
testcase_30 AC 898 ms
12,712 KB
testcase_31 AC 653 ms
12,844 KB
testcase_32 AC 834 ms
12,840 KB
testcase_33 AC 505 ms
12,768 KB
testcase_34 AC 588 ms
12,644 KB
testcase_35 AC 362 ms
12,780 KB
testcase_36 AC 230 ms
12,548 KB
testcase_37 AC 681 ms
12,832 KB
testcase_38 AC 863 ms
12,836 KB
testcase_39 AC 526 ms
12,796 KB
testcase_40 AC 442 ms
12,920 KB
testcase_41 AC 373 ms
12,792 KB
testcase_42 AC 279 ms
12,904 KB
testcase_43 AC 638 ms
12,724 KB
testcase_44 AC 828 ms
12,652 KB
testcase_45 AC 160 ms
12,708 KB
testcase_46 AC 564 ms
12,604 KB
testcase_47 AC 632 ms
12,844 KB
testcase_48 AC 861 ms
12,600 KB
testcase_49 AC 751 ms
12,900 KB
testcase_50 AC 195 ms
12,712 KB
testcase_51 AC 680 ms
12,784 KB
testcase_52 AC 334 ms
12,792 KB
testcase_53 AC 697 ms
12,748 KB
testcase_54 AC 950 ms
12,708 KB
testcase_55 AC 955 ms
12,932 KB
testcase_56 AC 942 ms
12,772 KB
testcase_57 AC 950 ms
12,792 KB
testcase_58 AC 960 ms
12,704 KB
testcase_59 AC 957 ms
12,864 KB
testcase_60 AC 962 ms
12,740 KB
testcase_61 AC 961 ms
12,792 KB
testcase_62 AC 962 ms
12,744 KB
testcase_63 AC 948 ms
12,904 KB
testcase_64 AC 953 ms
12,544 KB
testcase_65 AC 953 ms
12,640 KB
testcase_66 AC 950 ms
12,776 KB
testcase_67 AC 958 ms
12,904 KB
testcase_68 AC 956 ms
12,868 KB
testcase_69 AC 968 ms
12,748 KB
testcase_70 AC 956 ms
12,768 KB
testcase_71 AC 957 ms
12,708 KB
testcase_72 AC 959 ms
12,928 KB
testcase_73 AC 953 ms
12,724 KB
testcase_74 AC 953 ms
12,800 KB
testcase_75 AC 954 ms
12,648 KB
testcase_76 AC 943 ms
12,900 KB
testcase_77 AC 945 ms
12,752 KB
testcase_78 AC 954 ms
12,708 KB
testcase_79 AC 953 ms
12,792 KB
testcase_80 AC 952 ms
12,640 KB
testcase_81 AC 953 ms
12,640 KB
testcase_82 AC 946 ms
12,716 KB
testcase_83 AC 958 ms
12,904 KB
testcase_84 AC 948 ms
12,744 KB
testcase_85 AC 939 ms
13,088 KB
testcase_86 AC 950 ms
12,732 KB
testcase_87 AC 944 ms
12,740 KB
testcase_88 AC 945 ms
12,892 KB
testcase_89 AC 937 ms
12,736 KB
testcase_90 AC 938 ms
12,772 KB
testcase_91 AC 945 ms
12,784 KB
testcase_92 AC 955 ms
12,868 KB
testcase_93 AC 938 ms
12,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  ll K,N;
  cin>>K>>N;
  vector<ll> A(1234567+K);
  vector<ll> B(K);
  for(int i=0;i<K;i++){
    cin>>A[i];
  }for(int i=0;i<K;i++){
    cin>>B[i];
  }
  ll INF=-1000000000000000001LL;
  ll x;
  for(int i=0;i<1234567;i++){
    x=INF;
    for(int j=0;j<K;j++){
      x=max(x,min(A[i+j],B[j]));
    }
    A[K+i]=x;
  }
  cout<<A[min(N,(1200000/K)*K+(N%K))]<<"\n";
}
0