码迷,mamicode.com
首页 >  
搜索关键字:using password: yes    ( 53562个结果
AcWing 799. 最长连续不重复子序列
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++ ...
分类:Windows程序   时间:2020-07-28 14:21:52    阅读次数:93
AcWing 801. 二进制中1的个数
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= ...
分类:Windows程序   时间:2020-07-28 14:19:17    阅读次数:88
AcWing 793. 高精度乘法
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()| ...
分类:Windows程序   时间:2020-07-28 14:18:33    阅读次数:72
c++ 读取TXT文件,中文乱码处理
#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
牧场的安排(状压DP入门)
:将每行输入的数字转换为十进制,然后预处理出所有满足题意的状态并存储于 sta ,再处理出单独一行时候的方案数并存储于 dp1,sta 枚举第 i 行的状态,判断第 j = i-1行的状态,并更新dpi , j ,最后累和即可 #include <bits/stdc++.h> using names ...
分类:其他好文   时间:2020-07-28 14:10:58    阅读次数:62
round_up() 计算8字节对齐后的大小,或向上取最近的2的幂次
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
Unity脚步之NetworkBehaviour下前进、后退、左右转向的简单移动
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; public class PlayerCtrl : NetworkBehaviou ...
分类:移动开发   时间:2020-07-28 10:17:06    阅读次数:97
面试题32:从上到下打印二叉树
从上到下打印二叉树,引用辅助队列。 C++版本 #include <iostream> #include <vector> #include <stack> #include <cstring> #include <queue> #include <algorithm> using namespac ...
分类:其他好文   时间:2020-07-28 10:00:15    阅读次数:73
Codeforces Round #659 (Div. 2) D GameGame
题意: 给一个数组 两个人轮流从里面取数,取了的数不能再取 每个人有一个value 取了数之后要和value异或一下 最终value大的那个人 赢 题解: 每次取最高位的那个看即可,若最高位数量是偶数,无论怎么取,两个人这一位都一样 所以取数量是奇数次的最高位 然后分情况手玩一下 #include ...
分类:其他好文   时间:2020-07-28 00:02:11    阅读次数:85
Codeforces Round #659 (Div. 2) B1. Koa and the Beach (Easy Version)
题意 小明从一岸游泳到另一岸,每片区域有水深,一旦水深超过L,小明就会淹死 同时每段时刻有海浪和退潮 搜索一下 然后记忆化一下 老了,搜索写半天 #include<bits/stdc++.h> using namespace std; /*int main() { // freopen("data2 ...
分类:其他好文   时间:2020-07-27 23:58:02    阅读次数:127
53562条   上一页 1 ... 95 96 97 98 99 ... 5357 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!