#include <stdio.h>
#include <string.h>
#define pessoas 3
#define pre 2
struct p {
char nome[100];
char presentes[3][100];
};
int main(int argc, char** argv) {
struct p convidados[pessoas];
char teste[100], pesquisa[100];
int i, j;
for(i = 0; i < pessoas; i++) {
scanf("%s", convidados
[i
].
nome); for(j = 0; j < pre ; j++) {
scanf("%s", convidados
[i
].
presentes[j
]); }
}
scanf("%s %s", teste
, pesquisa
); printf("Pesquisando pelo par %s %s\n\n", teste
, pesquisa
); int encontrado = 0;
for(i = 0; i < pessoas; i++) {
for(j = 0; j < pre; j++) {
if(strcmp(convidados
[i
].
nome, teste
) == 0 && strcmp(convidados
[i
].
presentes[j
], pesquisa
) == 0) { encontrado = 1;
break;
}
}
if (encontrado == 1) break;
}
if (encontrado == 1){
} else {
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCiNkZWZpbmUgcGVzc29hcyAzCiNkZWZpbmUgcHJlIDIKCnN0cnVjdCBwIHsKCWNoYXIgbm9tZVsxMDBdOwoJY2hhciBwcmVzZW50ZXNbM11bMTAwXTsKfTsKCgppbnQgbWFpbihpbnQgYXJnYywgY2hhcioqIGFyZ3YpIHsKCXN0cnVjdCBwIGNvbnZpZGFkb3NbcGVzc29hc107CgljaGFyIHRlc3RlWzEwMF0sIHBlc3F1aXNhWzEwMF07CglpbnQgaSwgajsKCWZvcihpID0gMDsgaSA8IHBlc3NvYXM7IGkrKykgewoJCXNldGJ1ZihzdGRpbiwgTlVMTCk7CgkJc2NhbmYoIiVzIiwgY29udmlkYWRvc1tpXS5ub21lKTsKCQlmb3IoaiA9IDA7IGogPCBwcmUgOyBqKyspIHsKCQkJc2V0YnVmKHN0ZGluLCBOVUxMKTsKCQkJc2NhbmYoIiVzIiwgY29udmlkYWRvc1tpXS5wcmVzZW50ZXNbal0pOwoJCX0KCX0KCXNldGJ1ZihzdGRpbiwgTlVMTCk7CglzY2FuZigiJXMgJXMiLCB0ZXN0ZSwgcGV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