小狸猫--陈乘 的个人资料chencheng照片日志列表 工具 帮助

日志


江苏十三城(转)---爆搞笑

江苏十三城


    宿迁:贫困地区,靠一瓶洋河一瓶双沟打天下,经济给江苏省垫底。几个属县个个上贫困榜,靠国家接济度日。被人评价为不如西部。大多数省内人都不知道这个地方在哪里。
 连云港:喜欢拉外地人看他海边上几座不伦不类的洋房,县域经济惨不忍
睹。旅游资源本来不足为奇,几年时间从江苏最有发展前途的港口,堕落为被贫困包围的花瓶城市。
 徐州:山东的弃儿,江苏的养子。大而不当的重工业城市。以工业污染和治安混乱出名。城市规化完全不成体统。综合竞争力一再下降,煤矿老本吃光。但特别自大,总想自立为王。打出淮海经济区的旗号,但没有人响应
南京:江苏最大的城市,最没号召力的省会。经济每况愈下,靠吃老本度日。在长三角的重要地位被杭州取代。在省内被苏州无锡看不起。以语言难听出名,民风土俗,被称为最大的农村。最近在吵着撂挑子直辖。
 苏州:江苏最拽的城市。GDP吓人。自诩上海后花园。把上海苏州以外的地方一律看作贫困地区。市民以到外资企业当流水线工人为荣,产品连中文标志都不 加。为了经济指标疯狂抽取地下水,地表沉降严重。严重缺水,还好意思说自己是水乡。
    南京:江苏最大的城市,最没号召力的省会。经济每况愈下,靠吃老本度日。在长三角的重要地位被杭州取代。在省内被苏州无锡看不起。以语言难听出名,民风土俗,被称为最大的农村。最近在吵着撂挑子直辖。
    无锡:得过“小上海”的封号。凭借GDP张牙舞爪。工业城市,旅游资源靠人工现造但也不可小觑。喜欢跟苏州飙经济,和南京比大小。(在上海面前还比较乖)。一边唱“太湖美”一边放着太湖水发臭。
    常州:出了江苏就没人知道的“大城市”。最近正在考虑往特大城市发展。工业基础还不错,另一个有潜力的污染源。因为走不出苏州无锡的阴影,所以特别看不起江北人,但据说快被南通赶上了。
 镇江:跟江北基本没区别的江南城市,以醋和金山寺出名。体积袖珍,经济乏善可陈。地位相当于南京的一个县,但是喜欢往苏锡常的阵容挤,被苏锡常集体看不起。
 扬州:苏北文化的发源地加大本营。经常昧着良心说自己是江南。一天时间 就能看完的“历史文化名城”。谣传出美女,其实出修脚师傅搓背工。现在托某领袖的 福开始大兴土木。市民逢人就说,如今我们扬州也是大城市了。
 泰州:充其量一个加强版的县城,城市基础建设贻笑大方,居然也想当大城 市。经济上刚有点起色到处放卫星,生怕别人不知道。热衷于跟南通争风头,跟扬州抬杠,跟安徽抢胡**。瞎折腾了一阵,知名度还是很低。
 南通:地处偏远,人称“难通”,但沾了上海不少光。最恨被叫作苏北,GDP达 到苏州三分之一后开始叫别人苏北,恨不得叫长江改道。同样喜欢瞎放卫星。刚为了超过省内几个过气城市沾沾自喜。回头一看连人家烟台都不如了。
 盐城:苏北恶名的主要承担者,革命老区。对外开放了十多年,贫困人口一大把。海岸线长得吓人,但没有一个像样的港口。市民没见过市面,通了火车比看到恐龙还兴奋。但因为有个把属县进了全国百强而特别自信。
 淮安:淮河重灾区。民风半蛮不侉,工业一穷二白。农业倒还不错,喜欢显摆敬爱的总理和洪泽湖的龙虾。还喜欢说自己是长三角城市,虽然大多数市民没见过长江长的是什么模样。

tsunami's devastation in Sri Lanka

