思路:当石子个数大于2时,后手赢。 #include #include using namespace std; int main(){ int T; long long N; scanf("%d",&T); while(T--){ scanf("%lld",&N); if(N>2){ print
思路:当石子个数大于2时,后手赢。 #include #include using namespace std; int main(){ int T; long long N; scanf("%d",&T); while(T--){ scanf("%lld",&N); if(N>2){ print
company Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Discuss Problem Description There are n kinds of goods in the company, with each of them has a inventory of and ...
Problem Description Julyed is preparing for her CET-6. She has N words to remember, but there is only M days left. If she can’t remember all these words, she won’t pass CET-6. If she can’t pass .....
Solved ID PID Title Accepted Submit A 2407 Impasse (+) 0 0 B 2410 Mine Number 3 19 C 2412 Fruit Ninja I 4 19 D
#include #include #include #include using namespace std; long long num[55]; void init() { for(int i=1;i num[i]=num[i-1]*3+1; } long long solve(long long n) { long long cnt
#include #include #include #include #include #include using namespace std; //快速幂 int a[10009]; const int mod=997; int pow_quick(int x,int n) { int sum=1; while(n) ... if(n%2)su
题目 fireworks Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Discuss Problem Description ...Hmz likes to play fireworks, especially when they are put regularly. ...
Problem Description Because of the GFW (Great Firewall), we cannot directly visit many websites, such as Facebook, Twitter, YouTube, etc. But with the help of proxy and proxy server, we can easily...
E - Full Binary TreeTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status use MathJax to parse formulasDescriptionIn computer science, a binary tree is a tree ...
链接:https://www.nowcoder.com/acm/contest/123/C 来源:牛客网 There are cities in Byteland, and the city has a value . The cost of building a bidirectional road between two cities is the sum of ...
传送门:SDUT 2878题目大意:将数轴围成一个圆环,标有点 0~n-1,如果你当前在 x 点,则各有一半的几率到达 x+1 或 x-1 点,问从 0 点到 x 点要走的步数的期望是多少。思路:谈不上思路了,XJB一试竟然对了…… 答案...
2018.5.5-5.6山东省赛总结 从清明节选拔赛结束后开始准备的省赛终于也结束了。非常非常非常幸运的擦边拿了个银末,当然主要还是靠我的俩队友带飞,实在是太强了OAQ,跟他们组队我学会了不少新的名词,嗯…当然要...
Weighted Median Time Limit: 2000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 For n elements x1, x2, ..., xn with positive integer weights w1, w2, ..., wn. The weighted median ...
省赛结束快两个星期辣,原谅弱到现在才写总结,拖延症晚期路过(逃。 其实觉得自己挺幸运的,省赛前因为各种原因和FF and +才组队,然后瞬间抱上大腿,完美蜕变,成为一名辅助,走上人生巅峰。 一群不会起名字的BD...
作为水题王者前去水了一波山东理工大学的校赛,这道题一个小细节坑了我2个小时,思路其实很简单,就是线段树单点更新的模板,用一个60的数组标记,如果这个区间内有I种类的化石,那么就是1,否则为0,加入新化石的...
山东省第八届ACM程序设计竞赛。国庆节重现赛。 C题烟火爆炸,难在求组合数,需要用到逆元。其中我代码中的求法可以提取出来当板子用。 F题判段离散数学中的一个条件命题是否正确。难点是判断浮点数a / b是否为整数。...
题目链接: Proxy 题意 比赛前期读题不顺,不知道是最小生成树还是最短路径,好吧,其实我们最开始想的连最短路径都不是 到了后期终于知道了题意。就是给你一个图,让你求0节点到n+1节点的最短路径,但不是让你输出...
Description In GGO, a world dominated by gun and steel, players are fighting for the honor of being the strongest gunmen. Player Shino is a sniper, and her aimed shot kills one monster at a time....
题意:查找只被竞价一次的价格中的最小值。 set用法:http://www.cnblogs.com/BeyondAnyTime/archive/2012/08/13/2636375.html #include #include #include #include #include using namespace std;...
#include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int maxn=1e5+5; int a[maxn]; int main() ... scanf("%d
#include #include #include #include using namespace std; char str[1000][1000]; char type[1000]; //本题目使用scanf巧妙分段,将不同数据保存在不同的数组中,受教了。 void ace() ...
题意: 一个数论题,要求满足如下等式的x有多少个。 思路: 当时比赛是,队伍看到这个题,也没有做太多的思考,就是无从下手,几乎放弃。但是看到学校另外两支队伍都过了这个题,感觉自己还是好菜。...
标签: 心里旅程
山东省第六届省赛总结 第一次参加现场赛,写下这篇日志,告诉以后的我,这是梦启航的地方。 省赛选拔赛之后,和 GS and PP 组女队,经过一段时间的磨合,迎来五月份青岛之战。首先要感谢的我的队友们,没有她们...
Consider segments on a two-dimensional plane, where the endpoints of the -th segment are and . One can put as many tokens as he likes on the integer points of the plane (recall that an integer poin...
Problem DescriptionSherlock and Watson are playing the following modified version of Nim game: There are n piles of stones denoted as ,,…,, and n is a prime number; Sherlock always plays first, and...
题目题意:在数轴上会有烟花,他会向前一个和后一个扩散,然后在一定时间后,要求最后位置有多少烟花。 模拟一下发现一行中把0去掉之后他就是一个杨辉三角。新知识:杨辉三角就是组合数。但是因为组合数太大了,...
热身赛 这场比赛从结果而言达到了预期(金牌),从过程而言和我的预期相差甚远(打的太乱,个人发挥很差),还好关键时刻队友抗住压力,负责后果真的不堪设想。 热身赛纯粹测机器的,先把A,B,C草草水过(A题小写x打...
Time Limit: 5000 ms Memory Limit: 65536 KiB Submit Statistic Discuss Problem Description We define an element aia_ia i in a sequence “good”, if and only if there exists a j(1≤j<...
Problem Description Alice has a monkey, she must feed fruit to the monkey every day.She has three kinds of fruits, bananas, peaches and apples. Every day, she chooses ...
MedianTime Limit:1 Second Memory Limit:65536 KB Recall the definition of the median ofelements whereis odd: sort these elements and the median is the-th largest element. In this problem,...