码迷,mamicode.com
首页 >  
搜索关键字:foj    ( 91个结果
FOJ 10月赛题 FOJ2198~2204
A题。发现是递推可以解决这道题,a[n]=6*a[n-1]-a[n-2]。因为是求和,可以通过一个三维矩阵加速整个计算过程,主要是预处理出2^k时的矩阵,可以通过这道题 1 #include 2 #include 3 #include 4 #include 5 #define LL long...
分类:其他好文   时间:2015-10-16 20:50:48    阅读次数:315
各大oj题目分类(转)
POJ题目分类| POJ题目分类 |HDU题目分类|ZOJ题目分类|SOJ题目分类|HOJ题目分类|FOJ题目分类|模拟题:POJ1006POJ1008POJ1013POJ1016POJ1017POJ1169POJ1298POJ1326POJ1350POJ1363POJ1676POJ1786POJ1...
分类:其他好文   时间:2015-10-14 21:37:32    阅读次数:413
初学ACM - 半数集(Half Set)问题 NOJ 1010 / FOJ 1207
题目重述: 问题描述 要求找出具有下列性质数的个数(包含输入的自然数n): 先输入一个自然数n(n<=1000),然后对此自然数按照如下方法进行处理: 1. 不作任何处理; 2. 在它的左边加上一个自然数,但该自然数不能超...
分类:其他好文   时间:2015-10-09 14:02:12    阅读次数:168
FOJ 2203 单纵大法好
二分答案+验证#include#include#include#includeusing namespace std;int N,M,K,A;int p[200000+10],a[200000+10];int Num(int B,int A){ return (B+1)/(A+1);}int ...
分类:其他好文   时间:2015-10-06 20:42:12    阅读次数:149
FOJ 1075
#include#includeusing namespace std;int a[8000]={2,3};int hash[80000]={0};void func(){ int i,j,k=2,flag; hash[2]=hash[3]=1; for(i=5;k=a[j];j+...
分类:其他好文   时间:2015-09-09 16:50:14    阅读次数:156
FOJ 题目 2075 Substring (后缀数组求出现k次的最小字典序子串)
Problem 2075 Substring Accept: 70    Submit: 236 Time Limit: 1000 mSec    Memory Limit : 65536 KB Problem Description Given a string, find a substring of it which the original string conta...
分类:编程语言   时间:2015-08-27 23:07:16    阅读次数:1156
FOJ题目Problem 2082 过路费 (link cut tree边权更新)
Problem 2082 过路费 Accept: 382    Submit: 1279 Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description 有n座城市,由n-1条路相连通,使得任意两座城市之间可达。每条路有过路费,要交过路费才能通过。每条路的过路费经常会更新,现问你,当前情况下,从城市a...
分类:其他好文   时间:2015-08-17 19:35:50    阅读次数:113
Problem 2020 组合(FOJ)
Problem 2020 组合Accept: 714Submit: 1724Time Limit: 1000 mSecMemory Limit : 32768 KBProblem Description给出组合数C(n,m), 表示从n个元素中选出m个元素的方案数。例如C(5,2) = 10, C(...
分类:其他好文   时间:2015-08-12 08:59:56    阅读次数:122
Foj 1075 分解素因子
题目链接:http://acm.fzu.edu.cn/problem.php?pid=1075 思路:分解素因子#include #include #include using namespace std; const int maxn=65535+5; typedef long long LL; bool prime[maxn]; in...
分类:其他好文   时间:2015-08-01 15:46:21    阅读次数:112
猴子向右看,FOJ上某题 单调栈
N (1 i (1 i  Each monkey is looking to his left toward those with higher index numbers. We say that monkey i "looks up" to monkey j if i ij. For each monkey i, we would like to know the index of th...
分类:其他好文   时间:2015-07-06 21:50:51    阅读次数:153
91条   上一页 1 ... 5 6 7 8 9 10 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!