Attention:   The following article is quoted from "Dispatches From the Edge" by Anderson Cooper from CNN
http://www.cnn.com/2006/US/05/22/cooper.book.excerpt/index.html

Tuesday, May 23, 2006; Posted: 12:17 p.m. EDT (16:17 GMT)

Editor's note: CNN's Anderson Cooper, anchor of "Anderson Cooper 360°," has written a memoir about his career as a globe-trotting journalist and the various tragedies that have marked his personal life. The book is published by HarperCollins Publishers. What follows is an excerpt from Chapter 1.

Small waves, one after the other, lap the shore. Two Sri Lankan villagers walk along the water's edge, searching for bodies washed up by the tide. They come every morning, leave without answers. Some days they find nothing. Today there's a torn shoe and a piece of broken fence.

I'm standing in a pile of rubble. Beneath me the ground seems to move, twisting and turning in on itself. It takes a moment for my eyes to adjust. The ground isn't moving at all. It's maggots, thousands of them. Writhing, squirming, they feast on some unseen flesh. Nearby, a dog with low-hanging teats and a face smeared with blood scavenges for scraps. She steps carefully among scattered bricks, tourist snapshots, china plates, the flotsam and jetsam of life before the wave.

-------------------------------------------

It took centuries for the pressure to build. Subtle shifts, grinding force. Long ago, a thousand miles east of Sri Lanka, more than fifteen miles below the surface of the Indian Ocean, two gigantic shelves of rock, tectonic plates, pressed against each other -- the rim of what scientists call the India Plate began to push underneath the Burma Plate. Something had to give. At nearly one minute before 8:00 a.m., the morning after Christmas, 2004, the force of the compression explodes along a section of rock some one hundred miles off the west coast of Sumatra. A fault line more than seven hundred miles long violently rips open and a shelf of rock and sediment thrusts upward fifty feet, unleashing an explosion of energy so powerful it alters the rotation of the earth. It is one of the strongest earthquakes in recorded history.

Shock waves pulse in all directions, displacing millions of tons of water, creating giant undersea waves. A tsunami. A ship on the surface of the sea would barely have noticed, detecting perhaps some slight swells no more than two feet high. But underneath, out of sight, churning walls of water extend from the ocean's bottom to the surface, pushing outward. The water moves fast, five hundred miles per hour -- the speed of a commercial jetliner.

It takes eight minutes after the earthquake begins for the sonic signals to reach the Pacific Tsunami Warning Center, in Hawaii. The thin needle of a seismograph suddenly springs to life, rapidly scribbling side to side, signaling an alarm. It's already too late. Eight minutes later, at approximately 8:15 a.m., in Banda Aceh, Sumatra, the first of several massive walls of water explodes onto shore. In the next two hours, tsunami waves strike ten other countries. More than two hundred thousand people will die.

-------------------------------------------

In New York, 2005 begins in a blizzard. A hurricane of confetti and light. At the stroke of midnight, I'm standing on a platform in the center of Times Square. I'm about sixty feet off the ground, and below, on the streets all around me, are people -- hundreds of thousands of revelers packed shoulder to shoulder behind barricades set up by police. The crowd is cheering. I see their mouths are open, their hands waving in the air, but I can't hear them. Both my ears are plugged with wireless headphones connecting me to a control room several blocks away. I hear only the hiss of the satellite transmission and a thin pulse of blood throbbing in my ears.

It's a strange way to start 2005. We've been covering the tsunami around the clock this week, and each day brings new details, new horrors. There's been talk of canceling the celebrations, but in the end it's decided that the show will go on.

I've always hated New Year's Eve. When I was ten, I lay on the floor of my room with my brother, watching on TV as the crowd in Times Square counted down the remaining seconds of 1977. My father was in the intensive care unit at New York Hospital. He'd had a series of heart attacks, and in a few days would undergo bypass surgery. My brother and I were terrified, but too scared to speak with each other about it. We watched, silent, numb, as the giant crystal ball made its slow descent. It all seemed so frightening: the screaming crowds, the frigid air, not knowing if our father would live through the new year.

