关闭

[置顶] 浅谈code force

一个好的 oj 题目 要有 1.优质题目。 2.海量测试数据。 3.好的查重系统。 hdu 题目参差不齐有刁钻题,蛇皮题意,中国人写的英文,真的有些人写的蓝瘦,看起来蓝瘦,但是不乏有历年比赛。和牛逼学长出的题。 测试案例没有补充,有时你过了,但是换个oj就gg了。 国内很多oj都是这样,这个不可否认,但是做oj并不是一个赚钱的行当,这些国内oj给你提供这个平台已经非常不错了。 但我认为...
阅读(75) 评论(0)

Evaluate Postfix Expression_后缀表达式求解

6-2 Evaluate Postfix Expression(25 分) Write a program to evaluate a postfix expression. You only have to handle four kinds of operators: +, -, x, and /. Format of functions:ElementType EvalPostfix( c...
阅读(5) 评论(0)

主席树

主席树搞了一个多星期TAT,,,,,,也只是大致领悟而已!!! 主席树又称函数式线段树,顾名思义,也就是通过函数来实现的线段树,至于为什么叫主席树,那是因为是fotile主席创建出来的这个数据结构(其实貌似是当初主席不会划分树而自己想出来的另一个处理方式。。。。是不是很吊呢? ORZ...)不扯了,切入正题。 主席树就是利用函数式编程的思想来使线段树支持询问历史版本、同时充分利用它们之间的共同...
阅读(16) 评论(0)

6-3 在一个数组中实现两个堆栈(20 分)-pta_same_无聊的水体

6-3 在一个数组中实现两个堆栈(20 分) 本题要求在一个数组中实现两个堆栈。 函数接口定义:Stack CreateStack( int MaxSize ); bool Push( Stack S, ElementType X, int Tag ); ElementType Pop( Stack S, int Tag ); 其中Tag是堆栈编号,取1或2;MaxSize堆栈数组的规模;...
阅读(25) 评论(0)

6-1 Two Stacks In One Array-PTA双指针链表操作实现

6-1 Two Stacks In One Array(20 分) Write routines to implement two stacks using only one array. Your stack routines should not declare an overflow unless every slot in the array is used. Format of fun...
阅读(50) 评论(0)

Codeforces Round #442 (Div. 2) A. Alex and broken contest,B - Nikita and string

A. Alex and broken contest time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output One day Alex was creating a contest about his friends, but acci...
阅读(37) 评论(0)

Codeforces Round #441 D. Sorting the Coins

B. Sorting the Coins time limit per test1 second memory limit per test512 megabytes inputstandard input outputstandard output Recently, Dima met with Sasha in a philatelic store, and since then th...
阅读(31) 评论(0)

hdu_1698_线段树区间更新

注意, 1 ,区间查询写错,ll,rr和m的比较 2 ,lazy 标记算的长度在右区间不用加1更新分析,如果把线段树的每个点都更新,线段树就不再有logn的优势,所以有用一个标记表示在这个区间内有需要更新的,等你查询要用时再重新更新,#include #include using namespace std; #define L l,m,u<<1 #defin...
阅读(199) 评论(0)

Gym 100112H Horror List—深搜—bfs

It was time for the 7th Nordic Cinema Popcorn Convention, and this year the manager Ian had a brilliant idea. In addition to the traditional film program, there would be a surprise room where a small g...
阅读(25) 评论(0)

Gym 100112D Doorman 模拟—水

The doorman Bruno at the popular night club Heaven is having a hard time fulfilling his duties. He was told by the owner that when the club is full, the number of women and men let into the club sho...
阅读(26) 评论(0)

Gym 100112C Cookie Selection ,不停插入输出中位数

As chief programmer at a cookie production plant you have many responsibilities, one of them being that the cookies produced and packaged at the plant adhere to the very demanding quality standards of...
阅读(24) 评论(0)

Gym 100112A Aaah!

Jon Marius shouted too much at the recent Justin Bieber concert, and now needs to go to the doctor because of his sore throat. The doctor’s instructions are to say “aaah”. Unfortunately, the doctors...
阅读(17) 评论(0)

nitoj_202_二分——将区间分为三个部分

Sequence Time Limit: 500msMemory Limit: 65536KB 64-bit integer IO format: %lld Java class name: Main Prev Submit Status Statistics Next 袁学长又来啦,这次他有一个长度为n的数列a1 a2 … an,他想知道能否在这个数列中找到三个数使它们的和为零,...
阅读(29) 评论(0)

hdu 1754_单点更新,区间查询,查询注意if(rr>m) if (ll <= m)

很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0#include #include<...
阅读(63) 评论(0)

I - Por Costel and the Pairs Gym - 100923I _思维啊——可惜我现在还没

We don’t know how Por Costel the pig arrived at FMI’s dance party. All we know is that he did.The dance floor is hot because Por Costel broke the air conditioner. On the dance floor, the boys and girls...
阅读(22) 评论(0)

L - Por Costel and the Semipalindromes Gym - 100923L

Por Costel the pig, our programmer in-training, has recently returned from the Petrozaporksk training camp. There, he learned a lot of things: how to boil a cob, how to scratch his belly using his keyb...
阅读(41) 评论(0)
225条 共15页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:19253次
    • 积分:2235
    • 等级:
    • 排名:第18599名
    • 原创:211篇
    • 转载:14篇
    • 译文:0篇
    • 评论:2条
    最新评论