Search found 6 matches

by Zheng
Wed May 08, 2002 10:47 am
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 51312

I added a "endl" at the end, but the message is still P.E. :cry:

BIG5:
by Zheng
Wed May 08, 2002 10:12 am
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 41797

to Stefan Pochmann:
using the priority queue(a heap) in C++
I can slove the problem in 0.00 sec

but not O(n)
how does dynamic programming work in this problem?

some persons used this
[cpp]void main()
{
cout<<"The number is xxxxxxx";
}[/cpp]
they said the algorithm was "Preprocessing"
by Zheng
Wed May 08, 2002 9:19 am
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 51312

but what the minor thing is?
by Zheng
Wed May 08, 2002 8:53 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317862

this is my program:
[cpp]
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;

#ifndef ONLINE_JUDGE
ifstream FIN("3N.in"); //debug
#else
istream& FIN = cin;
#endif

ostream& OUT = cout;

void main()
{
int count[10002];

for(int i=1;i<=10000;i++)
{
int t = i;
int j ...
by Zheng
Wed May 08, 2002 8:43 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317862

try this:

[cpp]
#include <fstream>
using namespace std;

void main()
{
int i, j;
int maxlength;
istream& fin = cin; //stdin

while (!fin.eof())
{
fin>>i>>j;
fin.ignore(1,'\n');

maxlength=0;
for(int y=i; y<=j; y++)
{
int count=1;
int z=y;
while(z!=1)
{
if (z%2==0 ...
by Zheng
Mon May 06, 2002 12:44 pm
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 51312

105

I try to do the problem 105, but received this:

Warning: Your program would get a Presentation Error in a true contest.
The 24-hours judge interpretes it as an "Accepted" problem.

what does it mean?

[cpp]
#include <fstream>
#include <iostream>

using namespace std;

#ifndef ONLINE_JUDGE ...

Go to advanced search