| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 170319 | ngmh | Baza (COCI17_baza) | C++11 | 409 ms | 12900 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... | ||||
