- 博客(6)
- 资源 (4)
- 收藏
- 关注
原创 C++ 输入输出外挂 整数
#include #include using namespace std;inline void getInt(int* p) { char ch; do { ch = getchar(); } while (ch == ' ' || ch == '\n'); if (ch == '-') { *p = -(getchar
2014-10-28 21:11:48 1404
原创 操作系统实验 批处理作业的调度算法
#include #include #include #include #include #include #include using namespace std;typedef pair pii;const int N = 10000;int num;struct Node { char name[30];//作业的名字 int cTime; //作业进入输
2014-10-22 13:35:49 943
原创 51单片机 矩阵按键的扫描、消抖、动作分离
#include sbit ADDR0 = P1^0;sbit ADDR1 = P1^1;sbit ADDR2 = P1^2;sbit ADDR3 = P1^3;sbit ENLED = P1^4;sbit KEY_IN_1 = P2^4;sbit KEY_IN_2 = P2^5;sbit KEY_IN_3 = P2^6;sbit KEY_IN_4 = P2^7;sb
2014-10-15 13:19:14 2190
原创 ZIGBEE CC2430 使用Timer2定时器进行计数中断设置
#include #define uint unsigned int#define uchar unsigned charuint cnt = 0;uchar tmpFlag;void delay(uint n) { uint i, t; for (i = 0; i < 5; i++) for (t = 0; t < n; t++) ;}
2014-10-12 16:45:45 939
原创 51单片机 8*8LED点阵横向流水 使用位运算生成中间帧
#include sbit ADDR0 = P1^0;sbit ADDR1 = P1^1;sbit ADDR2 = P1^2;sbit ADDR3 = P1^3;sbit ENLED = P1^4;code unsigned char image[5][8] = { {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}, //动画帧0
2014-10-10 11:40:51 945
原创 hdu 4998 Rotate
给n次操作,每次操作为x, y, p即绕点(x,y)旋转p度,经过n次旋转后 相当于绕某个固定点旋转多少度,求固定点坐标和旋转度数。思路:很容易发现不管怎么旋转旋转度数相加就是最终度数(>=2*PI时减去2*PI就行了),那么咱们虚拟一个起始点,然后模拟旋转操作,最后得到一个虚拟终点,又虚拟起点和虚拟终点再加上旋转度数就能算出目标坐标了。
2014-10-02 16:33:49 430
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人