哈哈哈,$\mathcal{O}(n\log^2{n})$ 跑的飞快~~~
|
|
题解,可以做参考(最基础的写法,本人技术不足,还写不出太高深的)
|
|
唯一AC的一道
|
|
|
|
三年oi一场空,不开long long 见祖宗
题目 3778 [CSP 2022J]解密
2024-10-22 21:32:08
|
|
再写构造我死。
|
|
文件输入输出r打成w,260分谁给我补?我给你补个蛋
|
|
#include<bits/stdc++.h>
using namespace std; int n,w,r; long long a[100001]={0}; int px(int i){ int k,t; for(int l=1;l<=i;l++){ k=l; for(int j=l+1;j<=i;j++){ if(a[j]>a[k])k=j; if(k!=l){ t=a[l]; a[l]=a[k]; a[k]=t; } } } } int main() { freopen("csp2020pj_live.in","r",stdin); freopen("csp2020pj_live.out","w",stdout); cin>>n>>w; for(int i=1;i<=n;i++){ cin>>a[i]; r=i*w/100; if(r==0)r++; px(i); cout<<a[r]<<" "; } }
题目 3499 [CSP 2020J]直播获奖
2024-10-20 17:35:41
|
|
Kruskal没过,Prim过了
|
|
#include<bits/stdc++.h>
int main() { int T,a[3]; scanf("%d",&T); while(T--) { scanf("%d%d%d",a,a+1,a+2),std::sort(a,a+3); printf("%d\n",(a[0]==0?(a[1]==0?0:(a[1]==a[2]?1:2)):(a[0]+a[1]==a[2]||a[0]==a[1]||a[1]==a[2]?2:3))); } }
题目 3524 [NOI Online 2021 1st PJ] 切蛋糕(民间数据)
2024-10-19 11:12:06
|
|
样例1有问题,我样例一不过但是测试AC了
|
|
终于对了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
题目 3777 [CSP 2022J]乘方
2024-10-17 21:55:29
|
|
挑战最易懂代码
|
|
scanf大法好
|
|
MST首题!!
数组开小了会EEEEE |
|
维尼修斯的果篮(维尼都2亿欧了no!!!)
题目 3618 [CSP 2021J]小熊的果篮
2024-10-16 21:41:34
|
|
p
题目 1809 [NOIP 2014PJ]珠心算测试
2024-10-16 20:52:02
|
|
逆天半星第1题
题目 3285 [CSP 2019J]数字游戏
2024-10-15 21:00:11
|
|
st 表的代码看这里
|
|
DAG上DP首题qwq
|