LOADING

加载过慢请开启缓存,浏览器默认开启

Waiting for the dawn

daily 1

2023/5/31

daily codeforces

阅读全文

daily 1

2023/5/30

CF 710E

void solve(){
  ll n,x,y;
  cin>>n>>x>>y;
  vector<ll>dp(n+1,INF);
  dp[1]=x;
  for(int i=2;i<=n;++i){
    if(i%2==0){
      dp[i]=min(dp[i],dp[i/2]+y);
    }else{
      dp[i]=min(dp[(i+1)>>1]+x+y,dp[i]);
    }
    dp[i]=min(dp[i-1]+x,dp[i]);
  }
  cout<<dp[n]<<'\n';
  return;
}
阅读全文

daily 1

2023/5/29

CF 1833C

solve()
{
    cin>>n;
    for(int i=1;i<=n;i++) cin>>w[i];
    sort(w+1,w+n+1);
    if(w[1]%2) cout<<"YES"<<endl;
    else{
        for(int i=1;i<=n;i++)
            if(w[i]%2){
                cout<<"NO"<<endl;
                return ;
            }
        cout<<"YES"<<endl;
    }
}
阅读全文

daily 1

2023/5/28

CF 1833A

void solve()
{
    cin>>n>>m;
    for(int i=1;i<=n;i++) c[i] = i;
    for(int i=1;i<=n;i++) cin>>a[i];
    for(int i=1;i<=n;i++) cin>>b[i];

    sort(c+1, c+n+1,[&](int x, int y){
        return a[x]<a[y];
    });
    sort(b+1, b+n+1);
    for(int i=1;i<=n;i++) res[c[i]] = b[i];
    for(int i=1;i<=n;i++) cout<<res[i]<<" ";
    cout<<endl;
}
阅读全文

daily 1

2023/5/27

daily codeforces

阅读全文

daily 1

2023/5/26

daily codeforces

阅读全文

daily 1

2023/5/25

daily codeforces

阅读全文

daily 2

2023/5/24

daily codeforces

阅读全文

MIT-8-5840-Lab-II

2023/5/24

MIT Distributed system lab 2

阅读全文

daily 2

2023/5/23

daily codeforces

阅读全文
1 ... 18 19 20 21 22 ... 30
avatar
Yanxin Xiang

愿有一天能和你最重要的人再次相逢