Gravatar
baory
积分:13
提交:6 / 7
VIP各位自取:http://172.30.1.3/cogs/page/page.php?aid=lXSSyJSgq(COGS基本法(更新第一宪法修正案)请不要复制括号内容)

页面 51 [管理]警告与封号
2024-10-31 21:30:41
Gravatar
1nclude
积分:326
提交:159 / 584
CSP2024纪念

Gravatar
┭┮﹏┭┮
积分:4441
提交:907 / 1937
卡卡卡卡卡卡卡卡卡常.......

Gravatar
baory
积分:13
提交:6 / 7
VIP

#include<bits/stdc++.h>
using namespace std;
string a[55];
int ans=52;
int main() {
freopen("poker.in","r",stdin);
freopen("poker.out","w",stdout);
int n;
cin>>n;
ans-=n;
for(int i=1; i<=n; i++)cin>>a[i];
for(int i=1; i<=n; i++) {
for(int j=1; j<=i; j++) {
if(a[i]==a[j]&&i!=j) {
ans++;
break;
}
}
}
cout<<ans;
return 0;
}

题目 4052 [CSP 2024 J]接龙
2024-10-29 21:32:49
Gravatar
baory
积分:13
提交:6 / 7
不会做!!!

题目 4051 [CSP 2024 J]小木棍
2024-10-29 21:07:19
Gravatar
baory
积分:13
提交:6 / 7
给题解吧

题目 4051 [CSP 2024 J]小木棍
2024-10-29 21:01:08
Gravatar
┭┮﹏┭┮
积分:4441
提交:907 / 1937
哈哈哈,$\mathcal{O}(n\log^2{n})$ 跑的飞快~~~

Gravatar
dustsans
积分:82
提交:51 / 117
题解,可以做参考(最基础的写法,本人技术不足,还写不出太高深的)

Gravatar
GS53
积分:41
提交:17 / 66
唯一AC的一道

题目 4034 罚站 AAAAAAAAAA
2024-10-23 20:58:21
Gravatar
健康铀
积分:1284
提交:230 / 604
题解
千分留念

Gravatar
薛誉喜欢刘玮彦
积分:14
提交:8 / 18
三年oi一场空,不开long long 见祖宗

题目 3778 [CSP 2022J]解密
2024-10-22 21:32:08
Gravatar
┭┮﹏┭┮
积分:4441
提交:907 / 1937
再写构造我死。

Gravatar
健康铀
积分:1284
提交:230 / 604
文件输入输出r打成w,260分谁给我补?我给你补个蛋

Gravatar
lgy
积分:33
提交:16 / 80
#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]<<" ";
}
}

Gravatar
qyd
积分:693
提交:222 / 741
Kruskal没过,Prim过了

Gravatar
回归运动
积分:59
提交:47 / 125
#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)));
}
}

Gravatar
Embark
积分:17
提交:10 / 45
样例1有问题,我样例一不过但是测试AC了

Gravatar
awa
积分:10
提交:12 / 46
终于对了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

题目 3777 [CSP 2022J]乘方
2024-10-17 21:55:29
Gravatar
健康铀
积分:1284
提交:230 / 604
挑战最易懂代码

Gravatar
1nclude
积分:326
提交:159 / 584
scanf大法好