Search found 139 matches

by metaphysis
Thu May 11, 2017 1:05 am
Forum: Volume 5 (500-599)
Topic: 552 - Filling the Gaps
Replies: 12
Views: 3820

Re: 552 - Filling the Gaps

At first, I was warried about the test cases may be large, but after submitted the code and got AC, I realized the number of test cases is small.
by metaphysis
Thu May 04, 2017 4:41 am
Forum: Volume 5 (500-599)
Topic: 521 - Gossiping
Replies: 2
Views: 1973

Re: 521 - Gossiping

A simple question, but description of problem is vague. It says that "After passing the last stop listed on the line the bus goes again to the first stop listed on the line.", I misunderstood it, so I got 3 WAs. How poor my English! For example, a bus line is "1 2 3 4 5 6", a driver start at bus sto...
by metaphysis
Tue May 02, 2017 5:37 am
Forum: Volume 5 (500-599)
Topic: 520 - Append
Replies: 2
Views: 2280

Re: 520 - Append

Jan is right. At first, I misunderstood the problem, so got WA two times.
by metaphysis
Sun Apr 30, 2017 3:07 pm
Forum: Volume 5 (500-599)
Topic: 519 - Puzzle (II)
Replies: 2
Views: 1913

Re: 519 - Puzzle (II)

To make the description of problem clearer. The test data: 1 2 FOFF FFFI 2 1 FFOF IFFF 2 1 FFIF OFFF 2 2 FFFF FFFF FFFF FFFF 0 0 output: YES YES YES NO means the corner piece have two flat sides, and two sides with jut or cavity; pieces at row 1 have a top flat side and other three sides with jut or...
by metaphysis
Wed Apr 26, 2017 11:38 am
Forum: Volume 5 (500-599)
Topic: 511 - Do You Know the Way to San Jose?
Replies: 8
Views: 2927

Re: 511 - Do You Know the Way to San Jose?

The test data is not strong. For a given location, the area of every map which contains the location is distinct, so for a given level, it exists a only map or not. You even can ignore the preferred rule!
by metaphysis
Tue Apr 25, 2017 10:10 am
Forum: Volume 5 (500-599)
Topic: 508 - Morse Mismatches
Replies: 3
Views: 2742

Re: 508 - Morse Mismatches

The description of problem needs fix. It said that: "If multiple context words match morse perfectly, then select the matching word with the fewest characters. If this still results in an ambiguous match, any of these matches may be displayed. If multiple context words exist for a given morse, the f...
by metaphysis
Fri Apr 21, 2017 3:57 am
Forum: Volume 5 (500-599)
Topic: 503 - Parallelepiped walk
Replies: 1
Views: 1556

Re: 503 - Parallelepiped walk

Test data generator: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main(int argc, char *argv[]) { srand(time(NULL)); for (int c = 1; c <= 1000; c++) { int L = rand() % 1001, W = rand() % 1001, H = rand() % 1001; int x1, y1, z1, x2, y2, z2; int plane1 = rand() % 6; ...
by metaphysis
Mon Apr 17, 2017 3:59 am
Forum: Volume 5 (500-599)
Topic: 500 - Table
Replies: 1374
Views: 25432

Re: 500 - Table

OK, ACed!
There is no need to remove the rows which all columns are empty.
by metaphysis
Sun Apr 16, 2017 5:53 pm
Forum: Volume 5 (500-599)
Topic: 500 - Table
Replies: 1374
Views: 25432

Re: 500 - Table

The test data generator: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; const char separator = (char)(179), right_line_separator = (char)(180), top_right_corner = (char)(191), bottom_left_corner = (char)(192), bottom_line_separator = (char)(193), top_line_separator = (c...
by metaphysis
Sun Apr 16, 2017 5:52 pm
Forum: Volume 5 (500-599)
Topic: 500 - Table
Replies: 1374
Views: 25432

Re: 500 - Table

Still WA, I don't know why. There is my code:

Code: Select all

Deleted after ACed.
by metaphysis
Sun Apr 16, 2017 4:47 pm
Forum: Volume 5 (500-599)
Topic: 500 - Table
Replies: 1374
Views: 25432

Re: 500 - Table

Thank you for your reply! But how can I translate the uuencoded input to C++ style?
by metaphysis
Sun Apr 16, 2017 2:20 pm
Forum: Volume 5 (500-599)
Topic: 502 - DEL command
Replies: 21
Views: 9173

Re: 502 - DEL command

Code: Select all

-AAAAAAA.223
-AAAAAAA.22
-AAAAAAA.227
-AAAAAAA.233
+AAAAAAA.2

Code: Select all

DEL·AAAAAAA.2?*
by metaphysis
Sat Mar 25, 2017 3:09 am
Forum: Volume 4 (400-499)
Topic: 463 - Polynomial Factorization
Replies: 7
Views: 2662

Re: 463 - Polynomial Factorization

Test data generator: #include <iostream> #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> using namespace std; const int MAX_CASES = 100, DEGREE = 4, BASE = 50; struct polynomial { vector<int> coefficients; polynomial() {} polynomial(int a1, int a0) { coefficients.clear(); ...
by metaphysis
Fri Mar 17, 2017 4:04 am
Forum: Volume 9 (900-999)
Topic: 964 - Custom Language
Replies: 25
Views: 11749

Re: 964 - Custom Language

The specification of input data format is not so clear. I submited so many times (>=27) and used a lot of assert, finally, I got AC, YEAH! There is some tips: 1. End of instruction block or data block is a line start with '#', no leading space, but may with tailing space, so use line.front() == '#' ...
by metaphysis
Thu Mar 16, 2017 3:49 pm
Forum: Volume 9 (900-999)
Topic: 943 - Number Format Translator
Replies: 4
Views: 2901

Re: 943 - Number Format Translator

It is a problem belong to Portuguese but I solved it, yeah!

Go to advanced search