摘要: 显示行数,单词数和字节数wc [options] [file-list]选项 -c 仅仅显示输入中的字节数 -l 仅仅显示输入中的行数 -L 显示输入中最长的行的长度 -m 仅仅显示输入中的字符数 -w 仅仅显示输入中的单词数如 wc -lw file1 file2 file3 阅读全文
posted @ 2013-04-23 15:09 OpenSoucre 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1014. Product of DigitsTime Limit: 1.0 secondMemory Limit: 64 MBYour task is to find the minimal positive integer number Q so that the product of digits of Q is exactly equal to N.InputThe input contains the single integer number N (0 ≤ N ≤ 109). OutputYour program should print to the output the onl 阅读全文
posted @ 2013-04-23 10:30 OpenSoucre 阅读(398) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <vector>#include <algorithm>#include <string>using namespace std;int main(){ int n,k; cin >>n>>k; string ss; cin >> ss; bool isEnd = false; for(int i = 0; i < n; i ++ ){ if(ss[i+1] == '#'){ int j; for( j =i+1; j <= i 阅读全文
posted @ 2013-04-23 09:14 OpenSoucre 阅读(167) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <vector>#include <algorithm>using namespace std;int main(){ int n; cin >> n; vector<long long> a(n); long long minv = 1<<30; for(int i = 0; i < n; i++) { cin >> a[i]; minv = min(a[i],minv); } int i = 0; for( i = 0; i < n; i 阅读全文
posted @ 2013-04-23 09:13 OpenSoucre 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 很悲剧的一提,重提交的了三次,WA 6,第6测试用例是41000100110101101输出:Draw#include <iostream>#include <vector>#include <algorithm>#include <string>using namespace std;int main(){ long n; cin >>n; string s,t; cin >> s>>t; long ones=0,onet =0,oneshare = 0; for(long i =0; i < 2*n; 阅读全文
posted @ 2013-04-23 09:11 OpenSoucre 阅读(203) 评论(0) 推荐(0) 编辑