Initial commit

This commit is contained in:
2025-03-14 22:39:32 +08:00
commit 7b1e0f329e
38 changed files with 1153 additions and 0 deletions

15
15lanqiao/test1-1.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include<bits/stdc++.h>
using namespace std;
int main() {
int tot = (50*49) / 2, cnt = (7*6) / 2;
cout << tot - cnt << endl;
return 0;
}
/*
总共有50人参与会议如果按照常规情况即每个人与除了自己以外的所有人各握手一次
握手总数tot=49+48+...+1=(50*49)/2
现在有7个人没有互相握手这7这个人本来应该握手的次数 cnt=6+5+...+1=(7*6)/2
实际握手次数=总的握手次数tot-7人的情况cnt (tot - cnt)
*/