Java安卓学习总结(二)

探索过程 今天简单体验了一下布局界面XML,然后照例是发现了一些问题。 首先是如下图所示的,graphical layout没有显示的问题。 网上都说是因为ADT(Android Developer Tools)版本太落后于SDK,果然我将SDK换成Android 5就可以了。 但是我记得我之前下载的已经是可以下载到的最新的版本了。 于是又上网搜了一下最新的ADT的版本,貌似已经有24.0.2的版 […]

比较运算符 Comparison Operators

本篇将会介绍不同的比较操作符,如 ==,!=,>,< 等等,它们可以在C++中使用,以及应用于那些数据。 顾名思义,条件语句指定是否应该执行另一个语句或语句块。这些通常被称作 “ 选择结构 ” 。这两种类型是: “if…then” “switch…case” 不过需要注意:这里没有涉及到 循环 ,但是条件语句涉及到 循环。 比较运算符的语法 测试条件是使用比较运算符指定的。这些操作符导 […]

POJ1231总结

Little Dara has recently learned how to write a few letters of the English alphabet (say k letters). He plays a game with his little sister Sara. He draws a grid on a piece of paper and writes p instances of each of the k letters in the grid cells. He then asks Sara to draw as many side-to-side horizontal and/or vertical bold lines over the grid lines as she wishes, such that in each rectangle containing no bold line, there would be p instances of one letter or nothing. For example, consider the sheet given in Figure 1, where Sara has drawn two bold lines creating four rectangles meeting the condition above. Sara wins if she succeeds in drawing the required lines. Dara being quite fair to Sara, wants to make sure that there would be at least one solution to each case he offers Sara. You are to write a program to help Dara decide on the possibility of drawing the right lines.

POJ1176总结

To brighten up the gala dinner of the IOI’98 we have a set of N coloured lamps numbered from
1 to N. The lamps are connected to four buttons:
button 1 — when this button is pressed, all the lamps change their state: those that are ON are turned OFF and those that are OFF are turned ON.
button 2 — changes the state of all the odd numbered lamps.
button 3 — changes the state of all the even numbered lamps.
button 4 — changes the state of the lamps whose number is of the form 3K+1 (with K >= 0), i.e., 1,4,7,…
There is a counter C which records the total number of button presses.
When the party starts, all the lamps are ON and the counter C is set to zero.