摘要:
A. Fair Game Petya and Vasya decided to play a game. They have n cards (n is an even number). A single integer is written on each card. Before the gam 阅读全文
摘要:
The frequent subset problem is defined as follows. Suppose U={1, 2,…\ldots…,N} is the universe, and S1S_{1}S1, S2S_{2}S2,…\ldots…,SMS_{M}SM a 阅读全文
摘要:
Let S be a sequence of integers s1s_{1}s1, s2s_{2}s2, ........., sns_{n}sn Each integer is is associated with a weight by the following rules 阅读全文
摘要:
There are nnn rectangles on the plane. The problem is to find the area of the union of these rectangles. Note that these rectangles might overlap with 阅读全文
摘要:
You are given a list of train stations, say from the station to the station 100. The passengers can order several tickets from one station to another 阅读全文
摘要:
java中用MessageDigest类,可以用来加密MD5。 首先创建一个MessageDigest对象 调用digest.digest(psd.getBytes());会返回一个16位的字符串,然后使用规定的模板转换为32位即可。 完整的代码: 1 import java.security.Me 阅读全文
摘要:
A. Arpa and a research in Mexican wave A. Arpa and a research in Mexican wave Arpa is researching the Mexican wave. There are n spectators in the stad 阅读全文
摘要:
今天打得真的很爽,15分钟就AK了,第一次在13名。。。在过生日时打真的是我的幸运日,哈哈哈。 A - Sandglass2 Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement We have a 阅读全文
摘要:
昨天突然想在Android下调用图灵机器人API实现聊天的功能。说干就干,虽然过程中遇见一些问题,但最后解决了的心情真好。 API接口是(key值可以在图灵机器人网站里注册得到) 最后hello是讲的话,访问这个网站会访问一个JSON格式的内容。 text关键字就是访问的内容,只要把这个关键字的内容 阅读全文
摘要:
在Android中的四大组件中的广播接收者(BroadcastReceiver):可以用于监听 / 接收 应用发出的广播消息,并做出响应。 所以,通过这个自然而然的可以实现短信的拦截。 先定义一个SmsListenerRecevicer类来继承BroadcastReceiver。在里面实现短信的拦截 阅读全文