Submission #643128

# Submission time Handle Problem Language Result Execution time Memory
643128 2022-09-21T09:12:24 Z SlavicG Colors (RMI18_colors) C++17
0 / 100
63 ms 4880 KB
#include "bits/stdc++.h"
using namespace std;

#define ll long long
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define pb push_back
#define forn(i, n) for(int i = 0; i < n; ++i)

const int N = 1e5 + 10;
vector<int> adj[N];
int a[N], b[N];
void solve() {
    int n, m; cin >> n >> m;
    forn(i, n) adj[i].clear();
    for(int i = 0; i < n; ++i) cin >> a[i];
    for(int i = 0; i < n; ++i) cin >> b[i];
    for(int i = 0; i < m; ++i) {
        int u, v; cin >> u >> v; --u, --v;
        adj[u].pb(v);
        adj[v].pb(u);
    }
    for(int times = 0; times < n; ++times) {

    }
    forn(i, n) {
        if(a[i] != b[i]) {
            cout << "0\n";
            return;
        }
    }
    cout << "1\n";
}

int main() {
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int t; cin >> t;
    while(t--) {
        solve();
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 31 ms 3276 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 35 ms 2700 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 34 ms 3292 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 34 ms 3292 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 31 ms 3276 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 63 ms 4880 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 16 ms 2700 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 31 ms 3276 KB Output isn't correct
2 Halted 0 ms 0 KB -