- 博客(8)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 Uva1593——Alignment of Code
需要注意的是每行最后一个之后没有空格。 #include #include #include #include #include using namespace std; int space[250]; int n; vector li[1200]; void printspace(int c) { for(int i = 0; i < c; i++) cout << ' '
2015-10-30 23:20:41 340
原创 Uva136——Ugly Numbers
#include #include #include #include #include using namespace std; typedef long long LL; const int num[3] = {2, 3, 5}; int main() { priority_queue, greater > que; set s; que.push(1); s.inse
2015-10-29 23:03:18 218
原创 Uva400——Unix ls
#include #include #include using namespace std; string name[105]; const int maxcol = 60; int max(int x, int y) { return x > y ? x : y; } void print(const string &s, int len, char extra) { cout
2015-10-29 23:02:21 258
原创 Uva10474——Where is the Marble?
#include #include using namespace std; const int maxn = 10000; int main() { int n, q, x, a[maxn], kase = 0; while(cin >> n >> q && n) { for(int i = 0; i < n; i++) cin >> a[i]; sort(a, a
2015-10-24 20:34:34 214
原创 Uva101—— The Blocks Problem
#include #include #include #include using namespace std; const int maxn = 30; int n; vector pile[maxn]; void find_block(int a, int &p, int &h) { for(p = 0; p < n; p++) for(h = 0; h < pile[p].
2015-10-24 20:33:10 354
原创 Uva10815——Andy's First Dictionary
#include #include #include #include using namespace std; set dict; int main() { // freopen("10815.txt", "r", stdin); string s, buf; while(cin >> s) { for(int i = 0; i < s.length(); i++)
2015-10-24 20:32:15 282
原创 Uva156——Ananagrams
#include #include #include #include #include #include using namespace std; map cnt; vector words; string repr(const string &s) { string ans = s; for(int i = 0; i < ans.length(); i++) ans[i
2015-10-24 20:30:57 283
原创 Uva1590——IP networks
#include #include #include using namespace std; struct IP { int ip[4]; }; bool cmd(struct IP a, struct IP b) { for(int i = 0; i < 4; i++) if(a.ip[i] != b.ip[i]) return a.ip[i] < b.ip[i];
2015-10-19 23:05:47 389
vs2013 fstream 无法打开文件
2015-03-10
TA创建的收藏夹 TA关注的收藏夹
TA关注的人