D. Turtles Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/103/problem/D Description As you know, the most intelligent beings on the Earth are, of course, cows. This conclusion was reached long ago by the Martian aliens, a…
题目链接: http://codeforces.com/contest/103/problem/D D. Time to Raid Cowavans time limit per test:4 secondsmemory limit per test:70 megabytes 问题描述 As you know, the most intelligent beings on the Earth are, of course, cows. This conclusion was reached lo…
Codeforces Beta Round #80 (Div. 2 Only) A Blackjack1 题意 一共52张扑克,A代表1或者11,2-10表示自己的数字,其他都表示10 现在你已经有一个queen了,问你有多少种方案,能够得到n点 题解 其实只用考虑三种情况,都考虑一下就好了,实在不行就暴力枚举-- 代码 #include<bits/stdc++.h> using namespace std; int n; int main() { scanf("%d",&…
D. Time to Raid Cowavans time limit per test 4 seconds memory limit per test 70 megabytes input standard input output standard output As you know, the most intelligent beings on the Earth are, of course, cows. This conclusion was reached long ago by…
Codeforces Beta Round #69 (Div. 2 Only) http://codeforces.com/contest/80 A #include<bits/stdc++.h> using namespace std; #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define sqr(x) ((x)*(x)) #define pb push_back #define eb emplac…
Codeforces Beta Round #83 (Div. 1 Only) A. Dorm Water Supply 题意 给你一个n点m边的图,保证每个点的入度和出度最多为1 如果这个点入度为0,那么这个点就是水龙头点. 如果这个点的出度为0,那么这个点就是储存点. 现在让你把所有水龙头到储存点的路径都输出出来,且输出这条路径的边权最小值 题解 显然是个仙人掌图,所以直接XJB暴力就好了 代码 #include<bits/stdc++.h> using namespace std; co…
Codeforces Beta Round #79 (Div. 2 Only) http://codeforces.com/contest/102 A #include<bits/stdc++.h> using namespace std; #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define sqr(x) ((x)*(x)) #define pb push_back #define eb empla…
Codeforces Beta Round #77 (Div. 2 Only) http://codeforces.com/contest/96 A #include<bits/stdc++.h> using namespace std; #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define sqr(x) ((x)*(x)) #define pb push_back #define eb emplac…
Codeforces Beta Round #76 (Div. 2 Only) http://codeforces.com/contest/94 A #include<bits/stdc++.h> using namespace std; #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define sqr(x) ((x)*(x)) #define pb push_back #define eb emplac…
Codeforces Beta Round #75 (Div. 2 Only) http://codeforces.com/contest/92 A #include<iostream> using namespace std; #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define sqr(x) ((x)*(x)) #define maxn 100005 typedef long long ll; t…