• 2024-07-14kedaOJ#P0776. 【模板】可并堆
    思路可并堆不会的看作者的https://www.cnblogs.com/mcr130102/p/18301571代码复制都运行不了好吧#include<iostream>#include<vector>#include<queue>//堆用队列实现#include<algorithm>usingnamespacestd;constintMAXN=1e5+5;intparent[MAXN];intf
  • 2024-06-22kedaOJ#P0609. 质因分解加强版
    题目P0609.质因分解加强版思路代码#include<iostream>#include<vector>#include<string>std::stringprimeFactorization(intn){std::vector<int>factors;std::vector<int>counts;for(inti=2;i*i<=n;++i)
  • 2024-06-22kedaOJ#P2849时间涟漪
    题目kedaOJ#P2849时间涟漪思路栈代码#include<bits/stdc++.h>usingnamespacestd;intmain(){intN;cin>>N;stack<int>timeRipples;intmaxEnergy=INT_MIN;for(inti=0;i<N;++i){intinstruction;
  • 2024-06-22kedaOJ#P1529有趣的字母
    题目kedaOJ#P1529有趣的字母思路直接模拟,比较复杂的是找到最后一个字符代码#include<bits/stdc++.h>intmain(){std::vector<char>vowels={'a','e','i','o','u'};intn;std::cin>>n;intcount
  • 2024-06-22kedaOJ#P1530一起摇摆
    题目kedaOJ#P1530一起摇摆思路无代码#include<bits/stdc++.h>intmain(){ intn; std::cin>>n; std::vector<int>arr1(n); std::vector<int>arr2(n); for(inti=0;i<n;++i){ std::cin>>arr1[i]; } for(inti=0;i<
  • 2024-06-22kedaOJ-#P2574. [USACO 21DEC.B] Lonely Photo
    题目[USACO21DEC.B]LonelyPhoto思路include<bits/stdc++.h>usingnamespacestd;defineintlonglongdefineN500010intn,m,i,j,k;intl[N],r[N],ans;chara[N];signedmain(){scanf("%d%s",&n,a+1);for(i=1,k=0;i<=n;++i)