Search found 16 matches

by fsps60312
Tue Feb 09, 2016 6:49 am
Forum: Volume 127 (12700-12799)
Topic: 12732 - Guess the Fake Coin
Replies: 3
Views: 3005

Re: 12732 - Guess the Fake Coin

Really... A lot in queue
I wonder why still some people got the result, with some submission pending for one year (I mean @alexhighvis :wink: )
by fsps60312
Wed Dec 16, 2015 1:24 pm
Forum: Volume 15 (1500-1599)
Topic: 1518 - Train delays
Replies: 1
Views: 839

Re: 1518 - Train delays

Need help Getting WA... Random input generated but found nothing :( I took idea from SPFA My code: #include<cstdio> #include<cassert> #include<vector> #include<string> #include<map> #include<queue> using namespace std; //void assert(bool valid){if(valid)return;for(;;)putchar('E');} const double INF=...
by fsps60312
Mon Dec 14, 2015 3:06 pm
Forum: Volume 13 (1300-1399)
Topic: 1310 - One-way traffic
Replies: 2
Views: 4942

Re: 1310 - One-way traffic

I think there might be bugs in the Accepted solutions
for the case:

Code: Select all

4 4
1 2 2
2 3 2
4 3 1
4 1 2
I think the answer should be:

Code: Select all

2 1 1
3 2 1
1 4 1
But on uDebug it gives:

Code: Select all

2 3 2
1 2 2
1 4 2
Why? :-?
by fsps60312
Tue Dec 01, 2015 8:30 am
Forum: Volume 14 (1400-1499)
Topic: 1403 - Tough Water Level
Replies: 0
Views: 5189

Re: 1403 - Tough Water Level

Hello I tried to solve the problem by integration and used Simpson's rule to calculate the integration But keep getting WA :( My code (with annotation): #include<cstdio> #include<stack> #include<cmath> #include<cassert> using namespace std; const double EPS=1e-9,PI=acos(-1.0); char EQUATION[1000000]...
by fsps60312
Mon Nov 23, 2015 8:40 am
Forum: Volume 120 (12000-12099)
Topic: 12033 - Game of CS
Replies: 1
Views: 2296

Re: 12033 - Game of CS

I found a solution on the Internet and coded according to its description of solution. Got AC though, but didn't know why... Let v be child of u, the length between them is c Then according to the parity of c and sg[v], we can get a value from sg[v], called m Then sg =m_1^m_2^m_3...(m_i is the value...
by fsps60312
Thu Aug 27, 2015 9:18 am
Forum: Volume 16 (1600-1699)
Topic: 1621 - Jumping Around
Replies: 1
Views: 7058

Re: 1621 - Jumping Around

Solved :)
Should I remove previous post or code?
by fsps60312
Thu Aug 27, 2015 7:50 am
Forum: Volume 16 (1600-1699)
Topic: 1621 - Jumping Around
Replies: 1
Views: 7058

Re: 1621 - Jumping Around

Hi I think I’ve solved this problem, for safety, I made my code carefully check the validity of output before printing answer. If it’s not a valid answer, it should trigger assert(). The result should be either Accepted or Runtime Error. But it returns Wrong Answer. Why? The code won't trigger asser...
by fsps60312
Fri Aug 07, 2015 4:37 am
Forum: Volume 120 (12000-12099)
Topic: 12096 - The SetStack Computer
Replies: 8
Views: 4382

Re: 12096 - The SetStack Computer

Hello, I have some problem understanding. for the first case, I simulate the procedure manually: PUSH {} DUP {},{} ADD {{}} PUSH {},{{}} ADD {{},{}} DUP {{},{}},{{},{}} ADD {{},{},{{},{}}} DUP {{},{},{{},{}}},{{},{},{{},{}}} UNION {{},{},{{},{}}} It seems the output should be: 0 0 1 0 2 2 3 3 3 Hope...
by fsps60312
Thu Aug 06, 2015 2:18 pm
Forum: Volume 111 (11100-11199)
Topic: 11120 - Very Funny Mr. Feynman
Replies: 11
Views: 3910

Re: 11120 - Very Funny Mr. Feynman

How come I got WA :( All prime numbers below 1000000 tested, no difference with AC output(Thanks dibery :D somebody please tell me why :( #include<cstdio> #include<vector> #define termin(x,...) {printf(x,##__VA_ARGS__);while(1){}} using namespace std; int N; struct Deq { vector<char> db; int l, r; D...
by fsps60312
Thu Aug 06, 2015 4:28 am
Forum: Volume 111 (11100-11199)
Topic: 11120 - Very Funny Mr. Feynman
Replies: 11
Views: 3910

Re: 11120 - Very Funny Mr. Feynman

Hey, I got WA but have no idea where I'm going wrong. After compare more than 50000 cases with uDebug, I found several difference. One of these is 360037 I use calculator to get square root and it returns 600.03083254112867295724210327206 so the answer should be 360037 1 0, right? but uDebug gives 3...
by fsps60312
Thu Mar 26, 2015 2:21 pm
Forum: Volume 13 (1300-1399)
Topic: 1324 - Bring Them There
Replies: 1
Views: 4441

Re: 1324 - Bring Them There

What's the output order for the problem? Can anyone tell me? Or let's compare the output? According to my algorithm, mine is sorted by ship number Random Input: 2 1 7 1 2 2 1 2 1 16 2 1 2 1 2 1 22 1 2 1 2 5 10 24 5 3 5 4 5 3 4 3 4 1 2 4 1 5 1 3 5 2 1 2 2 3 6 15 33 4 1 3 5 4 3 4 1 1 3 4 5 5 6 5 1 2 6...
by fsps60312
Tue Mar 24, 2015 2:57 am
Forum: Volume 120 (12000-12099)
Topic: 12083 - Guardian of Decency
Replies: 2
Views: 1550

Re: 12083 - Guardian of Decency

This is an interesting MIS problem (Maximum Independent Set). You can create a bipartite graph between men and women. Connect men to all those women whose height difference with men is <= 40 and music is different and sport is the same (3 conditions). After that just use the MCBM algorithm to get t...
by fsps60312
Wed Mar 18, 2015 12:06 pm
Forum: Volume 122 (12200-12299)
Topic: 12206 - Stammering Aliens
Replies: 2
Views: 989

Re: 12206 - Stammering Aliens

YEAH!!! Finally solved!
by fsps60312
Fri Feb 20, 2015 3:55 am
Forum: Volume 4 (400-499)
Topic: 436 - Arbitrage (II)
Replies: 17
Views: 5127

Re: 436 - Arbitrage (II)

Though getting AC, I came up with a testcase:

Code: Select all

2
a
b
2
a -2 b
b -2 a
My AC output gives No.
But I think the answer should be Yes.
Because:a(1)->b(-2)->a(4), then you'll have four times more than origin.
Can anyone explain?
by fsps60312
Wed Feb 18, 2015 4:50 pm
Forum: Volume 10 (1000-1099)
Topic: 1083 - Fare and Balanced
Replies: 1
Views: 1807

Re: 1083 - Fare and Balanced

Why WA :( ? Here is my idea: for each road, calculate the max(stored in EDGE .lsum) & min(stored in EDGE .ssum) length of path pass by this road(stored in EDGE .sum) for each road intersection that has no road enter, use dfs to traval through the graph, if encounter a road that lsum==ssum, then add ...

Go to advanced search