Skip to content

Instantly share code, notes, and snippets.

@Biazus
Created August 22, 2014 14:27
Show Gist options
  • Save Biazus/496fa180f39ce8d1784d to your computer and use it in GitHub Desktop.
Save Biazus/496fa180f39ce8d1784d to your computer and use it in GitHub Desktop.
Desafios: Big Numbers of Teams Will Solve This
//Big Numbers of Teams Will Solve This
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int t, ok;
int i=1;
string team, judge, wr;
string nospaceteam, nospacejudge;
cin >> t;
getline(cin, wr);
while(t){
getline(cin,team);
getline(cin,judge);
if(team==judge){
cout << "Case " << i << ": Yes" << endl;
ok=1;
}
if(ok!=1){
team.erase(remove(team.begin(), team.end(), ' '), team.end());
if(team==judge){
cout << "Case " << i << ": Output Format Error" << endl;
ok=1;
}
else cout << "Case " << i << ": Wrong Answer" << endl;
}
t--;
i++;
ok=0;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment