Magical Forest Time Limit: 24000/12000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 134 Accepted Submission(s): 69 Problem Description There is a forest can be seen as N * M grid. In this forest, there is…
Naive Operations Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 502768/502768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Problem Description In a galaxy far, far away, there are two integer sequence a and b of length…
6356.Glad You Came 题意就是给你一个随机生成函数,然后从随机函数里确定查询的左右区间以及要更新的val值.然后最后求一下异或和就可以了. 线段树,区间最大值和最小值维护一下,因为数据有点大,不剪枝就会超时.(默默吐槽,剪了枝照样超时) 因为太菜,交了24遍也是没过,TLE,WA,RE轮流来,而且感觉这题有毒,删一个没用的变量就会WA... 百度了一下题解,发现有人和我写的几乎一模一样,但是人家的就可以过,我的死也过不去. 人家的博客:HDU6356 Glad You Came(…
#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 <…
solved 7/11 2016 Multi-University Training Contest 10 题解链接 分类讨论 1001 Median(BH) 题意: 有长度为n排好序的序列,给两段子序列[l1,r1],[l2,r2]构成新的序列,问中间的数字. 思路: 根据不同情况分类讨论即可.时间复杂度O(1). 代码: #include <bits/stdc++.h> const int N = 1e5 + 5; int a[N]; int n, m; int l1, r1, l2, r…
Group Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17 Accepted Submission(s): 5 Problem Description There are n men ,every man has an ID(1..n).their ID is unique. Whose ID is i and i-1 are…
CRB and Queries Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 533 Accepted Submission(s): 125 Problem DescriptionThere are N boys in CodeLand.Boy i has his coding skill Ai.CRB wants to k…