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; }…
135. Drawing Lines time limit per test: 0.25 sec. memory limit per test: 4096 KB Little Johnny likes to draw a lot. A few days ago he painted lots of straight lines on his sheet of paper. Then he counted in how many zones the sheet of paper was split…
求N条直线最多能把一个平面分成几部分. 代码如下: ============================================================================================================================== #include<stdio.h> #include<algorithm> #include<string.h> #include<vector> usin…
控制台程序. import javax.swing.JComponent; import java.util.*; import java.awt.*; import java.awt.geom.*; @SuppressWarnings("serial") public class SketcherView extends JComponent implements Observer { public SketcherView(Sketcher theApp) { this.theAp…
http://acm.sgu.ru/problemset.php?contest=0&volume=1 101 Domino 欧拉路 102 Coprime 枚举/数学方法 103 Traffic Lights 最短路 104 Little Shop of Flowers 动态规划 105 Div 3 找规律 106 The Equation 扩展欧几里德 107 987654321 Problem 找规律 108 Self-numbers II 枚举+筛法递推 109 Magic of Dav…
http://stackoverflow.com/questions/7611816/multi-line-nsattributedstring-with-truncated-text/10172794#10172794 Multi-line NSAttributedString with truncated text up vote14down votefavorite 8 I need a UILabel subcass with multiline attributed text with…
Update 10/24/12: If you’d like a new version of this tutorial fully updated for iOS 6 and Xcode 4.5, check out iOS 5 by Tutorials Second Edition! Note from Ray: This is the fourth iOS 5 tutorial in the iOS 5 Feast! This tutorial is a free preview cha…
本文转自:http://www.cnblogs.com/salam/archive/2010/10/29/1864246.html 现在学习Windows Phone 7开发资料十分有限,除了MSDN的官方开发文档外和一些博客外,几无其他的学习渠道.幸运地是美国的资深程序员兼作家Charles Petzold为大家免费放出了他的最新大作—<Programming windows phone 7 series>.他以往写的书籍本本是经典,包括我们耳熟能详的<Windows 程序设计>…
今天写一下基础教程里面的第二个项目,主要使用python来做一个pdf的图,比较简单. 首先我们需要安装用到的模块pip install reportlab即可. 书上是用urlopen从往上下了一个txt文件,然后打开处理一下得到数据,因为我从这个url路径没有获取到数据,所以直接写了一点数据在程序里. urlopen比较简单,以后写爬虫也会经常用到,所以这里就不讲了,只单独讲讲reportlab模块. #encoding:utf8 from reportlab.graphics.shapes…
#include <QGLSceneNode> QGLSceneNode ( QObject * parent = 0 ) QGLSceneNode ( const QGeometryData &geometry, QObject * parent = 0 ) virtual ~QGLSceneNode () void addNode ( QGLSceneNode * node ) void addNodes ( const QList<QGLSceneNode *> &a…