Skip to content

Instantly share code, notes, and snippets.

View huowa222's full-sized avatar
💭
Just leave me alone!

Howard huowa222

💭
Just leave me alone!
  • Self employed
  • Beijing
View GitHub Profile
@huowa222
huowa222 / hello world
Last active May 30, 2016 16:08
hello , my first gist code
public class sexIdentifier {
public static final String HOMOSEXUAL = "homo";
public static final String STRAIGHT = "straight";
public static void main(String args[]){
public String identifyGender(String yourGender, String belovedGender){
if(yourGender.equals(belovedGender)){
return HOMOSEXUAL;
}else{
@krisys
krisys / BadNeighbors.cpp
Last active September 5, 2021 11:39
Bad Neighbors TopCoder
/* Update - Thanks to some folks who pointed out a flaw in my code.
* I have updated it. Hope it is correct now :-)
* Old version can be found here -
https://gist.github.com/krisys/4089748/262cbc10d9b9f1cb5df771e14a1e143a86d2ecc6/
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;