1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <iostream> #include <string> int main(void){ int count = 0; for (int i=0; i<5; i++) { std::string buffer; std::cin >> buffer; count += (buffer=="yes")?1:-1; } std::cout << ((count>0)?"yes":"no"); return 0; } |
Direct link: https://paste.plurk.com/show/2321884