Guess a number! Time Limit: 1000MS   Memory Limit: 262144KB   64bit IO Format: %I64d & %I64u Submit Status Description A TV show called "Guess a number!" is gathering popularity. The whole Berland, the old and the young, are watching the sho…
Prison Transfer Time Limit: 1000MS   Memory Limit: 262144KB   64bit IO Format: %I64d & %I64u Submit Status Description The prison of your city has n prisoners. As the prison can't accommodate all of them, the city mayor has decided to transfer c of t…
C. Tic-tac-toe 题目连接: http://www.codeforces.com/contest/3/problem/C Description Certainly, everyone is familiar with tic-tac-toe game. The rules are very simple indeed. Two players take turns marking the cells in a 3 × 3 grid (one player always draws…
A. Extract Numbers Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/600/problem/A Description You are given string s. Let's call word any largest sequence of consecutive symbols without symbols ',' (comma) and ';' (semicolon…
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…
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…
B. Center Alignment 题目连接: http://www.codeforces.com/contest/5/problem/B Description Almost every text editor has a built-in function of center text alignment. The developers of the popular in Berland text editor «Textpad» decided to introduce this fu…
Ballot Analyzing Device 题目连接: http://codeforces.com/gym/100269/attachments Description Election committee of Flatland is preparing for presidential elections. To minimize human factor in ballot counting they decided to develop an automated Ballot Ana…
没错,我又爆零了.....先让我自闭一分钟.....so 当你忘记努力的时候,现实会用一记响亮的耳光告诉你东西南北在哪. 好了,现在重归正题: 全国信息学奥林匹克联赛(NOIP2014) 复赛模拟题 Day2 长乐一中 题目名称 改造二叉树 数字对 交换英文名称 binary pair swap输入文件名 binary.in pair.in swap.in输出文件名 binary.out pair.out swap.out时间限制 1s 2s 1s空间限制 256M 256M 256M测试点数目…
题目名称 正确答案  序列问题 长途旅行 英文名称 answer sequence travel 输入文件名 answer.in sequence.in travel.in 输出文件名 answer.out sequence.out travel.out 时间限制 1s 1s 1s 空间限制   256M 256M 256M 测试点数目 20 20 10 测试点分值 5 5 10 是否有部分分 无 无 无 题目类型 传统 传统 传统 是否有 SPJ 无 无 无 正确答案 全国信息学奥林匹克联赛(…
Problem I. Interest Targeting 题目连接: http://codeforces.com/gym/100714 Description A unique display advertisement system was developed at the department of advertising technologies, Yaagl Inc. The system displays advertisements that meet the interests…
\(NOIP\)模拟题汇总(加厚版) T1 string 描述 有一个仅由 '0' 和 '1' 组成的字符串 \(A\),可以对其执行下列两个操作: 删除 \(A\)中的第一个字符: 若 \(A\)中 '1' 出现的次数为奇数,则在 \(A\) 的末尾插入 '1',否则在 \(A\) 的末尾插入 '0'. 现在给出一个同样仅由 '0' 和 '1' 组成的字符串 \(B\),请你判断 \(A\) 能否在任意多次操作后转化为 \(B\). 输入 输入文件第一行一个正整数 \(T\),表示有 \(T\…
模拟题 PAT (Advanced Level) Practice 模拟题 目录 1008 Elevator (20) 1042 Shuffling Machine (20) 1046 Shortest Distance (20) 1051 Pop Sequence (25) 1117 Eddington Number (25) 1128 N Queens Puzzle (20) 1008 Elevator (20) #include<cstdio> int main() { int N; s…
Dance 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2223 Descriptionww.co For a dance to be proper in the Altered Culture of Machinema, it must abide by the following rules: A dip…
点球大战(penalty) Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/25 Description 在足球比赛中,有不少赛事,例如世界杯淘汰赛和欧洲冠军联赛淘汰赛中,当比赛双方经过正规比赛和加时赛之后仍然不分胜负时,需要进行点球大战来决定谁能够获得最终的胜利.点球大战的规则非常简单,两方轮流派出球员罚点球,每方各罚5个.当5轮点球结束以后如果仍然不分胜负,则进入一轮定胜…
这篇文章来介绍一些模拟题,即一类按照题目要求将现实的操作转换成程序语言. zoj1003: On every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV.   The rule is very simple.  On the ground there are 100 labeled  balloons, with the numbers 1 to 100.  Afte…
题目大意:给你一个完全二叉树,并且给他们编号,编号规则为左子树为2*k,右子树为2*k+1,每一个节点 上都有一个开关,初始时开关都处于关闭状态,小球碰到节点就会改变该点的开关的状态.然后给你I个小球, 要求输出第I个小球最终到达的叶子节点的编号. 思路分析:简单的模拟题,主要是要对二叉树的结构和编号原则清楚,有D层,则一共有(1<<D)-1个节点,然 后就可以开一个数组用来储存每一节点的状态,初识化为0,表示均处于关闭状态,然后就开始进行模拟,判断是否 越界通k>n?注意最后 要输出k…
Problem Description In a military parade, the King sees lots of new things, including an Andriod Phone. He becomes interested in the pattern lock screen. The pattern × square lattice, the three points ,,, the three points ,,, and the three points ,,.…
Codeforces 828B Black Square(简单题) Description Polycarp has a checkered sheet of paper of size n × m. Polycarp painted some of cells with black, the others remained white. Inspired by Malevich's "Black Square", Polycarp wants to paint minimum pos…
题目链接: http://poj.org/problem?id=3923 题意描述: 输入一个n*m的屏幕 该屏幕内有至少一个对话框(每个对话框都有对应的字母表示) 判断并输出该屏幕内处于最表层的对话框是哪些(有多个的话按字典序) 解题思路: 很接近生活的一道模拟题,考察了思维的缜密性,尤其是出现嵌套情况时,应该输出里层的对话框编号即可. AC代码: #include<stdio.h> #include<string.h> #include<ctype.h> ][];…
很久没有打模拟题了,再次总结一下模拟题的做法: 仔细分析题意,弄清楚过程 理清楚模拟步骤,严格按照步骤编写代码 添加中间输出测试每步结果 虽然这是一个很简单的水题,但是没有松哥帮忙还是卡了很久,因为没有做好第一步,题目中是老师先吹哨,然后一圈所有同学同事将自己现有糖的一般分给下一个同学,结束后老师将现手里为奇数的糖的同学再多给一颗糖最后判断每个人的糖是否一样,如果一样结束游戏 代码: #include<cstdio> #include<cstring> #include<al…
题目描述:实现一个计算器,可以进行任意步的整数以内的加减乘除运算,运算符号只有+.-.*./,求出结果. 解题报告:一个可以说麻烦的模拟题,我们可以这样,输入以字符串的形式输入,然后将输入先做一遍预处理,预处理要完成的是将其中所有的操作数和运算符号分开,我的做法是将操作数存放在一个数组里面,然后将运算符号也按同样的顺序存放在另一个数组里面,然后把所有的减法的运算转换成加上一个负数,这样在最后处理的时候就可以变得更简便,然后下一步就是运算处理,这一步我分成了两步来做,第一步,把其中所有的乘法和除法…
题目描述:输入一个偶数,判断这个偶数可以由哪两个差值最小的素数相加,输出这两个素数. 题目分析:模拟题,注意的是为了提高效率,在逐个进行判断时,只要从2判断到n/2就可以了,并且最好用打表法判断素数.代码附上... #include<cstdio> #include<cstring> #include<cmath> ; bool prim[MAX]; void dabiao() { //先打素数表 memset(prim,,sizeof(prim)); ;i<=M…
解题报告: 题目描述:写一个程序给一个编程考试C++实时提交系统排名,给你的数据是题目的总数,每次错误提交罚的时间分,每位用户的姓名,然后是输入用户每题的完成情况,有一下几种情况,第一,输入只有一个正值,表示该题只有一次提价记录,且已经AC了,第二,有一个正值,并且,正值后面有一个括号,括号里面有一个数字,前面的正值表示AC该题所用的时间,后面括号里面的数表示总共有多少次错误的提交记录,第三,只有一个负数,表示该题提交了这个负数的绝对值次,但还没有AC,第四,只有一个0,表示该题没有提交记录,对…
Problem K. UTF-8 Decoder 题目连接: http://opentrains.snarknews.info/~ejudge/team.cgi?SID=c75360ed7f2c7022&all_runs=1&action=140 Description UTF-8 is a character encoding capable of encoding all possible characters, or code points, in Unicode. Nowadays…
Problem C: LCR 题目连接: http://codeforces.com/gym/100646/attachments Description LCR is a simple game for three or more players. Each player starts with three chips and the object is to be the last person to have any chips. Starting with Player 1, each…
CodeForces.158A Next Round (水模拟) 题意分析 校赛水题的英文版,坑点就是要求为正数. 代码总览 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <sstream> #include <set> #include <map> #include <queue>…
最近做模拟题看到一些好的题及题解. 升格思想: 核电站问题 一个核电站有N个放核物质的坑,坑排列在一条直线上.如果连续M个坑中放入核物质,则会发生爆炸,于是,在某些坑中可能不放核物质. 任务:对于给定的N和M,求不发生爆炸的放置核物质的方案总数 输入:输入文件只一行,两个正整数N,M( 1<N<50,2≤M≤5) 输出:输出文件只有一个正整数S,表示方案总数. 运用升格思想.设N个坑不会发生爆炸的方案数是f[N],那么我们假设N以前的坑的方案 都已知了,那么我们只需要考虑第N个坑如何放即可(顺…
  8.22 NOIP 模拟题 编译命令 g++ -o * *.cpp gcc -o * *.c fpc *.pas 编译器版本 g++/gcc fpc 评测环境 位 Linux, .3GHZ CPU 评测软件 Lemon 评测方式 忽略行末空格和回车 特别注意:c/c++ 选手使用 printf 输出 位整数请使用%lld 注意事项 A 债务 文件名                            输入文件             输出文件            时空限制 debt.pa…
这场比赛的出题人挺有意思,全部magic成了青色. 还有题目中的图片特别有趣. 晚上没打,开virtual contest打的,就会前三道,我太菜了. 最后看着题解补了第四道. 比赛传送门 A. Angry Students 题目大意:有t队学生,每个学生有两种状态,生气(A)或不生气(P).(话说为什么生气的戴着圣诞帽哇)所有生气的人都会往前一个人丢雪球,被丢到的人也会变得生气,也会丢雪球.问你每队人中最后一个学生变得生气的时刻. 这题就是统计最长的连续的'P'当然前提是左边有生气的人. 代码…