• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
frankM
天下武功,唯快不破。
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

随笔分类 -  STL

 
LeetCode Two Sum
摘要:链接: https://oj.leetcode.com/problems/two-sum/在一个数组中找出两个值,使得他们的和等于 target; 返回相应的下标+1依次查找是存在值等于 target-numbers[i]class Solution{ public: vector twoSum(... 阅读全文
posted @ 2014-11-22 13:15 frankM 阅读(137) 评论(0) 推荐(0)
HDU 1879 继续畅通工程
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=1879并查集+优先队列...用cin会超时...TLE了好几次#include #include#include#define MAX_N 105using namespace std;class rode{... 阅读全文
posted @ 2014-07-16 16:45 frankM 阅读(146) 评论(0) 推荐(0)
NYOJ 113 字符串替换
摘要:链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=113直接用string类里的fin()和replace()成员函数即可#include #includeusing namespace std;int main(){ string dat... 阅读全文
posted @ 2014-05-22 17:28 frankM 阅读(124) 评论(0) 推荐(0)
NYOJ 4 ASCII码排序
摘要:链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=4水题#include #includeusing namespace std;int main(){ int n; cin>>n; char data[5]; while... 阅读全文
posted @ 2014-05-22 13:25 frankM 阅读(95) 评论(0) 推荐(0)
BNUOJ 1013 YC大牛的判题任务
摘要:链接:http://www.bnuoj.com/bnuoj/problem_show.php?pid=1013水题..用结构体二级排序即可..#include #include using namespace std;typedef struct{ int num; int time;}pro;pr... 阅读全文
posted @ 2014-05-14 17:12 frankM 阅读(179) 评论(0) 推荐(0)
NYOJ 86 找球号(一)
摘要:链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=86用数组标记法爆内存,暴力搜索超时....有一种方法是 快排+二分查找.可以过,但是有点慢.. #include #include #include using namespace std;in... 阅读全文
posted @ 2014-05-12 18:24 frankM 阅读(115) 评论(0) 推荐(0)
 

公告


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