poj 3094 Quicksum】的更多相关文章

http://poj.org/problem?id=3094 #include<iostream> #include <string> using namespace std; int main() { string str; getline(cin,str); while(str != "#") { ; ;i < str.length(); i++) { ; if(str[i] >= 'A' && str[i] <= 'Z')…
Quicksum Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 16488   Accepted: 11453 Description A checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum will…
#include <stdio.h> #include <string.h> ]; int main() { ; int i,len; while(gets(word)) { sum = ; ] == '#') break; len = strlen(word); ; i < len; ++i) { if(word[i] != ' ') sum += (i+) * (word[i]-); } printf("%d\n",sum); } ; }…
[简要题意]:题意是非常easy. 看样能理解 [分析]:略. 读取字符串. // 200K 0Ms #include<iostream> using namespace std; int main() { char a[256]; while(1) { int sum = 0; gets(a); if(strcmp(a,"#")==0) break; int len = strlen(a); for(int i = 0;i<len;i++) { if(a[i] ==…
简单题 #include <iostream> #include <stdio.h> #include <string> #include <stack> #include <map> #include <vector> #include <algorithm> using namespace std; int main() { string s; while(getline(cin, s)) { if (s == &qu…
链接:第四次小练 A.POJ 3094   Quicksum 水题中的水题啊~ 直接上代码: #include <iostream> #include <cstdio> #include <cstring> using namespace std; ]; int main() { ) { memset(a,,sizeof(a)); gets(a); ]=='#') break; ,k; int n=strlen(a); ;i<n;i++) { k=a[i]-; ;…
1. POJ 3299 Humidex 链接: http://poj.org/problem?id=3299 这道题是已知H,D,T三者的运算关系,然后告诉你其中两个.求另一个. #include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main () { char c,h; double T,D,H; while(cin>…
以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight Moves1101 Gamblers1204 Additive equations 1221 Risk1230 Legendary Pokemon1249 Pushing Boxes 1364 Machine Schedule1368 BOAT1406 Jungle Roads1411 Annive…
OJ上的一些水题(可用来练手和增加自信) (POJ 3299,POJ 2159,POJ 2739,POJ 1083,POJ 2262,POJ 1503,POJ 3006,POJ 2255,POJ 3094) 初期: 一.基本算法: 枚举. (POJ 1753,POJ 2965) 贪心(POJ 1328,POJ 2109,POJ 2586) 递归和分治法. 递推. 构造法.(POJ 3295) 模拟法.(POJ 1068,POJ 2632,POJ 1573,POJ 2993,POJ 2996) 二…
著名题单,最初来源不详.直接来源:http://blog.csdn.net/a1dark/article/details/11714009 OJ上的一些水题(可用来练手和增加自信) (POJ 3299,POJ 2159,POJ 2739,POJ 1083,POJ 2262,POJ 1503,POJ 3006,POJ 2255,POJ 3094) 初期: 一.基本算法: 枚举. (POJ 1753,POJ 2965) 贪心(POJ 1328,POJ 2109,POJ 2586) 递归和分治法. 递…