![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法竞赛入门第三章习题
xqch12345
这个作者很懒,什么都没留下…
展开
-
3-1 得分 UVa1585
#include <vector> #include <iostream> #include <string> using namespace std; int main() { string word; cin >> word; int num = 0,t=0; for (int i = 0; i < (int)word.size()...原创 2018-05-20 14:12:17 · 126 阅读 · 0 评论 -
3-11 换抵挡装置 UVa1588
#include <vector> #include <iostream> #include <string> using namespace std; int main() { vector<int>A = { 2, 1, 1, 1, 1, 1, 1 }; vector<int>B = { 2, 2, 2, 1, 2, 2, 1,...原创 2018-05-20 14:33:07 · 294 阅读 · 0 评论 -
3-10 盒子 UVa1587
#include <vector> #include <iostream> #include <string> using namespace std; struct box{ int x, y; bool operator==(const box& rhs) // 操作运算符重载 { return(x == rhs.x) &&...原创 2018-05-20 14:30:43 · 209 阅读 · 0 评论 -
3-9 子序列 UVa 10340
#include <vector> #include <iostream> #include <string> using namespace std; int main() { string s, t; cin >> s >> t; int j = 0; int k = 0; for (int i = 0; i < (...原创 2018-05-20 14:28:30 · 126 阅读 · 0 评论 -
3-8 循环小数 UVa202
#include <vector> #include <iostream> #include <string> using namespace std; int main() { int a, b; cin >> a >> b; vector<int> res(30001); vector<int> re原创 2018-05-20 14:27:06 · 126 阅读 · 0 评论 -
3-7 DNA序列 UVa1368
#include <vector> #include <iostream> #include <string> using namespace std; int GetMin(vector<int> vec) { int minSer = 0; for (int i = 0; i < 4; i++) { if (vec[i] <...原创 2018-05-20 14:24:48 · 142 阅读 · 0 评论 -
3-5 谜题 UVa227
#include <vector> #include <iostream> #include <string> using namespace std; int main() { vector<vector<char>> map = { { 'T', 'R', 'G', 'S', 'J' }, { 'X', 'D', 'O', 'K'...原创 2018-05-20 14:21:00 · 143 阅读 · 0 评论 -
3-4 周期串 UVa455
#include <vector> #include <iostream> #include <string> using namespace std; bool is_circle_string(string word, int num) { int n = word.size(); for (int i = 0; i < num; i++) f...原创 2018-05-20 14:19:22 · 107 阅读 · 0 评论 -
3-3 数数字 UVa1225
#include <vector> #include <iostream> #include <string> using namespace std; int main() { string word; cin >> word; vector<int> num(10); for (auto a : word) num[a - ...原创 2018-05-20 14:17:26 · 124 阅读 · 0 评论 -
3-2 分子量 UVa1586
#include <vector> #include <iostream> #include <string> using namespace std; int main() { string mol="CHON"; string word; cin >> word; int num = 0; vector<int> vec(...原创 2018-05-20 14:15:33 · 195 阅读 · 0 评论 -
3-12 浮点数 UVa11809
#include <vector> #include <iostream> #include <string> #include <sstream> using namespace std; int main() { double m, x; int ee; int E[10][30]; double M[10][30]; for (in...原创 2018-05-22 20:36:55 · 168 阅读 · 0 评论