提出 #70784751


ソースコード 拡げる

#include<bits/stdc++.h>
    using namespace std;
using ll = long long;
int main() {
    cin.tie(0)->sync_with_stdio(false);
        int n,m,k;
        cin>>n>>m>>k;
        vector<int> arr(n);
     for (auto &i:arr) cin>>i;
    vector<int>b(m);
    for (auto &i:b) cin>>i;
    sort(arr.begin(),arr.end());
    sort(b.begin(),b.end());
        int l=0,r=0;
        int cnt=0;
 while(l<n && r<m) {
     if (arr[l]<=b[r]) {cnt++;
         l++;
         r++;
     }else r++;
 }if (cnt>=k)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    return 0;
}

提出情報

提出日時
問題 C - Robot Factory
ユーザ shide_chuanzhang
言語 C++23 (GCC 15.2.0)
得点 300
コード長 568 Byte
結果 AC
実行時間 38 ms
メモリ 5088 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 4
AC × 35
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3476 KiB
00_sample_01.txt AC 1 ms 3564 KiB
00_sample_02.txt AC 1 ms 3456 KiB
00_sample_03.txt AC 1 ms 3616 KiB
01_random_03.txt AC 38 ms 4936 KiB
01_random_04.txt AC 38 ms 4908 KiB
01_random_05.txt AC 38 ms 5028 KiB
01_random_06.txt AC 38 ms 4936 KiB
01_random_07.txt AC 38 ms 4904 KiB
01_random_08.txt AC 38 ms 4960 KiB
01_random_09.txt AC 38 ms 5084 KiB
01_random_10.txt AC 38 ms 4892 KiB
01_random_11.txt AC 38 ms 5040 KiB
01_random_12.txt AC 17 ms 3964 KiB
01_random_13.txt AC 18 ms 4068 KiB
01_random_14.txt AC 25 ms 4284 KiB
01_random_15.txt AC 11 ms 3784 KiB
01_random_16.txt AC 10 ms 3796 KiB
01_random_17.txt AC 12 ms 3804 KiB
01_random_18.txt AC 38 ms 4936 KiB
01_random_19.txt AC 38 ms 5088 KiB
01_random_20.txt AC 38 ms 4948 KiB
01_random_21.txt AC 38 ms 4936 KiB
01_random_22.txt AC 38 ms 4956 KiB
01_random_23.txt AC 18 ms 4092 KiB
01_random_24.txt AC 2 ms 3632 KiB
01_random_25.txt AC 36 ms 4836 KiB
01_random_26.txt AC 37 ms 5084 KiB
01_random_27.txt AC 38 ms 5080 KiB
01_random_28.txt AC 38 ms 4948 KiB
01_random_29.txt AC 38 ms 4904 KiB
01_random_30.txt AC 38 ms 4960 KiB
01_random_31.txt AC 24 ms 4320 KiB
01_random_32.txt AC 28 ms 4424 KiB
01_random_33.txt AC 27 ms 4436 KiB