Roads in the North Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Description Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that the…
199. Beautiful People time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard output: standard The most prestigious sports club in one city has exactly N members. Each of its members is strong and beautiful. More precisely, i-t…
Inversion Sequence Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%lld & %llu Description For sequence i1, i2, i3, … , iN, we set aj to be the number of members in the sequence which are prior to j and greater to j at the same time.…
Problem Description One day, a useless calculator was being built by Kuros. Let's assume that number X is showed on the screen of calculator. At first, X = 1. This calculator only supports two types of operation. 1. multiply X with a number. 2. divid…
列表,字典,集合中根据条件筛选数据,如下所示 列表:[-10,2,2,3,-2,7,6,9] 找出所有的非负数 字典:{1:90,2:55,3:87...} 找出所有值大于60的键值对 集合:{2,3,8,6,7,5} 找出所有被3整除的数 列表 >>> from random import randint >>> data = [randint(-10,10) for x in xrange(10)] >>> data [-1, 8, -9, 9,…