2016 ccpc 网络选拔赛 F. Robots】的更多相关文章

Robots Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 60    Accepted Submission(s): 13 Problem Description QXJ has N robots on the plane, the i-th is at (xi,yi), numbereded 1 to N. Every robot…
HDU 5832 - A water problem 题意:有两颗星球,一年的长度分别为37天和173天.问第n天时它们是否为新年的第一天. 思路:显然  n 同时被37和173整除时,两种历法都在新年第一天,即 n 是 37*173=10001的倍数. 坑点:n的长度会达到1e7,我以为要用读入挂之类的,手写用getchar()读入却TLE,直接scanf("%s", n)就没事. #include<iostream> #include<cstdio> usi…
定义DP[pos][pre][odd][even],pos代表当前数位,pre代表前一位的数值,odd代表到前一位连续的奇数个数,even代表到前一位连续偶数个数. odd和even肯定至少有一个为0,而且最后的判断只和odd与even的奇偶性有关,能看出这个状态是可以被缩小到很小的,但是DP菜鸟我为了避免出错,还是定义了8万的可以接受的数组. 代码及注释如下: #include<iostream> #include<cstdio> #include<cstring>…
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; char maze[1025][1025]; void display(int x, int y, int d, int flag) { if (d == 0) { if (flag) maze[x][y] = 'P'; else maze[x][y] = 'C'; return; } int w = 1 <…
题意 description You are given an array a1,a2,...,an(∀i∈[1,n],1≤ai≤n). Initially, each element of the array is **unique**. Moreover, there are m instructions. Each instruction is in one of the following two formats: 1. (1,pos),indicating to change the…
Magic boy Bi Luo with his excited tree Problem Description Bi Luo is a magic boy, he also has a migic tree, the tree has N nodes , in each node , there is a treasure, it's value is V[i], and for each edge, there is a cost C[i], which means every time…
$$2019中国大学生程序设计竞赛(CCPC)\ -\ 网络选拔赛$$ \(A.\hat{} \& \hat{}\) 签到,只把AB都有的位给异或掉 //#pragma comment(linker, "/STACK:1024000000,1024000000") #include<bits/stdc++.h> using namespace std; function<void(void)> ____ = [](){ios_base::sync_wit…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=6705 path Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1250    Accepted Submission(s): 257 Problem Description You have a directed weighted graph…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=6709 Fishing Master Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 631    Accepted Submission(s): 170 Problem Description Heard that eom is a fishin…
1. 2016 CCPC 东北地区重现赛 2.总结:弱渣,只做出01.03.05水题 08   HDU5929 Basic Data Structure    模拟,双端队列 1.题意:模拟一个栈的操作,并在每次询问时,计算栈项到栈底元素nand位运算的值. 2.总结:思路就是看距离栈底最近的0的后面1的个数的奇偶.试了好多种办法,最后还是双端队列简便.总之,贼恶心的题.. #include<iostream> #include<cstring> #include<cmath…