自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 istringstream用法

今天看到一个istringstream的用法,顿时眼前一亮。头文件是。istringstream类用于执行C++风格的串流的输入操作。 看完下面这段代码应该就能轻松理解了。 #include #include using namespace std; int main() { string str; getline(cin, str); cout << str << endl;

2016-04-08 11:24:50 331

原创 UVa 1588 - Kickdown

好吧刚开始看这题的时候没仔细看题目,以为可以把字符串反转来做。 结果wa了几次之后发现并不可以。题目不难,对两条字符串分别扫一次取较小值即可。 题目链接:1588 - Kickdown #include #include #include #include #include #include using namespace std; int main() { strin

2016-04-08 10:03:48 247

原创 UVa 10340 - All in All

题目链接:10340 - All in All 超级大水题,扫一遍就好。//10340 - All in All #include #include #include #include #include using namespace std; int main() { int i, j; string a, b; while (cin>>a>>b) { for (i =

2016-04-07 22:57:01 226

原创 UVa 1368 - DNA Consensus String(AC)

题目链接:1368 - DNA Consensus String(AC) #include #include #include #include #include using namespace std; int main() { int T, m, n,MAX,dis; char ch; cin >> T; while (T--) { cin >> m >> n;

2016-04-06 22:13:11 201

原创 UVa 202 - Repeating Decimals(AC)

题目网址:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=138 解题的话模拟除法,出现两个相同的模(%b)的时候就出现了一个cycle。 #include #include #include #include #include usin

2016-04-06 20:11:08 277

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除