牛客2025年儿童节比赛
最有意思的一场, 哈哈哈
想玩的可以点下面的链接
链接如下:牛客竞赛_ACM/NOI/CSP/CCPC/ICPC算法编程高难度练习赛_牛客竞赛OJ
A.6.1(Easy)
#include <bits/stdc++.h>
using namespace std;
vector<int> a = {0, 1, 5, 6, 25, 76, 376, 625, 9376, 90625, 109376, 890625, 2890625, 7109376, 12890625};
int main()
{int ans = 0;int n;cin >> n;for (auto it : a){if (n >= it)ans++;}cout << ans << '\n';return 0;
}
吐槽:这个A还要去出题人的主页找线索, 太离谱了吧
B. 赛博抽卡II
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {cout<<20250601;return 0;
}
C. tree_value_sum
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {ll n,k,v,x;cin>>n>>k>>v>>x;if(n&1){cout<<v<<endl;}else{cout<<x<<endl;}return 0;
}
D. |端午节-儿童节|快乐!
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {cout<<33<<endl;return 0;
}
E. 别人家的孩子
#include <bits/stdc++.h>
using namespace std;
int main() {int n,m; cin>>n>>m;vector<vector<int>> a(n,vector<int>(m));vector<int> v;for(int i=0;i<n;i++){for(int j=0;j<m;j++){cin>>a[i][j];}
// sort(a[i].begin(),a[i].end());
// v.push_back(a[i][0]);}for(int i=0;i<m;i++){int max_num=-1;for(int j=0;j<n;j++){max_num=max(max_num,a[j][i]);}v.push_back(max_num);}for(int i=0;i<v.size();i++) cout<<v[i]<<" ";cout<<endl;return 0;
}
F. 年龄
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){ll m = 0, res = 0;cin>>m;vector<ll> a(m);for (ll b=1;b<=m;b++){for (ll p = 1;p<=m/b; p++){ll z = 0;z = b * p;++a[z - b];}}for (ll i=0;i<m;i++) res+= a[i]*(a[i]-1)/2;cout<<res;
}
G. 裂变的记忆
#include <iostream>
using namespace std;
int main() {cout << "badge"; return 0;
}
这个G, 比赛的时候我看好多人都过了,我一直认为是child,这个badge是什么东西啊
H. 叛逆
#include <bits/stdc++.h>
using namespace std;
int main() {string s;cin >> s;for (auto &c : s) c=tolower(c);if (s == "yes") cout<<"No"<<endl;else if (s=="no") cout<<"Yes"<<endl;return 0;
}
祝大家节日快乐!!!
对了,后面半个月就不更新了(其实是期末周了), 暑假有机会再更新
补充:力扣周赛还有一篇文章, 应该明天会发
感谢大家的点赞和关注,你们的支持是我创作的动力!