## Search found 139 matches

Tue Nov 14, 2017 10:01 am
Forum: Volume 109 (10900-10999)
Topic: 10950 - Bad Code
Replies: 19
Views: 10071

### Re: 10950 - Bad Code

Hope follow case helps.

Code: Select all

``````2
a 10
b 1
100010
2
a 10
b 1
10031
0
``````
Accetped output:

Code: Select all

``````Case #1
aa
ba

Case #2

``````
As mentioned aboved, no character with a code equal to 0.
Mon Sep 25, 2017 2:29 am
Forum: Volume 7 (700-799)
Topic: 753 - A Plug for UNIX
Replies: 20
Views: 10208

### Re: 753 - A Plug for UNIX

Here is some input - output for those getting WA. Also note that you don't need to use edmonds-karp/ford-fulkerson algorithm to solve this problem. It's a bipartite graph and can be solved by an n^3 algorithm explained here. http://www.geeksforgeeks.org/maximum-bipartite-matching/ Output for this i...
Tue Aug 08, 2017 6:42 pm
Forum: Volume 13 (1300-1399)
Topic: 1342 - That Nice Euler Circuit
Replies: 1
Views: 936

### Re: 1342 - That Nice Euler Circuit

Test data generator. #include <iostream> #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> using namespace std; struct point { int x, y; bool operator == (point p) { return x == p.x && y == p.y; } }; int main(int argc, char *argv[]) { srand(time(NULL)); for (int c = 1; c <= ...
Mon Jul 24, 2017 4:57 am
Forum: Volume 104 (10400-10499)
Topic: 10437 - Playing With Fraction
Replies: 9
Views: 2314

### Re: 10437 - Playing With Fraction

The test data of this problem seems not very strong, otherwise BigInteger should be used to get accepted.
Sat Jun 10, 2017 2:24 pm
Forum: Volume 6 (600-699)
Topic: 685 - Least Path Cost
Replies: 3
Views: 2054

### Re: 685 - Least Path Cost

Test data generator: #include <iostream> #include <ctime> #include <cstdlib> #include <cstring> using namespace std; int main(int argc, char *argv[]) { srand(time(NULL)); int M, N, D, start, end, height, linked[410][410]; int cases = 1000; cout << cases << '\n'; for (int c = 1; c <= cases; c++) { M ...
Wed Jun 07, 2017 7:48 am
Forum: Volume 6 (600-699)
Topic: 675 - Convex Hull of the Polygon
Replies: 12
Views: 5291

### Re: 675 - Convex Hull of the Polygon

Test data generator: #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main(int argc, char *argv[]) { srand(time(NULL)); int x, y; for (int c = 1; c <= 1000; c++) { if (c > 1) cout << '\n'; for (int i = 1; i <= 1000; i++) { x = rand() % 1000 * (rand() % 2 == 0 ? 1 : -1...
Tue Jun 06, 2017 6:34 pm
Forum: Volume 6 (600-699)
Topic: 653 - Gizilch
Replies: 2
Views: 1748

### Re: 653 - Gizilch

I used signed int for score and got accepted.
Tue Jun 06, 2017 5:01 am
Forum: Volume 5 (500-599)
Topic: 589 - Pushing Boxes
Replies: 14
Views: 5353

### Re: 589 - Pushing Boxes

I agreed with extremegf.
Fri Jun 02, 2017 6:30 pm
Forum: Volume 3 (300-399)
Topic: 316 - Stars
Replies: 13
Views: 3336

### Re: 316 - Stars

Test data generator: #include <iostream> #include <ctime> #include <cstdlib> #include <set> #include <string> using namespace std; int main(int argc, char *argv[]) { srand(time(NULL)); int cases = 5; set<long long int> produced; for (int c = 1; c <= cases; c++) { int n = rand() % 100 + 1; cout << n ...
Fri Jun 02, 2017 6:29 pm
Forum: Volume 3 (300-399)
Topic: 319 - Pendulum
Replies: 5
Views: 2351

### Re: 319 - Pendulum

Test data generator: #include <iostream> #include <ctime> #include <cstdlib> #include <map> using namespace std; int main(int argc, char *argv[]) { srand(time(NULL)); int cases = 1000, x1, y1; for (int c = 1; c <= cases; c++) { int n = rand() % 100; int lengthOfString = rand() % 10000 + 1; cout << n...
Fri Jun 02, 2017 6:25 pm
Forum: Volume 6 (600-699)
Topic: 631 - Microzoft Calendar
Replies: 11
Views: 5936

### Re: 631 - Microzoft Calendar

Test data generator: #include <iostream> using namespace std; bool isLeapYear(int yyyy) { return ((yyyy % 4 == 0 && yyyy % 100 != 0) || yyyy % 400 == 0); } int main(int argc, char *argv[]) { for (int i = 1600; i <= 5000; i += 100) { for (int j = 1; j <= 12; j++) { if (j == 2) { for (int k = 1; k <= ...
Fri Jun 02, 2017 1:28 am
Forum: Volume 6 (600-699)
Topic: 633 - A Chess Knight
Replies: 10
Views: 6499

### Re: 633 - A Chess Knight

You need to notice the type T movement, if Knight stands (1, 1) at start in a board with size 20*20, It can move to (20, 1) or (1, 20), but not (2,1), (1,2), (4,1), (1, 4), ... remember that the movement is mirror reflection with respect to board and one of axes parrelle to board sides. Secondly, th...
Sat May 27, 2017 2:02 am
Forum: Volume 3 (300-399)
Topic: 316 - Stars
Replies: 13
Views: 3336

### Re: 316 - Stars

Comfirmed by using assert in C++:
(1) There is no dupciliated point in star map or constellation in judge data.
(2) There is no need to handle symmetrical constellations, because all constellation are not symmetrical in judge data.
Fri May 12, 2017 4:19 pm
Forum: Volume 5 (500-599)
Topic: 561 - Jackpot
Replies: 7
Views: 3115

### Re: 561 - Jackpot

Test data generator. #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main(int argc, char *argv[]) { srand(time(NULL)); int cases = 100; cout << cases << '\n'; for (int c = 1; c <= cases; c++) { int x = rand() % 198 + 3; int y = rand() % 198 + 3; int z = rand() % 198 ...
Thu May 11, 2017 5:04 pm
Forum: Volume 5 (500-599)
Topic: 549 - Evaluating an Equations Board
Replies: 13
Views: 4706

### Re: 549 - Evaluating an Equations Board

The solution on uDebug seems buggy.

Code: Select all

``````+1xx0358+80
10
``````
Output of uDebug is "solution", but it's impossible to get "10" just using "+1xx0358+80".