TCHS SRM 48 Level one - 250 pt - Sending Cards editorial: http://community.topcoder.com/tc?module=Static&d1=hs&d2=match_editorials&d3=hs_srm48
TCHS SRM 48 Level one - 250 pt - Sending Cards solution:
#include <iostream> #include <vector> class SendingCards{ public: int howMany(std::vector <std::string> f) { int cnt=0; for(int i=0; i<f.size(); i++) for(int j=0; j<f[i].length(); j++) if(f[i][j]=='Y' && f[j][i]=='N') cnt++; return cnt; } };
No comments:
Post a Comment