摘要: 题意:给定n个矩阵 然后给出每个矩阵的行数和列数 让你求出一个矩阵表达式的乘的次数解题思路:栈解题代码:// File Name: uva442.c// Author: darkdream// Created Time: 2013年05月15日 星期三 21时15分38秒#include<stdio.h>#include<string.h>#include<stdlib.h>#include<time.h>#include<math.h>struct node { int a, b;}m[300] ;int main(){ //fre 阅读全文
posted @ 2013-05-15 22:23 dark_dream 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题意:看括号是否匹配解题思路:一直想用递归来做,发现做不出 后来才想到消去当今可以消去的() 与 【】 的括号 循环找就行了#include <stdlib.h>#include <stdio.h>#include <string.h>char str[1000];int main(){ int t ; scanf("%d",&t); getchar(); while(t--) { memset(str,0,sizeof(str)); gets(str); int ok = 0; int k = strlen... 阅读全文
posted @ 2013-05-15 20:17 dark_dream 阅读(134) 评论(0) 推荐(0) 编辑