Search found 100 matches

by DJWS
Sun Mar 11, 2012 5:49 pm
Forum: Other words
Topic: problems for programming skills
Replies: 4
Views: 5599

Re: problems for programming skills

Currently Rujia Liu has created a problem set. :)
http://uva.onlinejudge.org/index.php?op ... tegory=298
by DJWS
Sun Jan 30, 2011 9:20 am
Forum: Other words
Topic: problems for programming skills
Replies: 4
Views: 5599

problems for programming skills

Hi, I am trying to collect the problems (in UVA's problemset) that can be used to practice the programming skills. Lesser the algorithms, and more the architectures. I have already found some: 10966 (design a simple OS shell), 790/10258 (simulate the contest scoreboard). These problems are really go...
by DJWS
Mon Dec 27, 2010 5:22 pm
Forum: Volume 118 (11800-11899)
Topic: 11855 - Buzzwords
Replies: 21
Views: 5209

11855 sample output is incorrect

In the problem statement,
the sample output of the first test case is:

5
4
4
2
2

It should be

4
3
3
2
2

My program passed all cases from the judge.
So I think it's just a typo in the problem statement.
by DJWS
Fri Nov 26, 2010 3:22 pm
Forum: Volume 105 (10500-10599)
Topic: 10599 - Robots(II)
Replies: 27
Views: 9848

Re: 10599 - Robots (II)

Sure. It can be solved with O(n * n * m).
by DJWS
Sat Aug 28, 2010 4:00 am
Forum: Volume 101 (10100-10199)
Topic: 10154 - Weights and Measures
Replies: 60
Views: 39601

Re: 10154 - Weights and Measures

This problem can be modelled as a scheduling problem. It exists a O(nlogn) greedy algorithm which is better than modified-LIS method mentioned here. See Hodgson's algorithm.
by DJWS
Tue Nov 11, 2008 7:20 am
Forum: Volume 106 (10600-10699)
Topic: 10679 - I Love Strings!!
Replies: 101
Views: 47362

Re: 10679 - I love Strings!!!

ptargino wrote:The test cases of this problems are wrong. Actually, you just need to verify if each substring is prefix of the original. I've done this way and got AC. :D
The prefix of one string is also the substring of one string. It is reasonable that we need to check all the prefixes.
by DJWS
Tue Nov 11, 2008 6:38 am
Forum: Volume 101 (10100-10199)
Topic: 10131 - Is Bigger Smarter?
Replies: 93
Views: 63553

Re: 10131 - Is Bigger Smarter?

To oscartheroot, 1. Add return 0; at the bottom of main function. 2. Remove system("pause"); 3. Your program outputs extra things. 4. You can simply use int type instread of long long type. 5. The problem says there are no more than 1000 elephants. You can simply use a 1000-unit-array instead of a v...
by DJWS
Thu Oct 30, 2008 6:52 am
Forum: Volume 106 (10600-10699)
Topic: 10627 - Infinite Race
Replies: 10
Views: 6999

Re: 10627 - Infinite Race

Code: Select all

14
6
26
61
12
by DJWS
Sun Oct 26, 2008 5:22 am
Forum: Volume 6 (600-699)
Topic: 663 - Sorting Slides
Replies: 18
Views: 10627

Re: 663 - Sorting Slides

Edit: I found the error in my algorithm. AC now.

Here is one of mine implementations:

Code: Select all

Cut.
by DJWS
Mon Oct 06, 2008 5:57 am
Forum: Volume 110 (11000-11099)
Topic: 11090 - Going in Cycle!!
Replies: 23
Views: 13489

Re: 11090 - Going in Cycle!!

This problem is known as 'the minimum mean cycle problem' or 'the minimum mean-weight cycle problem.' There are two different approaches to solve this problem: The first approach is to project this problem to 'the minimum (cost-to-time) ratio problem.' The main idea to solve this problem is: set a p...
by DJWS
Sun Sep 21, 2008 3:35 am
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 35284

Re: 583 - Prime Factors TLE

Because your algorithm is not efficient enough. http://mathworld.wolfram.com/DirectSearchFactorization.html why TLE plz help whene i solved the problem after generating primes. But now if i dont handle only with primes the code gets TLE. #include <cstdio> int absValue(int a){ if(a<0) return -a; else...
by DJWS
Sun Sep 07, 2008 2:57 am
Forum: Bugs and suggestions
Topic: 10418 input description
Replies: 3
Views: 2801

Re: 10418 input description

Today I find that the problem has already reported in the pervious post. Just notify.
http://online-judge.uva.es/board/viewto ... f15a6ec5d3
by DJWS
Wed Sep 03, 2008 10:48 am
Forum: Algorithms
Topic: MinCost MaxFlow code
Replies: 20
Views: 14966

Min-Cost Max-Flow Related Problems

Hi everybody, I collected some advanced graph problems. Maybe you need them for exercises. Max-Flow 00563 Crimewave ------------------------ (Vertices have capacity. Edges have not.) 00820 Internet Bandwidth 10330 Power Transmission -------------- (Vertices have capacity.) 10511 Councilling --------...
by DJWS
Wed Sep 03, 2008 9:40 am
Forum: Volume 106 (10600-10699)
Topic: 10679 - I Love Strings!!
Replies: 101
Views: 47362

Re: 10679 - I love Strings!!!

Because your algorithm is not efficient enough. Try another better algorithm. whay TLE, im just comparing upto substring lenth? #include <cstdio> #include <algorithm> using namespace std; int main(){ freopen("in.txt","rt",stdin); int Case,subNum,i; char S1[100001],*p; char S2[1001]; char S3[1001]; i...
by DJWS
Sat Aug 23, 2008 3:06 pm
Forum: Volume 105 (10500-10599)
Topic: 10594 - Data Flow
Replies: 40
Views: 25401

Re: 10594 - Data Flow

camara wrote:Output:
15
Impossible
15
Impossible
1500
Numbers are okay.
But there should be one period at the end of the word 'Impossible.'

Go to advanced search