Pixel density Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Pixels per inch (PPI) or pixel density is a measurement of the resolution of devices in various contexts; typically computer displays, image scanners, and digital camera image s…
Fruit Ninja II Time Limit: 5000MS Memory limit: 65536K 题目描述 Have you ever played a popular game named "Fruit Ninja"? Fruit Ninja (known as Fruit Ninja HD on the iPad and Fruit Ninja THD for Nvidia Tegra 2 based Android devices) is a video game d…
n a^o7 ! Time Limit: 1000MS Memory limit: 65536K 题目描述 All brave and intelligent fighters, next you will step into a distinctive battleground which is full of sweet and happiness. If you want to win the battle, you must do warm-up according to my inst…
Boring Counting Time Limit: 3000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述     In this problem you are given a number sequence P consisting of N integer and Pi is the ith element in the sequence. Now you task is to answer a list of queries, for each…
Rescue The Princess Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Several days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the princess, a prince who wanted to marry the princess set out immedia…
The Android University ACM Team Selection Contest Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述  Now it's 20000 A.D., and the androids also participate in the ACM Inter-national Collegiate Programming Contest (ACM/ICPC). In order to sele…
Identifiers Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述  Identifier is an important concept in the C programming language. Identifiers provide names for several language elements, such as functions, variables, labels, etc. An identifie…
Crack Mathmen Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述  Since mathmen take security very seriously, they communicate in encrypted messages. They cipher their texts in this way: for every characther c in the message, they replace c w…
Ivan comes again! Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 The Fairy Ivan gave Saya three problems to solve (Problem F). After Saya finished the first problem (Problem H), here comes the second.This is the enhanced version of Proble…
Clockwise Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Saya have a long necklace with N beads, and she signs the beads from 1 to N. Then she fixes them to the wall to show N-1 vectors – vector i starts from bead i and end up with bead i…
Balloons Time Limit: 1000MS Memory limit: 65536K 题目描述 Both Saya and Kudo like balloons. One day, they heard that in the central park, there will be thousands of people fly balloons to pattern a big image.They were very interested about this event, an…
Shopping Time Limit: 1000MS Memory limit: 65536K 题目描述 Saya and Kudo go shopping together.You can assume the street as a straight line, while the shops are some points on the line.They park their car at the leftmost shop, visit all the shops from left…
Hello World! Time Limit: 1000MS Memory limit: 65536K 题目描述 We know that Ivan gives Saya three problems to solve (Problem F), and this is the first problem.“We need a programmer to help us for some projects. If you show us that you or one of your frien…
题目描述 Cainiao is a university student who loves ACM contest very much. It is a festival for him once when he attends ACM Asia Regional Contest because he always can find some famous ACMers there. Cainiao attended Asia Regional Contest Fuzhou Site on N…
Time Limit: 5000MS Memory limit: 65536K 题目描述 Haveyou ever played a popular game named "Fruit Ninja"? Fruit Ninja (known as Fruit Ninja HD on the iPad and Fruit Ninja THD for NvidiaTegra 2 based Android devices) is a video game developed by Halfb…
Isabella's Message Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1377    Accepted Submission(s): 406 Problem Description Isabella and Steve are very good friends, and they often write letters…
题目链接: http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=1255 描述 Given N (4 <= N <= 100)  rectangles and the lengths of their sides ( integers in the range 1..1,000), write a program that finds the maximum K for which there is a sequence of K of th…
Pixel density Time Limit: 1000MS Memory limit: 65536K 题目描述 Pixels per inch (PPI) or pixel density is a measurement of the resolution of devices in various contexts; typically computer displays, image scanners, and digital camera image sensors. Note,…
Solved ID PID Title Accepted Submit   A 2407 Impasse (+) 0 0   B 2415 Chess 0 0   C 2414 An interesting game 0 1   D 2413 n a^o7 ! 25 41   E 2412 Fruit Ninja I 0 2   F 2411 Pixel density 8 100   G 2410 Mine Number 0 0   H 2409 The Best Seat in ACM Co…
HEX SDUT 3896 17年山东省赛D题这个题是从矩形的左下角走到右上角的方案数的变形题,看来我对以前做过的题理解还不是太深,或者是忘了.对于这种题目,直接分析它的性质就完事了.从(1,1)走到(a,b)向左走的步数和向右走的步数是确定的,向下是代表向左向右各走了一步.细节:利用对称性,线性推逆元 对于每一种情况,向左下.向右下.向下的次数都是确定的,然后,对于每一种方向内部顺序不用考虑,然后排列组合就完事了对称性上又出错了,哎,自己也没找个小数据试一下,就...(a,b)和(a,a-b+…
2013年山东省赛F题 Mountain Subsequences先说n^2做法,从第1个,(假设当前是第i个)到第i-1个位置上哪些比第i位的小,那也就意味着a[i]可以接在它后面,f1[i]表示从第一个开始,以a[i]为结尾的不同递增序列的个数,要加上1,算上本身.正反各跑一遍,答案加一下(f1[i]-1)*(f2[i]-1)优化就是,比a[i]小的,只有a[i]-1个 #include<iostream> #include<cstdio> #include<queue&…
五题手快拿银,不然拿铜,甚至不拿,从结果上来看拿了铜牌对第一年的我们来说算好的,也不算太好. 从拿奖后的第一天,我想写这篇博客,但是我忍了下来,那时候被喜悦冲昏了头脑,当 冷静下来,我开始打算写这篇博客. 从心态方面分析: 训练赛,热身赛,都是抗压,很少拿过第一,每次被碾压,都有种想哭出来的滋味,好在我们学会了抗压,在M题230的通过量,我们WA了4次之后,我们慌得还不是很厉害.没有去看排名,1小时左右出了第一道T,如果说这是谁的责任,这是我的责任,大意,用double wa了3次,没考虑0的特…
杭州现场赛的题.BFS+DFS #include <iostream> #include<cstdio> #include<cstring> #define inf 9999999 using namespace std; char mp[105][105]; int sq[5][5]; int step[4][2]={{0,1},{1,0},{0,-1},{-1,0}}; struct pos { int x,y; }; int n,m,prn,x,y,tmp,ans…
这篇文章主要是介绍下C题的解题思路,首先我们对这道C题进行一个整体的概括,结构如下: C题:经济类 第一问:发现危险人群. 发现:欺诈的方式开始.雇佣或浪漫的承诺. 数据→确定特定的经济萧条地区→确定最危险的人群→针对这些人群的预防活动 被贩卖的因素(卷入人口贩运的风险因素): 贫困.失业.移民.逃避政治冲突.战争. 第二问:受害者身份和位置 发现:人口贩运网:动态的 贩毒者:频繁地改变分布.运输路线 (以避免被发现) ↓(信息不完整) 执法人员和分析人员→试图识别.摧毁 人口贩卖网络→(信息不…
2013年省赛H题你不能每次都快速幂算A^x,优化就是预处理,把10^9预处理成10^5和10^4.想法真的是非常巧妙啊N=100000构造两个数组,f1[N],间隔为Af2[1e4]间隔为A^N,中间用f1来填补f[x]=f1[x%N]*f2[x/N]%P; #include<iostream> #include<cstdio> #include<queue> #include<algorithm> #include<cmath> #inclu…
2013年省赛I题判断单向联通,用bfs剪枝:从小到大跑,如果遇到之前跑过的点(也就是编号小于当前点的点),就o(n)传递关系. bfs #include<iostream> #include<cstdio> #include<queue> #include<algorithm> #include<cmath> #include<ctime> #include<set> #include<map> #inclu…
RT,这太谔谔了,我不承认这是模拟赛 但是虽然是搬了三道题,题目本身也还能看,就这么着吧 (怎么机房里就我一道原题都没做过啊 T1 CF24D Broken Robot 比较简单地列出式子之后,我们发现可以自底向上每行做高斯消元求从每个格子出发的期望步数,复杂度$O(n^4)$(边界是最底下一行都是零) 然后我们发现高斯消元的时候每一行对应的方程就那几个地方有数,于是脚动高斯消元一下就可以$O(n^2)$了 #pragma GCC optimize(2) #include<cstdio> #i…
第一种情况大致思路: 每秒判断各个CNC的状态,若工作完成或者是出于空闲状态下则向RGV发出一个请求.同时,RGV每秒判断自己的状态(上下料.移动.闲置.清洗等),如果是处于闲置状态,则启用调度算法,把目前在闲置的CNC做一个全排列,计算把他们都换上料所花的时间.得到最优方案后再决定这次给谁上料,同时切换状态. 第二种情况大致思路: 大致与上面的相同,还是每秒判断各种状态,再特殊时段启用调度算法决定去哪,不过这里是双工序,所以需要在初始确定一种刀片分配方案.这里用循环直接枚举出所有的分配方案,每…
2016 第七届蓝桥杯 c/c++ B组省赛真题及解题报告 勘误1:第6题第4个 if最后一个条件粗心写错了,答案应为1580. 条件应为abs(a[3]-a[7])!=1,宝宝心理苦啊.!感谢zzh童鞋的提醒. 勘误2:第7题在推断连通的时候条件写错了,后两个if条件中是应该是<=12 落了一个等于号.正确答案应为116. 1.煤球数目 有一堆煤球.堆成三角棱锥形.详细: 第一层放1个, 第二层3个(排列成三角形), 第三层6个(排列成三角形), 第四层10个(排列成三角形). -. 假设一共…
F - Almost Sorted Array Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5532 Description We are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selectio…