There are too many datacases to solve it like you do.
Try to build answ integer (some candidates) using prime factors of n.
Search found 15 matches
- Thu Sep 21, 2006 9:00 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11099 - Next Same-Factored
- Replies: 24
- Views: 13141
- Thu Sep 21, 2006 8:26 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11099 - Next Same-Factored
- Replies: 24
- Views: 13141
- Thu Sep 21, 2006 8:10 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11099 - Next Same-Factored
- Replies: 24
- Views: 13141
Last Contest - Problems A and F
What is wrong with solutions of this simple problems?
<cut>
Maybe there are simple bugs, but I can't find it.
Thanks for help.
<cut>
Maybe there are simple bugs, but I can't find it.
Thanks for help.
- Sun Nov 28, 2004 7:16 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10444 - Multi-peg Towers of Hanoi
- Replies: 11
- Views: 3841
- Sat Nov 27, 2004 5:03 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10444 - Multi-peg Towers of Hanoi
- Replies: 11
- Views: 3841
10444 - Multi-peg Tower of Hanoi - WA
Hi!
I use dp and I have no idea, why it get WA. (where it could be mistake in my program)
Maybe some tricky inputs?
Please, give me some tests.
Best Regards!
I use dp and I have no idea, why it get WA. (where it could be mistake in my program)
Maybe some tricky inputs?
Please, give me some tests.
Best Regards!
- Sat Sep 18, 2004 1:57 pm
- Forum: C++
- Topic: Compile Error... STL?
- Replies: 6
- Views: 3359
- Fri Sep 17, 2004 2:38 pm
- Forum: C++
- Topic: Compile Error... STL?
- Replies: 6
- Views: 3359
Re: Compile Error... STL?
It doesn't work.. It's still CECDiMa wrote: OJ uses an old version of gcc... try this:
[cpp]
#include <hash_map.h>
[/cpp]
I don't know how to use STL without CE
Please help...
Best Regards
- Fri Sep 17, 2004 10:43 am
- Forum: C++
- Topic: Compile Error... STL?
- Replies: 6
- Views: 3359
Compile Error... STL?
Why this code get Compile Error?
Please help...
#include <stdio.h>
#include <string>
#include <hash_map>
using namespace std;
const int maxn = 11;
int n,test;
hash_map<string,int> person;
char names[maxn][15];
char name[15];
int main()
{
int x,y;
int ile,cash;
while (scanf ("%d",&n ...
Please help...
#include <stdio.h>
#include <string>
#include <hash_map>
using namespace std;
const int maxn = 11;
int n,test;
hash_map<string,int> person;
char names[maxn][15];
char name[15];
int main()
{
int x,y;
int ile,cash;
while (scanf ("%d",&n ...
- Thu Aug 19, 2004 5:28 pm
- Forum: Volume 6 (600-699)
- Topic: 663 - Sorting Slides
- Replies: 18
- Views: 12477
I solved this problem by applying repeated Bipartite-Match algorithm. (N+1) of them to be precise.. where N indicates the number of slides.
8)
I have got AC, but my time is not very well - 0.447 s - I do M Bipartite Match algorithm, where M is number of egdes in graph. It can be much more than N ...
8)
I have got AC, but my time is not very well - 0.447 s - I do M Bipartite Match algorithm, where M is number of egdes in graph. It can be much more than N ...
- Mon Aug 16, 2004 4:27 pm
- Forum: Volume 6 (600-699)
- Topic: 663 - Sorting Slides
- Replies: 18
- Views: 12477
- Sat Aug 14, 2004 11:04 pm
- Forum: Volume 6 (600-699)
- Topic: 663 - Sorting Slides
- Replies: 18
- Views: 12477
- Thu Jul 01, 2004 6:16 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10679 - I Love Strings!!
- Replies: 101
- Views: 68958
This links should be helpful
http://www.cs.uku.fi/~kilpelai/BSA04/le ... rint04.pdf
www-sr.informatik.uni-tuebingen.de/~buehler/AC/AC1.html
first one is about Aho-Corasic
second one is simulation of this algo. It helped me to understand.
http://www.cs.uku.fi/~kilpelai/BSA04/le ... rint04.pdf
www-sr.informatik.uni-tuebingen.de/~buehler/AC/AC1.html
first one is about Aho-Corasic
second one is simulation of this algo. It helped me to understand.
- Wed Jun 30, 2004 12:58 pm
- Forum: Volume 1 (100-199)
- Topic: 108 - Maximum Sum
- Replies: 233
- Views: 51617
- Wed Jun 30, 2004 12:53 pm
- Forum: Volume 1 (100-199)
- Topic: 108 - Maximum Sum
- Replies: 233
- Views: 51617
- Wed Jun 30, 2004 12:33 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10604 - Chemical Reaction
- Replies: 24
- Views: 19041