/ tabris /

记录详情

Accepted


  
# 状态 耗时 内存占用
#1 Accepted 2ms 204.0 KiB
#2 Accepted 2ms 216.0 KiB
#3 Accepted 3ms 212.0 KiB
#4 Accepted 2ms 216.0 KiB
#5 Accepted 3ms 216.0 KiB
#6 Accepted 2ms 216.0 KiB
#7 Accepted 2ms 212.0 KiB
#8 Accepted 2ms 216.0 KiB
#9 Accepted 2ms 216.0 KiB
#10 Accepted 2ms 216.0 KiB

代码

#include <bits/stdc++.h>                                                                                             
typedef long long int LL;                                                                                            
using namespace std;  

void run();

int main(){                                                                                                           
    run();                                                                                                           
    return 0;                                                                                                        
}

int a[1111];
int b[1111];
int c[1111];

void run(){
    int kcase = 0,n,m;
    while(~scanf("%d%d",&n,&m)){
        memset(c,0,sizeof(c));
        int mxa = 0,mxb = 0;
        for(int i=1;i<=n;i++){
            scanf("%d",&a[i]);
            mxa = max(mxa,a[i]);
        }
        for(int i=1;i<=m;i++){
            scanf("%d",&b[i]);
            mxb = max(mxb, b[i]);
            for(int j=1;j<=n;j++){
                c[i]+=(a[j]>=b[i]);
            }
        }
        printf("Case #%d:\n",++kcase);
        puts((mxa>=mxb)?"YES":"NO");
        for(int i=1;i<=m;i++)printf((i==m)?"%d\n":"%d ",c[i]);
    }
}

信息

递交者
类型
递交
语言
C++
递交时间
2019-06-10 22:36:59
评测时间
2019-06-10 22:36:59
评测机
分数
100
总耗时
26ms
峰值内存
216.0 KiB