• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
TLEz_
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理
上一页 1 2 3 4 5 6 7 下一页

2014年12月10日

UVa 10763 - Foreign Exchange
摘要: 第一次用了两重循环,结果TLE了。然后把每个学生对应到一个映射里,如果有意愿相同的那么数目加一,最后比较意愿相对的人数就OK了。说的有点乱,不过想出来了就很顺了。#include#include#includeusing namespace std;struct Ex_student { in... 阅读全文
posted @ 2014-12-10 00:20 xuziye0327 阅读(102) 评论(0) 推荐(0)
 
 

2014年12月9日

UVa 10935 - Throwing cards away I
摘要: 队列的简单应用,PE了两次。#include#includeusing namespace std;int main() { int n; while(cin >> n&& n) { bool sign = false; queue q; for... 阅读全文
posted @ 2014-12-09 17:04 xuziye0327 阅读(90) 评论(0) 推荐(0)
 
UVa 1592 - Database
摘要: 昨晚写的,学习了用map映射自定义类型,还有operator。#include#include#include#include#include#include#include#define MAXN_N_LEN 10010#define MAXN_M_LEN 11#define MAXN_STR_L... 阅读全文
posted @ 2014-12-09 11:28 xuziye0327 阅读(125) 评论(0) 推荐(0)
 
 

2014年12月8日

UVa 400 - Unix ls
摘要: 水题,没什么好说的。#include#include#include#define MAXN 105using namespace std;void print(string str, int size_l, char ch) { cout > N) { string word[... 阅读全文
posted @ 2014-12-08 14:58 xuziye0327 阅读(103) 评论(0) 推荐(0)
 
 

2014年12月7日

UVa 136 - Ugly Numbers
摘要: 仅仅几行代码就能搞定。#includeusing namespace std;int main() { cout #define MAXN 2000using namespace std;typedef unsigned long long LL;bool ugly_num(LL x) { ... 阅读全文
posted @ 2014-12-07 14:21 xuziye0327 阅读(112) 评论(0) 推荐(0)
 
 

2014年12月6日

UVa 540 - Team Queue
摘要: 优先队列,水题。#include#include#include#include#define MAXN 1100using namespace std;map team;int main() { int t, sign = 0; while(cin >> t&& t) { ... 阅读全文
posted @ 2014-12-06 22:16 xuziye0327 阅读(90) 评论(0) 推荐(0)
 
 

2014年12月4日

UVa 12096 - The SetStack Computer
摘要: 两周没出题了,这两周过得很颓废,不想看书不想做题不想听课,一直玩游戏啊玩游戏。突然一天清晨醒来发现自己在这样下去就完了,于是开始有意识的自己上自习,以前可没有上自习这种想法- -,这几天天冷了,不想动弹- -,可是我在努力的克服!(又逗比了)不扯了切入正题。当初看这道题的时候是在想不明白为什么要有I... 阅读全文
posted @ 2014-12-04 22:30 xuziye0327 阅读(359) 评论(0) 推荐(0)
 
 

2014年11月20日

UVa 156 - Ananagrams
摘要: 又是照着敲的,学习map了,但最后我改成直接用set储存了,省了重新排序的功夫了。#include#include#include#include#include#includeusing namespace std;vector word;string sort_set(const string&... 阅读全文
posted @ 2014-11-20 17:59 xuziye0327 阅读(104) 评论(0) 推荐(0)
 
UVa 10815 - Andy's First Dictionary
摘要: 过了一中午后自己敲的,很简单,练习使用set。#include#include#include#includeusing namespace std;set dict;string duf;int main() { string s, ss; while(cin >> s) { ... 阅读全文
posted @ 2014-11-20 16:25 xuziye0327 阅读(77) 评论(0) 推荐(0)
 
UVa 10474 - Where is the Marble?
摘要: 水题,一开始不会,照例题敲,然后刚才又自己写了一遍,感觉就是不一样- -#include#include#define MAXN 10000using namespace std;int marble[MAXN];int main() { int x, n, q, kase = 0; w... 阅读全文
posted @ 2014-11-20 09:25 xuziye0327 阅读(98) 评论(0) 推荐(0)
 
 
上一页 1 2 3 4 5 6 7 下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3