1学习了容斥原理,a+b-ab重合的部分=总,a+b+c-ab重-ac重-bc重+abc重,三叶草:ab重+ac重+bc重-3abc重
2.英语看了PETpart1的技巧,还背了如下单词:
rainy snow snowy storm stormy sun sunny warm wet wind windy alive compete
3语文学习了如何组织文章材料,有像时间顺序,空间顺序等。
4.我打了一段c++程序—贪吃蛇(1)如下:
#include
/* run this program using the console pauser or add your own getch, system(“pause”) or input loop */
#include<stdlib.h>
#include
#include
#include<windows.h>
#include<conio.h>
#define UP 1
#define DOWN 2
#define LEFT 3
#define RIGHT 4
#define MAP_HEIGHT 30
#define MAP_WIDTH 40
using namespace std;
int speed = 0:
void GotoXY(int x,int y){
COORD pos;
pos.X=x;
pos.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
}
typedef struct
{
int x;
int y;
}COORDINATE;
class GameSet{
pubic:
static void Gamelnit(){
system(“mode con cols=80 line=40”);
HANDLE handle=GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_CURSOR_INFO Cursorlnfo;
GetConsoleCursorlnfo(handle,&Cursorlnfo);
Cursorlnfo.bVisible=false;
SetConsoleCursorlnfo(handie,&Cursorlnfo);
srand((unsigned int)time(0))
}
};
class PrintUI{
public:
static void DrawMap(){
system(“cls”);
int i,j;
for(i=0;i<MAP_WIDTH;i++){
cout << “";
}
cout << endl;
for(i=0;i<MAP_HEIGHT;i++){
cout << "”;
for(j=0;j<MAP_WIDTH-2;j++){
cout << “”;
}
cout<<""<<endl;
}
for(i=0;i<MAP_WIDTH;i++){
cout << "";
}
}
static void GameOver(int score){
GotoXY(MAP_WIDTH + 3,3);
cout << “GAME OVER”<<endl;
GotoXY(MAP_WIDTH + 3,5);
cout << “YOUR SCORE IS”<<score<<endl;
}
static void (int score){
GotoXY(MAP_WIDTH + 3,5);
cout << “YOUR SCORE IS”<<score<<endl;
GotoXY(MAP_WIDTH + 3,8);
cout << “NOW SPEED IS”,<< 10- speed / 25<<endl;
}
};
int main() {
return 0;
}