Another Training Contest

酱油 posted @ Sat, 08 Aug 2015 13:17:47 +0800 in OI life with tags NOIP 2015 Training Contest , 898 readers

Aug. 8th, 2015

An NOIP2015 Training Contest Prepared by hhw && mxh1999
A very tough contest, right?

Time: 8:00 a.m. ~ 11:30 a.m.

Number of Prob.s: 3


I didn't know why I became the last contestant... T_T

A car starts with velocity v1 and ends with velocity v2. The car can change its velocity immediately in the area of ±d. There is t that shows total time the car spends on the road.
Then what's the longest distance can the car travel?
v1 v2
t d
S(indicating the longest distance)
Sample Input:
5 6
4 2
Sample Output:
(+2 +1 -2)
For all 20 testcases: 1<=v1,v2<=100; 2<=t<=100; 0<=d<=10; It is confirmed that there is only one fixed answer for each of the testcases.


Prob. A was considered as "a bottle of purified water", but I didn't get 100 pts.. In fact I had never realized that until I got the result. Why, only 60 pts.?

After comparing my program with Mars_cat's, I was perfectly shocked! I just made a mistake in searching for the answer, which led to missing of 40 pts. because of WA.

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <algorithm>
#define DONS 1010
using namespace std;
int v1,v2,t,d,i,j,sum,f[DONS],g[DONS];
int main()
	for(i=1;i<=t;i++)if(f[i]-g[i]==0 || (f[i+1]-g[i+1])*(v1-v2)<0)break;
	for(j=1;j<=t;j++)sum+=min(f[j],g[j]);/*Mistake: for(j=1;j<=i;j++)sum+=f[j];for(j=i+1;j<=t;j++)sum+=g[j];*/
	fclose(stdin);fclose(stdout);return 0;

Wondering why I was wrong? Here is an example: (

2 1

2 2

When testing my first version of code, I got WA because my output was 6. But, obviously, the standard answer is 3.

Carelessness led to failure? Now I am sure about that...


Prob. B & Prob. C were difficult. Waiting for discussion to solve.


I am always a WEAK DISH, so I haven't correct the other two programs into std's yet.

Just like my Chinese nickname, participating in the unscientific contest is exactly "getting a bottle of Soy Sauce".

(Comments are welcomed and it is recommended that you reply in English.)


enable cookies chrom said:
Fri, 12 Apr 2019 17:32:29 +0800

How do I use cookies or chrome in chrome? enable cookies chrome You can learn to go here and see it in a very simple way.

enable cookies chrom said:
Sat, 29 Jun 2019 16:15:46 +0800

How do I use cookies or chrome in chrome? enable cookies chrome You can learn to go here and see it in a very simple way.

Anshika said:
Sat, 20 Mar 2021 13:25:34 +0800
A very awesome blog post. We are really grateful for your blog post. Delhi Escorts Delhi Escorts Service Escorts in Delhi Escorts Service in Delhi Delhi EscortYou will find a lot of approaches after visiting your post.
Delhi Escorts said:
Tue, 18 May 2021 18:52:52 +0800

I simply want to tell you that I am new to weblog and definitely liked this blog site. Very likely I’m going to bookmark your blog . You absolutely have wonderful stories. Cheers for sharing with us your blog.

Delhi Escorts said:
Sat, 10 Jul 2021 01:50:52 +0800

The Hot and sexy Girls are here to give all sorts of fun and enjoyment here.

Saket Escorts said:
Sat, 10 Jul 2021 16:59:34 +0800

I read this article. I think You put a lot of effort to create this article. I appreciate your work.

Delhi Escorts said:
Sat, 17 Jul 2021 14:50:36 +0800

The Girls here will give all sorts of fun.

Chennai Escorts said:
Mon, 04 Oct 2021 19:56:25 +0800

This site gives a brilliant and informative message to us.

Escorts in Aerocity said:
Wed, 04 May 2022 20:08:13 +0800

I am interested in such topics so I will address page where it is cool described

Female Escorts said:
Wed, 04 May 2022 20:10:13 +0800

This is such a great web page with such wonderful content. to make your day I have the best link here

Click Here said:
Wed, 04 May 2022 20:13:33 +0800

Hi, This is a High-Profile VIP Independent girl To Your lusty Desires with a curvy and juicy body, To visit me just click on the link.

Swedish Massage Serv said:
Wed, 04 May 2022 20:14:34 +0800

Tremendous, Nice post and the content is very well with simplicity so may everyone read and get it easily.

Escorts in Goa said:
Wed, 04 May 2022 20:15:37 +0800

Fantastic post on this web page but luckly, I am here for those people who want Escorts who may fulfill their sexual desires. To take advantage visit the link.

Goa Call Girls said:
Wed, 04 May 2022 20:17:16 +0800

This post has really great knowledge with getable words, I appreciate the person who worked on it, Keep it continue, To get something Extraordinary click on the link.

Russian Escorts in A said:
Wed, 04 May 2022 20:18:58 +0800

Nice post, Amazing content you have written here, I personally liked it, Great work and i personally shared it with my friend.

Escort Service in De said:
Wed, 04 May 2022 20:20:52 +0800

Hey guys, There is something Extra and far better even you didn't think about it, To check just click on the link.

Escort Service in De said:
Wed, 04 May 2022 20:21:45 +0800

wow, This is such an informative and unique page but guys I have also something unique links.

BSNL Bill View said:
Tue, 09 Aug 2022 19:42:47 +0800

You can view, download, and print the present or old duplicate bills, but bill downloading for BSNL landline or broadband restricted to 12 months usage or six issued telephone bills. BSNL Bill View Nowadays many customers can do BSNL bill payment at quick pay portal on getting SMS to their mobiles, where sometimes the customer wants the copy for which also paid. At that time they are not having due to some common reasons, It is like, misplaced the BSNL bill copy or didn’t get the invoice through post or courier.

MBOSE Model Paper Cl said:
Thu, 25 Aug 2022 18:42:18 +0800

Meghalaya Board Model Paper 2023 Class 8 Pdf Download with Answers for Bengali Medium, English Medium, Hindi Medium, Urdu Medium & Students for Small Answers, Long Answer, Very Long Answer Questions, and Essay Type MBOSE Model Paper Class 8 Questions to Term1 & Term2 Exams at official website. New Exam Scheme or Question Pattern for Sammittive Assignment Exams (SA1 & SA2): Very Long Answer (VLA), Long Answer (LA), Small Answer (SA), Very Small Answer (VSA), Single Answer, Multiple Choice and etc.

Electronic City Esco said:
Sat, 17 Dec 2022 13:18:44 +0800

It is truly superb, unintentionally, to look at the information with this handle.

Majestic Escorts Ser said:
Sat, 17 Dec 2022 13:19:06 +0800

I'm perseveringly looking on the web for stories that can oblige me. There is obviously a substitute to sort out this.

Login *

loading captcha image...
(type the code from the image)
or Ctrl+Enter