码迷,mamicode.com
首页 > 其他好文 > 详细

Good Bye 2019 A. Card Game

时间:2020-01-08 00:30:23      阅读:80      评论:0      收藏:0      [点我收藏+]

标签:while   http   ios   false   syn   ima   info   思路   game   

第一次五分钟过了cf A

https://codeforces.com/contest/1270/problem/A

思路:谁拿到最大的牌即赢

官方:

技术图片

 

 

 

 #include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N= 105 ;
int a[N],b[N];
int main(){
    int T;
    ios::sync_with_stdio(false);cin.tie(0);
    cin>>T;
    while(T--){
        int n,k1,k2,flag=0;
        cin>>n>>k1>>k2;
        for(int i=0;i<k1;i++)
        {cin>>a[i];
        if(a[i]==n)flag=1;
        }
        for(int i=0;i<k2;i++)cin>>b[i];
        if(flag)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
        
    }
    return 0;
    
}

Good Bye 2019 A. Card Game

标签:while   http   ios   false   syn   ima   info   思路   game   

原文地址:https://www.cnblogs.com/wyh447154317/p/12164268.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!