A - Little Elephant and Function

思路:

  水题;

代码:

#include <cstdio>
#include <iostream> using namespace std; int n; int main()
{
scanf("%d",&n);
printf("%d ",n);
for(int i=;i<n;i++) printf("%d ",i);
return ;
}

AC日记——Little Elephant and Function codeforces 221a的更多相关文章

  1. AC日记——Little Elephant and Shifts codeforces 221e

    E - Little Elephant and Shifts 思路: 一次函数线段树(疯狂debug): b不断循环左移,判断每次最小的|i-j|,a[i]=b[j]: 仔细观察发现,每个bi移动时, ...

  2. AC日记——Little Elephant and Array codeforces 221d

    221D - Little Elephant and Array 思路: 莫队: 代码: #include <cmath> #include <cstdio> #include ...

  3. AC日记——Little Elephant and Numbers codeforces 221b

    221B - Little Elephant and Numbers 思路: 水题: 代码: #include <cmath> #include <cstdio> #inclu ...

  4. AC日记——Little Elephant and Problem codeforces 221c

    221C 思路: 水题: 代码: #include <cstdio> #include <cstring> #include <iostream> #include ...

  5. AC日记——Sagheer and Nubian Market codeforces 812c

    C - Sagheer and Nubian Market 思路: 二分: 代码: #include <bits/stdc++.h> using namespace std; #defin ...

  6. AC日记——Red and Blue Balls codeforces 399b

    399B - Red and Blue Balls 思路: 惊讶的发现,所有的蓝球的消除都是独立的: 对于在栈中深度为i的蓝球消除需要2^i次操作: 代码: #include <cstdio&g ...

  7. AC日记——Andryusha and Colored Balloons codeforces 780c

    C - Andryusha and Colored Balloons 思路: 水题: 代码: #include <cstdio> #include <cstring> #inc ...

  8. AC日记——The Child and Sequence codeforces 250D

    D - The Child and Sequence 思路: 因为有区间取模操作所以没法用标记下传: 我们发现,当一个数小于要取模的值时就可以放弃: 凭借这个来减少更新线段树的次数: 来,上代码: # ...

  9. Codeforces 221 A. Little Elephant and Function

    A. Little Elephant and Function time limit per test 2 seconds memory limit per test 256 megabytes in ...

随机推荐

  1. Java-多线程与单例

    最近在公司写需求时遇到了多线程与单例一同出现的情况. 这个时候想到的就是线程安全以及单例的定义了,虽然单例指的是在内存中它只有一份,但是并不是说就是线程安全的. 所以,我当时就到网上找了关于多线程下单 ...

  2. bootstrap设计横线上加字

    1.给横线上加字 . 2.思路:通过z-index实现,可以将父元素的z-index设置成2,而横线的z-index设置成-1,这样有字的地方就可以覆盖横线,再设置字的padding达到合理的宽度 ( ...

  3. 《Cracking the Coding Interview》——第9章:递归和动态规划——题目4

    2014-03-20 03:08 题目:给定一个集合,返回其幂集. 解法:DFS. 代码: // 9.4 Return all subsets of a set #include <cstdio ...

  4. iOS笔记056 - UI总结02

    九宫格布局 UICollectionViewController 创建控制器一定要指定默认的布局样式. // 加载一个九宫格布局的控制器,必须指定布局样式 UICollectionViewFlowLa ...

  5. Canvas 图形组合方式

    /** * 图形组合 */ function initDemo5() { var canvas = document.getElementById("demo5"); if (!c ...

  6. ASP.Net MVC+EF架构

    ASP.Net MVC是UI层的框架,EF是数据访问的逻辑. 如果在Controller中using DbContext,把查询的结果的对象放到cshtml中显示,那么一旦在cshtml中访问关联属性 ...

  7. 【多线程学习(1)】创建java多线程

    1)java多线程的创建方式有三种: 1.继承Thread类 2.实现Runnable接口 3.实现Callable接口 第一种: //继承Thread类 class ExtendsThread ex ...

  8. hdu 1203 01背包 I need a offer

    hdu 1203  01背包  I need a offer 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1203 题目大意:给你每个学校得到offe ...

  9. 使用redis实现简单的锁机制

    在测试第三方账号注册时,授权拉取后,如果两台手册同时点击注册按钮,数据库中就会新增两天一模一样的数据,而我们的需求是一个第三方账号只能绑定一个账号,所以,由此现象可以知道,这里产生了并发访问,我们应该 ...

  10. Tomcat学习笔记(一)

    Tomcat目录结构的认识 tomcat是Apache旗下的一个开源Servlet的容器,实现了对Servlet和JSP技术支持. 通过http://tomcat.apache.org/ 下载tomc ...