AcWing 799. 最长连续不重复子序列 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int a[N],s[N]; int main(){ int n; cin>>n; for(int i=0;i<n;i++ ...
AcWing 801. 二进制中1的个数 #include <bits/stdc++.h> using namespace std; int lowbit(int x){ return x&-x; } int main(){ int n; cin>>n; while(n--){ int x,res= ...
AcWing 793. 高精度乘法 #include <bits/stdc++.h> using namespace std; vector<int> mul(vector<int> &A,int b){ int t=0; vector<int> C; for(int i=0;i<A.size()| ...
#include <iostream> #include <fstream> #include <string> #include <vector> #include <windows.h> using namespace std; string UTF8ToGB(const char* str) ...
分类:
编程语言 时间:
2020-07-28 14:12:09
阅读次数:
119
:将每行输入的数字转换为十进制,然后预处理出所有满足题意的状态并存储于 sta ,再处理出单独一行时候的方案数并存储于 dp1,sta 枚举第 i 行的状态,判断第 j = i-1行的状态,并更新dpi , j ,最后累和即可 #include <bits/stdc++.h> using names ...
分类:
其他好文 时间:
2020-07-28 14:10:58
阅读次数:
62
round_up.cpp内容如下: #include <iostream> using namespace std; const int kAlign = 8; // kAlign show be powers of 2, say 2, 4 ,8, 16, 32, ... const int kAl ...
分类:
其他好文 时间:
2020-07-28 13:51:52
阅读次数:
100
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; public class PlayerCtrl : NetworkBehaviou ...
分类:
移动开发 时间:
2020-07-28 10:17:06
阅读次数:
97
从上到下打印二叉树,引用辅助队列。 C++版本 #include <iostream> #include <vector> #include <stack> #include <cstring> #include <queue> #include <algorithm> using namespac ...
分类:
其他好文 时间:
2020-07-28 10:00:15
阅读次数:
73
题意: 给一个数组 两个人轮流从里面取数,取了的数不能再取 每个人有一个value 取了数之后要和value异或一下 最终value大的那个人 赢 题解: 每次取最高位的那个看即可,若最高位数量是偶数,无论怎么取,两个人这一位都一样 所以取数量是奇数次的最高位 然后分情况手玩一下 #include ...
分类:
其他好文 时间:
2020-07-28 00:02:11
阅读次数:
85
题意 小明从一岸游泳到另一岸,每片区域有水深,一旦水深超过L,小明就会淹死 同时每段时刻有海浪和退潮 搜索一下 然后记忆化一下 老了,搜索写半天 #include<bits/stdc++.h> using namespace std; /*int main() { // freopen("data2 ...
分类:
其他好文 时间:
2020-07-27 23:58:02
阅读次数:
127