/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 344.0 KiB
#2 Wrong Answer 1ms 320.0 KiB

Code

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

#define ll long long

int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
int dx2[] = {1, -1, 0, 0, -1, 1, -1, 1};
int dy2[] = {0, 0, 1, -1, 1, 1, -1, -1};
int knightX[] = {-2, -2, 2, 2, 1, 1, -1, -1};
int knightY[] = {-1, 1, -1, 1, -2, 2, -2, 2};

const ll INF = 0x3f3f3f3f;
const int N = 1e6 + 5, K = 105;
const ll MOD = 1e9 + 7;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int t = 1;
    cin >> t;
    while (t--) {
        int n , m;
        cin >> n >> m;
        vector<bool> v(10 , false) , vv(10 , false);
        for(int i = 0; i < n; i++){
            int x;
            cin >> x;
            v[x] = true;
        }
        for(int i = 0; i < m; i++){
            int x;
            cin >> x;
            vv[x] = true;
        }

        cout << (v[0] && v[1] && v[2] && v[3] && !count(vv.begin() , vv.end() , false) ? "YES" : "NO") << endl;
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1153 Is Date Possible?
Contest
Happy New Year 2025
Language
C++17 (G++ 13.2.0)
Submit At
2025-01-02 14:37:52
Judged At
2025-01-02 14:37:52
Judged By
Score
0
Total Time
1ms
Peak Memory
344.0 KiB