A : Rescue The Princess 题意: 给你平面上的两个点A,B,求点C使得A,B,C逆时针成等边三角形. 思路: http://www.cnblogs.com/E-star/archive/2013/06/11/3131563.html   向量的旋转. 直接套公式就行,或者我们可以找到等式解一个二元一次方程然后向量判断方向即可.我比较懒,就写了向量旋转的. #include <iostream> #include <cstdio> #include <cm…
[题意]给定一个长度为N的数列,M个询问区间[L,R]内大于等于A小于等于B的数的个数. [题目链接]http://acm.upc.edu.cn/problem.php?id=2224 省赛的时候脑抽想了10min没想出来就看别的题去了= =,赛后又想了10min想出来了并且1Y...真嫌弃自己= =... [分析]如果做过询问区间[L,R]内小于H的个数的那道线段树题(HDU 4417 2012年杭州赛区网络赛)那么这题就好想了.那在这里再说一下做法:{将所有的询问离线读入之后,按H从小到大排…
Description 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 immediately. Yet, the beast set a maze. Only if the prince find out the m…
Rescue The Princess Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 412  Solved: 168[Submit][Status][Web Board] Description Several days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the princess, a prince who…
E .Sequence in the Pocket sol:将数组copy一份,然后sort一下,找寻后面最多多少个元素在原数组中保持有序,用总个数减去已经有序的就是我们需要移动的次数. 思维题 #include "bits/stdc++.h" using namespace std; ; int a[MAXN], b[MAXN]; int main() { int t, n; scanf("%d", &t); while (t--) { scanf(&qu…
2013年"浪潮杯"山东省第四届ACM大学生程序设计竞赛排名:http://acm.upc.edu.cn/ranklist/ 一.第J题坑爹大水题,模拟一下就行了 J:Contest Print Server [题解]: 题目大意:输入 n,s,x,y,mod  分别队伍数n,还有一个s生成函数 s=((s*x)+y)%mod,就是打印机根据要求打印纸张,打印到s时,打印机将重置,生成新的s [code]: #include <iostream> #include <…
Alice and Bob Time Limit: 1000ms   Memory limit: 65536K 题目描述 Alice and Bob like playing games very much.Today, they introduce a new game. There is a polynomial like this: (a0*x^(2^0)+1) * (a1 * x^(2^1)+1)*.......*(an-1 * x^(2^(n-1))+1). Then Alice as…
点击打开链接 2226: Contest Print Server Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 53  Solved: 18 [Submit][Status][Web Board] Description In ACM/ICPC on-site contests ,3 students share 1 computer,so you can print your source code any time. Here you ne…
Mountain Subsequences 题目描述 Coco is a beautiful ACMer girl living in a very beautiful mountain. There are many trees and flowers on the mountain, and there are many animals and birds also. Coco like the mountain so much that she now name some letter s…
题解 被你们虐了千百遍的题目和 OJ 也很累的,也想要休息,所以你们别想了,行行好放过它们,我们来看题解吧... A. 诡异的计数法 Description cgy 太喜欢质数了以至于他计数也需要用质数表示!在他看来,2(第一小质数)表示1,3(第二小质数)表示2--可正因为他的计数方法太奇葩,所以他的数学成绩非常差而且拖累了他的绩点. lxy 得知 cgy 的绩点排名之后打算告诉他,可是必须以极度麻烦的 cgy 质数计数法的方式表示. lxy 出重金 ¥(10000000 mod 10) 请你…