-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1267.cpp
More file actions
54 lines (41 loc) · 1.07 KB
/
1267.cpp
File metadata and controls
54 lines (41 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <iostream>
#include <vector>
using namespace std;
int main(){
while(true){
int n, d;
bool aluno_janta;
vector<vector<int>> alunos;
cin >> n >> d;
if(n == 0 && d == 0) break;
for(int i=0; i<d; i++){
vector<int> jantar;
for(int j=0; j<n; j++){
int num;
cin >> num;
jantar.push_back(num);
}
alunos.push_back(jantar);
}
for(int coluna=0; coluna<n; coluna++){
vector<int> listinha;
for(int linha=0; linha<d; linha++){
listinha.push_back(alunos[linha][coluna]);
}
for(int e : listinha){
if(e == 0){
aluno_janta = false;
break;
}
aluno_janta = true;
}
if(aluno_janta == true) break;
}
if(aluno_janta == true){
cout << "yes" << endl;
} else {
cout << "no" << endl;
}
}
return 0;
}