Popular posts from this blog
Codeforces Solution 82A Double Cola
#include <iostream> using namespace std ; int main () { int n , c = 0 ; cin >> n ; while ( n > 5 ) { n = n / 2 ; n -= 2 ; } if ( n == 1 ) cout << "Sheldon" << endl ; else if ( n == 2 ) cout << "Leonard" << endl ; else if ( n == 3 ) cout << "Penny" << endl ; else if ( n == 4 ) cout << "Rajesh" << endl ; else if ( n == 5 ) cout << "Howard" << endl ; return 0 ; }
Codeforces solution 236A Boy or Girl
#include < bits / stdc ++. h > using namespace std ; int main () { set < int > s ; int d , c = 0 , n ; char ch [ 1000 ]; cin . getline ( ch , 1000 ); d = strlen ( ch ); for ( int i = 0 ; i < d ; i ++) { s . insert ( ch [ i ]); } d = s . size (); if ( d % 2 == 0 ) cout << "CHAT WITH HER!" << endl ; else cout << "IGNORE HIM!" << endl ; return 0 ;

Comments
Post a Comment