| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 170319 | ngmh | Baza (COCI17_baza) | C++11 | 409 ms | 12900 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 long n, m, q, t, l[1001], a[1001][1001];
bool good;
int main(){
	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 >> l[j];
		t = 0;
		for(int j = 0; j < n; j++){
			good = true;
			for(int k = 0; k < m; k++){
				if(l[k] != -1 && l[k] != a[j][k]){
					good = false; break;
				}
			}
			if(good) t++;
		}
		cout << t << endl;
	}
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