I grew up in New York but never went to see the ball drop until I volunteered to cover it for CNN. For most New Yorkers, the idea of going anywhere near Times Square on New Year's Eve is inconceivable. It's like eating at Tavern On The Green; the food may be tasty, but it's best left to out-of-towners.

I've always thought that New Year's Eve is proof that human beings are essentially optimistic creatures. Despite hundreds of years of pathetic parties and hellish hangovers, we continue to cling to the notion that it's possible to have fun on that night. It's not. There's too much pressure, too many expectations, too few bathrooms.

The truth is, I began volunteering to work on New Year's Eve as a way to avoid having to do something social. This is my second time covering the Times Square festivities, and I've actually begun to enjoy it. There aren't many opportunities in this city to feel part of a community. We scuttle about the streets each day, individual atoms occasionally running into one another but rarely coalescing to form a whole. In Times Square, however, as the ball descends and the crowd cheers, New York becomes a very different place, a place of pure feeling.

When midnight arrives, the air explodes into a solid mass, a swirl of colored confetti that seems to hang suspended in space. For several minutes I am not expected to say anything. The pictures take over. The cameras pan the streets, wide shots and close-ups; people sing and shout. I take the headphones out of my ears and am surrounded by the waves of sound. The air seems to shake, and for a few brief moments I feel part of something larger, not lost in the crowd but swept up by it, buoyed by the emotion, the energy, the joyful pandemonium. It overwhelms my defenses, my hard won cynicism. The past gives way to the present, and I give myself up to it -- the possibilities, the potential.

It doesn't last long. By 12:30, it's over. I thank the viewers for watching, and the broadcast ends; the lights go out. The crowds have already dispersed, pushed along by tired police and armies of street sweepers cleaning up debris. I shake hands with the cameramen, and crew, wish everyone a happy new year. There are genuine smiles, and jokes. We pause for pictures, arms around one another -- quick snapshots I'll never see. A few minutes later I walk home alone. I have a flight to Sri Lanka that takes off in the morning. I still have to pack. There's no point in sleeping.

When I first started reporting, in the early 1990s, I used to experience anxiety attacks before heading overseas. Packing bags, sitting on a plane, breathing in all that recycled air and anticipation, I felt like an astronaut floating in space -- untethered, unmoored. Whatever thin bonds I'd established back home, whatever delicate connections, I'd willingly severed. I used to think that these anxiety attacks were just part of the process -- a midair metamorphosis I had to go through the closer I got to the edge. They were a warning, of course, but it took me years to understand this.

At dawn I board the plane, the first of several I'll take to get to Sri Lanka. When I sit down, the flight attendant tells me I still have confetti in my hair.

The foregoing is excerpted from Chapter 1 of "Dispatches from the Edge." All rights reserved. No part of this book may be used or reproduced without written permission from HarperCollins Publishers.

队列实现划分子集问题

//queuelist.h//
// queuelist.h: interface for the queuelist class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_QUEUELIST_H__E1E0BFBA_9B05_4657_9A37_52A6FBFD596A__INCLUDED_)
#define AFX_QUEUELIST_H__E1E0BFBA_9B05_4657_9A37_52A6FBFD596A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class queuelist 
{
public:
 queuelist                                      ();
 virtual ~queuelist                             ();
 int JumpOut                                    ();
 int InserttheList                              (int element);
 void SetNull                                   ();
 bool ChargeEmpty                               ();
 bool ChargeFull                                ();
 int GetTotal_num                               ();
 int GetRear                                    () { return rear; }
 int GetFront                                   () { return front; }
private:
 int total_num;
 int Race_list[10];
 int front;
 int rear;
};
#endif // !defined(AFX_QUEUELIST_H__E1E0BFBA_9B05_4657_9A37_52A6FBFD596A__INCLUDED_)
 
//queuelist.cpp//
// queuelist.cpp: implementation of the queuelist class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "queuelist.h"
#include <iostream>
using namespace std;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
 
