Skip to content

Instantly share code, notes, and snippets.

@fredbr
Created June 19, 2018 23:28
Show Gist options
  • Save fredbr/9c81282c3db985d75692196af40e567c to your computer and use it in GitHub Desktop.
Save fredbr/9c81282c3db985d75692196af40e567c to your computer and use it in GitHub Desktop.
// solucao de davi gabriel
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n;
for(int i = 1; i <= n; i++){
cin >> k;
string p;
int q = 0, ans = 0;
cin >> p;
string ant;
ant = p;
for(int j = 0; j < k-1; j++){
cin >> p;
if(ant != p) ans = 1;
else ant = p;
}
if(ans == 1) cout << "ingles\n";
else{
cout << p << "\n";
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment