码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
HNU 12834 Thread Tree
递归输出即可了 #include<bits/stdc++.h> using namespace std; struct tree{ int dot; string s; }t[1020]; vector<int>v[1020]; void print(int x) { for(int i=0;i<v ...
分类:其他好文   时间:2017-05-16 15:00:40    阅读次数:158
indeed 5.13 第二次网测
题目描述,我找不见了,大概写一下想法和代码吧。 1. 没有看 2. 由于数据范围很小,就是简单的枚举,求全排列,然后更新答案。 1 #include<bits/stdc++.h> 2 #define pb push_back 3 typedef long long ll; 4 using names ...
分类:其他好文   时间:2017-05-16 14:51:40    阅读次数:209
la3211
2-sat+二分。。。 每次二分答案然后连边2-sat。。。边要开到n*n 样例水得跟没有一样。。。 #include<bits/stdc++.h> using namespace std; const int N = 4010; struct edge { int nxt, to; } e[N * ...
分类:其他好文   时间:2017-05-16 00:37:00    阅读次数:155
扩展欧几里得
题目描述 求关于 x 的同余方程 ax ≡ 1 (mod b)的最小正整数解。 输入输出格式 输入格式: 输入只有一行,包含两个正整数 a, b,用一个空格隔开。 输出格式: 输出只有一行,包含一个正整数 x0,即最小正整数解。输入数据保证一定有解。 1 #include < bits/stdc++ ...
分类:其他好文   时间:2017-05-15 19:45:06    阅读次数:125
342. Power of Four(LeetCode)
Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example:Given num = 16, return true. Given num = 5, return fa ...
分类:其他好文   时间:2017-05-15 12:03:36    阅读次数:153
191. Number of 1 Bits(LeetCode)
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit ...
分类:其他好文   时间:2017-05-15 11:59:42    阅读次数:126
297. Serialize and Deserialize Binary Tree
题目: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, ...
分类:其他好文   时间:2017-05-15 10:11:39    阅读次数:294
bzoj1823
http://www.lydsy.com/JudgeOnline/problem.php?id=1823 2-sat裸题 #include<bits/stdc++.h> using namespace std; const int N = 4010; struct edge { int nxt, t ...
分类:其他好文   时间:2017-05-15 00:34:50    阅读次数:185
bzoj3112
http://www.lydsy.com/JudgeOnline/problem.php?id=3112 模板题。。。模板又打错了。。。 #include<bits/stdc++.h> using namespace std; const int N = 1010; const double eps ...
分类:其他好文   时间:2017-05-14 14:53:29    阅读次数:167
省赛训练赛(---)
A.HDU4968 最大gpa为从最大区间开始,每次取区间最小分数。 最小gap为从最小区间开始,每次取区间最大分数。 #include<bits/stdc++.h> using namespace std; int ave,n; int x[10] = {0,85,80,75,70,60}; do ...
分类:其他好文   时间:2017-05-14 10:37:52    阅读次数:200
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!