
IO
文章平均质量分 87
ACLJW
这个作者很懒,什么都没留下…
展开
-
213:Message Decoding
Some message encoding schemes require that an encoded message be sent in two parts. The first part, called the header, contains the characters of the message. The second part contains a pattern that r...原创 2018-04-11 10:17:46 · 170 阅读 · 0 评论 -
1593:Alignment of Code
Alignment of Code#include<iostream>#include<cstring>#include<vector>#include<algorithm>#include<sstream>using namespace std;const int maxw = 180 + 5;const int maxl...原创 2018-04-21 01:13:42 · 152 阅读 · 0 评论 -
814:The Letter Carrier's Rounds
The Letter Carrier's Rounds注意可能有重复的收件人。version 1(20ms):#include<cstdio>#include<iostream>#include<map>#include<set>#include<cstring>#include<algorithm>using n...原创 2018-04-20 17:09:35 · 237 阅读 · 0 评论 -
207:PGA Tour Prize Money
PGA Tour Prize Money 这道题太麻烦了,先放这儿,日后再说。。。#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn = 150;struct player{ char name[20]; int s...原创 2018-04-19 19:17:52 · 183 阅读 · 0 评论 -
220:Othello
Othello我的这道题的代码还是比较简洁的哈哈。version 1:#include<cstdio>#include<cstring>using namespace std;int n,wn,bn;int dxs[3] = {0,1,-1};int dys[3] = {0,1,-1};char c,gamer,cmd[5],game[9][9];char r...原创 2018-04-13 13:30:19 · 180 阅读 · 0 评论 -
12504:Updating a Dictionary
Updating a Dictionaryversion 1:#include<cstdio>#include<iostream>#include<map>#include<set>#include<cstring>using namespace std;const int maxl = 100 + 5;int t,n;c...原创 2018-04-22 16:55:33 · 154 阅读 · 0 评论 -
1592:Database
Database思路:只枚举c1和c2,然后从上到下扫描各行。每次碰到一个新的行r,把c1,c2两列的内容作为一个二元组存到一个map中。如果map的键值中已经存在这个二元组,该二元组映射到的就是所要求的r1,而当前行就是r2。在主循环之前先做一个预处理——给所有字符串分配一个编号,则整个数据库中每个单元格都变成了整数,上述二元组就变成了两个整数,这个操作同样用到了map。version 1(14...原创 2018-04-17 23:59:59 · 185 阅读 · 0 评论 -
400:Unix ls
Unix ls #include<iostream>#include<vector>#include<algorithm>using namespace std;const int len = 60 + 2;void print(const string& s,int len,char extra){ cout<<s; ...原创 2018-04-17 21:21:18 · 120 阅读 · 0 评论 -
227:Puzzle
A children’s puzzle that was popular 30 years ago consisted of a 5×5 frame which contained 24 smallsquares of equal size. A unique letter of the alphabet was printed on each small square. Since therew...原创 2018-04-05 13:17:58 · 166 阅读 · 0 评论 -
548:Tree
Tree首先根据中序遍历和后序遍历递归地构造二叉树(后续遍历的最后一个节点为二叉树的根节点),然后前序遍历。输入有点坑,你说你直接告诉多少个节点多好。。。我想的是先用fets读取整个串,然后用atoi转化为数字,本地运行没问题可是一提交就报错,暂时还没找到原因,大概是因为回车符的问题,参考了别人的输入方法过了,比我的想法要好。#include<bits/stdc++.h>using ...原创 2018-05-29 23:22:48 · 199 阅读 · 0 评论