会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
DaDa-0120
博客园
首页
新随笔
联系
订阅
管理
2025年7月5日
Subarray Division
摘要: https://www.hackerrank.com/challenges/the-birthday-bar/problem?isFullScreen=true 0(n^2): 1 int birthday(vector<int> s, int d, int m) { 2 3 int res=0;
阅读全文
posted @ 2025-07-05 09:36 哒哒DaDa^_^
阅读(2)
评论(0)
推荐(0)
2025年7月2日
between-two-sets
摘要: https://www.hackerrank.com/challenges/between-two-sets/problem?isFullScreen=true 最大公约数(Greatest Common Divisor, 简称 GCD) 是指两个或多个整数中,能同时整除它们的最大正整数。 欧几里得
阅读全文
posted @ 2025-07-02 10:14 哒哒DaDa^_^
阅读(2)
评论(0)
推荐(0)
2025年6月29日
Time Conversion
摘要: https://www.hackerrank.com/challenges/time-conversion/problem?isFullScreen=true `string timeConversion(string s) { char c=s[s.size()-2]; if(c'P') { st
阅读全文
posted @ 2025-06-29 12:10 哒哒DaDa^_^
阅读(3)
评论(0)
推荐(0)
Box It!
摘要: `class Box{ public: Box(){ l=b=h=0; } Box(int l,int b,int h) { this->l=l; this->b=b; this->h=h; } Box(Box&box) { this->l=box.l; this->b=box.b; this->h
阅读全文
posted @ 2025-06-29 11:24 哒哒DaDa^_^
阅读(7)
评论(0)
推荐(0)
Birthday Cake Candles
摘要: 2个for: `int birthdayCakeCandles(vector candles) { int max=INT_MIN; int count=0; for(auto i:candles) { if(i>max)max=i; } for(auto i:candles) { if(i==ma
阅读全文
posted @ 2025-06-29 10:56 哒哒DaDa^_^
阅读(1)
评论(0)
推荐(0)
Min_MaxSum
摘要: https://www.hackerrank.com/challenges/mini-max-sum/problem?isFullScreen=true O(N^2)解法 `void miniMaxSum(vector arr) { long long min=LLONG_MAX,max=LLONG
阅读全文
posted @ 2025-06-29 10:35 哒哒DaDa^_^
阅读(6)
评论(0)
推荐(0)
公告