beijing
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<graphics.h>
#include<conio.h>
#include<math.h>
#include<dos.h>
int init;
int read_mouse;
void cursor;
void newxy;
int main()
{
int buttons,x,y;
char str[];
int driver=VCA;
int moede=VGAHT;
initgraph(&gdriver,&mode,"");
cleardevice();
rectangle(,,,);
setfillstyle(,);
circle(,,);
x=,y=;
cursor(x,y);
for(;;)
{ newxy(&x,&y,&butttons);
if(x>=&&x<=&&y>=&&y<=&&buttons)
{
cleardevice();
closegraph();
exit();
}
}
}
void(int x,int y)
{ int x1,x2,y1,y2;
x1=x-;
x2=x+;
y1=y-;
y2=y+;
line(x1,y,x2,y);
line(x,y1,x,y2);
}
int read_mouse(int*mx,int*my,int*mbutton)
{
union REGS regs;
int x0=*mx,y0=*my,button0=*mbutton;
int xnew,ynew;
do
{
regs.x.ax=;
int86(0x33,®s,®s);
xnew=regs.x.cx;
ynew=regs.x.dx;
*mbutton=regs.x.bx;
}
while(xnew==x0&&ynew==y0&&*mbutton==button0);
*mx=xnew;
*my=ynew;
switch(*mbutton)
{ case :
return ;
case :
return ;
case :
return ;
case :
return3;
default :
return4;
}
}
void newxy(int *mx,int *my,int *mbutt)
{ int ch,xx0=*mx,yy0=*my;
int xm,ym;
ch=read_mouse(&xm,&ym,mbutt);
curse(xx0,yy0);
curse(xm,xy);
switch(ch)
{ case : break;
case : cirse(xm,ym,);break;
case : rectangle(xm-,ym-,xm+,ym+);break;
default : putpixel(xm,ym,);break;
}
*mx=xm;
*my=ym;
}

beijing的更多相关文章
- bzoj 2659: [Beijing wc2012]算不出的算式
2659: [Beijing wc2012]算不出的算式 Time Limit: 3 Sec Memory Limit: 128 MB Description 算不出的算式背景:曾经有一个老掉牙的游 ...
- Kalendar server Beijing Tiandiyuandian Technology Limited 果然是木马
我的Windows 7 系统,在开始菜单里面输入msconfig ,回车打开系统配置,隐藏所有Microsoft的进程,在服务和启动项里面都有 Kalendar server Beijing Ti ...
- Amazon Kindle Device is hiring in Beijing Shanghai and Shenzhen!
This is Angela from recruitment team of Amazon Kindle Device Software & Applications, we are exp ...
- BZOJ 2661: [BeiJing wc2012]连连看 费用流
2661: [BeiJing wc2012]连连看 Description 凡是考智商的题里面总会有这么一种消除游戏.不过现在面对的这关连连看可不是QQ游戏里那种考眼力的游戏.我们的规则是,给出一个闭 ...
- BZOJ2253: [2010 Beijing wc]纸箱堆叠
题解: 其实就是求三维偏序最长链.类似于三维逆序对,我们可以用树状数组套平衡树来实现. DP方程 :f[i]=max(f[j]+1) a[j]<a[i] 我们按一维排序,另一位建立树状数组,把第 ...
- Unite Beijing 2015大型活动
摘要:2015年,我做的最疯狂的事情:网友见面会—去北京参加Unite Beijing 2015大会. 正文:记得,上次在北京参加大型活动还是2008年前–传统电信行业的巅峰时期:那时移动互联网.An ...
- 【二分答案+贪心】UVa 1335 - Beijing Guards
Beijing was once surrounded by four rings of city walls: the Forbidden City Wall, the Imperial City ...
- LA 3177 Beijing Guards(二分法 贪心)
Beijing Guards Beijing was once surrounded by four rings of city walls: the Forbidden City Wall, the ...
- BZOJ2661: [BeiJing wc2012]连连看
2661: [BeiJing wc2012]连连看 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 483 Solved: 200[Submit][S ...
- Bzoj 2662: [BeiJing wc2012]冻结 dijkstra,堆,分层图,最短路
2662: [BeiJing wc2012]冻结 Time Limit: 3 Sec Memory Limit: 128 MBSubmit: 647 Solved: 348[Submit][Sta ...
随机推荐
- 第七次scrum meeting记录
文章负责:张华杰 日期:2017年10月31日 会议地点:主楼主南201 各组员工作情况 团队成员 昨日完成任务 明日要完成任务 赵晓宇 课程列表页面搭建 issue20 课程列表页面搭建(part ...
- LeetCode OJ:Count Primes(质数计数)
Count the number of prime numbers less than a non-negative number, n. 计算小于n的质数的个数,当然就要用到大名鼎鼎的筛法了,代码如 ...
- Android 进阶11:进程通信之 ContentProvider 内容提供者
学习启舰大神,每篇文章写一句励志的话,与大家共勉. When you are content to be simply yourself and don't compare or compete, e ...
- Ubuntu 中 java 环境 (sunjdk) 的配置 (附详细说明)
暑假以来为了鼓捣双系统废了很大的劲儿,本来一股脑想装 CentOS,无奈怎么处理分区引导都不能成功地与 Win8 共存,最终用 Ubuntu 一句 "检测到系统上有 Windows Boot ...
- 手贱使用shift+delete删除文件之后
昨天整理文件夹,重新整理和命名所有项目文件,几个很久的项目代码使用shift+delete删除了. 今天早上过来说是要发版本,然后发现居然有个工程是在昨天删除的文件夹里,额,~ 然后各种百度,各种go ...
- bzoj 4465 游戏中的学问
Written with StackEdit. Description 大家应该都见过很多人手拉手围着篝火跳舞的场景吧?一般情况下,大家手 拉手跳舞总是会围成一个大圈,每个人的左手拉着旁边朋友的右手, ...
- javascript的八张思维导图
出处:http://www.cnblogs.com/junhey/p/4292683.html
- mysql中OPTIMIZE TABLE的作用及使用
来看看手册中关于 OPTIMIZE 的描述: OPTIMIZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE tbl_name [, tbl_name] ... 如果您已经删除 ...
- spring的<array>标签错误
1,复习了一下spring xml的配置 单个默认命名空间 我们看到,在配置文件中,beans,bean等元素我们是没有使用命名空间前缀的.重复限定一个要在命名空间中使用的元素或属性可能会非常麻烦.这 ...
- Maven入门----介绍及环境搭建(一)
知识点: 介绍Maven 本机搭建Maven环境 DEMO测试 本地仓库迁出 Maven简介: 百度百科: 说到底就是一个项目管理工具. 本机搭建Maven环境: Maven的环境需要jdk环境的支持 ...