7)错误票据 解题思路:考察的是在不知数据个数的前提下存储一个数组的方法,这里可以采用sstream库的优势,进行巧妙地转化,进而解决此题。 #include <iostream> #include <sstream> using namespace std; const int maxn = 10 ...
分类:
其他好文 时间:
2021-04-12 12:46:54
阅读次数:
0
本场链接:Codeforces Round #713 (Div. 3) A. Spy Detected! #include <bits/stdc++.h> using namespace std; typedef long long ll; #define forn(i,x,n) for(int i ...
分类:
其他好文 时间:
2021-04-12 12:42:16
阅读次数:
0
原题链接 题解:注意建立边 代码: #include <iostream> #include <algorithm> #include <cstring> #include <cmath> using namespace std; const int N = 5e3 + 9; const int M ...
分类:
其他好文 时间:
2021-04-12 12:34:29
阅读次数:
0
ini文件读写 添加帮组类 using System; using System.Text; using System.IO; using System.Runtime.InteropServices; namespace IniHelperDemo { public class IniConfig ...
分类:
其他好文 时间:
2021-04-12 12:32:03
阅读次数:
0
XML文件操作 实体类 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace XMLDemo { class Student { public string St ...
分类:
其他好文 时间:
2021-04-12 12:30:15
阅读次数:
0
又是该LL用int了,什么时候才能不犯病啊。 A:水题,让你找出3个以上的数组中不同的那个数 我是直接分情况。 1 #include<iostream> 2 #include<vector> 3 using namespace std; 4 const int N=110; 5 int a[N]; ...
分类:
其他好文 时间:
2021-04-12 12:25:31
阅读次数:
0
LCA — 欧拉序+ST表 \(O(n\log n)\) 预处理,\(O(1)\) 询问?。 \(lca(x,y)=\) 欧拉序中最早出现的 \(x\) 和 \(y\) 中间深度最浅的点。 Luogu P3379 #include <bits/stdc++.h> using namespace st ...
分类:
其他好文 时间:
2021-04-12 12:13:56
阅读次数:
0
很显然的区间dp 当我们卖掉一个物品时,可以看为给延后卖的商品都加价 $ dp [ i ] [ j ] $ 表示卖掉i~j的最大收益 #include<bits/stdc++.h> using namespace std; int n; int v[2021]; int dp[2021][2021] ...
分类:
其他好文 时间:
2021-04-12 12:03:32
阅读次数:
0
一、 引用1.1 引用概念 引用(reference)是为变量起了另一个名字,而不是定义一个新变量。编译器不会为引用变量开辟内存空间,它和它引用的变量共用同一块内存空间。其使用形式如下: 类型& 引用变量名(对象名) = 引用实体; eg: int ival = 1024;int &refVal = ...
分类:
编程语言 时间:
2021-04-12 11:45:29
阅读次数:
0
#include<iostream> #include<algorithm>//sort头文件 using namespace std; struct student{ int theta;//阈值 int result;//结果 }; bool compare(student a,student ...
分类:
编程语言 时间:
2021-04-12 11:39:49
阅读次数:
0