摘要: Java语言规定字符串常量必须用双引号“”括起,例如: System.out.println("JAVA!"); Java的任何字符串常量都是String类的对象,若没有命名,Java自动为其创建一个·匿名String类对象,成为匿名String类的对象。 创建String对象 1.用一个已创建的字 阅读全文
posted @ 2021-08-05 12:49 AA、 阅读(51) 评论(0) 推荐(0) 编辑
摘要: C++ Stack(堆栈) 是一个容器类的改编,为程序员提供了堆栈的全部功能,——也就是说实现了一个先进后出的数据结构。 c++ stl栈stack的成员函数介绍 操作 比较和分配堆栈 empty() 堆栈为空则返回真 pop() 移除栈顶元素 push() 在栈顶增加元素 size() 返回栈中元 阅读全文
posted @ 2021-03-03 15:55 AA、 阅读(58) 评论(0) 推荐(0) 编辑
摘要: time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have nn stacks of blocks. The ii-th s 阅读全文
posted @ 2021-02-20 15:02 AA、 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 会下国际象棋的人都很清楚:皇后可以在横、竖、斜线上不限步数地吃掉其他棋子。如何将8个皇后放在棋盘上(有8 * 8个方格),使它们谁也不能被吃掉!这就是著名的八皇后问题。 对于某个满足要求的8皇后的摆放方法,定义一个皇后串a与之对应,即a=b 1b 2...b 8,其中b i为相应摆法中第i行皇后所处 阅读全文
posted @ 2021-02-18 16:06 AA、 阅读(43) 评论(0) 推荐(0) 编辑
摘要: time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output The great hero guards the country where 阅读全文
posted @ 2021-02-11 12:48 AA、 阅读(123) 评论(0) 推荐(0) 编辑
摘要: B1. Painting the Array I time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output The only differ 阅读全文
posted @ 2021-02-10 16:32 AA、 阅读(138) 评论(0) 推荐(0) 编辑
摘要: You are given an array of integers 𝑎1,𝑎2,…,𝑎𝑛. Find the maximum possible value of 𝑎𝑖𝑎𝑗𝑎𝑘𝑎𝑙𝑎𝑡 among all five indices (𝑖,𝑗,𝑘,𝑙,𝑡) (𝑖 阅读全文
posted @ 2021-02-08 18:52 AA、 阅读(75) 评论(0) 推荐(0) 编辑
摘要: time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output Alice and Bob play a game. They have a binary s 阅读全文
posted @ 2021-02-05 20:36 AA、 阅读(78) 评论(0) 推荐(0) 编辑
摘要: Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large re 阅读全文
posted @ 2021-01-29 20:52 AA、 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。 Output 共 阅读全文
posted @ 2021-01-29 18:09 AA、 阅读(72) 评论(0) 推荐(0) 编辑