| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 89413 | AntonioDaki | Baza (COCI17_baza) | C++14 | 87 ms | 33504 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
long a[1002][1002], b[1002][1002];
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
    int n, m, q, x = 0, ok = 1;
    cin >> n >> m;
    for(int i = 0; i < n; ++i)
        for(int j = 0; j < m; ++j) cin >> a[i][j];
    cin >> q;
    for(int i = 0; i < q; ++i)
        for(int j = 0; j < m; ++j) cin >> b[i][j];
    for(int Q = 0; Q < q; ++Q){
        for(int i = 0; i < n; ++i){
        	for(int j = 0; j < m; ++j) if(b[Q][j] != -1 and a[i][j] != b[Q][j]){
			    ok = 0;
			    break;
			}
        	if(ok) ++x;
        	ok = 1;
        }
        cout << x << endl;
        x = 0;
    }
	return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
