夜语声烦-
夜语声烦-
全部文章
分类
题解(33)
归档
标签
去牛客网
登录
/
注册
夜语声烦-的博客
全部文章
(共35篇)
题解 | #神经网络#
建议先去学习一下拓扑排序再来 思路和题目意思就不做过多赘述了 要点都在注释里了 神经网络 #include <iostream> #include <cstring> using namespace std; const int N = 1010, M = N * N; ...
C++
2022-05-14
5
331
题解 | #[USACO 2010 Feb S]Chocolate Eating#
[USACO 2010 Feb S]Chocolate Eating 二分的对象是幸福感 #include <iostream> using namespace std; typedef long long LL;//啥也不说了,直接全部long long const int N =...
C++
二分查找
2022-05-12
5
501
题解 | #素数回文#
素数回文 #include <bits/stdc++.h> using namespace std; typedef long long LL; string s; bool isprime(LL n) { for(LL i = 2; i <= n / i;...
C++
2022-05-12
0
301
题解 | #素数判断#
素数判断 #include <bits/stdc++.h> using namespace std; int n, T; bool isprime(int n)//普通的判断素数 { bool f = true; for(int i = 2; i <= n /...
C++
2022-05-12
5
310
题解 |
递归 牛客这边可以过,但是一本通那边会超时 #include<iostream> using namespace std; int res = 1; void fun(int k) { for(int i = 1; i <= k >> 1; i +...
C++
2022-05-05
1
265
题解 | #[NOIP2001]数的划分#
[NOIP2001]数的划分 #include <iostream> using namespace std; int n, k, cnt; void dfs(int u, int s, int sum)//当前分成u份 上一个选择的数是s 当前总和是sum { if(u ...
C++
深度优先搜索
2022-03-22
1
449
题解 | #活动安排#
活动安排 #include <bits/stdc++.h> #define x first #define y second using namespace std; typedef pair<int, int> PII; const int N = 1010; in...
C++
贪心
2022-03-14
0
390
题解 | #[NOIP2010]数字统计#
[NOIP2010]数字统计 杀鸡用牛刀了属于是 # include <iostream> # include <cmath> using namespace std; int dgt(int n) // 计算整数n有多少位 { int res = 0; ...
C++
2022-03-11
1
315
题解 | #[NOIP2011]数字反转#
[NOIP2011]数字反转 #include <bits/stdc++.h> using namespace std; int n; int main() { cin >> n; if(n < 0) { n = -n; ...
2022-03-10
2
395
题解 | #[NOIP2013]表达式求值#
[NOIP2013]表达式求值 #include <iostream> using namespace std; int n,m,ans; char c; int main() { cin >> n; while(~scanf("%c%d",&c...
C++
2022-03-03
17
476
首页
上一页
1
2
3
4
下一页
末页