C. Vladik and Memorable Trip time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vladik often travels by trains. He remembered some of his trips especially well and I would like to tell you ab…
C. Vladik and Memorable Trip time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vladik often travels by trains. He remembered some of his trips especially well and I would like to tell you ab…
C. Vladik and Memorable Trip time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vladik often travels by trains. He remembered some of his trips especially well and I would like to tell you…
http://codeforces.com/contest/754/problem/C C. Vladik and chat time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Recently Vladik discovered a new entertainment — coding bots for social netwo…
A. Vladik and Courtesy time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output At regular competition Vladik and Valera won a and b candies respectively. Vladik offered 1 his candy to Valera. Afte…
A CodeForces 811A Vladik and Courtesy B CodeForces 811B Vladik and Complicated Book C CodeForces 811C Vladik and Memorable Trip D CodeForces 811D Vladik and Favorite Game E CodeForces 811E Vladik and Entertaining Flags 点击题号进入题面 ------…
A. Vladik and Courtesy 题面 At regular competition Vladik and Valera won a and b candies respectively. Vladik offered 1 his candy to Valera. After that Valera gave Vladik 2 his candies, so that no one thought that he was less generous. Vladik for same…
A. Vladik and Courtesy time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output At regular competition Vladik and Valera won a and b candies respectively. Vladik offered 1 his candy to Valera. Afte…
A. Vladik and Courtesy 水题略过 #include<cstdio> #include<cstdlib> #include<cmath> using namespace std; typedef long long int LL; int main() { LL a,b; scanf("%I64d%I64d",&a,&b); LL num=1; while(true) { if(a<num){printf(&…
Road Trip Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KB Total submit users: 29, Accepted users: 29 Problem 12882 : No special judgement Problem description You are planning a road trip to visit your friends, each of whom live in…
E. Vladik and cards 题目链接 http://codeforces.com/contest/743/problem/E 题面 Vladik was bored on his way home and decided to play the following game. He took n cards and put them in a row in front of himself. Every card has a positive integer number not e…
题目链接:1484 - Alice and Bob's Trip 题意:BOB和ALICE这对狗男女在一颗树上走,BOB先走,BOB要尽量使得总路径权和大,ALICE要小,可是有个条件,就是路径权值总和必须在[L,R]之间,求终于这条路径的权值. 思路:树形dp,dp[u]表示在u结点的权值,往下dfs的时候顺带记录下到根节点的权值总和,然后假设dp[v] + w + sum 在[l,r]内,就是能够的,状态转移方程为 dp[u] = max{dp[v] + w }(bob) dp[u] = m…
Alice and Bob's Trip Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2643 Accepted Submission(s): 708 Problem Description Alice and Bob are going on a trip. Alice is a lazy girl who wants to…
Trip Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3850 Accepted: 1030 Description Alice and Bob want to go on holiday. Each of them has planned a route, which is a list of cities to be visited in a given order. A route may contain a…
Trip Planning Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVALive 4261 Description You are going on a long trip. Initially, you stay at hotel 0. Along the way, there are n<tex2html_verbatim_mark&g…
题目链接 Mahmoud and a xor trip 树形DP.先考虑每个点到他本身的距离和,再算所有点两两距离和. 做的时候考虑二进制拆位即可. #include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i(0); i < (n); ++i) #define rep(i, a, b) for(int i(a); i <= (b); ++i) #define LL long long const…