TopCoder SRM 588 DIV2 KeyDungeonDiv2

简单的题目

class KeyDungeonDiv2
{
public:
int countDoors(vector <int> doorR, vector <int> doorG, vector <int> keys)
{
int res = ;
for(int i = ; i < doorR.size(); i ++){
if(doorR[i] <= keys[]+keys[] && doorG[i] <= keys[]+keys[] && doorR[i] + doorG[i] <=keys[]+keys[]+keys[]) res ++;
}
return res;
}
};
上一篇:SPOJ 370 Ones and zeros BFS + 同余剪枝


下一篇:SQL2005 遍历表插入