和这一题构造的矩阵的方法相同。
需要注意的是,题目中a0~a9 与矩阵相乘的顺序。
#include
#include
#include
#include
#include
#define N 10
using namespace std;
int mod;
typedef long long LL;
struct matrix
{
LL a[10][10];
}...
分类:
其他好文 时间:
2014-06-16 12:06:07
阅读次数:
231
一、MySingle类
import Foundation
class MySingle{
//定义单例的属性
var name:String?
var age:Int?
var height:Double?
//定义类方法
class func shareInstance()->MySingle{
struct qzSingle...
分类:
其他好文 时间:
2014-06-16 12:04:04
阅读次数:
272
下标
swift允许我们为 类,结构体,枚举 定义下标,以更便捷的方式访问一大堆属性。比如Array和Dictionary都是结构体,swift的工程师已经为这两个类型提供好了下标操作的代码,所以,我们才可以通过 myArray[2]这种方式,读取和改写这个struct中保存的数据。而且,一个类型中可以定义多种下标访问方式(重载,关于重载,在后面的笔记中会提到,这里先不用太在意)
下标...
分类:
其他好文 时间:
2014-06-16 11:35:16
阅读次数:
173
1、存储属性
1. 作为特定类或结构实例的一部分,存储属性存储着常量或者变量的值。存储属性可分为变量存储属性(关键字var描述)和常量存储属性(关键字let描述)。
struct student{
let name = ""
var score = 0
}
let a = student(name:"小笨狼",score:96)
注意:
...
分类:
其他好文 时间:
2014-06-14 07:15:21
阅读次数:
309
昨天把DM8168的Timer设置给摸了一遍,为写PWM的底层驱动做好了准备,现在就要进入主题了。
dm8168_pwm.c:
#include
#include
#include
#include /* copy_to_user,copy_from_user */
#include
#include
#include
static struct class *pwm_cla...
分类:
其他好文 时间:
2014-06-14 06:06:27
阅读次数:
234
【Enumeration and
Structures】1、使用toRaw、fromRaw方法可以在原始值之间。注意enum的定义中使用了case。另外要注意switch中的枚举值。
2、struct和class最大的区别在于,struct被传递时,使用的是使用的是copy。 3、枚举变量可以有.....
分类:
其他好文 时间:
2014-06-13 19:53:46
阅读次数:
343
题目二:逆序链表输出。题目描述:
将输入的一个单向链表,逆序后输出链表中的值。链表定义如下:typedef struct tagListNode { int value; struct
tagListNode *next; }ListNode; 要求实现函数: void converse...
分类:
其他好文 时间:
2014-06-13 18:35:48
阅读次数:
203
dfs#include #include char Map[16][16];int
mv[16][16];//mv[i][j] == 0 没有被访问//mv[i][j] == 1 已经被访问struct N{int x,y;} ;int
jx[] = { 0,-1, 0, 1};int jy[] =...
分类:
其他好文 时间:
2014-06-13 17:45:35
阅读次数:
263
#include #include int map[51][51][51];int
v[51][51][51];int a,b,c,t11;struct node{ int x,y,z,ans;}q[200001];int
jx[6]={0,0,0,0,-1,1};int jy[6]={0,0...
分类:
其他好文 时间:
2014-06-13 17:10:39
阅读次数:
157
这个比较简单,用栈、递归、倒转链表都可以实现,不再过多解释。代码使用递归实现 1
#include 2 #include 3 #include 4 typedef struct Node 5 { 6 int data; 7 Node*
next; 8 }Node, *List;...
分类:
其他好文 时间:
2014-06-13 15:25:59
阅读次数:
194