Regionals 2012 :: Asia - Dhaka】的更多相关文章

水 B Wedding of Sultan 题意:求每个点的度数 分析:可以在,每个字母的的两个端点里求出的的出度,那么除了起点外其他点还有一个入度,再+1 /************************************************ * Author :Running_Time * Created Time :2015/11/4 星期三 13:22:03 * File Name :B.cpp ****************************************…
链接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=566 A  uva live 6182 - Ginkgo Numbers 题目意思: 规则: 1.<m, n> · <x, y> = <mx − ny, my + nx> 2.假设<m,n>是<p,q>的"除数".则存在<x,…
啥都不会做了.. 做题慢死 A.Grandpa's Walk 签到题. 直接DFS就行. 注意先判断这个点可以作为一个路径的起点不. 然后再DFS. 否则处理起来略麻烦 #include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <map> #define MAXN 111111 #define INF 1000000007 usin…
2015 UESTC Winter Training #4 Regionals 2008 :: Asia - Tehran 比赛开始时电脑死活也连不上WIFI,导致花了近1个小时才解决_(:зゝ∠)_ 未完成:B E F G H I A - String LD 给n(<=100)个互不相同的字符串(最长为100),然后进行stringld操作,就是每次操作把各个字符串的首个字符删去,直到 有字符串完全删去 存在两个字符串完全一致 问在最后一次操作之前有几次操作(PS:问法是在太奇怪了,不就是答案…
Sum of divisors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4318    Accepted Submission(s): 1382 Problem Description mmm is learning division, she's so proud of herself that she can figure…
Problem Description In this problem, you are given several strings that contain only digits from '0' to '9', inclusive.An example is shown below.101123The set S of strings is consists of the N strings given in the input file, and all the possible sub…
题目连接 排行榜 A和I都是签到题 按位BFS K Yet Another Multiple Problem 题意:给一些可以用的数字,求最小的数,它由特定的数字组成且是n的倍数 分析:暴力枚举不可行,因为数字可能非常大.考虑到大数取模为0,BFS每一层即数位,递归输出路径. #include <bits/stdc++.h> const int N = 1e4 + 5; bool no[10]; std::pair<int, int> pre[N]; int dir[10]; bo…
题目传送门排行榜 一个人做了12年北大出的题,自己还是太弱了,图论的知识忘光光,最小生成树裸题写不来,Dijkstra TLE不知道用SPFA. 简单几何(点到线段的距离) + 三分 B Stealing a Cake 题意:圆外一个点先到圆再到矩形的最短距离. 分析:由于圆在[0, PI]和[PI, PI*2]上是单峰函数,用三分求极值,应该在[0,PI*2]上也算单峰函数吧. /************************************************ * Author…
Browsing History http://acm.hdu.edu.cn/showproblem.php?pid=4464 签到 #include<cstdio> #include<algorithm> using namespace std; ]; int main(){ ; while(~scanf("%d",&n)){ ; while(n--){ scanf("%s",a); ; ;a[i];i++){ sum+=a[i];…
Friend Chains http://acm.hdu.edu.cn/showproblem.php?pid=4460 图的最远两点距离,任意选个点bfs,如果有不能到的点直接-1.然后对于所有距离最远的点都bfs一次.最坏n^2 邻接表 #include<cstdio> #include<cstring> #include<iostream> #include<queue> #include<map> #define mt(a,b) mems…