lala

lala的相关文章

Codeforces Round #312 (Div. 2) A.Lala Land and Apple Trees

Amr lives in Lala Land. Lala Land is a very beautiful country that is located on a coordinate line. Lala Land is famous with its apple trees growing everywhere. Lala Land has exactly n apple trees. Tree number i is located in a position xi and has ai

Codeforces 558A Lala Land and Apple Trees(Sort快排)

A. Lala Land and Apple Trees time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Amr lives in Lala Land. Lala Land is a very beautiful country that is located on a coordinate line. Lala Land is

Codeforces Round #312 (Div. 2) A. Lala Land and Apple Trees 暴力

A. Lala Land and Apple Trees Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/558/problem/A Description Amr lives in Lala Land. Lala Land is a very beautiful country that is located on a coordinate line. Lala Land is famous

CF 558A(Lala Land and Apple Trees-暴力)

A. Lala Land and Apple Trees time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Amr lives in Lala Land. Lala Land is a very beautiful country that is located on a coordinate line. Lala Land is

cf 558A Lala Land and Apple Trees

#include<stdio.h> #include<algorithm> #include<string.h> using namespace std; struct data { int x; int a; }; data l[1024],r[1024]; bool c1(data q,data p) { return q.x<p.x; } bool c2(data q,data p) { return q.x>p.x; } int main() { i

Codeforces 558A Lala Land and Apple Trees 摘苹果

题意:n棵苹果树在x轴上排成一排,每棵苹果树有一个坐标值(均不为0)和苹果数量.现在某人从0开始任意选择一个方向走,每遇到一颗新的苹果树就摘下所有苹果,然后掉转方向直到遇到下一颗之前没遇到过的苹果树然后再摘下所有苹果,如此往复直到再也遇不到新的苹果树.问最多能摘下多少个苹果. 水题.以0为中心,对坐标排序后计算左右两边的苹果树个数.如果左边小于右边,就先从左边摘,反之则先从右边摘.最后看有多少个苹果树摘不到即可. #include <iostream> #include <cstdio&

angularJs中关于ng-class的三种使用方式说明

在开发中我们通常会遇到一种需求:一个元素在不同的状态需要展现不同的样子. 而在这所谓的样子当然就是改变其css的属性,而实现能动态的改变其属性值,必然只能是更换其class属性 这里有三种方法: 第一种:通过数据的双向绑定(不推荐) 第二种:通过对象数组 第三种:通过key/value 下面简单说下这三种: 第一种:通过数据的双向绑定 实现方式: function changeClass(){   $scope.className = "change2"; } <div clas

杂记整理三:php、thinkphhp和sql

php 循环,v为键,c为值 $list = array( "aaa"=>"ttt", "bbb"=>"sss" ); foreach($list as $v => $c){ echo $v; echo $c; }; 生成定长的62进制随机码(0-9, a-z, A-Z) function getRandom($param){ $str="0123456789abcdefghijklmnopqrst

Python基础(一)

一.python的版本 python版本分为2系列和3系列,但是目前大部分企业都使用2系列版本,但是3系列python版本已经成为趋势,因此本博客主要以3系列的python版本为主. 二.变量 变量即是预先定义的值,主要用于方便脚本编写,方便脚本调用.变量通常以数字.字母及下划线开头,例:1_pass ._pass .pass都可以作为变量使用,但是特殊字符不可以 例: print("hello world")name = "xiao yu"name2 = name