随笔分类 -  poj

每周两题
杭电oj 1002
摘要:1 #include 2 #include 3 using namespace std; 4 int nCases; 5 int m[1001], n[1001]; 6 char a[1001], b[1001]; 7 int main() 8 { 9 scanf("%d", &nCa... 阅读全文

posted @ 2014-05-09 20:19 Lingc· 阅读(1138) 评论(0) 推荐(0)

杭电oj 1001
摘要:#includeusing namespace std;int main(){ int n = 0, sum; while (cin>>n) { sum = 0; // 这里要清零 for (int i =0; i <= n; i++) {... 阅读全文

posted @ 2014-05-08 23:26 Lingc· 阅读(394) 评论(1) 推荐(0)

杭电oj 1000
摘要:今天开始和一个认识的学弟刷题。 学弟是个大牛,我还是个菜鸟。嘿嘿。杭电第一题我就wrong了好几次。 1 #include 2 using namespace std; 3 4 int main() 5 { 6 int A = 0,B = 0; 7 while(cin >> A ... 阅读全文

posted @ 2014-05-08 23:03 Lingc· 阅读(367) 评论(0) 推荐(0)

POJ2159 Ancient Cipher
摘要:题目很抽象,没有说明按哪种规则Substitution cipher,即A->? ~ Z->?并未说明,没有指明permutation cipher使用的数组,即怎么换序也不知道。确定的事:字母变换过程虽然未指明,但同一个字母肯定对应同一其他字母;学习内容:c++的I/O流;STL中的sort 对给定区间所有元素进行排序 ;#include //悲剧的WA#include //包含一组基础算法:置换、排序、合并、搜索等using namespace std;int main(){ const int maxlength = 100; //少于100个字母 char plate[.. 阅读全文

posted @ 2013-11-13 14:15 Lingc· 阅读(204) 评论(0) 推荐(0)

poj3299 Humidex
摘要:The humidex formula is as follows:humidex = temperature + hh = (0.5555)× (e - 10.0)e = 6.11 × exp [5417.7530 × ((1/273.16) - (1/(dewpoint+273.16)))]whereexp(x)is 2.718281828 raised to the exponentx.While humidex is just a number, radio announcers often announce it as if it were the te 阅读全文

posted @ 2013-11-06 13:41 Lingc· 阅读(288) 评论(0) 推荐(0)

导航

不知道不知道 知道不知道 知道知道 不知道知道。
天道酬勤,同志们共同努力!