//队列初始化//
queuelist::queuelist()
{
 for(int i=0; i<9; i++)
 {
  Race_list[i] = i+1;
 }
 front = 9;
 rear = 8;
 total_num = 9;
}
queuelist::~queuelist()
{
}
//插入队列//
int queuelist::InserttheList(int element)
{
 if(ChargeFull())
 {
  cout << "队列已满,不能再插入元素" << endl;
  return -1;
 }
 else
 {
  rear = (rear+1)%10;
  Race_list[rear] = element;
  total_num++;
  return Race_list[rear];
 }
}
//跳出队列//
int queuelist::JumpOut()
{
 if(ChargeEmpty())
 {
  cout << "队列为空,不能跳出元素" << endl;
  return -1;
 }
 else
 {
  front = (front+1)%10;
  total_num--;
  return Race_list[front];
 }
}
//置空队列//
void queuelist::SetNull()
{
 front = 0;
 rear = 0;
}
//判断队列是否为空//
bool queuelist::ChargeEmpty()
{
 if(rear == front)
  return true;
 else
  return false;
}
//判断队列是否饱和//
bool queuelist::ChargeFull()
{
 if(((rear+1)%10)==front)
  return true;
 else
  return false;
}
int queuelist::GetTotal_num()
{
 return total_num;
}
 
 
//main.cpp//
// chencheng_队列划分子集问题.cpp : Defines the entry point for the console application.
//
// 设有9个比赛项目,则 A = {1,2,3,4,5,6,7,8,9}。项目报名汇总后得到有冲突的项目如下:
// R = {(2,8),(9,4),(2,9),(2,1),(2,5),(6,2),(5,9),(5,6),(5,4),(7,5),(7,6),(3,7),(6,3)}
#include "stdafx.h"
#include "queuelist.h"
#include <iostream>
using namespace std;
typedef struct result{
 int Group_Record[9];
}RESULT;
 
typedef struct newr{
    int Crash_Record[9];
  
}NEWR;
//冲突矩阵//
 int R[][9] = {
  {0,1,0,0,0,0,0,0,0},
  {1,0,0,0,1,1,0,1,1},
  {0,0,0,0,0,1,1,0,0},
  {0,0,0,0,1,0,0,0,1},
  {0,1,0,1,0,1,1,0,1},
  {0,1,1,0,1,0,1,0,0},
  {0,0,1,0,1,1,0,0,0},
  {0,1,0,0,0,0,0,0,0},
  {0,1,0,1,1,0,0,0,0}};
 
//判断是否冲突,冲突则加入到队列尾继续排队,否则跳出队列,添加到所在的组中//
bool ChargeQuarrel(int* crash, int* ending, int position, int groups)
{
 if(crash[position]==0)
 {
  ending[position] = groups;
  for(int i=0; i<9; i++)
  {
   crash[i] = crash[i] + R[position][i];
  }
  return false;
 }
 
 else
 {
  return true;
 }
}

int main(int argc, char* argv[])
{
 int g_row = 1;
 queuelist cq;
 RESULT Into_dif_group;
 NEWR of_Crash;
 
    // 初始化 result 和 newr 两个数组//
 for(int i=0; i<9; i++)
 {
  Into_dif_group.Group_Record[i] = 0;
  of_Crash.Crash_Record[i] = 0;
 }
 //划分子集//
 while(!cq.ChargeEmpty())
 {
  int num = cq.GetTotal_num();
  for(int k=0; k<num; k++)
  {
   int temp = cq.JumpOut();
  
      //判断是否冲突//
     
if(ChargeQuarrel(of_Crash.Crash_Record, Into_dif_group.Group_Record, (temp-1), g_row))
   {
       cq.InserttheList(temp);
   }
  }
  //清空冲突数组newr//
  for(int q=0; q<9; q++)
  {
   of_Crash.Crash_Record[q] = 0;
  }
        //组序号加一//
  g_row++;
 }
 //输出//
 
for(int m=1; m<g_row; m++)
 {
  cout << "第" << m << "组元素:" << endl;
   for(int n=0; n<9; n++)
  {
   if(Into_dif_group.Group_Record[n]==m)
    cout << (n+1) << " ";
  }
  cout << endl;
 }
 return 0;
}


