摘要: 一道关于表达式的题目。。。 思路参考了xhr大大的题解,在此贴上: 算法讨论我们考虑一个宏是否是“安全”的,经过观察和一些实验,可以发现,只有以下4种状态:•状态1(s1):这个宏完全安全,以任何方式使用该宏都没问题。•状态2(s2):这个宏不安全,只要表达式中出现该宏,都会导致表达式不安全。•状态 阅读全文
posted @ 2016-02-16 15:10 OZTOET 阅读(499) 评论(0) 推荐(0)
摘要: 一套矩阵库,主要实现功能有求特征值&特征向量,求合同标准型。 定义了实矩阵,多项式,多项式矩阵,向量四个类 注释比较详尽 /* Copyright © 2016 by dhd All Right Reserved. */ #include<bits/stdc++.h> #define rep(i, 阅读全文
posted @ 2016-02-14 20:56 OZTOET 阅读(403) 评论(0) 推荐(0)
摘要: A: #include<iostream> using namespace std; int main() { int n; cin>>n; cout<<(n-1)/5+1; } B: #include<iostream> using namespace std; int n; int pos[11 阅读全文
posted @ 2016-01-28 12:15 OZTOET 阅读(157) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> using namespace std; int a,b; int gcd(int a,int b) { if(a%b==0) return b; else return gcd(b,a%b); } int main() 阅读全文
posted @ 2016-01-28 12:12 OZTOET 阅读(250) 评论(0) 推荐(0)
摘要: #include<iostream> #include<string> using namespace std; int a[5][5];int b[5][5]; #define rep(i,j,k) for(int i=j;i<=k;i++) int n=4; string s[20]; void 阅读全文
posted @ 2016-01-28 12:11 OZTOET 阅读(183) 评论(0) 推荐(0)
摘要: #include<iostream> #include<string> #include<algorithm> using namespace std; int a[30],b[30]; string sa,sb; #define rep(i,j,k) for(int i=j;i<=k;i++) b 阅读全文
posted @ 2016-01-28 12:10 OZTOET 阅读(278) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstdio> using namespace std; int n; #define rep(i,j,k) for(int i=j;i<=k;i++) int main() { int sum=0; cin>>n; int tmp; rep( 阅读全文
posted @ 2016-01-28 12:10 OZTOET 阅读(372) 评论(0) 推荐(0)
摘要: #include<iostream> #include<string> using namespace std; int a[20][20];int b[20][20]; #define rep(i,j,k) for(int i=j;i<=k;i++) int n; string s[20]; vo 阅读全文
posted @ 2016-01-28 12:09 OZTOET 阅读(326) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int recur(int m,int n) { if(n==1) return 1; if(m==0) return 1; int sum=0; if(m>=n) sum+=recur(m-n,n); sum+=rec 阅读全文
posted @ 2016-01-28 12:09 OZTOET 阅读(194) 评论(0) 推荐(0)
摘要: #include<iostream> #include<string> using namespace std; int sum[201]; string s; int main() { while(cin>>s&&!(s.length()==1&&s[0]=='0')) { int x=s.len 阅读全文
posted @ 2016-01-28 12:08 OZTOET 阅读(186) 评论(0) 推荐(0)