原文 India's Golden City celebrates its culture with costumes(服装),crafts(工艺品) and camels One of the festival's most popular events is the Mr.Desert competition,where judges assess contestants(竞赛者)' mustaches,which are seen as a sign of honor.Visitors t…
CODE FESTIVAL 2017 qual B B - Problem Set 确实水题,但当时没想到map,用sort后逐个比较解决的,感觉麻烦些,虽然效率高很多.map确实好写点. 用map: #include<iostream> #include<cstdio> #include<cstdlib> #include<map> using namespace std; map<int,int>mp; int main() { int n,…
CODE FESTIVAL 2017 qual B C - 3 Steps 题意:给定一个n个结点m条边的无向图,若两点间走三步可以到,那么两点间可以直接连一条边,已经有边的不能连,问一共最多能连多少条边. 题解:其实我不知道二分图的实际算法,网上有人说这可以看成是否是二分图来做. 有人给出了个性质(没发现>_<):相邻奇数长度的两个点一定能连边 二分图就是一个图的结点分别在两个不相交的集合S,T中,且每条边都在两个集合中.(不严谨说法)如果是二分图,那么能连的边数就是|S|*|T|-m…
昨晚因为有点事就去忙了,没打后悔啊 A - XXFESTIVAL Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Rng is going to a festival. The name of the festival is given to you as a string S, which ends with FESTIVAL, from input. Answer the questi…
A - Snuke's favorite YAKINIKU -- #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ') #define enter putchar('\n') #define MAXN 40005 #define…
最近不知道为啥被安利了饥荒,但是不能再玩物丧志了,不能颓了 饥荒真好玩 A - XXFESTIVAL CCFESTIVAL #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ') #define enter putchar('\n'…
A - Can you get AC? No #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define pb push_back #define mp make_pair using namespace std; typedef long long int64; char s[15]; int main() { scanf("%s",…