提出 #70775756


ソースコード 拡げる

#include<bits/stdc++.h>
#define ll long long
#define REP(i,l,r) for(int i=(l);i<=(r);i++)
#define PER(i,r,l) for(int i=(r);i>=(l);i--)
using namespace std;
inline int read(){
    int x=0,f=1;
    char c=getchar();
    while(!isdigit(c)){
        if(c=='-')f=-1;
        c=getchar();
    }
    while(isdigit(c)){
        x=(x<<3)+(x<<1)+c-'0';
        c=getchar();
    }
    return x*f;
}
void write(int x){
    if(x<0)putchar('-'),x=-x;
    if(x>9)write(x/10);
    putchar(x%10+'0');
}
const int N=2e5+5;
int n,m,k,h[N],b[N];
int main(){
    n=read(),m=read(),k=read();
    REP(i,1,n)h[i]=read();
    REP(i,1,m)b[i]=read();
    sort(h+1,h+n+1);
    sort(b+1,b+m+1);
    int p=1;
    REP(i,1,m){
        if(h[p]<=b[i])--k,++p;
        if(!k)break;
        if(p>n)break;
    }
    if(k)printf("No\n");
    else printf("Yes\n");
    return 0;
}

提出情報

提出日時
問題 C - Robot Factory
ユーザ Yuzimy
言語 C++23 (GCC 15.2.0)
得点 300
コード長 881 Byte
結果 AC
実行時間 40 ms
メモリ 5164 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 3456 KiB
00_sample_01.txt AC 1 ms 3368 KiB
00_sample_02.txt AC 1 ms 3376 KiB
00_sample_03.txt AC 1 ms 3368 KiB
01_random_03.txt AC 39 ms 5100 KiB
01_random_04.txt AC 39 ms 5112 KiB
01_random_05.txt AC 40 ms 5092 KiB
01_random_06.txt AC 39 ms 4944 KiB
01_random_07.txt AC 39 ms 5112 KiB
01_random_08.txt AC 39 ms 4948 KiB
01_random_09.txt AC 39 ms 5044 KiB
01_random_10.txt AC 39 ms 5112 KiB
01_random_11.txt AC 39 ms 5100 KiB
01_random_12.txt AC 18 ms 4256 KiB
01_random_13.txt AC 20 ms 4344 KiB
01_random_14.txt AC 26 ms 4560 KiB
01_random_15.txt AC 12 ms 3920 KiB
01_random_16.txt AC 11 ms 3892 KiB
01_random_17.txt AC 12 ms 4072 KiB
01_random_18.txt AC 39 ms 5068 KiB
01_random_19.txt AC 39 ms 5100 KiB
01_random_20.txt AC 39 ms 5120 KiB
01_random_21.txt AC 39 ms 5112 KiB
01_random_22.txt AC 39 ms 4908 KiB
01_random_23.txt AC 19 ms 4304 KiB
01_random_24.txt AC 2 ms 3584 KiB
01_random_25.txt AC 37 ms 5164 KiB
01_random_26.txt AC 39 ms 5120 KiB
01_random_27.txt AC 40 ms 5128 KiB
01_random_28.txt AC 39 ms 4992 KiB
01_random_29.txt AC 39 ms 5072 KiB
01_random_30.txt AC 38 ms 5072 KiB
01_random_31.txt AC 25 ms 4588 KiB
01_random_32.txt AC 29 ms 4688 KiB
01_random_33.txt AC 28 ms 4716 KiB