id=46667" style="color:blue; text-decoration:none">CodeForces - 344D id=46667" style="color:blue; text-decoration:none">Alternating Current Time Limit: 1000MS   Memory Limit: 262144KB   64bit IO Format: %I64d & %I64…
Description Mad scientist Mike has just finished constructing a new device to search for extraterrestrial intelligence! He was in such a hurry to launch it for the first time that he plugged in the power wires without giving it a proper glance and st…
题意:两根导线绕在一起,问能不能拉成两条平行线,只能向两端拉不能绕 思路:从左至右,对+-号分别进行配对,遇到连续的两个“+”或连续的两个“-”即可消掉,最后如果全部能消掉则能拉成平行线.拿两根线绕一下就理解了,也可以一根拉成直线,另一根围着它绕,然后观察能拉成直线的条件.用栈实现就行. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38…
B. The Queue time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Finally! Vasya have come of age and that means he can finally get a passport! To do it, he needs to visit the passport office, b…
E. Read Time time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Mad scientist Mike does not use slow hard disks. His modification of a hard drive has not one, but n different heads that can re…
C. Exponential notation time limit per test: 2 seconds memory limit per test:256 megabytes input: standard input output: standard output You are given a positive decimal number x. Your task is to convert it to the "simple exponential notation".…
CodeForces - 344B id=46665" style="color:blue; text-decoration:none">Simple Molecules Time Limit: 1000MS   Memory Limit: 262144KB   64bit IO Format: %I64d & %I64u id=46665" class="login ui-button ui-widget ui-state-default…
题意:给定 n 个按顺序的命令,但是可能有的命令不全,让你补全所有的命令,并且要求让总数最少. 析:没什么好说的,直接用优先队列模拟就行,insert,直接放入就行了,removeMin,就得判断一下队列是不是空的,然后再考虑getMin,这个是不是对应的值,如果队列中首元素比它大,那么就加上一个, 如果相等直接取出,如果小于就不断取队列中最小元素. 代码如下: #include <bits/stdc++.h> using namespace std; char s[15], t[30]; v…
D. Alternating Current time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Mad scientist Mike has just finished constructing a new device to search for extraterrestrial intelligence! He was in…
B. Memory Manager 题目连接: http://www.codeforces.com/contest/7/problem/B Description There is little time left before the release of the first national operating system BerlOS. Some of its components are not finished yet - the memory manager is among th…