ICode9

精准搜索请尝试: 精确搜索
  • 对象添加迭代器2019-05-11 17:53:21

      当需要对一个对象进行迭代时(比如用于一个for..of循环中),它的@@iterator方法都会在不传参情况下被调用,返回的迭代器用于获取要迭代的值。   let fridge = { name: "卡萨帝冰箱", color: "白色", brand: "海尔" };fridge[Symbol.iterator] = function*() { yield this.name; yi

  • B. Alyona and a Narrow Fridge 【 思维题 】2019-04-17 20:51:38

    B. Alyona and a Narrow Fridge Codeforces Global Round 2 &:这题看到了一种很简单的做法,于是按照敲一波,比原来打的好看多了。 题意:给你一个 h * 2 的冰箱,然后给你一些随机高度 A * 1的瓶子 ,一个高的瓶子一旦放上,那么这一段就不能发其他的了,但是旁边的一个单位宽度依然可以放

  • Codeforces Global Round 22019-04-07 09:51:00

    本来想一场上紫;真没想到结果集体凉凉 A. Ilya and a Colorful Walk Ilya lives in a beautiful city of Chordalsk. There are nn houses on the street Ilya lives, they are numerated from 11 to nn from left to right; the distance between every two neighboring h

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有