SGU 135.Drawing Lines
水题,不说了。
#include <iostream>
using namespace std;
int f[70000]={1};
int n;
int main(){
cin>>n;
for(int i=1;i<=n;i++)
f[i]=f[i-1]+i;
cout<<f[n]<<endl;
}
SGU 135.Drawing Lines的更多相关文章
- 快速切题 sgu135. Drawing Lines
135. Drawing Lines time limit per test: 0.25 sec. memory limit per test: 4096 KB Little Johnny likes ...
- Drawing Lines - SGU 135(简单递推)
求N条直线最多能把一个平面分成几部分. 代码如下: ========================================================================== ...
- Java基础之在窗口中绘图——绘制直线和矩形(Sketcher 2 drawing lines and rectangles)
控制台程序. import javax.swing.JComponent; import java.util.*; import java.awt.*; import java.awt.geom.*; ...
- SGU 分类
http://acm.sgu.ru/problemset.php?contest=0&volume=1 101 Domino 欧拉路 102 Coprime 枚举/数学方法 103 Traff ...
- Multi-line NSAttributedString with truncated text
http://stackoverflow.com/questions/7611816/multi-line-nsattributedstring-with-truncated-text/1017279 ...
- Beginning OpenGL ES 2.0 with GLKit Part 1
Update 10/24/12: If you’d like a new version of this tutorial fully updated for iOS 6 and Xcode 4.5, ...
- [转]"Windows Phone 7程序设计”完全版电子书可以免费下载了
本文转自:http://www.cnblogs.com/salam/archive/2010/10/29/1864246.html 现在学习Windows Phone 7开发资料十分有限,除了MSDN ...
- python基础教程笔记—画幅好画(详解)
今天写一下基础教程里面的第二个项目,主要使用python来做一个pdf的图,比较简单. 首先我们需要安装用到的模块pip install reportlab即可. 书上是用urlopen从往上下了一个 ...
- (Qt 翻译) QGLSceneNode
#include <QGLSceneNode> QGLSceneNode ( QObject * parent = 0 ) QGLSceneNode ( const QGeometryDa ...
随机推荐
- (转载)Undefined variable: PHP_SELF的问题解决方法
(转载)http://blog.sina.com.cn/s/blog_4ab014680100gx43.html 在PHP使用了$PHP_SELF函数时,出现以下错误 Undefined variab ...
- ACM2096
#include<iostream> int main() { using namespace std; int a,b,count; cin>>count; while(co ...
- [Python]Pip的安装以及简单的使用
Pip的安装 安装python以后(我的python版本是32位,版本号2.7.10),如果需要安装一些其他的库,一般有两种办法,一种是自己手动去各个库的官网下载,自己安装:另一种方法是安装pip,使 ...
- poj 1228 凸包
题目链接:http://poj.org/problem?id=1228 #include<cstdio> #include<cstring> #include<cmath ...
- 对C++进行优化了的android-ndk-r6-crystax-2
https://www.crystax.net/en/android/ndk/6?id=6 Here is customized distribution of Android NDK r6 whic ...
- 月見(つきみ) 夕(ゆう) SumiHui.墨虺
造影早迎中秋,自己通过word设计的
- 我眼中的 Oracle 性能优化
恒生技术之眼 作者 林景忠 大家对于一个业务系统的运行关心有如下几个方面:功能性.稳定性.效率.安全性.而一个系统的性能有包含了网络性能.应用性能.中间件性能.数据库性能等等. 今天从数据库性能的角度 ...
- 使用jq工具在Shell命令行处理JSON数据
由于近期要处理一些 JSON 数据格式.一大早经过一番搜索后,终于找到了 jq 这个非常棒的工具.jq 同意你直接在命令行下对 JSON 进行操作,包含分片.过滤.转换等等. 首先在mac下安装jq. ...
- Delphi Memo的记事本功能
Delphi Memo的记事本功能 下载地址 : http://download.csdn.net/detail/teststudio/6412883 这个代码实现了Windows ...
- IOS-UIProgressView的简单介绍
IOS-UIProgressView的简单介绍 转载:http://blog.sina.com.cn/s/blog_9c2363ad0101e1jy.html // UIProgressView的使用 ...