結果

問題 No.1460 Max of Min
ユーザー googol_S0googol_S0
提出日時 2021-03-31 21:52:21
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 443 bytes
コンパイル時間 2,317 ms
コンパイル使用メモリ 199,884 KB
実行使用メモリ 13,112 KB
最終ジャッジ日時 2023-08-22 01:19:21
合計ジャッジ時間 72,322 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
12,608 KB
testcase_01 AC 8 ms
12,496 KB
testcase_02 AC 10 ms
12,476 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 8 ms
12,676 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 451 ms
12,784 KB
testcase_13 WA -
testcase_14 AC 552 ms
12,736 KB
testcase_15 AC 378 ms
12,864 KB
testcase_16 AC 897 ms
12,556 KB
testcase_17 AC 697 ms
12,736 KB
testcase_18 WA -
testcase_19 AC 643 ms
12,912 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 659 ms
12,864 KB
testcase_23 AC 107 ms
12,604 KB
testcase_24 AC 741 ms
12,920 KB
testcase_25 AC 101 ms
12,920 KB
testcase_26 AC 960 ms
12,932 KB
testcase_27 AC 387 ms
12,852 KB
testcase_28 AC 210 ms
12,860 KB
testcase_29 AC 718 ms
12,672 KB
testcase_30 AC 916 ms
12,672 KB
testcase_31 AC 675 ms
13,056 KB
testcase_32 AC 862 ms
12,872 KB
testcase_33 AC 515 ms
12,744 KB
testcase_34 AC 611 ms
12,556 KB
testcase_35 AC 371 ms
12,884 KB
testcase_36 AC 230 ms
12,612 KB
testcase_37 AC 701 ms
12,800 KB
testcase_38 AC 884 ms
12,748 KB
testcase_39 AC 534 ms
12,664 KB
testcase_40 AC 446 ms
12,792 KB
testcase_41 AC 379 ms
12,732 KB
testcase_42 AC 290 ms
12,592 KB
testcase_43 AC 656 ms
12,556 KB
testcase_44 AC 842 ms
12,852 KB
testcase_45 AC 162 ms
12,864 KB
testcase_46 AC 582 ms
12,904 KB
testcase_47 AC 656 ms
12,868 KB
testcase_48 AC 885 ms
12,804 KB
testcase_49 AC 765 ms
12,920 KB
testcase_50 AC 194 ms
12,888 KB
testcase_51 AC 689 ms
12,756 KB
testcase_52 AC 340 ms
12,924 KB
testcase_53 AC 708 ms
12,852 KB
testcase_54 AC 966 ms
12,920 KB
testcase_55 AC 968 ms
12,616 KB
testcase_56 AC 969 ms
12,604 KB
testcase_57 AC 968 ms
12,784 KB
testcase_58 WA -
testcase_59 AC 968 ms
12,596 KB
testcase_60 AC 965 ms
12,732 KB
testcase_61 AC 968 ms
12,736 KB
testcase_62 AC 968 ms
12,604 KB
testcase_63 AC 967 ms
12,788 KB
testcase_64 AC 967 ms
12,916 KB
testcase_65 AC 968 ms
12,920 KB
testcase_66 AC 966 ms
12,892 KB
testcase_67 AC 967 ms
12,792 KB
testcase_68 AC 967 ms
12,860 KB
testcase_69 AC 966 ms
12,664 KB
testcase_70 AC 967 ms
12,592 KB
testcase_71 AC 968 ms
12,916 KB
testcase_72 AC 967 ms
12,556 KB
testcase_73 AC 969 ms
12,792 KB
testcase_74 AC 960 ms
13,060 KB
testcase_75 AC 965 ms
12,920 KB
testcase_76 AC 960 ms
12,592 KB
testcase_77 AC 959 ms
12,808 KB
testcase_78 AC 963 ms
12,600 KB
testcase_79 AC 960 ms
12,748 KB
testcase_80 AC 961 ms
12,792 KB
testcase_81 AC 962 ms
12,928 KB
testcase_82 AC 960 ms
12,744 KB
testcase_83 AC 964 ms
12,544 KB
testcase_84 WA -
testcase_85 WA -
testcase_86 WA -
testcase_87 WA -
testcase_88 WA -
testcase_89 WA -
testcase_90 WA -
testcase_91 WA -
testcase_92 WA -
testcase_93 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  int 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