Search found 28 matches
- Sun Mar 24, 2013 12:18 am
- Forum: Volume 110 (11000-11099)
- Topic: 11053 - Flavius Josephus Reloaded
- Replies: 22
- Views: 13096
Re: 11053 - Flavius Josephus Reloaded
Hi! Why TLE for this solution? Please help! 1000000 iteration of the main loop is not time-consuming! Here is the code: #include <iostream> #include <cstring> #include <map> using namespace std; long long int n, a, b; char seen [ 1000000000 ]; int ind [ 1000000 ]; int rem; void process(); int main()...
- Fri Feb 22, 2013 12:06 am
- Forum: Volume 100 (10000-10099)
- Topic: 10044 - Erdos Numbers
- Replies: 102
- Views: 52169
Re: 10044 - Erdos Numbers
Hi!
Thanks for your help!
But after removing leading spaces I still get RE!
![:(](./images/smilies/icon_frown.gif)
Thanks for your help!
But after removing leading spaces I still get RE!
![:(](./images/smilies/icon_frown.gif)
- Wed Feb 20, 2013 9:58 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10044 - Erdos Numbers
- Replies: 102
- Views: 52169
Re: 10044 - Erdos Numbers
Hi! Sorry! I got RE! Here is my code: #include <iostream> #include <map> #include <cstring> #include <string> #include <queue> #include <cctype> using namespace std; int p, n; map<string,int> aut; int mat [ 1000 ][ 1000 ]; int nameCnt; int len [ 1000 ]; int color [ 1000 ]; void preprocess(); void pr...
- Fri Jan 25, 2013 10:27 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10139 - Factovisors
- Replies: 80
- Views: 38734
Re: 10139 - Factovisors
Thanks!
It worked!
![:D](./images/smilies/icon_biggrin.gif)
It worked!
![:D](./images/smilies/icon_biggrin.gif)
- Fri Jan 25, 2013 4:09 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10139 - Factovisors
- Replies: 80
- Views: 38734
Re: 10139 - Factovisors
Hi! I can't find the problem with my code! Please help me! :D Here is my code: #include <iostream> #include <cmath> using namespace std; struct Factor { int b, e; }f [ 31 ]; int n, m ; void process(); int main() { while( cin >> n >> m ) { if ( m == 0 ) { cout << m << " does not divide " <<...
- Sat Oct 13, 2012 12:03 am
- Forum: Volume 5 (500-599)
- Topic: 598 - Bundling Newspapers
- Replies: 25
- Views: 11639
Re: 598: Bundling eccentric newspapers
So the sample output was wrong!
Many thanks!!![:D](./images/smilies/icon_biggrin.gif)
Many thanks!!
![:D](./images/smilies/icon_biggrin.gif)
- Fri Oct 12, 2012 9:58 pm
- Forum: Volume 5 (500-599)
- Topic: 598 - Bundling Newspapers
- Replies: 25
- Views: 11639
Re: 598: Bundling eccentric newspapers
Hi! I don't know why I get WA. Does anybody know the bug? Thanks in advance! :D Here is my code: #include <iostream> #include <string> #include <cstring> #include <cstdlib> using namespace std; int m; string names [ 12 ]; int cnt; char query [ 63 ]; void process(); void backtrack( int stInd, int rem...
- Thu Aug 30, 2012 1:27 am
- Forum: Volume 103 (10300-10399)
- Topic: 10382 - Watering Grass
- Replies: 29
- Views: 16871
Re: 10382 - Watering Grass
Many Thanks!
I got AC!![:D](./images/smilies/icon_biggrin.gif)
I got AC!
![:D](./images/smilies/icon_biggrin.gif)
- Tue Aug 28, 2012 2:11 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10382 - Watering Grass
- Replies: 29
- Views: 16871
Re: 10382 - Watering Grass
Hi! I checked the code several times but I can't find any mistake in it. Does anybody know the problem with it? Here is my code: #include <iostream> #include <cmath> using namespace std; int n; int sX [ 10000 ], sR [ 10000 ]; int l, w; struct Line { double l, r; } ln [ 10000 ]; void process(); void ...
- Fri Aug 24, 2012 11:42 pm
- Forum: Volume 115 (11500-11599)
- Topic: 11597 - Spanning Subtree
- Replies: 4
- Views: 4643
Re: 11597 - Spanning Subtree
Hi! Does anybody know how can I reduce my runtime to zero? Here is my code: #include <stdio.h> int main() { int n; int caseNo = 1; scanf( "%d", &n ); while ( n != 0 ) { printf( "Case %d: %d\n", caseNo++, n >> 1 ); scanf( "%d", &n ); } return 0; } Thanks in advan...
- Tue Aug 14, 2012 3:05 am
- Forum: Volume 106 (10600-10699)
- Topic: 10616 - Divisible Group Sums
- Replies: 39
- Views: 24216
Re: 10616 - Divisible Group Sums
Thank you for your help!
I got AC!
I got AC!
- Sat Aug 11, 2012 6:08 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10616 - Divisible Group Sums
- Replies: 39
- Views: 24216
Re: 10616 - Divisible Group Sums
Hi! I get Runtime Error for the problem. I don't know the reason. Could anybody help me? Thanks in advance! :D #include <iostream> using namespace std; int n, q; int a [ 200 ]; int d, m; long long int mat [ 201 ][ 20 ][ 11 ]; void constrMat(); int main() { int setNo = 1; cin >> n >> q; while ( !( n ...
- Fri Jul 27, 2012 7:56 am
- Forum: Volume 8 (800-899)
- Topic: 847 - A Multiplication Game
- Replies: 41
- Views: 26166
Re: 847 - A Multiplication Game
Hi!
Could anybody tell me the reason why the following works:
If n <= 9, Stan wins
Else If n <= 9*2 Ollie wins
Else If n <= 9*2*9 Stan wins
Else If n <= 9*2*9*2, Ollie wins
...etc...
Thanks in advance!![:D](./images/smilies/icon_biggrin.gif)
Could anybody tell me the reason why the following works:
If n <= 9, Stan wins
Else If n <= 9*2 Ollie wins
Else If n <= 9*2*9 Stan wins
Else If n <= 9*2*9*2, Ollie wins
...etc...
Thanks in advance!
![:D](./images/smilies/icon_biggrin.gif)
- Tue Jul 24, 2012 11:17 pm
- Forum: Volume 2 (200-299)
- Topic: 259 - Software Allocation
- Replies: 28
- Views: 13469
Re: 259 - optimizing..
Thanks!
You were right! Newline should be between inputs not after each of them.
![:D](./images/smilies/icon_biggrin.gif)
You were right! Newline should be between inputs not after each of them.
- Tue Jul 24, 2012 2:52 am
- Forum: Volume 2 (200-299)
- Topic: 259 - Software Allocation
- Replies: 28
- Views: 13469
Re: 259 - optimizing..
Thanks!
But your input needs another new line!
But your input needs another new line!