`
wss71104307
  • 浏览: 218544 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论
文章列表
描述某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度。某天,雷达捕捉到敌国的导弹来袭。由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹。怎么办呢?请帮助计算一下最少需要多少套拦截系统?输入输入若干组数据(不超过100组),每组数据一行,分别为:导弹总个数(正整数,不超过1000),导弹依此飞来的高度(雷达给出的高度数据是不大于30000的正整数,用空格分隔)输出对应每组数据输出拦截所有导弹最少要配备多少套这种导弹拦截系统。样例输入8 389 207 155 30 ...

char * 与 char []

There is an important difference between these definitions: char amessage[] = "now is the time"; /* an array */ char *pmessage = "now is the time"; /* a pointer */amessage is an array, just big enough to hold the sequence of characters and '\0' that initializes it. Individual ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; char ...
#include <stdio.h> int main() { float f; float sum = 0; int i = 12; while(i--) { scanf("%f", &f); sum += f; } sum = sum / 12; printf("$%.2f\n", sum); return 0; }
#include <stdio.h> const float PI = 3.1415926; int main() { int i, N, A; scanf("%d", &N); float X, Y; for( i = 1; i <= N; i++) { scanf("%f%f", &X, &Y); A = (int)((X*X + Y*Y) * PI / 100) + 1; pr ...
#include <stdio.h> double a[275]; int main() { int i; for( i = 1; i < 275; i++) { a[i] = a[i - 1] + 1/(double)(i+1); } double num; scanf("%lf", &num); while(num != 0.00) { for( i = 1; i < 274; i++) ...
#include <stdio.h> #include <stdlib.h> #include <math.h> void swap(int &a, int &b) { int c = a; a = b; b = c; } int gcd(int a, int b) { if(a < b) swap(a, b); if(a % b == 0) return b; else return gcd(b, a%b); } int main() { int n; ...
#include <stdio.h> #include <string.h> #include <stdlib.h> int main() { int n, m, k; int i,j; while(scanf("%d,%d,%d", &n, &m, &k) == 3) { char * src = (char *)malloc(n); char * dest = (char *)malloc(n); memset(src,'w', m); memset( ...

POJ1002

#include <iostream>#include <string>using namespace std;int myctoi(const char c);int a[10000000];int main(){ int N; cin>>N; string str; int num; while(N--) { num = 0; cin>>str; for(int i = 0; i < str.length(); i++) { if(str.at(i) != '-') num = num * 10 + myctoi( ...
#include <iostream> using namespace std; int cells[101]; int main() { int N; cin>>N; int n, answer; while(N--) { cin>>n; for(int i = 2; i <= n; i++) for(int j = 2; j <= n; j++) { if(j % i == 0) cells[j] = 1 - cells[j]; } ...
  1     .file   "test.c"   2     .section    .rodata   3 .LC0:   4     .string "address of i = %u\n"   5 .LC1:   6     .string "input please"   7 .LC2:   8     .string "%d"   9 .LC3:  10     .string "%d\n"  11     .text  12 .globl main  13 ...
Best Practices for Speeding Up Your Web Site 原文: http://developer.yahoo.com/performance/rules.html#page-nav   优化网站性能 提高网站速度访问速度的14条实践 http://www.phpv.net/html/1660.html     Minimize HTTP Requests  减少HTTP
List 1.list [] 定义 2.List有负索引,list[-k]=lisk[n-k] 3.list的切片slice  li[m,n],从m到n(不包括)  3.1 m到n没有区间,返回空的list  3.2 list[:n] 返回从o到n的list  3.3 list[n:] 返回n后面所有的list 4   4.1 list.append() 向list添加元素   4.2 list.insert(index, "new") 向list指定位置插入新元素   4.3 list.extend()  连接2个list   *** append ...
转载自  http://www.matrix67.com/blog/archives/944/trackback      设想这样一个计算机系统,它只支持以下几个操作:     1. 定义变量、给变量赋值;     2. 变量自身加一;     3. 令一段语句循环执行指定的次数。   这个系统只处理且只能处理0和正整数。系统不存在“溢出”的问题。   注意这个系统没有比较运算,事实上它甚至不存在Boolean值和判断语句。   循环语句也不是FOR i=a TO b DO的形式,只能是LOOP n的形式。   在这个系统上实现加法很容易,让a自增b次即可。现在的问 ...

ByteofPython 笔记

用MindMap 做的笔记。
Global site tag (gtag.js) - Google Analytics