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 ...
随机推荐
- Node.js 问题集合
使用node合并多个接口, 最后获取数据慢的问题 暂时没解决方法 pm2 访问 ip 记录到日志 ...
- TF随笔-4
>>> import tensorflow as tf>>> a=tf.constant([[1,2],[3,4]])>>> b=tf.const ...
- AlexNet神经网络结构
Alexnet是2014年Imagenet竞赛的冠军模型,准确率达到了57.1%, top-5识别率达到80.2%. AlexNet包含5个卷积层和3个全连接层,模型示意图: 精简版结构: conv1 ...
- [leetcode]_Binary Tree Level Order Traversal I && II
题目:给定一棵二叉树,对其进行层次遍历,将遍历结果存入二维链表中. 思路:二叉树的层次遍历关键在于使用Queue. 复习: Queue的定义.LinkedList实现了Queue接口,因此可用Link ...
- loader疑惑
今天写自己的loader管理类时,发现一个问题,如果证明flash是并发加载资源的呢? var loader:Loader=new Loader; loader.contentLoaderInfo.a ...
- Linux内核开发
Linux内核开发 https://www.cnblogs.com/pugang/p/9728983.html 很早之前就想写一篇文章总结一下Linux Kernel开发的相关资料,项目的原因,再加上 ...
- storm-kafka源码走读之KafkaSpout
from: http://blog.csdn.net/wzhg0508/article/details/40903919 (五)storm-kafka源码走读之KafkaSpout 原创 2014年1 ...
- 《DSP using MATLAB》示例Example7.22
代码: h = [1, 2, 3, 4, 3, 2, 1]/15; M = length(h); n = 0:M-1; [Hr, w, a, L] = Hr_Type1(h); a L amax = ...
- System.Web.HttpRequestValidationException: 从客户端(dbFlag="<soap:Envelope xmlns...")中检测到有潜在危险的 Request.Form 值。
System.Web.HttpRequestValidationException: 从客户端(dbFlag="<soap:Envelope xmlns...")中检测到有潜 ...
- Spring Aware接口---BeanNameAware BeanFactoryAware ApplicationContextAware
前言 对于应用程序来说,应该尽量减少对spring api的耦合程度,然后有时候为了运用spring提供的一些功能,有必要让bean了解spring容器对其管理的细节信息,如让bean知道在容器中是以 ...