Finally found a bug:
there should be 'knights' string all the time, even if result is 1
Search found 6 matches
- Thu Aug 09, 2007 6:41 am
- Forum: Volume 6 (600-699)
- Topic: 696 - How Many Knights
- Replies: 29
- Views: 16535
- Thu Aug 09, 2007 6:15 am
- Forum: Volume 6 (600-699)
- Topic: 696 - How Many Knights
- Replies: 29
- Views: 16535
Please help, getting WA!
Here's my code, please help!
#include <stdio.h>
int max(int a, int b) {
return a>b? a:b;
}
int mid(int p) {
int d = p/2;
return max(d, p-d);
}
int main() {
while (true) {
int n,m,l;
scanf("%d%d", &n, &m);
if (n==0 && m==0)
break;
l=max(n,m);
int r = mid(n*m);
if (n>0)
r=max(r,m);
if ...
#include <stdio.h>
int max(int a, int b) {
return a>b? a:b;
}
int mid(int p) {
int d = p/2;
return max(d, p-d);
}
int main() {
while (true) {
int n,m,l;
scanf("%d%d", &n, &m);
if (n==0 && m==0)
break;
l=max(n,m);
int r = mid(n*m);
if (n>0)
r=max(r,m);
if ...
- Tue Jul 31, 2007 5:14 am
- Forum: Off topic (General chit-chat)
- Topic: What game do you like best?
- Replies: 17
- Views: 66029
Counter Strike!
Surely, Counter Strike and WOW rules!
Guys, just try DotA All Starts form WOW
Guys, just try DotA All Starts form WOW
- Tue Jul 31, 2007 5:11 am
- Forum: Off topic (General chit-chat)
- Topic: How old are you? Statistics.
- Replies: 121
- Views: 195322
my age
i'm 24 and I've solved about 400 when i was 20
- Mon Jul 30, 2007 7:23 am
- Forum: Algorithms
- Topic: MinCost MaxFlow code
- Replies: 20
- Views: 18676
network flow pdf
here's couple:Kallol wrote:can anyone provide me with some links or soft book/tutorial/pdf for network flow algorithm and its variations??
http://ww3.algorithmdesign.net/handouts/MaxFlow.pdf
http://web.mit.edu/15.053/www/AMP-Appendix-C.pdf
http://activities.tjhsst.edu/sct/lectures/netflow.pdf
- Mon Jul 30, 2007 7:19 am
- Forum: Java
- Topic: Problem submitting Java
- Replies: 1
- Views: 4022
Java support
I'm interested in java support, too. Do anyone know information about packages?