ACdream原创群赛__15】的更多相关文章

这场感觉题目确实还算可以,不过,说好的每题10s效果上却不理想.这个时限还算比较紧.因为时间不是按绝对的多出几秒来计算,而是几倍来计算的. 比赛做的不好,后面又去做了一下. A:典型的数位DP,一直坑在这里. E:求f(f(f(n)))%p.f()表示斐波那契数.关于求斐波那契数模的循环节是有特定的数学定理和方法的.我也不知道,但是看了结论之后自己会实现了.首先,把p因数分解,ai^pi,显然最终的循环节就等于这些单独因子计算循环节的lcm.同时ai^pi的循环节又是G(ai)*ai^(pi-1…
只做了4题水题ADGI A题需要注意的就是“[...]”的输出了,何时输出,何时不输出. #include <stdio.h> int main() { int n, cur, d; ; while(scanf("%d%d%d",&n,&cur,&d)!=EOF) { printf("Case #%d: ",cnt++); ) printf("[<<]"); else printf("(&…
True love Time Limit: 4000/2000 MS (Java/Others)     Memory Limit:128000/64000 KB (Java/Others) Problem Description Is there true love in the world?maybe or not, god knows! We know there are some complex relationships between ds and cxlove, they fell…
<传送门> B - Apple Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) SubmitStatus Problem Description Alice and Bob are coming.This time, they are playing with apples. Initially, there are N baskets and M apples. Both bas…
题意:http://acdream.info/problem?pid=1112 Problem Description Here  is Alice and Bob again ! Alice and Bob are playing a game. There are several numbers.First, Alice choose a number n.Then he can replace n (n > 1)with one of its positive factor but not…
地址:http://acdream.info/onecontest/1014   都是来自Codeforce上简单题.   A. Boy or Girl 简单字符串处理   B. Walking in the Rain 每次能移动1或2的距离. 答案为,ans = min{ max{e(i), e(i+1)} (其中i从0->n-1) };   C. Cutting Figure 输入为一个nxm的矩阵,#都是连通区域,考虑4连通,去掉最少的#让#区域不连通. 首先说明,在矩阵中一个#的连接最少…
zoj3741 简单dp.wa了两个小时,中间改了好多细节.后来还是不对,参考了别人的代码,发现一个致命问题,初始化的时候,不是每种状态都能直接达到的.初始化成-1. (题目有个小坑,0<=L<=5, 即使吃药了,也不能到6 ) #include <vector> #include <list> #include <map> #include <set> #include <queue> #include <stack>…
点此进入比赛 T1:小凯的数字 题意:给定q个l,r,求l(l+1)(l+2)...(r-1)r模9的结果 很显然,这是道考验数(运)学(气)的题目 结论:输出\((l+r)*(r-l+1)\over2\)(具体证明见比赛官方博客) 需要注意的是不能直接乘,不然会爆long long 而且,这道题卡快读... Code: #include<bits/stdc++.h> #define ll long long using namespace std; ll q,l,r; int main(){…
Sudoku Checker Time Limit: 2000/1000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others) SubmitStatisticNext Problem Problem Description Sudoku is a popular single player game. The objective is to fill a 9x9 matrix with digits so that each colu…
蛋疼啊,本次只做出了一道题目...渣爆了... 妈蛋,,卡题之夜..比赛结果是1道题,比赛完哗啦哗啦出4道题.. A acdream1191 Dragon Maze 题意: 给一个迷宫,给出入口坐标和出口坐标,要求从入口到出口的步数尽可能少,如果有多种方案,则要求获得的分数尽可能多,获得的分数为经过的方格的数字之和 思路: bfs求最小步数,每走一步更新一下走到这个格子的最大权值 #include <bits/stdc++.h> using namespace std; typedef lon…