这名用户暂未设置签名。
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《求助帖,第三个点过不了。谢谢大佬》回复:
@[__l_z_c__](/user/675888) 这道题的时间复杂度是O(n),因为不是要遍历吗,如果用字典,这样说可以吗?所以能不能帮我看看哪里有问题啊?
在讨论《求助帖,第三个点过不了。谢谢大佬》回复:
@[zhouzihe](/user/798537) 已关,但是。我不想使用二分做。用map时间复杂度只有O(n)吧,但是2分是O(nlogn)
```cpp #include #include #include using namespace std; int main(){ int N,C;cin>>N>>C; vector lt(N);for(int i=0;i >lt[i];} unordered_map zd; for(int i:lt){ if(zd…
读入不要使用eval(),使用int()才能过。想了一个下午,我还以为是算法的问题。 ```python N,M=map(int,input().split()) lt=[int(i) for i in input().split()] lt.sort(reverse=True) cnt,h=0,0 if N==1:…