Submission #70783574


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

int main(){
  int N, M, K;
  cin >> N >>M>>K;
  vector<int> H(N), B(M);
  for(int i = 0;i<N;i++)cin>>H[i];
  for(int i =0;i<M;i++)cin>>B[i];
  sort(H.begin(),H.end());
  sort(B.begin(),B.end());
  int idx=M-K;
  bool ok=true;
  for(int i=0;i<K;i++){
    if(H[i]>B[idx+i])ok=false;
  }
  if(ok)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}

Submission Info

Submission Time
Task C - Robot Factory
User hokuto9982
Language C++23 (GCC 15.2.0)
Score 300
Code Size 416 Byte
Status AC
Exec Time 133 ms
Memory 4996 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 4
AC × 35
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt, 01_random_24.txt, 01_random_25.txt, 01_random_26.txt, 01_random_27.txt, 01_random_28.txt, 01_random_29.txt, 01_random_30.txt, 01_random_31.txt, 01_random_32.txt, 01_random_33.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3432 KiB
00_sample_01.txt AC 1 ms 3572 KiB
00_sample_02.txt AC 1 ms 3628 KiB
00_sample_03.txt AC 1 ms 3572 KiB
01_random_03.txt AC 131 ms 4956 KiB
01_random_04.txt AC 130 ms 4932 KiB
01_random_05.txt AC 130 ms 4680 KiB
01_random_06.txt AC 130 ms 4996 KiB
01_random_07.txt AC 132 ms 4816 KiB
01_random_08.txt AC 130 ms 4876 KiB
01_random_09.txt AC 133 ms 4816 KiB
01_random_10.txt AC 130 ms 4872 KiB
01_random_11.txt AC 131 ms 4940 KiB
01_random_12.txt AC 60 ms 3984 KiB
01_random_13.txt AC 63 ms 4040 KiB
01_random_14.txt AC 86 ms 4216 KiB
01_random_15.txt AC 38 ms 3780 KiB
01_random_16.txt AC 33 ms 3700 KiB
01_random_17.txt AC 41 ms 3804 KiB
01_random_18.txt AC 131 ms 4940 KiB
01_random_19.txt AC 131 ms 4808 KiB
01_random_20.txt AC 131 ms 4944 KiB
01_random_21.txt AC 133 ms 4816 KiB
01_random_22.txt AC 130 ms 4944 KiB
01_random_23.txt AC 60 ms 3980 KiB
01_random_24.txt AC 5 ms 3656 KiB
01_random_25.txt AC 123 ms 4808 KiB
01_random_26.txt AC 130 ms 4992 KiB
01_random_27.txt AC 131 ms 4872 KiB
01_random_28.txt AC 131 ms 4928 KiB
01_random_29.txt AC 131 ms 4928 KiB
01_random_30.txt AC 131 ms 4944 KiB
01_random_31.txt AC 82 ms 4356 KiB
01_random_32.txt AC 96 ms 4420 KiB
01_random_33.txt AC 92 ms 4444 KiB