摘要: Java程序开发过程中,需要从键盘获取输入值是常有的事,但Java它偏偏就没有像c语言给我们提供的scanf(),C++给我们提供的cin()获取键盘输入值的现成函数!Java没有提供这样的函数也不代表遇到这种情况我们就束手无策,请你看以下三种解决方法吧: 以下将列出几种方法: 方法一:从控制台接收 阅读全文
posted @ 2018-10-19 17:08 不会写代码的猪 阅读(1409) 评论(0) 推荐(0) 编辑
摘要: HDU-2089; HDU-4734; POJ-3252; HDU-3709; UVA-1305; 阅读全文
posted @ 2018-07-28 14:35 不会写代码的猪 阅读(93) 评论(0) 推荐(0) 编辑
摘要: UVALive - 6434 #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <climits> using namespace std; const int MAX_N=110; 阅读全文
posted @ 2018-07-27 09:23 不会写代码的猪 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Thanks a lot for helping Harry Potter in finding the Sorcerer's Stone of Immortality in October. Did we not tell you that it was just an online game ? 阅读全文
posted @ 2018-07-11 11:37 不会写代码的猪 阅读(150) 评论(0) 推荐(0) 编辑
摘要: A.棋盘问题 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格 阅读全文
posted @ 2018-07-06 17:22 不会写代码的猪 阅读(227) 评论(0) 推荐(0) 编辑
摘要: E. Accepted Passwords(Gym - 100989E) Islam is usually in a hurry. He often types his passwords incorrectly. He hates retyping his password several tim 阅读全文
posted @ 2018-07-06 14:31 不会写代码的猪 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 代码: 阅读全文
posted @ 2018-06-27 11:05 不会写代码的猪 阅读(257) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/acm_cxlove/article/details/7854530 大佬们的总结。 阅读全文
posted @ 2018-06-05 20:44 不会写代码的猪 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 使用标准库的栈和队列时, 应包含先关头文件. 在栈中应包含头文件: #include< stack > 定义: stack< int > s; 包含头文件: #include< queue > 定义: queue< int > q; 阅读全文
posted @ 2018-04-21 13:19 不会写代码的猪 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 这只是我copy来方便自己复习。。。 标准c++中string类函数介绍注意不是CString之所以抛弃char*的字符串而选用C++标准程序库中的string类,是因为他和前者比较起来,不必 担心内存是否足够、字符串长度等等,而且作为一个类出现,他集成的操作函数足以完成我们大多数情况下(甚至是10 阅读全文
posted @ 2018-04-08 19:42 不会写代码的猪 阅读(3232) 评论(0) 推荐(0) 编辑