码迷,mamicode.com
首页 >  
搜索关键字:iostream    ( 13291个结果
爱因斯坦的数学题
题目: 爱因斯坦出了一道这样的数学题:有一条长阶梯,若每步跨2阶,则最最后剩一阶,若每步跨3 阶,则最后剩2阶,若每步跨5阶,则最后剩4阶,若每步跨6阶则最后剩5阶。只有每次跨7阶,最后才正好一阶不剩。请问这条阶梯共有多少阶? 问题分析与算法设计: 根据题意,阶梯数满足下面一组同余式: x≡1 (m ...
分类:其他好文   时间:2021-02-25 12:03:57    阅读次数:0
Codeforces Round #697 (Div. 3) A. Odd Divisor
Aimee 只要不能写成$2N N \subseteq N*$就肯定有 #include<iostream> #include<cstdio> #include<cmath> #define int long long using namespace std; int n,m; int prime[ ...
分类:其他好文   时间:2021-02-24 13:26:00    阅读次数:0
Codeforces Round #704 (Div. 2)
Codeforces 难得有一次不熬夜的比赛。 A 送分题,记得开 long long。 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; #define in ...
分类:其他好文   时间:2021-02-24 13:20:53    阅读次数:0
【WZOI 21/239】 Picks loves segment tree
题链 #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #include <stdlib.h> #pragma GCC optimize(2 ...
分类:其他好文   时间:2021-02-22 12:36:23    阅读次数:0
P1939 【模板】矩阵加速(数列)
Aimee 矩阵加速递推的模板了。 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #define int long long #define ll long long using names ...
分类:其他好文   时间:2021-02-22 12:24:51    阅读次数:0
Codeforces Round #703 (Div. 2) C2. Guessing the Greatest(二分,交互)
https://codeforces.com/contest/1486/problem/C2 #include<cstdio> #include<iostream> #include<deque> #include<cstring> #include<cmath> #include<map> #in ...
分类:其他好文   时间:2021-02-22 12:10:32    阅读次数:0
2019年春季PAT 7-1 Sexy Primes (20 分)
Sexy primes are pairs of primes of the form (p, p+6), so-named since "sex" is the Latin word for "six". (Quoted from http://mathworld.wolfram.com/Sexy ...
分类:其他好文   时间:2021-02-20 11:45:24    阅读次数:0
CCF 201809-1 卖菜
#include <iostream> #include <bits/stdc++.h> #include <string> using namespace std; int main() { int n; cin>>n; vector<int> a; for(int i=0;i<n;i++) { ...
分类:其他好文   时间:2021-02-19 13:54:37    阅读次数:0
Codeforces Round #702 (Div.3)
A. Dense Array 链接: https://codeforces.com/contest/1490/problem/A 思路: 贪心。找到一队不满足的数,求最大值是最小值2的几次幂倍就好。 代码: #include<iostream> #include<cstdio> #include<c ...
分类:其他好文   时间:2021-02-19 13:36:52    阅读次数:0
Function Run Fun POJ - 1579
原题链接 考察:记忆化搜索 思路: 可用递推和记忆化搜索两种方式. 1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4 #include <cstdio> 5 using namespace std; 6 const ...
分类:其他好文   时间:2021-02-19 13:15:23    阅读次数:0
13291条   上一页 1 ... 13 14 15 16 17 ... 1330 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!