#include <iostream> #include <cstdio> #include <vector> #include <string> #include <sstream> #include <algorithm> #include <map> #include <bitset> #define MAX 1000000 using namespace std; int main(int argc, char *argv[]){ int t; int n; string subject; int days; int deadline; cin >> t; for (int i=1; i<=t; ++i){ cin >> n; map<string, int> m; map<string, int>::iterator it; for (int j=0; j<n; ++j){ cin >> subject >> days; m[subject] = days; } cin >> deadline >> subject; it = m.find(subject); if (it == m.end()){ printf("Case %d: Do your own homework!\n", i); } else if (it->second <= deadline) { printf("Case %d: Yesss\n", i); } else if (it->second <= deadline+5) { printf("Case %d: Late\n", i); } else { printf("Case %d: Do your own homework!\n", i); } } return 0; }
2014年2月7日 星期五
uva 11917 - Do Your Own Homework
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言