数模所有的课件

 
我已经将课件上传到Mofile
 
下载地址:
http://pickup.mofile.com/8418395424920234

用队列输出杨晖三角

//本程序使用C++编写//
 
 
// sequeue.h//
// sequeue.h: interface for the sequeue class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SEQUEUE_H__29A28262_0EBE_4813_BAAF_FDA1156DFABD__INCLUDED_)
#define AFX_SEQUEUE_H__29A28262_0EBE_4813_BAAF_FDA1156DFABD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class sequeue 
{
public:
 sequeue                         ();
 virtual ~sequeue                ();
 void SetNullSequeue             ();
 bool ChargeEmpty                ();
 bool ChargeFull                 ();
 int& GetFrontELe                ();
 int& InsertSequeue              ();
 int& InsertZero                 ();
 int& InsertZero                 (int meaningless);
 int& JumpOut                    ();
private:
 int data[10];
 int front;
 int rear;
};
#endif // !defined(AFX_SEQUEUE_H__29A28262_0EBE_4813_BAAF_FDA1156DFABD__INCLUDED_)
 
 
// sequeue.cpp// 
//////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
// sequeue.cpp: implementation of the sequeue class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "sequeue.h"
#include <iostream>
using namespace std;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
 
sequeue::sequeue()                      //构造队列//
{
 front = 10 - 1;
 data[0] = 0;
 data[1] = 1;
    data[2] = 1;
 data[3] = 0;
 rear = 3;
 cout << "1" << endl;
 cout << "1" << " " << "1" << endl;
}
sequeue::~sequeue()
{
}
bool sequeue::ChargeEmpty()            //判断队列是否为空//
{
 if(rear==front)
  return true;
 else
  return false;
}
bool sequeue::ChargeFull()                 //判断队列是否为满//
{
 if((rear+1)%10 == front)
  return true;
 else
  return false;
}
int& sequeue::GetFrontELe()               //取出队列头元素//
{
 if(data[front]!=0)
  cout << data[front] << " ";
 return data[front];
}
int& sequeue::InsertSequeue()                      //插入队列//
{
 int x;
 if(ChargeFull())
 {
  cout << "数组溢出" << endl;
  exit(0);
 }
 else
 {
  x = GetFrontELe() + JumpOut();
  rear = (rear+1)%10;
  data[rear] = x;
  return data[rear];
 }
}
int& sequeue::InsertZero()          //插入队列前的零//
{
 if(ChargeFull())
 {
  cout << "数组溢出" << " ";
  exit(0);
 }
 else
 {
  JumpOut();
  rear = (rear+1)%10;
  data[rear] = 0;
  return data[rear];
 }
}
int& sequeue::InsertZero(int meaningless)                  //插入队列后的零//
{
 if(ChargeFull())
 {
  cout << "数组溢出" << " ";
  exit(0);
 }
 else
 {
  rear = (rear+1)%10;
  data[rear] = 0;
  return data[rear];
 }
}
int& sequeue::JumpOut()                     //跳出队列//
{
 int x;
 if(ChargeEmpty())
 {
  cout << "数组为空" << endl;
  exit(0);
 }
 else
 {
  x = front;
  front = (front+1)%10;
     return data[front];
 }
}
void sequeue::SetNullSequeue()                 //置空队列//
{
 rear = front;
}
 
 
//main//
/////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
// chencheng_数组队列实现杨晖三角.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "sequeue.h"
#include <iostream>
using namespace std;

int main(int argc, char* argv[])
{
 sequeue Queue;
 for(int i=2; i<7; i++)
 {
  Queue.InsertZero();
  for(int j=1; j<=(i+1); j++)
   Queue.InsertSequeue();
  Queue.InsertZero(1);
  cout << endl;
 }
 return 0;
}