hdu 2106】的更多相关文章

#include <iostream> #include <cmath> #include <string.h> using namespace std; int main() { int sum,m,len,t,i,k,s; char a[1001]; while(cin>>t) { sum=0; while(t--) { cin>>a; m=0; len=strlen(a); for(i=0;i<len;i++) {if(a[i]=='…
http://acm.hdu.edu.cn/showproblem.php?pid=2160 Problem Description 话说现在猪肉价格这么贵,著名的ACBoy 0068 也开始了养猪生活.说来也奇怪,他养的猪一出生第二天开始就能每天中午生一只小猪,而且生下来的竟然都是母猪.不过光生小猪也不行,0068采用了一个很奇特的办法来管理他的养猪场:对于每头刚出生的小猪,在他生下第二头小猪后立马被杀掉,卖到超市里.假设在创业的第一天,0068只买了一头刚出生的小猪,请问,在第N天晚上,00…
Problem Description As we know , we always use the decimal system in our common life, even using the computer. If we want to calculate the value that 3 plus 9, we just import 3 and 9.after calculation of computer, we will get the result of 12. But af…
#include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #define maxn 1000 using namespace std; char str[maxn]; int change(char *s) { int k=strlen(s); int pos; ; ; i<k; i++) { if(s[i]=='(') { pos=i; break; } }…
题意:给你n个r进制数,让你求和. 析:思路就是先转化成十进制,再加和. 代码如下: #include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <vector> #include <cstring> #include <map> using namespace std; const int maxn = 70;…
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5558 Problem Description Alice wants to send a classified message to Bob. She tries to encrypt the message with her original encryption method. The message is a string S, which consists of Nlowercase let…
HDU 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 1049 1050 1057 1062 1063 1064 1070 1073 1075 1082 1083 1084 1088 1106 1107 1113 1117 1119 1128 1129 1144 1148 1157 1161 1170 1172 1177 1197 1200 1201…
Asteroids! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3159    Accepted Submission(s): 2106 Problem Description You're in space.You want to get home.There are asteroids.You don't want to hit…
A + B Problem Too Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13465    Accepted Submission(s): 10008 Problem Description This problem is also a A + B problem,but it has a little difference,…
转载来自:http://www.cppblog.com/acronix/archive/2010/09/24/127536.aspx 分类一: 基础题:1000.1001.1004.1005.1008.1012.1013.1014.1017.1019.1021.1028.1029.1032.1037.1040.1048.1056.1058.1061.1070.1076.1089.1090.1091.1092.1093.1094.1095.1096.1097.1098.1106.1108.1157…