## Search found 15 matches

- Fri Oct 23, 2009 7:00 am
- Forum: Volume 101 (10100-10199)
- Topic: 10136 - Chocolate Chip Cookies
- Replies:
**6** - Views:
**4159**

### Re: 10136 - Chocolate Chip Cookies

My algorithm is the following: 1) Consider all pairs of points, for each pair of points (A, B): if they are at <=5 cm distance from each other, then find the centers of two possible circles with points A and B on the circumference, count how many of the points given are inside these circles 2) Draw ...

- Sun Oct 05, 2008 12:55 am
- Forum: Volume 115 (11500-11599)
- Topic: 11519 - Logo 2
- Replies:
**6** - Views:
**2656**

### 11519 - Logo 2

Our team submitted this problem 5 times during the contest, and got WA each time. The idea behind our approach is the following: if the missing number is in the command "lt" or "rt", just brute-force over all possible degrees [0,359] and return the degree with which we come back to point (0,0). If t...

- Sat Oct 04, 2008 7:12 pm
- Forum: General
- Topic: Waterloo ACM Programming Contest Fall 2
- Replies:
**0** - Views:
**2265**

### Waterloo ACM Programming Contest Fall 2

Waterloo ACM Programming Contest Fall 2: please put new problems for this contest, not the ones that were last week!

- Mon Sep 01, 2008 11:54 pm
- Forum: ACM ICPC Archive Board
- Topic: 4094 - WonderTeam
- Replies:
**1** - Views:
**4365**

### 4094 - WonderTeam

I have been trying to solve this problem http://acmicpc-live-archive.uva.es/nuevoportal/data/problem.php?p=4094 from "Asia - Tehran - 2007/2008" since early morning. I think greedy should work. According to my observations, the wonderteam should have 0 draws not to increase its points count. Hence, ...

- Sun Dec 30, 2007 7:43 am
- Forum: Volume 113 (11300-11399)
- Topic: 11371 - Number Theory for Newbies
- Replies:
**65** - Views:
**22700**

How can I optimize my solution to run in <=1 sec? Here is my code: #define For(i,b) for(int i = 0; i < (int)b; ++i) #define All(t) t.begin(),t.end() string itos (int i) {stringstream s; s << i; return s.str();} int stoi (string s) {istringstream in(s); int ret; in >> ret; return ret;} string itos (i...

- Sat Nov 24, 2007 4:10 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11353 - A Different Kind of Sorting
- Replies:
**17** - Views:
**7551**

### 11353 - A Different Kind of Sorting

Here is the problem: http://icpcres.ecs.baylor.edu/onlinejudge/contests/190-53d26a44/11353.html I got TLE twice. But I don't see how I can optimize my solution. Could you please help me with this. Here is my code (w/o includes and other formal things): #define Fori(i,a,b) for(int i = a; i < (int)b; ...

- Wed Nov 14, 2007 5:08 am
- Forum: Volume 113 (11300-11399)
- Topic: 11349 - Symmetric Matrix
- Replies:
**43** - Views:
**19258**

Oh, I see: [-2^32 ... 2^32] doesn't fit signed 32-bit integer ([-2^32...2^31-1]), I overlooked that. However I still get WA.

I changed this

to this

That is the only I change I need to do to use 64-bit integers.

I changed this

Code: Select all

`int m[110][110]; `

Code: Select all

`long long m[110][110]; `

- Tue Nov 13, 2007 9:49 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11349 - Symmetric Matrix
- Replies:
**43** - Views:
**19258**

What is wrong with this code, I got WA?

Please give sample input with the correct output that make my program fail.

Code: Select all

```
thanx, luishhh and sclo! got AC
```

- Tue Nov 13, 2007 7:17 am
- Forum: Volume 113 (11300-11399)
- Topic: 11342 - Three-square
- Replies:
**14** - Views:
**6633**

### 11342 - Three-square

this is my function that given k returns the vector that contains a,b,c such that a*a+b*b+c*c = k, however it's too slow (TLE), what optimization will speed it up?

Code: Select all

```
got AC
```

- Tue Nov 13, 2007 6:56 am
- Forum: Volume 113 (11300-11399)
- Topic: 11341 - Term Strategy
- Replies:
**20** - Views:
**7818**

- Mon Nov 12, 2007 5:41 am
- Forum: Volume 113 (11300-11399)
- Topic: 11340 - Newspaper
- Replies:
**154** - Views:
**43485**

- Mon Nov 12, 2007 5:39 am
- Forum: Volume 113 (11300-11399)
- Topic: 11340 - Newspaper
- Replies:
**154** - Views:
**43485**

What input routine should I use then?so each element of string is char (not unsigned char) and you must handle this.

I can't use the code below since the character can be whitespace (' '):

Code: Select all

```
ll cost;
unsigned char ch;
cin>>ch>>cost;
cnt[(int)ch]=cost;
```

- Sun Nov 11, 2007 8:01 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11340 - Newspaper
- Replies:
**154** - Views:
**43485**

I used stl map, got TLE, now switched to simple hash table, got WA 3 times. what is wrong with my code?

Code: Select all

```
thanx all, got AC
```

- Sun Oct 07, 2007 6:19 am
- Forum: Volume 100 (10000-10099)
- Topic: 10020 - Minimal coverage
- Replies:
**57** - Views:
**20581**

### TLE after a week of struggle

I have been solving this problem ("Minimal coverage "): http://acm.uva.es/p/v100/10020.html for about a week. I got TLE and WA all the time. I assume the numbers in pairs are doubles. With the last version of my code I got TLE. Could you please point out how I can improve the efficiency and get AC? ...

- Tue Sep 25, 2007 3:20 am
- Forum: Volume 101 (10100-10199)
- Topic: 10183 - How Many Fibs?
- Replies:
**66** - Views:
**23631**

### How to debug the program to find the reason of RE

I'm using BigInteger class ( http://online-judge.uva.es/board/viewtopic.php?t=5922&start=0&postdays=0&postorder=asc&highlight=mahbub+murshed+suman ). I've run my program with all the tests from the board, it solves all the tests correctly. But I'm getting Runtime Error from judge. What is the reason...